#Mass Dispel Weak aura
14 messages · Page 1 of 1 (latest)
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
It might have something to do with what you are using to trigger the function?
!crosspost
Please do not cross-post your question or query to multiple channels.
I have it triggering on if i can cast mass dispel
checking if party has a magic debuff
and player has a magic debuff
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
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
Unit Count > 0