#Mass Dispel Weak aura

14 messages · Page 1 of 1 (latest)

real sinew
#

I am attempting to create a weakaura that will inform me when myself and party members within 15 yards have a magic debuff. So far I have got the weakaura to appear when I have a magic debuff however the stacking aspect I have is not increasing to 1 its remaining at 0.

#

function()
local count = 0
local members = GetNumGroupMembers()

-- Check if the player has a magic debuff
if AuraUtil.FindAuraByName("Magic", "player", "HARMFUL") then
    count = 1
end

-- Check the rest of the party members
for i = 1, members do
    local unit = (IsInRaid() and "raid"..i or "party"..i)
    if UnitExists(unit) and UnitInRange(unit) and AuraUtil.FindAuraByName("Magic", unit, "HARMFUL") then
        count = count + 1
    end
end

aura_env.count = count

-- Show the stack count as a string
return tostring(count)

end

#

this is the code i have at least gotten to not throw errors

onyx folio
#

It might have something to do with what you are using to trigger the function?

charred gale
#

!crosspost

thick domeBOT
#

Please do not cross-post your question or query to multiple channels.

real sinew
#

I have it triggering on if i can cast mass dispel

#

checking if party has a magic debuff

#

and player has a magic debuff

charred gale
#

why are you using code? there's a built-in trigger for getting that info

#

Trigger->Aura->smart group-> debuff Debuff Type=magic Unit Count > 0

real sinew
#

I am rather new at making weakaura as stated I have only done a Hey your missing this buff. Thank you for telling me about the triggers, could you point me to the area where I can add the number of players in the party who have a magic debuff. Currently I just have a static icon that is not disappearing even if i dont have a magic debuff

charred gale
#

Unit Count > 0

real sinew