local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, -1) -- the -1 is to allow conditions to run forever -
setConditionParam(condition, CONDITION_PARAM_STAT_MAXHEALTHPERCENT, 110) -- add 10% of max health to the player's current hp --
local condition_max_250 = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition_max_250, CONDITION_PARAM_TICKS, -1) -- the -1 is to allow conditions to run forever -
setConditionParam(condition_max_250, CONDITION_PARAM_STAT_MAXHEALTH, 250) -- add 250 health to the player's current hp --
function onEquip(cid, item, slot)
if getCreatureMaxHealth(cid) >= 2501 then
doAddCondition(cid, condition_max_250)
elseif getCreatureMaxHealth(cid) < 2501 then
doAddCondition(cid, condition)
end
return TRUE
end
function onDeEquip(cid, item, slot)
doRemoveCondition(cid, CONDITION_ATTRIBUTES)
end