@Yan18
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)
local function setAttribute(item, value, time)
if time > 0 then
doItemSetAttribute(item, "lifeabsorb", value)
addEvent(setAttribute, 1000, value, time - 1)
else
doItemSetAttribute(item, "lifeabsorb", 0)
end
end
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end