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

Lua Boat NPC with Premium Destination

ex eclipse

New Member
Joined
Jul 15, 2007
Messages
282
Reaction score
1
Location
Brazil
Hello there guys, im trying to make a boat npc who only transports premium players using the but its not working and its transporting free players too...

here is the code
Code:
<npc name="Captain Jack" script="data/npc/scripts/travel.lua" autowalk="1" floorchange="0" access="5" level="1" maglevel="1">
	<health now="150" max="150"/>
	<look type="129" head="19" body="69" legs="107" feet="50" corpse="2212"/>
	<parameters>
<parameter key="message_decline" value="We would like to serve you some time." />
<parameter key="message_greet" value="Welcome on board, |PLAYERNAME|." />
                <parameter key="message_walkaway" value="Good bye. Recommend us, if you were satisfied with our service." />	
		<parameter key="message_farewell" value="Good bye. Recommend us, if you were satisfied with our service." />
		<parameter key="module_travel" value="1" />
		<parameter key="travel_destinations" value="ice,1203,1820,7,110,true" />
		
			
	</parameters>
</npc>
Travel.lua
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



-- Makes sure the npc reacts when you say hi, bye etc.
npcHandler:addModule(FocusModule:new())
why the function TravelModule:addDestination(name, position, price, premium) from jiddo isnt working? |:
 
Does it actually work that way? Never tried it. ^^ I've always made it in the lua file with the old system when you need premium to travel. :p
 
Module is
Code:
elf:addDestination(name, {x=x, y=y, z=z}, cost, premium)

<parameter key="travel_destinations" value="ice,1203,1820,7,110,true" />

Change true for 1 or test using yes
 
Back
Top