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

travel to vip places if got premium days

tyngaste

New Member
Joined
Dec 2, 2008
Messages
223
Reaction score
0
Location
Sweden
hello i wonder if anyone could help with this, you get free premium when making account it will stay free premium all time untill you buy days, when got premmy days on account your a vip, i want a check on boat when traveling to pyre gengia and oken, only if you got premmy days and are not a free premmy account you can travel to thoese places would be kind if someone could help me out.

thanks in advance
 
Don't use "if isPremium(cid) then", use "if getPlayerPremiumDays(cid) > 0 then


here is the part of my code help me please.

Code:
PremDay = getPlayerPremiumDays(cid) -- Checks premium player days
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



local travelNode = keywordHandler:addKeyword({'oken'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to sail to Oken for 0 gold coins?'})
        	travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, getPlayerPremiumDays(cid) > 0 , level = 0, cost = 0, destination = {x=19990, y=20008, z=6} })
        	travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Then stay here!'})
 
Any errors?


no but still not working i want a check only if player got premmy days you are able to travel there, if player got premium without any days then it will be non vip and not able to travel.


hope anyone could help me i use 0.3.2 btw.

nvm fixed it.

close thread
 
Last edited:
Back
Top