Salve galera, eu tenho um sisteminha de travel, porem ele ta com um problema que não estou sabendo solucionar. Eu falo com o npc ele responde normalmente, porem quando eu falo o nome do local que quero ir ele não teleporta, nem da sinal de vida.
npcs/Kollys Captain.xml
<npcname="Kollys Captain"script="data/npc/scripts/captain.lua"walkinterval="1000"floorchange="0"><healthnow="150"max="150"/><looktype="98"head="0"body="0"legs="0"feet="0"corpse="6080"/><parameters><parameterkey="message_greet"value="Ola |PLAYERNAME|. ! Eu posso te levar para {Fire Hunt} e a ilha dos {Condenados}, Onde deseja ir?"/><parameterkey="message_decline"value="Vai custar |TOTALCOST| gold coins. Vai viajar?!"/></parameters></npc>
npcs/script/captain.lua
local keywordHandler = KeywordHandler:new()local npcHandler = NpcHandler:new(keywordHandler)NpcSystem.parseParameters(npcHandler) -- OTServ event handling functions startfunction onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) endfunction onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) endfunction onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) endfunction 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({'Fire Hunt'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Voce quer viajar para central por 10000 gold coins?'})travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 300, cost = 0, destination = {x=485, y=659, z=15} })travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'I wouldn\'t go there either.'}) -- Don't forget npcHandler = npcHandler in the parameters. It is required for all StdModule functions!local travelNode = keywordHandler:addKeyword({'Condenados'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Voce quer viajar para ilha dos condenados por 10000 gold coins?'})travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 300, cost = 0, destination = {x=1213, y=255, z=9} })travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'I wouldn\'t go there either.'}) -- Makes sure the npc reacts when you say hi, bye etc.npcHandler:addModule(FocusModule:new())
Pergunta
YagobLINDDD 0
Salve galera, eu tenho um sisteminha de travel, porem ele ta com um problema que não estou sabendo solucionar.
Eu falo com o npc ele responde normalmente, porem quando eu falo o nome do local que quero ir ele não teleporta, nem da sinal de vida.
npcs/Kollys Captain.xml
npcs/script/captain.lua
local keywordHandler = KeywordHandler:new()local npcHandler = NpcHandler:new(keywordHandler)NpcSystem.parseParameters(npcHandler) -- OTServ event handling functions startfunction onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) endfunction onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) endfunction onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) endfunction 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({'Fire Hunt'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Voce quer viajar para central por 10000 gold coins?'})travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 300, cost = 0, destination = {x=485, y=659, z=15} })travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'I wouldn\'t go there either.'}) -- Don't forget npcHandler = npcHandler in the parameters. It is required for all StdModule functions!local travelNode = keywordHandler:addKeyword({'Condenados'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Voce quer viajar para ilha dos condenados por 10000 gold coins?'})travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 300, cost = 0, destination = {x=1213, y=255, z=9} })travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'I wouldn\'t go there either.'}) -- Makes sure the npc reacts when you say hi, bye etc.npcHandler:addModule(FocusModule:new())
Link para o comentário
Compartilhar em outros sites
1 resposta a esta questão
Posts Recomendados