• 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!

Solved Help with boat NPC

Cwift

New Member
Joined
Feb 12, 2012
Messages
39
Reaction score
4
Location
Australia
XML:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Dimral" script="default.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}."/>
<parameter key="travel_destinations" value="excelsior,803,1237,6,50;"/>
</parameters>
</npc>

This is the NPC i am useing. it takes the money and everything it just doesn't TP the character to the new location. and I don't know why. is there something else i have to change?
 
Last edited by a moderator:
try copying the script of another boat npc and editing it, its easy. Download any ot and u will see it. it is better to put the new location in a script.lua in npc/scripts.
 
Last edited:
Don't use that travel parameters, use a custom script, (not default.lua), try this:

Code:
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({'loney town'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you wish to travel to LT for free?'})
	travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 1, cost = 0, destination = {x=875, y=973, z=6} })
	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 Loney Town.'})

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

You can add more destinations, edit cost, level, prem, etc.
 
for the love of everything that is good in the world, use tags!!
I'm not familiar with this NPC System(I always do mine old-fashioned), so I can't really help here :/
 
Back
Top