Can someone help me to add when the exhaustion time (11sec) are ended, it will send a message you are ready to use this spell again.
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, FIREDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 5)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 3)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -0.5, -60, -0.6, 0)
local area = createCombatArea(AREA_CIRCLE2X2)
setCombatArea(combat, area)
function onCastSpell(cid, var)
if exhaustion.check(cid, 2002) == false then
exhaustion.set(cid, 2002, 11)
local target = getCreatureTarget(cid)
return doCombat(cid, combat, var)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Cooldown "..exhaustion.get(cid, 2002).." seconds.")
end
end
Last edited by a moderator: