Hello all. I came here because I have doubts in a script.
My server has Extra Exp for VIP players (30%), this script:
And extra for vip who conquered the castle (20%), this script:
Who won the castle and it's VIP, right is to gain 50% extra for VIP, but not giving, is giving only 30%
I tried to edit a script to gain 50% exp, that:
But did not really work, can someone tell me what's wrong? Grateful.
My server has Extra Exp for VIP players (30%), this script:
Code:
function onLogin(cid)
local rate = 1.3 -- 30%
local config = {
vip = "Você tem "..((rate - 1)*100).."% de exp a mais agora!",
notvip = "Tornesse vip e ganhe "..((rate - 1)*100).."% a mais de experiencia!",
}
if vip.hasVip(cid) == TRUE then
doPlayerSetExperienceRate(cid, rate)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.vip)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.notvip)
end
return TRUE
end
And extra for vip who conquered the castle (20%), this script:
Code:
dofile("./_woe.lua")
function onLogin(cid)
Woe.getInfo()
local Guild_ID = getPlayerGuildId(cid)
if (Guild_ID == infoLua[2]) and (infoLua[2] ~= 0) then
doPlayerSetExperienceRate(cid, 1.20) -- here
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your guild has won the last War of Emperium, for that reason you have 20% extra experience.")
end
return true
end
Who won the castle and it's VIP, right is to gain 50% extra for VIP, but not giving, is giving only 30%
I tried to edit a script to gain 50% exp, that:
Code:
dofile("./_woe.lua")
function onLogin(cid)
Woe.getInfo()
local Guild_ID = getPlayerGuildId(cid)
local rate = 1.5 -- 50%
local config = {
vipecastle = "Logo voce tem "..((rate - 1)*100).."% de exp a mais por ter conquistado o castelo e ser vip!",
notviporcastle = "Tornesse vip e ganhe "..((rate - 1)*100).."% a mais de experiencia!",
}
if (vip.hasVip(cid) == TRUE) and (Guild_ID == infoLua[2]) and (infoLua[2] ~= 0) then
doPlayerSetExperienceRate(cid, rate)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.vipecastle)
else
end
return TRUE
end