Forum nie tylko o Tibii i OTS...

Nie tylko o Tibii i OTS...

  • Nie jesteś zalogowany.
  • Polecamy: Komputery

#1 2007-02-14 00:56:59

Tomek

http://i37.tinypic.com/okc0lk.gif

Zarejestrowany: 2007-02-14
Posty: 8

MOJE POSTY

Tutaj dodam Skrypty ktore mam na ots

Ostatnio edytowany przez Tomek (2007-02-14 11:26:50)

Offline

 

#2 2007-02-14 01:04:14

Tomek

http://i37.tinypic.com/okc0lk.gif

Zarejestrowany: 2007-02-14
Posty: 8

Re: MOJE POSTY

no to tak dodam NPC ktory opowiada kawaly

no to zacztnamy:

wchodzisz do ots/data/npc i tam dodajesz plox xml o nazwie Kawalarz nastepnie otwierasz za pomoca notatnika i tam podajesz kod:<?xml version="1.0"?>
<npc name="Kawalarz" script="data/npc/scripts/kawaly.lua" access="3">
    <look type="128" head="4" body="114" legs="132" feet="115"/>
</npc>

ok potem
wchodzisz ots/data/npc/scripts i tam dodajesz plik kawaly.lua
otwierasz go i tam podajesz kod:focus = 0
talk_start = 0
target = 0
following = false
attacking = false

function onThingMove(creature, thing, oldpos, oldstackpos)

end


function onCreatureAppear(creature)

end


function onCreatureDisappear(cid, pos)
if focus == cid then
selfSay('Good bye then.')
focus = 0
talk_start = 0
end
end


function onCreatureTurn(creature)

end
function msgcontains(txt, str)
return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not
string.find(txt, str .. '(%w+)'))
end


function onCreatureSay(cid, type, msg)
msg = string.lower(msg)

if ((string.find(msg, '(%a*)hi(%a*)')
or string.find(msg, '(%a*)siema(%a*)')
or string.find(msg, '(%a*)czesc(%a*)')
or string.find(msg, '(%a*)cze(%a*)')
or string.find(msg, '(%a*)yo(%a*)')
or string.find(msg, '(%a*)witaj(%a*)'))
and (focus == 0)) and getDistanceToCreature(cid) < 4 then

rsay = math.random(1,4)
if rsay == 1 then says = 'Waazzuup'
elseif rsay == 2 then says = 'Siema'
elseif rsay == 3 then says = 'Czesc'
elseif rsay == 4 then says = 'Witaj'
end


selfSay(says .. ' ' .. creatureGetName(cid) .. '! Chcesz zebym opowiedzial kawal?')
focus = cid
talk_start = os.clock()
end

if (string.find(msg, '(%a*)hi(%a*)')
or string.find(msg, '(%a*)siema(%a*)')
or string.find(msg, '(%a*)czesc(%a*)')
or string.find(msg, '(%a*)yo(%a*)')
or string.find(msg, '(%a*)cze(%a*)')
or string.find(msg, '(%a*)witaj(%a*)')) and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
selfSay('Spadaj do kolejki ' .. creatureGetName(cid) .. '!')
end

if msgcontains(msg, 'tak') and focus == cid then

rsay = math.random(1,14)
if rsay == 1 then
selfSay('Co maja wspólnego UFO i inteligentna blondynka? \n - Ciagle o nich slyszysz, ale nigdy nie widziales.')
elseif rsay == 2 then
selfSay('- Co to jest: czerwone, grube i jak wchodzi to sprawia przyjemnosc? \n - Swiety Mikolaj.')
elseif rsay == 3 then
selfSay('A wiesz, co to jest: lata po pokoju i robi yzb, yzb, yzb... \n - Mucha na wstecznym biegu.')
elseif rsay == 4 then
selfSay('- Sasiedzie! Dokupilem sobie 10 hektarów pola! \n - Wiem. Panski kon powiesil sie za stodola.')
elseif rsay == 5 then
selfSay('Czym róznia sie od siebie dlugopis, trumna i prezerwatywa? \n Wkladem.')
elseif rsay == 6 then
selfSay('Jak sie nazywa po japonsku sekretarka? \n Nagasuka.')
elseif rsay == 7 then
selfSay('Jak sie nazywa po japonsku kibel? \n Nasikojtu.')
elseif rsay == 8 then
selfSay('Jak sie nazywaja po czesku golebie? \n Srajdachówki.')
elseif rsay == 9 then
selfSay('Jak sie nazywa po francusku kibel? \n Lejnamur.')
elseif rsay == 10 then
selfSay('Jak sie nazywa po chinsku pilkarz? \n Kiwajakotako.')
elseif rsay == 11 then
selfSay('Co robi dyrektor z bezpartyjna sekretarka? \n Wciaga ja na czlonka.')
elseif rsay == 12 then
selfSay('Kto byl pierwszym lotnikiem? \n Adam, bo przelecial Ewe.')
elseif rsay == 13 then
selfSay('Co to jest: idzie to spiewa, stoi to smierdzi? \n Pielgrzymka do Czestochowy.')
elseif rsay == 14 then
selfSay('Dlaczego Swiety Mikolaj nie moze miec dzieci? \n Bo ma krzywa laske, wór na plecach i spuszcza sie przez komin.')
end

selfSay('hahaha jeszcze jeden?')
talk_start = os.clock()
end


if (string.find(msg, '(%a*)bye(%a*)') or string.find(msg, '(%a*)nara(%a*)') or string.find(msg, '(%a*)nie(%a*)') or string.find(msg, '(%a*)narazie(%a*)')) and focus == cid and getDistanceToCreature(cid) < 4 then

rsay = math.random(1,4)
if rsay == 1 then says = 'Nara'
elseif rsay == 2 then says = 'Narazie'
elseif rsay == 3 then says = '3maj sie'
elseif rsay == 4 then says = 'CYA'
end

selfSay(says .. ' ' .. creatureGetName(cid) .. '!')
focus = 0
talk_start = 0
end
end

-- script by ostry

function onCreatureChangeOutfit(creature)

end


function onThink()
if (os.clock() - talk_start) > 30 then
if focus > 0 then
selfSay('Nastepny...')
end
focus = 0
end
if focus ~= 0 then
if getDistanceToCreature(focus) > 5 then
selfSay('Nara!')
focus = 0
end
end
if focus == 0 then
cx, cy, cz = selfGetPosition()
randmove = math.random(1,10)
if randmove == 1 then
nx = cx + 1
end
if randmove == 2 then
nx = cx - 1
end
if randmove == 3 then
ny = cy + 1
end
if randmove == 4 then
ny = cy - 1
end
if randmove >= 5 then
nx = cx
ny = cy
end
moveToPosition(nx, ny, cz)
end
end
potem wchodzisz do ots/data/world/npc.xml i tam wpisujesz ten kod <npc name="Kawalarz" x="138" y="55" z="7" dir="1"/>t x,y,z to pozycja w jakiej ma stac npc

jak narazie to wszystko

Offline

 

#3 2007-02-14 01:12:34

Tomek

http://i37.tinypic.com/okc0lk.gif

Zarejestrowany: 2007-02-14
Posty: 8

Re: MOJE POSTY

ok przypomnial mi sie jeszcze 1 skrypt NPC ktory sprzedaje kolorowe bp:
no to jedziemy

wchdzisz do ots/data/npc i tam dodajesz plik BP Seller.xml
Otwierasz przez notatnik i tam wpisujesz
Kod:
<?xml version="1.0"?>
<npc name="Bp Seller" script="data/npc/scripts/bp seller.lua" access="3">
<look type="133" head="0" body="81" legs="114" feet="0"/>
</npc>

ok potem idziesz do ots/data/npc/scripts i tam robisz plik bp seller.lua i tam podajesz
Kod:
focus = 0
talk_start = 0
target = 0
following = false
attacking = false

function onThingMove(creature, thing, oldpos, oldstackpos)

end


function onCreatureAppear(creature)

end


function onCreatureDisappear(cid, pos)
if focus == cid then
selfSay('hi.')
focus = 0
talk_start = 0
end
end


function onCreatureTurn(creature)

end

function msgcontains(txt, str)
return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))
end


function onCreatureSay(cid, type, msg)
msg = string.lower(msg)

if ((string.find(msg, '(%a*)hi(%a*)')) and (focus == 0)) and getDistanceToCreature(cid) < 4 then
selfSay('Siemka ' .. creatureGetName(cid) .. '! Sellne ci backpacki i bagi wszystkich kolorow tylko po 35 i 20 gp!.. Powiedz backpack albo bag a powiem ci co i jak')
focus = cid
talk_start = os.clock()
end

if string.find(msg, '(%a*)hi(%a*)') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
selfSay('No kurwa, ' .. creatureGetName(cid) .. '! Poczekaj,widzisz ze opylam??.')
end
if msgcontains(msg, 'backpack') and focus == cid then
selfSay('Moge ci sprzedac kolory:zielony,zolty,czerwony,fioletowy,niebieski, szary,zloty,jungle i zwykle.Powiedz np.niebieski bp aby go kupic^^')
end
if msgcontains(msg, 'bag') and focus == cid then
selfSay('Moge ci sprzedac kolory:zielony,zolty,czerwony,fioletowy,niebieski, szary,zloty,jungle i zwykle.Powiedz np.zielony bag aby go kupic:]')
end

if msgcontains(msg, 'zwykly bag') and focus == cid then
buy(cid,1987,1,20)
talk_start = os.clock()
end
if msgcontains(msg, 'zielony bag') and focus == cid then
buy(cid,1991,1,20)
talk_start = os.clock()
end
if msgcontains(msg, 'zolty bag') and focus == cid then
buy(cid,1992,1,20)
talk_start = os.clock()
end
if msgcontains(msg, 'czerwony bag') and focus == cid then
buy(cid,1993,1,20)
talk_start = os.clock()
end
if msgcontains(msg, 'fioletowy bag') and focus == cid then
buy(cid,1994,1,20)
talk_start = os.clock()
end
if msgcontains(msg, 'niebieski bag') and focus == cid then
buy(cid,1995,1,20)
talk_start = os.clock()
end
if msgcontains(msg, 'szary bag') and focus == cid then
buy(cid,1996,1,20)
talk_start = os.clock()
end
if msgcontains(msg, 'zloty bag') and focus == cid then
buy(cid,1997,1,20)
talk_start = os.clock()
end
if msgcontains(msg, 'jungle bag') and focus == cid then
buy(cid,3939,1,20)
talk_start = os.clock()
end
if msgcontains(msg, 'zwykly bp') and focus == cid then
buy(cid,1988,1,35)
talk_start = os.clock()
end
if msgcontains(msg, 'zielony bp') and focus == cid then
buy(cid,1998,1,35)
talk_start = os.clock()
end
if msgcontains(msg, 'zolty bp') and focus == cid then
buy(cid,1999,1,35)
talk_start = os.clock()
end
if msgcontains(msg, 'czerwony bp') and focus == cid then
buy(cid,2000,1,35)
talk_start = os.clock()
end
if msgcontains(msg, 'fioletowy bp') and focus == cid then
buy(cid,2001,1,35)
talk_start = os.clock()
end
if msgcontains(msg, 'niebieski bp') and focus == cid then
buy(cid,2002,1,35)
talk_start = os.clock()
end
if msgcontains(msg, 'szary bp') and focus == cid then
buy(cid,2003,1,35)
talk_start = os.clock()
end

if msgcontains(msg, 'zloty bp') and focus == cid then
buy(cid,2004,1,35)
talk_start = os.clock()
end
if msgcontains(msg, 'jungle bp') and focus == cid then
buy(cid,3940,1,35)
talk_start = os.clock()
end



if string.find(msg, '(%a*)bye(%a*)') and focus == cid and getDistanceToCreature(cid) < 4 then
selfSay('Nie to nie zegnaj, ' .. creatureGetName(cid) .. '!')
focus = 0
talk_start = 0
end
end


function onCreatureChangeOutfit(creature)

end


function onThink()
if (os.clock() - talk_start) > 30 then
if focus > 0 then
selfSay('Nastepny ...')
end
focus = 0
end
if focus ~= 0 then
if getDistanceToCreature(focus) > 5 then
selfSay('Cya.')
focus = 0
end
end
end
ok potem idziesz do ots/data/world/npc.xml i tam wpisujesz taki kod:
<npc name="Bp Seller" x="168" y="47" z="7" dir="1"/>
x,y,z to pozycja w jakiej ma stac npc

Offline

 

#4 2007-02-14 01:13:38

Tomek

