NPCDEPALADIN
data\npc\NPCDEPALADIN.xml
<npc name="NPCDEPALADIN" script="data/npc/scripts/telepaladin.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="134" head="78" body="88" legs="0" feet="88" addons="3"/> <parameters> <parameter key="message_greet" value="Ola. Para mais informacoes de meus servicos diga {go}." /> <parameter key="message_farewell" value="Tchau." /> <parameter key="message_walkaway" value="Tchau." /> </parameters> </npc>
data\npc\scripts\telepaladin.lua
local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local pos = {x=160,y=54,z=7} -------------- Pos para onde o player sera levado function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) if msgcontains(msg, 'go') then if getPlayerVocation(cid) == 3 or getPlayerVocation(cid) == 7 or getPlayerVocation(cid) == 11 then selfSay("Boa viagem.", cid) doTeleportThing(cid, pos) else selfSay("Eu Não Posso Te Teleporta só Fiel A Os Paladin. E Vc Não è UM", cid) end end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
NPCDEKNIGHT
data\npc\NPCDEKNIGHT.xml
<npc name="NPCDEKNIGHT" script="data/npc/scripts/teleknight.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="134" head="78" body="88" legs="0" feet="88" addons="3"/> <parameters> <parameter key="message_greet" value="Ola. Para mais informacoes de meus servicos diga {go}." /> <parameter key="message_farewell" value="Tchau." /> <parameter key="message_walkaway" value="Tchau." /> </parameters> </npc>
data\npc\scripts\teleknight.lua
local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local pos = {x=160,y=54,z=7} -------------- Pos para onde o player sera levado function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) if msgcontains(msg, 'go') then if getPlayerVocation(cid) == 4 or getPlayerVocation(cid) == 8 or getPlayerVocation(cid) == 12 then selfSay("Boa viagem.", cid) doTeleportThing(cid, pos) else selfSay("Eu Não Posso Te Teleporta só Fiel A Os Kinght. E Vc Não è UM", cid) end end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
NPCDEMAGES
data\npc\scripts\telemages.lua
<npc name="NPCDEMAGES" script="data/npc/scripts/telemages.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="134" head="78" body="88" legs="0" feet="88" addons="3"/> <parameters> <parameter key="message_greet" value="Ola. Para mais informacoes de meus servicos diga {go}." /> <parameter key="message_farewell" value="Tchau." /> <parameter key="message_walkaway" value="Tchau." /> </parameters> </npc>
data\npc\scripts\telemages.lua
local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local pos = {x=160,y=54,z=7} -------------- Pos para onde o player sera levado function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) if msgcontains(msg, 'go') then if getPlayerVocation(cid) == 1 or getPlayerVocation(cid) == 2 or getPlayerVocation(cid) == 5 or getPlayerVocation(cid) == 6 or getPlayerVocation(cid) == 9 or getPlayerVocation(cid) == 10 then selfSay("Boa viagem.", cid) doTeleportThing(cid, pos) else selfSay("Eu Não Posso Te Teleporta só Fiel A Os Druds E Magos E Vc Não è UM", cid) end end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())