Originally Posted by
mentally
Try this R4g4t0kk:
local unithealth = 100 * UnitHealth("target") / UnitHealthMax("target")
local hasExecutioner, _, _, _, _, _, timer = UnitBuffID("player", 90806)
local _, _, _, ExecutionerStacks = UnitBuffID("player", 90806)
-- Use the skill when the "target" is at 20% health or less and current stacks are 4 or less.
if unithealth <= 20 and hasExecutioner ~= nil then
if ExecutionerStacks <= 4 then
return true
end
end
-- Use the skill when the "target" is at 20% health or less and time left is less or equal to 2 seconds.
if unithealth <= 20 and hasExecutioner ~= nil and timer - GetTime() <= 2 then
return true
end