• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Erro NPC Boat do not travel

Sardinha

New Member
Joined
Feb 19, 2011
Messages
22
Reaction score
2
I have an error in my NPC when I talk to him to travel, after I confirm with 'yes' he doesn't answer anything anymore and he doesn't travel, if I say 'no' he doesn't answer either.

I realized that this error is not only in the NPC of Barco but in everyone that I say 'yes' to give me an action, whether teleporting or storage.

Below my boat npc as an example.

I can post the LIB of the npc if needed.

I'm using TFS 1.3 from Nekiro 8.6

Lua:
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({'dragon land'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 20, cost = 500, destination = {x=32311, y=32211, z=6} })
    travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 20, cost = 500, destination = {x=32311, y=32211, z=6} })
    travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Boa sorte em suas viagens'})

local travelNode = keywordHandler:addKeyword({'south jungle'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Você quer ir para a South Jungle por 500gps?'})
    travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 1, cost = 500, destination = {x=193, y=107, z=7} })
    travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Boa sorte em suas viagens'})

local travelNode = keywordHandler:addKeyword({'dwarven hideout'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Você quer ir para Dwarven Hideout por 500gps?'})
    travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 10, cost = 500, destination = {x=169, y=131, z=7} })
    travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Boa sorte em suas viagens'})

local travelNode = keywordHandler:addKeyword({'elemental forest'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Você quer ir para a Elemental Forest por 500gps?'})
    travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 30, cost = 500, destination = {x=52, y=108, z=7} })
    travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Boa sorte em suas viagens'})

local travelNode = keywordHandler:addKeyword({'hell port'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Você quer ir para Hell Port por 1000gps?'})
    travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 60, cost = 1000, destination = {x=47, y=202, z=7} })
    travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Boa sorte em suas viagens'})

local travelNode = keywordHandler:addKeyword({'central port'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Você quer ir para Central Port por 200gps?'})
    travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 1, cost = 200, destination = {x=119, y=60, z=7} })
    travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Boa sorte em suas viagens'})



keywordHandler:addKeyword({'travel'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Eu posso levá-lo a \'Dragon Land\', \'Dwarven Hideout\', \'Hell Port\', \'Elemental Forest\', \'Frozen Dungeon\', \'Central Port\', \'Hoover City\' ou  \'South Jungle\'.'})


-- Makes sure the npc reacts when you say hi, bye etc.
npcHandler:addModule(FocusModule:new())
 
Back
Top