Created
October 30, 2011 22:15
-
-
Save gig3m/1326527 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function paladin_ret(self) | |
-- Rewrite for CDO by Kyletxag, altered from GoCargo's write. | |
local myHealthPercent = UnitHealth("player")/UnitHealthMax("player") * 100 | |
local targetHealthPercent = UnitHealth("target")/UnitHealthMax("target") * 100 | |
local myManaPercent = UnitMana("player")/UnitManaMax("player") * 100 | |
local hPower = UnitPower("player","9") | |
local race = UnitRace("player") | |
local inqDuration = cdo.buff_duration("player","Inquisition") | |
-- Interrupt, works equally well with "focus" instead of "target" | |
if cdo.interrupts and cdo.should_interrupt("target") and cd("Rebuke") == 0 and myManaPercent >= 25 then | |
return "Rebuke" | |
end | |
-- Blood Elf Arcane Torrent | |
if cdo.interrupts and cdo.should_interrupt("target") and cd("Arcane Torrent") == 0 and race == "Blood Elf" then | |
return "Arcane Torrent" | |
end | |
-- Check for any Seal, if none, Seal of Truth | |
if not ub("player","Seal of Truth") and not ub("player", "Seal of Righteousness") and not ub("player", "Seal of Insight") and not ub("player", "Seal of Justice") then | |
return "Seal of Truth" | |
end | |
if cdo.use_defensive_cd and myManaPercent < 35 and cd("Divine Plea") == 0 then | |
return "Divine Plea" | |
end | |
-- About to Die ? | |
if cdo.use_defensive_cd and myHealthPercent < 10 and hPower == 3 then | |
return "Word of Glory" | |
end | |
-- Cooldowns (Must remain in a seperate "if" block in case nothing returns) | |
if cdo.use_defensive_cd and cd("Divine Protection") == 0 then | |
return "Divine Protection" | |
elseif cdo.use_defensive_cd and myHealthPercent < 10 and cd("Lay on Hands") == 0 then | |
return "Lay on Hands" | |
-- Inquisition logic (Cannot get timers working right, commented out for now) | |
elseif not ub("player", "Inquisition") and ub("player", "Divine Purpose") then | |
return "Inquisition" | |
elseif ub("player", "Divine Purpose") and inqDuration < 3 and cdo.cdProgressionZeal ~= 1 then | |
return "Inquisition" | |
elseif not ub("player", "Inquisition") and hPower == 3 and cdo.cdProgressionZeal ~= 1 then | |
return "Inquisition" | |
-- Cooldown Logic Pre-T12 4pc | |
elseif cdo.use_offensive_cd and cdo.cdProgression ~= 1 and cd("Guardian of Ancient Kings") == 0 and cd("Zealotry") == 0 and cd("Avenging Wrath") == 0 then | |
-- Start the line up | |
cdo.cdProgression = 1 | |
cdo.cdProgressionZeal = 1 | |
print("Lining up cooldowns") | |
return nil | |
elseif cdo.use_offensive_cd and cdo.cdProgression == 1 then | |
if cd("Guardian of Ancient Kings") == 0 then | |
return "Guardian of Ancient Kings" | |
end | |
print("What about Zeal?") | |
if cdo.buff_duration("player", "Guardian of Ancient Kings") < 30 and hpower == 3 then | |
cdo.cdProgressionZeal = nil | |
return "Zealotry" | |
end | |
print("Zeal again?") | |
if ub("player", "Divine Purpose") and cdo.buff_duration("Guardian of Ancient Kings") < 30 then | |
cdo.cdProgressionZeal = nil | |
return "Zealotry" | |
end | |
print("AW then?") | |
if cdo.buff_duration("player", "Guardian of Ancient Kings") < 21 then | |
cdo.cdProgression = nil | |
cdo.cdProgressionZeal = nil | |
return "Avenging Wrath" | |
end | |
--Zealotry logic for CD usage | |
elseif cdo.use_offensive_cd and cdo.cdProgression ~= 1 and ub("player", "Divine Purpose") and cd("Zealotry") == 0 then | |
return "Zealotry" | |
elseif cdo.use_offensive_cd and cdo.cdProgression ~= 1 and hPower == 3 and cd("Zealotry") == 0 then | |
return "Zealotry" | |
--Other Offensive CDs | |
elseif cdo.use_offensive_cd and cdo.cdProgression ~= 1 and cd("Avenging Wrath") == 0 then | |
return "Avenging Wrath" | |
elseif cdo.use_offensive_cd and cdo.cdProgression ~= 1 and cd("Guardian of Ancient Kings") == 0 then | |
return "Guardian of Ancient Kings" | |
end | |
--TEMPLAR'S VERDICT LOGIC-- | |
if ub("player", "Divine Purpose") then | |
return "Templar's Verdict" | |
elseif hPower == 3 then | |
return "Templar's Verdict" | |
-- Crusader Strike / Divine Storm based on MultiTarget | |
elseif cd("Crusader Strike") == 0 and not cdo.multi_target then | |
return "Crusader Strike" | |
elseif cd("Divine Storm") == 0 and cdo.multi_target then | |
return "Divine Storm" | |
-- Hammer during execute mode or Avenging wrath | |
elseif targetHealthPercent < 20 and cd("Hammer of Wrath") == 0 then | |
return "Hammer of Wrath" | |
elseif ub("player", "Avenging Wrath") and cd("Hammer of Wrath") == 0 then | |
return "Hammer of Wrath" | |
--EXORCISM LOGIC-- | |
elseif ub("player", "The Art of War") and cd("Exorcism")==0 then | |
return "Exorcism" | |
--JUDGEMENT LOGIC-- | |
elseif cd("Judgement") == 0 then | |
return "Judgement" | |
--HOLY WRATH-- | |
elseif cd("Holy Wrath") == 0 then | |
return "Holy Wrath" | |
--TIME TO GO OOM-- | |
elseif cd("Consecration") == 0 then | |
return "Consecration" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment