#1 2008-07-17 10:53:48

 DaVo

http://i35.tinypic.com/71u5wo.gif

Zarejestrowany: 2008-02-03
Posty: 1053
WWW

NPC opowiadający kawały.

Skrypt nie jest mój!

Nie widziałem tego na tym forum więc dodaje

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('Chuck Norris ma narysowanom na klatce piersiowej mape teksasu w skali 1:1')
elseif rsay == 3 then
selfSay('Prognozy dzis nie bendzie Ania dostala z pół obrotu')
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 biggrin.gif 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

Następnie w data/npc robimy plik koniuch.lua i piszemy

Kod:

<?xml version="1.0"?>
<npc name="Koniuch" script="data/npc/scripts/kawal.lua" access="3">
<look type="128" head="78" body="71" legs="82" feet="114"/>
</npc>

Pozdrawiam DaVo .


<<

http://img835.imageshack.us/img835/1563/franklampard.png

Offline

 

#2 2008-07-17 11:04:14

Bamboleo

http://i46.tinypic.com/fwixqw.jpg

status 485915
11183814
Call me!
Skąd: Wroclove
Zarejestrowany: 2008-07-13
Posty: 1494
Nick: Dom Spokojnej
Profesja: Starosci
Server: W Kurwidołku
WWW

Re: NPC opowiadający kawały.

DaVo napisał:

Skrypt nie jest mój!

Nie widziałem tego na tym forum więc dodaje

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('Chuck Norris ma narysowanom na klatce piersiowej mape teksasu w skali 1:1')
elseif rsay == 3 then
selfSay('Prognozy dzis nie bendzie Ania dostala z pół obrotu')
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 biggrin.gif 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

Następnie w data/npc robimy plik koniuch.lua i piszemy

Kod:

<?xml version="1.0"?>
<npc name="Koniuch" script="data/npc/scripts/kawal.lua" access="3">
<look type="128" head="78" body="71" legs="82" feet="114"/>
</npc>

Pozdrawiam DaVo .

Az mi sie zal robi to samo dałem i niedość ze kopiujesz psty z innych forum gdzie tez to dawalem ....... OPCJA suzkaj nieboli


Offline

 

#3 2008-07-17 11:10:41

 DaVo

http://i35.tinypic.com/71u5wo.gif

Zarejestrowany: 2008-02-03
Posty: 1053
WWW

Re: NPC opowiadający kawały.

suzkaj, az, psty (ile masz lat? 10??)   . Sorry ale nie widziałem tego ^^ :(


<<

http://img835.imageshack.us/img835/1563/franklampard.png

Offline

 

#4 2008-07-17 11:54:56

 Dantez

http://i37.tinypic.com/2rxttv8.gif

Skąd: Częstochowa
Zarejestrowany: 2008-03-17
Posty: 1946
Nick: Danreg
Profesja: Elite Knight
Server: Celesta
Level: 116

Re: NPC opowiadający kawały.

Stare jak swiat bylo to.

Fajnie ze da sie mowic do niego czesc ;p Na polskie OTS bedzie dobre.

Ostatnio edytowany przez Dantez (2008-07-17 11:55:52)


2009-02-23 - data mianowania na Redaktora
2010-08-26 - data rezygnacji
http://img268.imageshack.us/img268/9939/25985.png

Offline

 

#5 2008-07-17 12:35:28

Bamboleo

http://i46.tinypic.com/fwixqw.jpg

status 485915
11183814
Call me!
Skąd: Wroclove
Zarejestrowany: 2008-07-13
Posty: 1494
Nick: Dom Spokojnej
Profesja: Starosci
Server: W Kurwidołku
WWW

Re: NPC opowiadający kawały.

DaVo napisał:

suzkaj, az, psty (ile masz lat? 10??)   . Sorry ale nie widziałem tego ^^ :(

Szukaj* tylko mnie to denerwuje a lat mam 16..
szpan ze 200 postow? Wystarczylo Szukaj Npc zadajacy zagadki ;]


Offline

 

Stopka forum

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

[ Generated in 0.018 seconds, 7 queries executed ]


Darmowe Forum | Ciekawe Fora | Darmowe Fora
GotLink.pl