Definitely liking this program, makes the game more fun in some ways or maybe I'm just beyond bored with the game otherwise. Ret is my paladin's off spec and I've gotten this to pull over 15k sustained dps on the raid dummy now so I can't complain.
Here's my version of zealotry. It wont use Zealotry if GoAK is available to be used. Will use it if GoAK is on cooldown and will use it if GoAK is active and the strength bonus is fully stacked.
Code:
local sDivinePurpose = UnitBuffID("player", 90174)
-- 86700 is the stacking strength buff from GoaK.
local _,_,_,APowerCount = UnitBuffID("player", 86700)
-- Where Z = Zealotry, G = Guardian of Ancient Kings and s,d,e are start, duration and enabled.
local Zs,Zd,Ze = GetSpellCooldown(85696)
local Gs,Gd,Ge = GetSpellCooldown(86150)
if Ze == 0 then
-- Zealotry is active.
return false
else
-- Neither Zealotry nor GoAK are active.
if (Gs == 0 and Gd == 0) then
-- GoAK is ready to use, do not use Zealotry.
return false
else
-- GoAK is on cool down, free to use Zealotry.
if APowerCount == nil then
if (Zs == 0 and Zd == 0) then
-- Zealotry is ready to use.
if UnitPower("player", 9) == 3 or sDivinePurpose ~= nil then
return true
end
end
elseif APowerCount ~=nil then
if APowerCount == 20 then
if (Zs == 0 and Zd == 0) then
-- Zealotry is ready to use.
if UnitPower("player", 9) == 3 or sDivinePurpose ~= nil then
return true
end
end
end
end
end
end