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

Bonux vip

setembro

New Member
Joined
May 22, 2008
Messages
110
Reaction score
1
Help My script vip exp dont work bonus exp. All msgs work but bonus exp dont work. I registred creature event.


function onLogin(cid)

local rate = 1.4 -- 40%
local config = {
welvip = "[VIP Status]: Você possui ".. getPlayerVipDays(cid) .." dias de VIP e "..((rate - 1)*100).."% de Bonus Exp!",
not_vip = "[VIP Status]: Você possui 0 dias de VIP. Adiquira VIP para obter "..((rate - 1)*100).."% de Bonus Exp e muitas outras vantagens!",
vip = getPlayerVipDays(cid) >= 1
}

if (config.vip == TRUE) then
doPlayerSetExperienceRate(cid, rate)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.welvip)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.not_vip)
end
return TRUE
end



I add Rep ++
 
new line with just in the local config.
Code:
rate = (rate-1)*100
then do the same and "doPlayerSetExperienceRate(cid, config.rate)"
should work
 
new line with just in the local config.
Code:
rate = (rate-1)*100
then do the same and "doPlayerSetExperienceRate(cid, config.rate)"
should work

Bro dont work

function onLogin(cid)

local rate = 1.4 -- 40%
local config = {
rate = (rate-1)*100,
welvip = "[VIP Status]: Você possui ".. getPlayerVipDays(cid) .." dias de VIP e "..((rate - 1)*100).."% de Bonus Exp!",
not_vip = "[VIP Status]: Você possui 0 dias de VIP. Adiquira VIP para obter "..((rate - 1)*100).."% de Bonus Exp e muitas outras vantagens!",
vip = getPlayerVipDays(cid) >= 1
}

if (config.vip == TRUE) then
doPlayerSetExperienceRate(cid, config.rate)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.welvip)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.not_vip)
end
return TRUE
end
 
No NO

PHP:
function onLogin(cid)
   if getPlayerVipDays(cid) >= 1 then
   doPlayerSendTextMessage(cid, 19, "You have ".. getPlayerVipDays(cid) .." vip days left.")
   doPlayerSetRate(cid, SKILL__LEVEL, 0.50) 
         end
         return true
end

Edit This
PHP:
   doPlayerSetRate(cid, SKILL__LEVEL, 0.50)
 
Create LUA file on creaturescripts/scripts and name it to vipexp.lua and put this
Code:
 function onKill(cid, target)
	return getPlayerStorageValue(cid, 95883) == 1 and doPlayerAddExperience(cid, getMonsterInfo(string.lower(getCreatureName(target))).experience * 0.5) or true
end

In creaturescripts.xml put this line
Code:
<event type="kill" name="vipExp" event="script" value="vipexp.lua"/>

In login.lua register this event!
Code:
registerCreatureEvent(cid, "vipExp")

Regards,
Sacred Anlyest
 
Back
Top