Originally Posted by
cpowroks
Avey you can add this to your ret/prot profile for dispells.
Code:
function ValidDispel(t)
local HasValidDispel = false
local i = 1
local debuff = UnitDebuff(t, i)
while debuff do
local debuffType = select(5, UnitDebuff(t, i))
if debuffType == "Poison"
or debuffType == "Disease" then
HasValidDispel = true
end
i = i + 1
debuff = UnitDebuff(t, i)
end
return HasValidDispel
end
Code:
if ValidDispel("player") then
CastSpellByName(GetSpellInfo(4987), "player")
end
if ValidDispel("party1")
and PQR_IsOutOfSight("party1") == false
and IsSpellInRange("Cleanse", "party1") == 1
and not UnitIsEnemy("party1", "player") then
CastSpellByName(GetSpellInfo(4987), "party1")
end
if ValidDispel("party2")
and PQR_IsOutOfSight("party2") == false
and IsSpellInRange("Cleanse", "party2") == 1
and not UnitIsEnemy("party2", "player") then
CastSpellByName(GetSpellInfo(4987), "party2")
end
if ValidDispel("party3")
and PQR_IsOutOfSight("party3") == false
and IsSpellInRange("Cleanse", "party3") == 1
and not UnitIsEnemy("party3", "player") then
CastSpellByName(GetSpellInfo(4987), "party3")
end
if ValidDispel("party4")
and PQR_IsOutOfSight("party4") == false
and IsSpellInRange("Cleanse", "party4") == 1
and not UnitIsEnemy("party4", "player") then
CastSpellByName(GetSpellInfo(4987), "party4")
end
if ValidDispel("party5")
and PQR_IsOutOfSight("party5") == false
and IsSpellInRange("Cleanse", "party5") == 1
and not UnitIsEnemy("party5", "player") then
CastSpellByName(GetSpellInfo(4987), "party5")
end
Its what i added to my personal edit of your profile for the 2nd boss in throne of thunder.
Thank you!, really helped with my holy profile.
PHP Code:
function ValidDispel(t)
local HasValidDispel = false
local i = 1
local debuff = UnitDebuff(t, i)
while debuff do
local debuffType = select(5, UnitDebuff(t, i))
if debuffType == "Poison" or debuffType == "Disease" or debuffType == "Magic" then
HasValidDispel = true
end
i = i + 1
debuff = UnitDebuff(t, i)
end
return HasValidDispel
end
if ValidDispel(members[1].Unit) then
if PQR_IsOutOfSight(members[1].Unit) == false and IsSpellInRange(GetSpellInfo(4987), members[1].Unit) == 1 and not UnitIsEnemy(members[1].Unit, "player") then
PQR_CustomTarget = members[1].Unit
return true
end
end
4987 custom GroupInfo function