Misokoko
New Member
- Joined
- Mar 29, 2013
- Messages
- 126
- Reaction score
- 0
hello i got a problem with my exp ring when i equip or de equip it server got crash
my tfs 0.4 and the script in movements.xml :
and in scripts
and sometimes igot this only error in console :
[Error - ItemSpawnEvent::configureRaidEvent] id (or name) tag missing for itemspawn event.
[Error - ItemSpawnEvent::configureRaidEvent] id (or name) tag missing for itemspawn event.
my tfs 0.4 and the script in movements.xml :
Code:
<movevent type="Equip" itemid="6301" slot="ring" event="function" value="onEquipItem"/>
<movevent type="Equip" itemid="6300" slot="ring" event="script" value="expring.lua"/>
<movevent type="DeEquip" itemid="6301" slot="ring" event="script" value="expring.lua"/>
and in scripts
Code:
local config = {
rate = 1.2, -- 1.2 = faster than normal.
un_equip = 6300, -- Item ID of the UN-Equipped ring.
equip = 6301 -- 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))*1.2)
else
doPlayerSetExperienceRate(cid, getConfigValue("rateExperience")*1.2)
end
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)
doDecayItem(item.uid)
return true
end
[Error - ItemSpawnEvent::configureRaidEvent] id (or name) tag missing for itemspawn event.
[Error - ItemSpawnEvent::configureRaidEvent] id (or name) tag missing for itemspawn event.