local configs = {
percent = 20 -- percent of max mana that will be added
interval = 5 -- time to add mana again
}
local function addMana(cid, interval)
if getCreatureMana(cid) < getCreatureMaxMana then
doCreatureAddMana(cid, getCreatureMaxMana(cid) * configs.percent / 100)
end
addEvent(addMana, interval, cid, interval)
return true
end
function onEquip(cid, item, slot)
addEvent(addMana, 0, cid, configs.interval)
return true
end
function onDeEquip(cid, item, slot)
stopEvent(addMana)
return true
end