• 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 VIP gets extra exp.

mofaza

Maskin
Joined
Jun 26, 2011
Messages
73
Reaction score
0
Hello.
I want VIP players to recieve more exp from killing monsters. I'm using the VIP-days system and I did some search and I found a script but it was for storage ID's.
So I tried to modify it for VIP-days but it didnt work. Help would be appriciated.

Lua:
function onKill(cid, target)
	return getPlayerVipDays(cid) >= 1 and doPlayerAddExperience(cid, getMonsterInfo(string.lower(getCreatureName(target))).experience * 0.3) or true
end

I've registred it in creaturescripts.xml and login.lua.
 
make them receive double exp at login better then onkill
login.lua
Lua:
	if getPlayerVipDays(cid) >= 1 then
	doPlayerSetExperienceRate(cid, 2)
	end
 
Lua:
function onLogin(cid) 
 
local rate = 1.2 -- 20% 
local config = { 
vip = "Você tem "..((rate - 1)*100).."% de exp a mais agora!", 
notvip = "Torne-se vip e ganhe "..((rate - 1)*100).."% a mais de experiencia!", 
} 
 
if getPlayerVipDays(cid) == 0 then  
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, config.notvip) 
else 
doPlayerSetExperienceRate(cid, rate) 
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, config.vip) 
end 
return TRUE 
end
 
Lua:
function onLogin(cid) 
 
local rate = 1.2 -- 20% 
local config = { 
vip = "Você tem "..((rate - 1)*100).."% de exp a mais agora!", 
notvip = "Torne-se vip e ganhe "..((rate - 1)*100).."% a mais de experiencia!", 
} 
 
if getPlayerVipDays(cid) == 0 then  
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, config.notvip) 
else 
doPlayerSetExperienceRate(cid, rate) 
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, config.vip) 
end 
return TRUE 
end
Tab ffs, use it!
 
Back
Top