• 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 Double exp if VIP

SnowFox

New Member
Joined
May 18, 2008
Messages
264
Reaction score
0
Hello, OTLand

Im looking for a script so if the players logs in and he is VIP

Code:
if isPlayerVip(cid)

His EXP will be set to double what it is at the moment, so if in Stages.xml its 10x EXP and he is VIP it will be 20x, it will stay 20x forever aslong as he is VIP. is this possible?
 
Havent tested can someone verify please.

NVM i tested it, its not working for some reason, if someone can fix it would be great

Code:
function onLogin(cid)
	local rate = 5
			if isPlayerVip(cid) == TRUE then          
				setPlayerExtraExpRate(cid, getPlayerextraExpRate(cid) + rate)
			else
			
            doPlayerSendTextMessage(cid,19, 'Purchase VIP and get more EXP from monsters!')
end
return TRUE
end
 
Last edited:
Tested and worked but when You use vip access or ect. You must relogin because exp rate is changing when You login not when You get Vip access.

Lua:
function onLogin(cid)
local storage = 21444 --your vip storage
local rate = 2
	if getPlayerStorageValue(cid, storage) >= 1 then
		doPlayerSetExperienceRate(cid, rate)
		doPlayerSendTextMessage(cid,19, "Exp Stage = " .. getConfigValue("rateExperience")*rate .. ".")
	else
        doPlayerSendTextMessage(cid,19, 'Purchase VIP and get more EXP from monsters!')
end
return TRUE
end
 
Back
Top