movements/scripts/exp_ring.lua
function onEquip(cid, item, slot)
doTransformItem(item.uid, 10612, 1)
doPlayerSendTextMessage(cid, 22, 'Now you have 2x extra experience!')
doPlayerSetExperienceRate(cid, 2)
return true
end
function onDeEquip(cid, item, slot)
doTransformItem(item.uid, 10613, 1)
doPlayerSendTextMessage(cid, 22, 'Extra experience ended.')
doPlayerSetExperienceRate(cid, 1)
return true
end
movements.xml
<movevent type="Equip" itemid="10612" slot="ring" event="script" value="exp_ring.lua"/><!-- EXPERIENCE RING IN USE-->
<movevent type="DeEquip" itemid="10612" slot="ring" event="script" value="exp_ring.lua"/><!-- EXPERIENCE RING IN USE-->
<movevent type="Equip" itemid="10613" slot="ring" event="script" value="exp_ring.lua"/><!-- EXPERIENCE RING OFF USE-->
<movevent type="DeEquip" itemid="10613" slot="ring" event="script" value="exp_ring.lua"/><!-- EXPERIENCE RING OFF USE-->
items.xml
<!-- Exp Ring-->
<!-- ON -->
<item id="10612" article="an" name="experience ring">
<attribute key="weight" value="500"/>
<attribute key="slotType" value="ring"/>
<attribute key="duration" value="43200"/>
<attribute key="decayTo" value="0"/>
<attribute key="showduration" value="1"/>
<attribute key="transformDeEquipTo" value="10613"/>
</item>
<!-- OFF -->
<item id="10613" article="an" name="experience ring">
<attribute key="weight" value="500"/>
<attribute key="slotType" value="ring"/>
<attribute key="stopduration" value="1"/>
<attribute key="showduration" value="1"/>
<attribute key="transformEquipTo" value="10612"/>
</item>
Créditos: dragaoart