Vai na pasta do seu ot e vá em:
Data/npc -> Copie um npc -> renomeie ele para Capitao Batata -> abra-o e em dentro dele bote.
<npc name="Capitao Batata" script="data/npc/scripts/coruja.lua" walkinterval="0" floorchange="0" access="5" level="1" maglevel="1">
<health now="150" max="150"/>
<look type="129" head="114" body="119" legs="114" feet="114" corpse="2212"/>
<parameters>
<parameter key="message_greet" value="E ae cara quer viajar para onde?" />
<parameter key="message_decline" value="Vai custar |TOTALCOST| gold coins. Vai viajar? Voce pode ir em outras cidades indo ao tapete do meu primo!"/>
</parameters>
</npc>
Agora vá em:
Data/npc/scripts -> copie um script qualquer -> renomeie ele para coruja ->abra-o e em dentro dele bote.
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
-- OTServ event handling functions start
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
-- OTServ event handling functions end
-- Don't forget npcHandler = npcHandler in the parameters. It is required for all StdModule functions!
local travelNode = keywordHandler:addKeyword({'vipstyle city'}, StdModule.say, {npcHandler = npcHandler,
onlyFocus = true, text = 'quer ir mesmo se quiser diga {yes}'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium =
true, level = 2, cost = 10000, destination = {x=1000, y=1000, z=15} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true,
reset = true, text = 'I wouldn\'t go there either.'})
keywordHandler:addKeyword({'destination'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true,
text = 'I can take you to \'vipstyle city\' for just a small fee.'})
-- Makes sure the npc reacts when you say hi, bye etc.
npcHandler:addModule(FocusModule:new())
Eu teste aki e deu certo se n da so informa o poblema que concerto.