GarQet
Own3d!
- Joined
- Feb 10, 2009
- Messages
- 1,381
- Solutions
- 14
- Reaction score
- 81
Hello Otlanders!
I have a small problem with addEvent.
I want create special ring who:
- change our maxhealth and maxmana;
- send magic effect to us every 3 seconds (Yellow Fireworks).
Currently, my script looks like this:
I don't know how addEvent.
He must send magic effect on us only if we get equiped ring.
Event stoped if we get unequiped ring.
Who can help me?
Please.
//Sorry for my english.
I have a small problem with addEvent.
I want create special ring who:
- change our maxhealth and maxmana;
- send magic effect to us every 3 seconds (Yellow Fireworks).
Currently, my script looks like this:
Code:
local config = {
un_equip = 6300, -- Item ID of the UN-Equipped ring.
equip = 6301, -- Item ID of the Equipped ring.
}
function onDeEquip(cid, item, slot)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your Transform Ring has been expired!")
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-350)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-700)
doTransformItem(item.uid, config.un_equip)
return true
end
function onEquip(cid, item, slot)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Transform ring change your Max Health and your Max Mana!\nYour power will be shown by special Effect! Yellow Fireworks!")
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+350)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)+700)
doTransformItem(item.uid, config.equip)
doDecayItem(item.uid)
return true
end
I don't know how addEvent.
He must send magic effect on us only if we get equiped ring.
Event stoped if we get unequiped ring.
Who can help me?
Please.
//Sorry for my english.