ex eclipse
New Member
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
Travel.lua
why the function TravelModule:addDestination(name, position, price, premium) from jiddo isnt working? |:
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>
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())