I was preparing a npc travel, but he doesn't works =/
what is wrong with him?
PS : Don't have errors in console
what is wrong with him?
Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Dimral" script="data/npc/scripts/travel.lua" walkinterval="0" floorchange="0">
<health now="150" max="150"/>
<look type="129" head="114" body="119" legs="114" feet="114" corpse="2212"/>
<parameters>
<parameter key="module_travel" value="1"/>
<parameter key="message_greet" value="Hello |PLAYERNAME|. If you don't know where to flow, say {travel}."/>
</parameters>
</npc>
Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
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
local travelNode = keywordHandler:addKeyword({'Hydra'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'It will cost you 119 gold, are you sure?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 8, cost = 119, destination = {x=553, y=367, z=7}})
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'I guess your not ready for the challenge.'})
local travelNode = keywordHandler:addKeyword({'Dragon'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'It will cost you 230 gold, are you sure?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost = 230, destination = {x=187, y=197,z=7}})
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'I guess your not ready for the challenge.'})
local travelNode = keywordHandler:addKeyword({'Area Maldita'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'It will cost you 230 gold, are you sure?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost = 230, destination = {x=215,y=246, z=15}})
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'I guess your not ready for the challenge.'})
local travelNode = keywordHandler:addKeyword({'Low Level'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'It will cost you 230 gold, are you sure?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost = 230, destination = {x=144, y=233,z=7}})
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'I guess your not ready for the challenge.'})
local travelNode = keywordHandler:addKeyword({'Black Knight'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'It will cost you 230 gold, are you sure?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost = 230, destination = {x=383, y=450,z=10}})
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'I guess your not ready for the challenge.'})
local travelNode = keywordHandler:addKeyword({'Serpent Spawn'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'It will cost you 230 gold, are you sure?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost = 230, destination = {x=710, y=291,z=10}})
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'I guess your not ready for the challenge.'})
local travelNode = keywordHandler:addKeyword({'Meu Bairro'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'It will cost you 230 gold, are you sure?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost = 230, destination = {x=596, y=98,z=7}})
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'I guess your not ready for the challenge.'})
local travelNode = keywordHandler:addKeyword({'Meu Bairro 2'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'It will cost you 230 gold, are you sure?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost = 230, destination = {x=687, y=98,z=7}})
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'I guess your not ready for the challenge.'})
local travelNode = keywordHandler:addKeyword({'Hunts'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'It will cost you 230 gold, are you sure?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost = 230, destination = {x=596, y=519,z=15}})
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'I guess your not ready for the challenge.'})
local travelNode = keywordHandler:addKeyword({'Templo Perdido'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'It will cost you 230 gold, are you sure?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost = 230, destination = {x=608, y=251,z=9}})
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'I guess your not ready for the challenge.'})
local travelNode = keywordHandler:addKeyword({'Gelox'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'It will cost you 230 gold, are you sure?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost = 230, destination = {x=635, y=212,z=10}})
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'I guess your not ready for the challenge.'})
local travelNode = keywordHandler:addKeyword({'Warlock'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'It will cost you 230 gold, are you sure?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost = 230, destination = {x=170, y=261,z=7}})
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'I guess your not ready for the challenge.'})
keywordHandler:addKeyword({'travel'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can bring you to {Hydra}, {Dragon}, {Low Level}, {Black Knight}, {Serpent Spawn}, {Meu Bairro}, {Meu Bairro 2}, {Hunts}, {Templo Perdido}, {Gelox} and {Warlock}.'})
npcHandler:addModule(FocusModule:new())
PS : Don't have errors in console