Follow along with the video below to see how to install our site as a web app on your home screen.
Notka: This feature may not be available in some browsers.
function onUse(cid, item, frompos, item2, topos)
if item.itemid == 5785 then
local playerpos = getCreaturePosition(cid)
doRemoveItem(item.uid,5785)
setPlayerStorageValue(cid,21444,1)
doSendMagicEffect(playerpos, 12)
doPlayerSay(cid, "Congratulation! Now you are have VIP Access!!!", TALKTYPE_ORANGE_1)
end
end
function onUse(cid, item, frompos, item2, topos)
local storageValue = 21444
vipstatus = getPlayerStorageValue(cid,storageValue)
newnPosition = {x=830, y=897, z=7}
if vipstatus == 1 then
playerpos = getPlayerPosition(cid)
doorpos = {x = frompos.x, y = frompos.y, z = frompos.z, stackpos = 253}
if item.actionid == 2075 and getPlayerStorageValue(cid,21444) == 1 then
doTeleportThing(cid,newnPosition)
doSendMagicEffect(newnPosition, 10)
doPlayerSay(cid, "Welcome on VIP !!!", TALKTYPE_ORANGE_1)
end
else
doPlayerSay(cid, "You don't have vip access!!!", TALKTYPE_ORANGE_1)
end
return 1
end

ale dzi?ki za ch?ci 
<npc name="Dikas" script="data/npc/scripts/gdzies.lua" autowalk="25" floorchange="0" access="5" level="1" maglevel="1">
<health now="150" max="150"/>
<look type="129" head="114" body="119" legs="114" feet="114" corpse="2212"/>
<parameters>
</parameters>
</npc>
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({'mystic island'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you wish to travel to Vip Island for 50 gold coins?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 50, cost = 50, destination = {x=1447, y=1504, z=7} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'I wouldn\'t go there either.'})
local travelNode = keywordHandler:addKeyword({'house'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you wish to travel to House Land for 300 gold coins?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 50, cost = 300, destination = {x=836, y=978, 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 \'Mystic Island and House\' for just a small fee.'})
-- Makes sure the npc reacts when you say hi, bye etc.
npcHandler:addModule(FocusModule:new())
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}
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 vipisland = {x=1000, y=1000, z=7}
function creatureSayCallback(cid, type, msg)
if(not npcHandler:isFocused(cid)) then
return false
end
local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
if(msgcontains(msg, 'destination') or msgcontains(msg, 'locations')) then
selfSay('I can take you to \'Vip Island\' for just a small fee.', cid)
end
if(msgcontains(msg, 'vip island')) then
selfSay('Do you wish to travel to Vip Island for 50 gold coins?', cid)
talkState[talkUser] = 1
elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 1) then
if getPlayerLevel(cid) >= 50 then
if isPremium(cid) == true then
if getPlayerStorageValue(cid, 21444) == 1 then
doTeleportThing(cid, vipisland)
talkState[talkUser] = 0
else
selfSay('You don\'t have Vip Acces!', cid)
end
else
selfSay('You don\'t have premium account!', cid)
end
else
selfSay('You don\'t have 50 level!', cid)
end
elseif(msgcontains(msg, 'no') and isInArray({1}, talkState[talkUser])) then
selfSay('I wouldn\'t go there either.', cid)
talkState[talkUser] = 0
end
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())