Thrown together for a Mage De-Curse, can be tailored to what you need
Code:
if IsInRaid() then
group = "raid"
elseif IsInGroup() then
group = "party"
end
for i=1, GetNumGroupMembers() do
if UnitDebuffID(group..i, 136512) ~= nil then --Hex of Confusion. Make sure its whatever harmful one you need dispelled
PQR_CustomTarget = group..i
if PQR_UnitDistance("player", PQR_CustomTarget) <= 40 then
CastSpellByName(GetSpellInfo(475), PQR_CustomTarget) --475 is the mage dispell, so change that to what you need
end
end
end
For Monks you can use this with your Detox...
Code:
if IsInRaid() then
group = "raid" elseif IsInGroup() then
group = "party" end for i = 1, GetNumGroupMembers() do
for d = 1, 40 do
if ( select(5, UnitDebuff(group..i, d)) == "Poison"
or select(5, UnitDebuff(group..i, d)) == "Disease" ) then
PQR_CustomTarget = group..i
if PQR_UnitDistance("player", PQR_CustomTarget) <= 40 then
CastSpellByName(GetSpellInfo(115450), PQR_CustomTarget)
end
end
end
end