Sam
Banned User
hi
Is there a script that allows people to use the boat if they have a vip account? Preferably by storage ID.
Is there a script that allows people to use the boat if they have a vip account? Preferably by storage ID.
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
-- OTServ event handling functions start
function onCreatureAppear(cid) npcHandlernCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandlernCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandlernCreatureSay(cid, type, msg) end
function onThink() npcHandlernThink() 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({'vip'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to visit the VIP Area?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 0, destination = {x=1125, y=1519, z=7} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Noob!'})
keywordHandler:addKeyword({'sail'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can teleport you to the VIP Arena.'})
keywordHandler:addKeyword({'job'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I a VIP Gateman who teleport players if they got the correct permission.'})
keywordHandler:addKeyword({'travel'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can take you to VIP Castle.'})
-- Makes sure the npc reacts when you say hi, bye etc.
npcHandler:addModule(FocusModule:new())
<?xml version="1.0"?>
<npc name="Garim" script="data/npc/scripts/donationteleport.lua" speed="40" access="3" floorchange="0" walkinterval="0">
<health now="1000" max="1000"/>
<parameters>
<parameter key="message_greet" value="Hello, |PLAYERNAME|. If you got an VIP account, I can teleport you to VIP Area!" />
</parameters>
<look type="129" head="116" body="114" legs="89" feet="95" corpse="1313"/>
</npc>