local cfg = {
rate = 2.0
ringOn = 6301
ringOff = 6300
}
function onDeEquip(cid, item, slot)
if (item.itemid == cfg.ringOn) then
doPlayerSetExperienceRate(cid, getConfigValue("rateExperience"))
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have ended your extra experience.")
doTransformItem(item.uid, cfg.ringOff)
end
end
function onEquip(cid, item, slot)
if(item.itemid == cfg.ringOff) then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your extra experience rate has been activated. It is now: " .. cfg.rate .. "x.")
doPlayerSetExtraExpRate(cid, rate)
doTransformItem(item.uid, cfg.ringOn)
end
end