http://i37.tinypic.com/okc0lk.gif

Zarejestrowany: 2007-02-14
Posty: 8

Re: MOJE POSTY

aha i w razie jakis problemow prosze pisac w tym poscie lub na gg:794005

Offline

 

#5 2007-02-14 01:33:48

Guzur

http://i34.tinypic.com/3321jrs.gif

Zarejestrowany: 2006-04-17
Posty: 1526
WWW

Re: MOJE POSTY

@Topic-

Tomek napisał:

Tutaj dodam posty ktore mam na ots

Posty na ots? Raczej nie Powiedzmy, że są to skrypty.




Całkiem niezłe:) Rozwalają mnie te kawały tego "Kawalarza"xD




PS. Dla niekumatych. Te kawały można edytować według własnych upodobań:)

@Tomek- Używaj opcji EDYTUJ! (po prawej na dole postu) Bo niepotrzebnie nawalasz post pod postem.


"Oczywiście, że wiem kim jesteś... Moją pracą jest wiedzieć"

"Gdyby byki i konie miały ręce i mogły nimi malować i tworzyć dzieła, jak ludzie, to konie malowały by postacie bogów podobne do koni, i takież ciała im dawały, a byki podobne do byków"

Offline

 

#6 2007-02-14 11:07:00

SirChiracle

Zbanowany

Zarejestrowany: 2006-10-27
Posty: 1132
WWW

Re: MOJE POSTY

Boshe... Twoje to to nie jest -.- jakbym miał ściągać wszystkie skrypty z www.forum.otserv.pl / www.otfans.pl
To wiesz ile ich by było ? -.- Proszę mu dać ostrzeżenie żeby edytował posty a nie "Nabija posty"


WYJEBANE W TO FORUM - - -- - -- - - - -- -- -- --  -- ---------------------------------------------------------------------------------------------------------------------------------------------------

Offline

 

#7 2007-02-14 11:27:42

Tomek

http://i37.tinypic.com/okc0lk.gif

Zarejestrowany: 2007-02-14
Posty: 8

Re: MOJE POSTY

1 skrypt z kawalarzem nie jest moj a reszta jest moja

Offline

 

#8 2007-02-14 11:39:02

Guzur

http://i34.tinypic.com/3321jrs.gif

Zarejestrowany: 2006-04-17
Posty: 1526
WWW

Re: MOJE POSTY

Niechętnie wstawiam ostrzeżenia ale muszę :(

Złamałeś jedną z zasad Regulaminu Forum

5.Używaj opcji "Edytuj" aby uniknąć pisania post pod postem jednego użytkownika.

@Tomek- Mały - dla Ciebie. Staraj się unikać takich sytuacji.


"Oczywiście, że wiem kim jesteś... Moją pracą jest wiedzieć"

"Gdyby byki i konie miały ręce i mogły nimi malować i tworzyć dzieła, jak ludzie, to konie malowały by postacie bogów podobne do koni, i takież ciała im dawały, a byki podobne do byków"

Offline

 

#9 2007-02-14 18:40:46

Tomek

http://i37.tinypic.com/okc0lk.gif

Zarejestrowany: 2007-02-14
Posty: 8

Re: MOJE POSTY

Ups... sorry ale zapomnialem

Offline

 

#10 2007-12-23 16:51:23

Legolas

http://i49.tinypic.com/2whmhds.jpg

Skąd: ja mam to coś ?
Zarejestrowany: 2007-12-23
Posty: 1228
Profesja: Kyra
Server: 102
WWW

Re: MOJE POSTY

hehe sciąac?? -.-

Offline

 

#11 2007-12-24 09:32:02

Slayer

Zbanowany

Zarejestrowany: 2007-12-23
Posty: 18

Re: MOJE POSTY

no ja jusz tego kawalarza na www.otfans.pl widziałem 100 razy i tu znowy mugł aby edytować go np. {jakiś nowy kawał itp...


http://img527.imageshack.us/img527/5963/usebar28vhub8.th.jpg
jak zrobić rzeby to było wienksze

Offline

 

Stopka forum

RSS
Powered by PunBB
© Copyright 2002–2008 PunBB
Polityka cookies - Wersja Lo-Fi


Darmowe Forum | Ciekawe Fora | Darmowe Fora
Ferienwohnung Oststraße 37