Hi all so I am working on creating a weak aura that will alert me when the player (Demon Hunter) has Immolation Aura(258920) that is about to expire, less than 4 sec, and is missing the Momentum(208628) at a greater or equal duration.
At first I tried a method with multiple triggers
- Trigger [1] – Immolation aura exist on the player
- Trigger [2] – Momentum exists on the player
- Trigger [3] – Immolation aura has less than or equal to 4 sec duration
- Trigger [4] - Momentum has less then or equal to 4 sec of duration
This was than used with the following trigger
function(trigger)
return (trigger[1] and trigger[3]) and (not trigger[2] or trigger[4])
end
This sort of worked but would not always trigger or would double trigger as its close but not exactly what I was looking for.
The next step I went into doing this as a custom trigger and think I am on the right path here but am not sure where I am getting held up (a) and (b) how I should setup the other lines for the custom trigger. I have done a bunch of edits to make weak auras that exist work for me but this is my first time trying to do a custom trigger from scratch. Below is my current attempt that I think is close but I am not sure If I am even going in the right direction.
function(trigger)
local buff1, _, _, _, _, _, buff1_duration, _, _, _, _ = UnitBuff("player", 258920)
local buff2, _, _, _, _, _, buff2_duration, _, _, _, _ = UnitBuff("player", 208628)
return (buff1 and buff1_duration <= 4) and (not buff2 or buff2_duration >= buff1_duration)
end
Any help or advice would be greatly appreciated.