Nie tylko o Tibii i OTS...
na poczatek tworzymy w data\npc\ plik Inwazjer
i wpisujemy
Kod
<npc name="Inwazjer" script="data/npc/scripts/inwazje.lua" access="3" lookdir="2"> <mana now="800" max="800"/> <health now="200" max="200"/> <look type="129" head="0" body="94" legs="94" feet="114"/> </npc>
i potem w data\npc\scripts tworzymy plik inwazje
i
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*)')) and (focus == 0)) and getDistanceToCreature(cid) < 4 then selfSay('Hello ' .. creatureGetName(cid) .. '! Chcesz inwazji ?? kogo ...: Orc,Dwarf,Minotaur,Elf,Human,Dragon,GS,Demon,Orsh,Orshabaal.') focus = cid talk_start = os.clock() end if msgcontains(msg, 'demon') and focus == cid then selfSay('/m demon') talk_start = os.clock() end if msgcontains(msg, 'orshabaal') and focus == cid then selfSay('/m orshabaal') talk_start = os.clock() end if msgcontains(msg, 'dwarf') and focus == cid then selfSay('/m dwarf') talk_start = os.clock() end if msgcontains(msg, 'orc') and focus == cid then selfSay('/m inwazja orc') talk_start = os.clock() end if msgcontains(msg, 'orsh') and focus == cid then selfSay('/m orsh') talk_start = os.clock() end if msgcontains(msg, 'minotaur') and focus == cid then selfSay('/m minotaur') talk_start = os.clock() end if msgcontains(msg, 'gs') and focus == cid then selfSay('/m giant spider') talk_start = os.clock() end if msgcontains(msg, 'elf') and focus == cid then selfSay('/m elf') talk_start = os.clock() end if msgcontains(msg, 'human') and focus == cid then selfSay('/m human') talk_start = os.clock() end if msgcontains(msg, 'dragon') and focus == cid then selfSay('/m dragon') talk_start = os.clock() end if string.find(msg, '(%a*)bye(%a*)') and focus == cid and getDistanceToCreature(cid) < 4 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 if focus ~= 0 then if getDistanceToCreature(focus) > 5 then selfSay('Good bye then.') focus = 0 end end end
Myslę ze się przyda jak tamte poprzednie ;]
Offline
Ten NPC inwazjer samodzielnie stawia potworki co jakiś czas czy jak się do niego napisze? Bo te co się do nich pisze, żeby stawiały potworki są do kitu bo jakiś low lvl przylezie i postawia orsche itp. albo taki high lvl i postawia i ucieknie, a wtedy masa ludzi ginie:P
Offline
zgadzam sie z guzurem dla mnie tacy "Inwazjerzy" sa bez sensu jakis hight lvl zrobi 5 demcuw i lov levele beda dedac. do otsuw nie polecam ale do zabawy jest fajny.lepiej expc samodzilnie wieksza fraida P.O.Z.D.R.O
Jestem Guzur nie Gazur xD (nie wiem czego ale często na mnie tak mówią w Tibii )- Guzur
Ostatnio edytowany przez Guzur (2007-04-10 22:09:02)
Offline
Hmmmmm mi sie przyda poniewaz gdy sam tworze potwory to sie laguje!!! A moglby ktos powiedziec co zrobic by te potwory tworzyly sie w odpowiednich miejscach i np. nie po 1 ale po ok 5??
Offline
Taki NPC może się przydać na arenę
Tam jak ludzie będą sobie stawiać potworki i jak padną, to nic im nie wyleci... To może służyć jako trening przed pójściem na hunta
Offline