Originally Posted by
808
How would you tweak this code to make it use detox for any poison or disease debuff for any situation?
Thanks,
808
I'm actually very interested in knowing if it works also, I just threw this together. You should test and let me know
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("Detox"), PQR_CustomTarget)
end
end
end
end