#1 2007-12-07 09:07:31

jasiu1995l

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

Zarejestrowany: 2007-12-05
Posty: 1396

Dragon Rider- Monster [YurOTS]

data/monsters tworzymy plik o nazwe Dragon Rider.


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*)') and (focus == 0)) and getDistanceToCreature(cid) < 3 then
selfSay('Hello, ' .. creatureGetName(cid) .. '! I sell amulets.'
focus = cid
talk_start = os.clock()

elseif string.find(msg, '(%a*)hi(%a*)' and (focus ~= cid) and getDistanceToCreature(cid) < 3 then
selfSay('Sorry, ' .. creatureGetName(cid) .. '! I talk to you in a minute.'

elseif msgcontains(msg, 'crystal nacklace' and focus == cid then
buy(cid,2946,1,200)
talk_start = os.clock()

elseif msgcontains(msg, 'wolves tooth chain' and focus == cid then
buy(cid,2950,1,20)
talk_start = os.clock()

elseif msgcontains(msg, 'golden amulet' and focus == cid then
buy(cid,2951,1,1000)
talk_start = os.clock()

elseif msgcontains(msg, 'elven amulet' and focus == cid then
buy(cid,2952,7,500)
talk_start = os.clock()

elseif msgcontains(msg, 'silver amuler' and focus == cid then
buy(cid,2953,10,100)
talk_start = os.clock()

elseif msgcontains(msg, 'ruby necklace' and focus == cid then
buy(cid,2954,1,100)
talk_start = os.clock()

elseif msgcontains(msg, 'silver brooch' and focus == cid then
buy(cid,2955,1,300)
talk_start = os.clock()

elseif msgcontains(msg, 'scarab amulet' and focus == cid then
buy(cid,2956,1,350)
talk_start = os.clock()

elseif msgcontains(msg, 'demonbones amulet' and focus == cid then
buy(cid,2957,1,10000)
talk_start = os.clock()

elseif msgcontains(msg, 'amulet' and focus == cid then
buy(cid,2959,1,10)
talk_start = os.clock()

elseif msgcontains(msg, 'ruby necklace' and focus == cid then
buy(cid,2960,1,500)
talk_start = os.clock()

elseif msgcontains(msg, 'phoenix amulet' and focus == cid then
buy(cid,2962,1,700)
talk_start = os.clock()

elseif msgcontains(msg, 'strange talisman' and focus == cid then
buy(cid,2983,1,700)
talk_start = os.clock()

elseif msgcontains(msg, 'platinum amulet' and focus == cid then
buy(cid,2993,1,700)
talk_start = os.clock()

elseif msgcontains(msg, 'bronze amulet' and focus == cid then
buy(cid,2993,1,700)
talk_start = os.clock()

elseif msgcontains(msg, 'bronze amulet' and focus == cid then
buy(cid,2995,1,750)
talk_start = os.clock()

elseif msgcontains(msg, 'broken amulet' and focus == cid then
buy(cid,3018,1,750)
talk_start = os.clock()

elseif msgcontains(msg, 'stone skin amulet' and focus == cid then
buy(cid,3019,1,850)
talk_start = os.clock()

elseif msgcontains(msg, 'gralic necklace' and focus == cid then
buy(cid,3021,1,850)
talk_start = os.clock()

elseif msgcontains(msg, 'aol' and focus == cid then
buy(cid,2995,1,850)
talk_start = os.clock()




elseif string.find(msg, '(%a*)bye(%a*)' and focus == cid and getDistanceToCreature(cid) < 3 then
selfSay('Good bye, ' .. 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('Next Please...'
end
focus = 0
end
end

You attack me?
                                              You have problems...

                                              No problems!
                                              No rulez!


                                       Jesli pomoglem prosze o reputka

Offline

 

#2 2007-12-07 14:09:45

SmileY

http://i37.tinypic.com/330fo7t.gif

4011293
Zarejestrowany: 2007-11-09
Posty: 677

Re: Dragon Rider- Monster [YurOTS]

Lol to jest ... NPC ? xDDD Jesli ci chodzilo o NPC to spoko ale jesli o potwora to ci cos chyba nie wyszlo

Offline

 

#3 2007-12-07 14:19:32

Ustii

http://i33.tinypic.com/2v2gq5x.gif

2619571
Skąd: Łódź
Zarejestrowany: 2007-07-23
Posty: 287

Re: Dragon Rider- Monster [YurOTS]

jasiu1995l napisał:

data/monsters tworzymy plik o nazwe Dragon Rider.


selfSay('Good bye then.'



selfSay('Hello, ' .. creatureGetName(cid) .. '! I sell amulets.'



selfSay('Sorry, ' .. creatureGetName(cid) .. '! I talk to you in a minute.'



buy(cid,2946,1,200)

Jeśli się nie mylę, to są komendy npc...
Up@
Byłeś szybszy .

Ostatnio edytowany przez Novis (2007-12-07 14:20:51)


zajonczek ^^
http://img403.imageshack.us/img403/5179/lofl7.gifNie pomagam na gg! Tylko na forum.
http://foteka.pl/full/b158563aa4113c86316e221fcc653a62.jpg

Offline

 

#4 2007-12-07 14:20:40

Kakashi Gaiden

http://i38.tinypic.com/avakh.gif

7378900
Call me!
Zarejestrowany: 2007-11-29
Posty: 72

Re: Dragon Rider- Monster [YurOTS]

No faktycznie nie atakuje ani nic. Trochę pomieszałeś.


http://www.ubar.pl/www/img_14806_normal.gif

Offline

 

#5 2007-12-07 14:25:42

jasiu1995l

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

Zarejestrowany: 2007-12-05
Posty: 1396

Re: Dragon Rider- Monster [YurOTS]

ej no sorki cos mi sie pomieszalo

Offline

 

#6 2007-12-07 15:07:32

Sir Xidoaozu

Zbanowany

Zarejestrowany: 2007-11-28
Posty: 119

Re: Dragon Rider- Monster [YurOTS]

NPC a nie potwór ;pp cos ci nie wyszlo ja to przerobie na potwora


Za duża sygnaturka. Linki usunięte.

Offline

 

#7 2007-12-07 15:13:44

 Rici

Sułtan łechtaczek

Skąd: Ełk
Zarejestrowany: 2007-05-15
Posty: 1753
Nick: Vineium Doron
Profesja: Paladyn
Server: Guardia
Level: 64

Re: Dragon Rider- Monster [YurOTS]

@up nie no co za odkrycie (prawie jak Ameryki)
@topic źle zrobione zero codów popraw


http://img13.imageshack.us/img13/8466/ovoj.jpg

Offline

 

#8 2007-12-10 13:47:18

Burbon

http://i37.tinypic.com/30iway9.gif

9616756
Skąd: Katowice
Zarejestrowany: 2007-10-28
Posty: 92
Nick: xxxxxxx
Profesja: Aldora
Server: 116

Re: Dragon Rider- Monster [YurOTS]

Niedojz ze ci wyszedl NPC to dotego nic nie robi:P -.-


Save Your Planet ~ Kill Yourself

Offline

 

Stopka forum

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


Darmowe Forum | Ciekawe Fora | Darmowe Fora
Uslara House