#Trigger for when a boss is casting a targeted ability but player is NOT the target.

5 messages · Page 1 of 1 (latest)

eager plaza
#

The thread's image is what I have for when you ARE targeted, I'm wondering if it's possible to have a weakaura with in-built weakauras triggers that allows the inverse? I use a lot of Causese's weakauras and he often has this custom code for targeted spells, I'm also wondering if that is better or worse than just using a default trigger. Example below, thanks for any help.

    if event == "UNIT_TARGET"
    and UnitIsUnit(unit.."target", "player")
    then
        local _,_,_,_,expirationTime,_,_,_,spellId = UnitCastingInfo(unit)
        local guid = UnitGUID(unit)
        if spellId
        and guid
        and (spellId == 291928 or spellId == 292264)
        and not allstates[guid] then
            allstates[guid] = {
                show = true,
                changed =  true,
                progressType = "timed", 
                duration = expirationTime / 1000 - GetTime(),
                expirationTime = expirationTime / 1000,
                unit = unit,
                autoHide = true,
            }
            return true
        end
    elseif event == "UNIT_SPELLCAST_STOP" and (spellId == 291928 or spellId == 292264) then
        local state = allstates[UnitGUID(unit)]
        if state then
            state.show = false
            state.changed = true
            return true
        end
    end
end```
nocturne bridge
#

Duplicate the trigger (which is trigger 2 then) and untick casters target in the duplicate

#

Then set "required for activation" to custom and put in

function(t)
return not t[1] and t[2]
end
#

Which requires trigger 1 (boss is casting X on you) to NOT be active, but trigger 2 (boss is casting X in general) to be active

#

Which sounds like what you want or?