Skip to content

Instantly share code, notes, and snippets.

@benphelps
Forked from brandonjank/gist:85b08a0bf5ca11eeb61a
Last active August 29, 2015 14:04
Show Gist options
  • Save benphelps/44489c58678d75d2fe5f to your computer and use it in GitHub Desktop.
Save benphelps/44489c58678d75d2fe5f to your computer and use it in GitHub Desktop.
-- Backburn's Survival Hunter Rotation
-- Updated on July 17th, 2014.
-- PLAYER CONTROLLED: Rabid MUST be on Auto-Cast for Stampede pets to use them :)
-- SUGGESTED TALENTS:
-- CONTROLS: Pause - Left Control, Explosive/Ice/Snake Traps - Left Alt, Freezing Trap - Right Alt, Scatter Shot - Right Control
-- Import
local Actions, Receivers, Modifiers = Device.actions, Device.recivers, Device.modifiers
-- Actions
local spell, pause = Actions:Spell, Actions:Pause
-- Recivers
local unit, ground = Receivers:Unit, Receivers:Ground
-- Modifiers
local key, mouse, toggle = Modifiers:Key, Modifiers:Mouse, Modifiers:Toggle
-- Shortcuts
local target, pet, focus, player, mouseover = unit('target'), unit('pet'), unit('focus'), unit('player'), unit('mouseover')
local class = 'Hunter'
local spec = 'Survival'
-- TOGGLES
local toggles = {
-- {id, icon, title, description}
{'callpet', 'Interface\\Icons\\ability_hunter_beastcall', 'Call Pet 1', 'Toggle to keep the pet in your first pet slot out.'},
{'misdirect', 'Interface\\Icons\\ability_hunter_misdirection', 'Auto Misdirect', 'Toggle to automatically misdirect to your Focus>Tank>Pet when high on threat.'},
{'consume', 'Interface\\Icons\\inv_alchemy_endlessflask_06', 'Use Consumables', 'Toggle the usage of Flasks/Food/Potions etc..'},
{'autotarget', 'Interface\\Icons\\ability_hunter_snipershot', 'Auto Target', 'Automatically target the nearest enemy when target dies or does not exist.'},
{'aspect', 'Interface\\Icons\\ability_mount_jungletiger', 'Auto Aspect', 'Automatically switch aspect when moving and not in combat.'},
{'mouseovers', 'Interface\\Icons\\ability_hunter_quickshot', 'Use Mouseovers', 'Toggle automatic usage of stings/scatter/etc on eligible mouseover targets.'},
{'pvpmode', 'Interface\\Icons\\achievement_pvp_o_h', 'Enable PvP', 'Toggle the usage of PvP abilities.'},
{'camomode', 'Interface\\Icons\\ability_hunter_displacement', 'Use Camouflage', 'Toggle the usage Camouflage when out of combat.'},
{'cleavemode', 'Interface\\Icons\\ability_upgrademoonglaive', 'Cleave Mode', 'Toggle the automatic usage of AoE abilities for 2 to 3 enemies.'}
}
-- COMBAT
local combat = {
-- Rotation Utilities
-- TODO: Explosive Trap timer cooldown OSD
-- cant place traps without target?
-- TODO: DPS Test Function
pause('Pause Rotation', function()
return key('lcontrol') -- Pause Key
-- or '@bbLib.bossMods' -- Boss Pause
or player:buff(5384) -- Feign Death
end)
--bbLib.BGFlag
macro('/targetenemy [noexists]', function()
return toggle('autotarget') and not target:exists()
end),
macro('/targetenemy [dead]', function()
return toggle('autotarget') and target:exists() and target:dead()
end),
-- Interrupts
spell(147362, target, function() -- Counter Shot
return target:range() < 40 and target:randinterrupt()
end),
-- Pet
spell(883, player, function() -- Call Pet 1
return toggle('callpet') and not pet:exists()
end),
spell(55709, pet, function() -- Heart of the Phoenix
return toggle('callpet') and pet:dead()
end),
spell(136, pet, function() -- Mend Pet
return pet:health() < 50 and not pet:buff('136') and pet:range() < 40
end),
-- PvP Abilities
spell(53271, player, function() -- Master's Call
return player:state('disorient') or player:state('stun') or player:state('root') or player:state('snare')
end),
spell(19503, target, function() -- Scatter Shot on Target
return toggle('pvpmode') and target:exists() and target:enemy() and target:alive() and not target:status('disorient')
and not target:status('sleep') and not target:status('incapacitate') and not target:status('fear') and not target:status('misc') and not target:status('root')
and not target:status('stun') and not target:status('snare') and not target:immune('all') and not target:immune('disorient')
end),
spell(19503, mouseover, function() -- Scatter Shot on Mouseover
return ( (toggle('mouseovers') and toggle('pvpmode')) or key('rcontrol') ) and mouseover:exists() and mouseover:enemy() and mouseover:alive() and not mouseover:status('disorient')
and not mouseover:status('sleep') and not mouseover:status('incapacitate') and not mouseover:status('fear') and not mouseover:status('misc') and not mouseover:status('root')
and not mouseover:status('stun') and not mouseover:status('snare') and not mouseover:immune('all') and not mouseover:immune('disorient')
end),
spell(19386, mouseover, function() -- Wyvern Sting on Mouseover
return ( (toggle('mouseovers') and toggle('pvpmode')) or key('rcontrol') ) and player:spell(19503):cooldown() > 0 and mouseover:exists() and mouseover:enemy() and mouseover:alive()
and not mouseover:status('disorient') and not mouseover:status('sleep') and not mouseover:status('incapacitate') and not mouseover:status('fear')
and not mouseover:status('misc') and not mouseover:status('root') and not mouseover:status('stun') and not mouseover:status('snare') and not mouseover:immune('all')
and not mouseover:immune('sleep')
end),
spell(13809, ground, function() -- Ice Trap on Scatter Shot targets
return key('rcontrol') and player:spell(19503):cooldown > 0 and mouseover:exists and mouseover:enemy and mouseover:alive and mouseover:status('disorient')
and not mouseover:immune('all') and not mouseover:immune('sleep')
end),
}
local nocombat = {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment