Skip to content

Instantly share code, notes, and snippets.

@gig3m
Created August 11, 2011 18:59
Show Gist options
  • Save gig3m/1140444 to your computer and use it in GitHub Desktop.
Save gig3m/1140444 to your computer and use it in GitHub Desktop.
MM rotation
function hunter_mm(self)
-- Marksmanship Hunter by Chiffon with additions by Scribe
------------------------------------------
local up = UnitPower
local r = RunMacroText;
local spell = nil
local raf_ready,raf_timeleft,_ = GetSpellCooldown("Rapid Fire");
local chim_ready,chim_timeleft,_ = GetSpellCooldown("Chimera Shot");
-- Interupting, Borrowed directly from feral cat
if jps.Interrupts and jps.should_kick("target") and cd("Silencing Shot") == 0 then
print("Silencing Target")
return "Silencing Shot"
end
-- Misdirecting to focus if jps.opening is on and focus is set
if jps.Opening and UnitExists("focus") and cd("Misdirection") then
print("Misdirecting to",GetUnitName("focus", showServerName)..".")
jps.Target = "focus"
spell = "Misdirection"
jps.Opening = false
end
-- Feign Death if aggro, wait 2 seconds to let it take effect
if UnitThreatSituation("player") == 3 and not cd("Feign Death") and not jps.check_timer("feign") then
print("Aggro! Feign Death cast.")
jps.create_timer("feign", "2")
spell = "Feign Death"
elseif jps.check_timer("feign") then
spell = nil
end
if not ub("pet","Mend Pet") and UnitHealth("pet")/UnitHealthMax("pet") <= 0.5 and UnitHealth("pet") then
spell = "Mend Pet"
elseif GetUnitSpeed("player") == 0 and not ub("player", "Aspect of the Hawk") then
spell = "Aspect of the Hawk"
elseif IsShiftKeyDown() and jps.MultiTarget and not ub("player", "Trap Launcher") and cd("Explosive Trap") then
spell = "Trap Launcher"
elseif IsShiftKeyDown() and jps.MultiTarget and ub("player", "Trap Launcher") and cd("Explosive Trap") then
CameraOrSelectOrMoveStart()
CameraOrSelectOrMoveStop()
spell = "Explosive Trap"
elseif jps.MultiTarget and up("player") > 40 then
spell = "Multi-Shot"
elseif UnitHealth("target")/UnitHealthMax("target") <= 0.2 and cd("Kill Shot") == 0 then
spell = "Kill Shot"
elseif not jps.MultiTarget and not UnitDebuff("target", "Serpent Sting",nil,"PLAYER") and up("player") > 25 and UnitHealth("target") > 50000 then
spell = "Serpent Sting"
elseif cd("Chimera Shot") == 0 and up("player") >= 44 then
spell = "Chimera Shot"
elseif jps.UseCDs and cd("Rapid Fire") == 0 and not ub("player","rapid fire") then
spell = "Rapid Fire"
elseif jps.UseCDs and cd("Lifeblood") == 0 and not ub("player","Lifeblood") then
spell = "Lifeblood"
elseif jps.UseCDs and cd("Rapid Fire") > 0 and jps.get_cooldown("Rapid Fire") >= 120 and not ub("player","rapid fire") and cd("readiness") == 0 then
spell = "Readiness"
elseif GetUnitSpeed("player") == 0 and UnitHealth("target")/UnitHealthMax("target") > 0.9 and up("player") > 55 and jps.get_cooldown("Chimera Shot") > 4 then
spell = "Aimed Shot"
elseif up("player") > 66 then
if ub("player","rapid fire") then
spell = "Aimed Shot"
else
spell = "Arcane Shot"
end
elseif ub("player", "Fire!") then
spell = "Aimed Shot"
elseif GetUnitSpeed("player") > 0 and not ub("player", "Aspect of the Fox") then
spell = "Aspect of the Fox"
else
spell = "Steady Shot"
end
return spell
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment