dragaoart
Since 2009...
- Joined
- May 10, 2009
- Messages
- 97
- Reaction score
- 9
Hello!
I'm trying to run this code: exp_ring.lua
It's called in movement.lua:
In items.xml i got:
There is a problem:
The extra experience given looks quite unstable.
I've created a creature whose give 1 exp.
And inside stages.xml, a level 200+ got 1x exp
1x1 = 1 *lol*
The ring just give 3 exp point when you kill that creature.
I would like to:
•The script work like this way, 2x exp when worn and back to normal when "deequip". SOLVED
•Add duration time countdown.
Any Ideas on how to fix it?
Thanks for your time.
-------- EDIT
EXP FIXED, DURATION TIME STILL DOESN'T WORK!
I'm trying to run this code: exp_ring.lua
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
It's called in movement.lua:
HTML:
<movevent type="Equip" itemid="10612" slot="ring" event="script" value="vip_items/exp_ring.lua"/><!-- EXPERIENCE RING IN USE-->
<movevent type="DeEquip" itemid="10612" slot="ring" event="script" value="vip_items/exp_ring.lua"/><!-- EXPERIENCE RING IN USE-->
<movevent type="Equip" itemid="10613" slot="ring" event="script" value="vip_items/exp_ring.lua"/><!-- EXPERIENCE RING OFF USE-->
<movevent type="DeEquip" itemid="10613" slot="ring" event="script" value="vip_items/exp_ring.lua"/><!-- EXPERIENCE RING OFF USE-->
In items.xml i got:
HTML:
<!-- 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>
There is a problem:
The extra experience given looks quite unstable.
I've created a creature whose give 1 exp.
And inside stages.xml, a level 200+ got 1x exp
1x1 = 1 *lol*
The ring just give 3 exp point when you kill that creature.
I would like to:
•The script work like this way, 2x exp when worn and back to normal when "deequip". SOLVED
•Add duration time countdown.
Any Ideas on how to fix it?
Thanks for your time.
-------- EDIT
EXP FIXED, DURATION TIME STILL DOESN'T WORK!
Last edited: