• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

[Npc] Boat travel.

Midxas

New Member
Joined
Apr 21, 2014
Messages
43
Reaction score
0
Hello Otland!

Im looking for npc, boat traveller which transport you to other place for each monay and if you got xxx lvl. Is that possible to make?

@Edit: Im using tfs 0.4
 
Last edited:
just edit the XXX
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({'XXX'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to sail to XXX for XXX gold coins?'})
            travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = XXX, cost = XXX, destination = {x=XXX, y=XXX, z=XXX} })
            travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Then stay here!'})
       
        keywordHandler:addKeyword({'travel'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can take you to XXX'})
        npcHandler:addModule(FocusModule:new())
 
Back
Top