Can't test this right now, can someone test it for me or point out any obvious errors.
PHP Code:
-- Holy Avenger Check
if UnitBuffID("player", 105809) and UnitPower("player", 9) >= 3 then
return false
end
-- Prevents Wrong Spell Cast Ret
if (select(2, GetSpecializationInfo(GetSpecialization()))) == "Retribution" then
if PQR_SpellAvailable(879) or PQR_SpellAvailable(24275) or PQR_SpellAvailable(35395) or UnitBuffID("player", 87138) then
return false
end
end
-- Prevents Wrong Spell Cast Prot
if (select(2, GetSpecializationInfo(GetSpecialization()))) == "Protection" then
if PQR_SpellAvailable(35395) then
return false
end
end
-- Seal Check
local hasSeal = false
if GetShapeshiftForm() ~= 0 then hasSeal = true else hasSeal = false end
--Censure time/stack check for double jeoparady
local tCensure = select(7, UnitDebuffID("target", 31803))
local fCensure = select(7, UnitDebuffID("focus", 31803))
if hasSeal and UnitPower("player", 9) < 5 then
if UnitExists("focus") and RangeCheck(20271, "focus") then
if not fCensure or (tCensure - GetTime()) > (fCensure - GetTime()) then
CastSpellByName(GetSpellInfo(20271), "focus")
end
end
else
if UnitExists("target") and RangeCheck(20271, "target") then
if not tCensure or (tCensure - GetTime()) < (fCensure - GetTime()) then
CastSpellByName(GetSpellInfo(20271), "target")
end
end
end