--reset the condition?
--if true, it will remove and re-add the condition
--if false, it will do nothing if the condition exists
local resetTimer = true
local cooldownHealingGroup = Condition(CONDITION_SPELLGROUPCOOLDOWN)
cooldownHealingGroup:setParameter(CONDITION_PARAM_SUBID, SPELLGROUP_HEALING)
cooldownHealingGroup:setParameter(CONDITION_PARAM_TICKS, 3000) --duration in ms
local action = Action()
function action.onUse(player, item, fromPosition, target, toPosition, isHotkey)
if not...
yesTo clarify, do you want to manually apply the group exhaust for healing?
--reset the condition?
--if true, it will remove and re-add the condition
--if false, it will do nothing if the condition exists
local resetTimer = true
local cooldownHealingGroup = Condition(CONDITION_SPELLGROUPCOOLDOWN)
cooldownHealingGroup:setParameter(CONDITION_PARAM_SUBID, SPELLGROUP_HEALING)
cooldownHealingGroup:setParameter(CONDITION_PARAM_TICKS, 3000) --duration in ms
local action = Action()
function action.onUse(player, item, fromPosition, target, toPosition, isHotkey)
if not player:hasCondition(CONDITION_SPELLGROUPCOOLDOWN, SPELLGROUP_HEALING) then
player:addCondition(cooldownHealingGroup)
return true
end
if resetTimer then
player:removeCondition(CONDITION_SPELLGROUPCOOLDOWN, SPELLGROUP_HEALING)
player:addCondition(cooldownHealingGroup)
end
return true
end
action:id(2550)
action:register()
You can just apply the condition CONDITION_SPELLGROUPCOOLDOWN, with the healing group to the player
local cooldown = Condition(CONDITION_SPELLCOOLDOWN)
cooldown:setParameter(CONDITION_PARAM_TICKS, 500)
cooldown:setParameter(CONDITION_PARAM_SUBID, 3)