• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Exp ring gives to much..

Donio

Banned User
Joined
Jun 24, 2008
Messages
4,004
Reaction score
16
Location
Manhattan, New York
Hey, I just saw a script about a exp ring, but the problem here is I want it to give 2x exp from the original one.. but it gives like 20% more :o

how can i fix this? this is my script:

Code:
local config = {
 
        rate            = 2,  -- 2.0 = 2x faster than normal.
        un_equip        = 2123, -- Item ID of the UN-Equipped ring.
        equip           = 2123 -- Item ID of the Equipped ring.
 
}
 
function onDeEquip(cid, item, slot)
        doPlayerSetExperienceRate(cid, 1.0)
        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your extra experience rate has ended.")
        doTransformItem(item.uid, config.un_equip)
        return true
end
 
function onEquip(cid, item, slot)
        if getConfigValue("experienceStages") == "yes" then
           doPlayerSetExperienceRate(cid, getExperienceStage(getPlayerLevel(cid))*2)
        else
           doPlayerSetExperienceRate(cid, getConfigValue("rateExperience")*2)
        end
        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your extra experience rate has been activated! It is now: " .. config.rate .. "times more than the original experience rate.")
        doTransformItem(item.uid, config.equip)
        doDecayItem(item.uid)
        return true
end

I tried to change the "rate = 2, -- 2.0 = 2x faster than normal."

and doPlayerSetExperienceRate(cid, getExperienceStage(getPlayerLevel(cid))*2)

but nothing :s
 
Wanna know why? :)

It's because if you have your exp rate set to 500 in your config.lua, then it will become 1000 when you double it.

now fix it yourself, by simply editing the experience in the config
 
Try this:

Code:
local config = {
        rate            = 2,  -- 2.0 = 2x faster than normal.
        un_equip        = 2123, -- Item ID of the UN-Equipped ring.
        equip           = 2123 -- Item ID of the Equipped ring.
}

function onEquip(cid, item, slot)
	if item.itemid == 2123 then --Id of the item
	doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your extra experience rate has been activated! It is now: " .. config.rate .. "times more than the original experience rate.")
	doPlayerSetExperienceRate(cid, getExperienceStage(getPlayerLevel(cid))*2)
	else
	doPlayerSetExperienceRate(cid, getConfigValue("rateExperience")*2)
    end
    doTransformItem(item.uid, config.equip)
    doDecayItem(item.uid)
    return true
end

function onDeEquip(cid, item, slot)
        doPlayerSetExperienceRate(cid, 1.0)
        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your extra experience rate has ended.")
        doTransformItem(item.uid, config.un_equip)
        return true
end


EDIT: If that does not work, here is something that should work for you.

>>http://otland.net/f81/ring-experience-81969/<<
 
Back
Top