Daniel Kopeć
Member
After putting on the ring, you don't get any experience at all.
After removing the ring, the server shuts down (crash). After about 2 minutes.
The time of the ring's goes down once and then it does not go down.
Here are my scripts:
I was looking for a solution on the forum but I found nothing sensible
I've also used this script before
BUMP
After removing the ring, the server shuts down (crash). After about 2 minutes.
The time of the ring's goes down once and then it does not go down.
Here are my scripts:
XML:
<!-- Exp Ring -->
<movevent type="Equip" itemid="7697" slot="ring" event="script" value="exp_ring.lua"/>
<movevent type="Equip" itemid="7708" slot="ring" event="script" value="exp_ring.lua"/>
<movevent type="DeEquip" itemid="7708" slot="ring" event="script" value="exp_ring.lua"/>
Lua:
local config = {
rate = 1.5, -- 1.2 = faster than normal.
un_equip = 7697, -- Item ID of the UN-Equipped ring.
equip = 7708 -- Item ID of the Equipped ring.
}
function onDeEquip(cid, item, slot)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your extra experience rate has ended.")
doTransformItem(item.uid, config.un_equip)
if getConfigValue("experienceStages") == "yes" then
doPlayerSetExperienceRate(cid, getExperienceStage(getPlayerLevel(cid)))
else
doPlayerSetExperienceRate(cid, getConfigValue("rateExperience"))
end
--print("printed onDeEquip")
return true
end
function onEquip(cid, item, slot)
if getConfigValue("experienceStages") == "yes" then
doPlayerSetExperienceRate(cid, getExperienceStage(getPlayerLevel(cid))*1.2)
else
doPlayerSetExperienceRate(cid, getConfigValue("rateExperience")*1.2)
end
--print("printed onEquip")
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your extra experience rate has been activated! It is now doubled your former experience rate.")
doTransformItem(item.uid, config.equip)
return true
end
I was looking for a solution on the forum but I found nothing sensible
Post automatically merged:
I've also used this script before
Lua:
local config = {
rate = 2.0
}
function onDeEquip(cid, item, slot)
if(item.itemid == 7697) then
doPlayerSetExperienceRate(cid, 1.0)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your extra experience rate has ended.")
doTransformItem(item.uid, 7708)
end
end
function onEquip(cid, item, slot)
if(item.itemid == 7708) then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your extra experience rate has been activated! It is now: " .. config.rate .. "x doubled your former experience rate.")
doPlayerSetExperienceRate(cid, config.rate)
doTransformItem(item.uid, 7697)
return true
end
end
Post automatically merged:
BUMP
Last edited: