Skip to content

Instantly share code, notes, and snippets.

@brandonjank
Last active August 29, 2015 14:04

Revisions

  1. @backburn backburn revised this gist Jul 19, 2014. 1 changed file with 43 additions and 69 deletions.
    112 changes: 43 additions & 69 deletions gistfile1.lua
    Original file line number Diff line number Diff line change
    @@ -1,90 +1,64 @@
    -- Backburn's Survival Hunter Rotation
    -- Updated on July 17th, 2014.
    -- Schmoe's Feral Death Knight Mage Rotation

    -- 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'
    -- Rotation settings
    local apiversion = "1.0.0-alpha"
    local rotationversion = "1.0.0-alpha"
    local class = 'MAGE'
    local spec = 'FROST'

    -- TOGGLES
    -- UI 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.'}
    -- {id, icon, title, description},
    {'aoemode', 'Interface\\Icons\\ability_upgrademoonglaive', 'AoE Mode', 'Click to toggle in and out of AOE mode.'},
    }

    -- COMBAT
    -- Combat rotation
    local combat = {
    -- Rotation Utilities
    -- TODO: Explosive Trap timer cooldown OSD
    -- cant place traps without target?
    -- TODO: DPS Test Function
    pause('Pause Rotation', function()

    pause('Pause Rotation', function() -- Pause the rotation while key is held down
    return key('lcontrol') -- Pause Key
    -- or '@bbLib.bossMods' -- Boss Pause
    or unit('player').buff(5384)' -- Feign Death
    end)

    --bbLib.BGFlag

    macro('/targetenemy [noexists]', function()
    return toggle('autotarget') and not unit('target').exists()
    end),
    macro('/targetenemy [dead]', function()
    return toggle('autotarget') and unit('target').exists() and unit('target').dead()

    macro('/targetenemy [dead]', function() -- Target next enemy if target is dead
    return target:exists() and target:dead()
    end),

    -- Interrupts
    spell(147362, unit('target'), function() -- Counter Shot
    return unit('target').range() < 40 and unit('target').randinterrupt()
    spell(12345, target, function() -- Interrupt target's spell
    return target:randinterrupt()
    end),

    -- Pet
    spell(883, unit('player'), function() -- Call Pet 1
    return toggle('callpet') and not unit('pet').exists()
    spell(12345, focus, function() -- Interrupt focus's spell
    return focus:randinterrupt()
    end),
    spell(55709, unit('pet'), function() -- Heart of the Phoenix
    return toggle('callpet') and unit('pet').dead()

    -- Spells
    spell(12345, target, function() -- Cast AOE spell
    return toggle('aoemode')
    end),
    spell(136, unit('pet'), function() -- Mend Pet
    return unit('pet').exists() and unit('pet').health() < 50 and not unit('pet').buff('136') and unit('pet').range() < 40

    spell(12345, target, function() -- Cast a spell
    return true
    end),

    -- PvP Abilities
    spell(53271, unit('player'), function() -- Master's Call
    return unit('player').state('disorient') or unit('player').state('stun') or unit('player').state('root') or unit('player').state('snare')
    end),
    spell(19503, unit('target'), function() -- Scatter Shot on Target
    return toggle('pvpmode') and unit('target').exists() and unit('target').enemy() and unit('target').alive() and not unit('target').status('disorient')
    and not unit('target').status('sleep') and not unit('target').status('incapacitate') and not unit('target').status('fear') and not unit('target').status('misc') and not unit('target').status('root')
    and not unit('target').status('stun') and not unit('target').status('snare') and not unit('target').immune('all') and not unit('target').immune('disorient')
    end),
    spell(19503, unit('mouseover'), function() -- Scatter Shot on Mouseover
    return ( (toggle('mouseovers') and toggle('pvpmode')) or key('rcontrol') ) and unit('mouseover').exists() and unit('mouseover').enemy() and unit('mouseover').alive() and not unit('mouseover').status('disorient')
    and not unit('mouseover').status('sleep') and not unit('mouseover').status('incapacitate') and not unit('mouseover').status('fear') and not unit('mouseover').status('misc') and not unit('mouseover').status('root')
    and not unit('mouseover').status('stun') and not unit('mouseover').status('snare') and not unit('mouseover').immune('all') and not unit('mouseover').immune('disorient')
    end),
    spell(19386, unit('mouseover'), function() -- Wyvern Sting on Mouseover
    return ( (toggle('mouseovers') and toggle('pvpmode')) or key('rcontrol') ) and unit('player').spell(19503).cooldown() > 0 and unit('mouseover').exists() and unit('mouseover').enemy() and unit('mouseover').alive()
    and not unit('mouseover').status('disorient') and not unit('mouseover').status('sleep') and not unit('mouseover').status('incapacitate') and not unit('mouseover').status('fear')
    and not unit('mouseover').status('misc') and not unit('mouseover').status('root') and not unit('mouseover').status('stun') and not unit('mouseover').status('snare') and not unit('mouseover').immune('all')
    and not unit('mouseover').immune('sleep')
    end),
    spell(13809, ground, function() -- Ice Trap on Scatter Shot targets
    return key('rcontrol') and unit('player').spell(19503).cooldown > 0 and unit('mouseover').exists and unit('mouseover').enemy and unit('mouseover').alive and unit('mouseover').status('disorient')
    and not unit('mouseover').immune('all') and not unit('mouseover').immune('sleep')
    end),

    ...

    }

    -- Out of combat rotation
    local nocombat = {

    -- blah blah

    }
  2. @backburn backburn revised this gist Jul 18, 2014. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions gistfile1.lua
    Original file line number Diff line number Diff line change
    @@ -29,7 +29,7 @@ local combat = {
    -- cant place traps without target?
    -- TODO: DPS Test Function
    pause('Pause Rotation', function()
    return modifier('lcontrol') -- Pause Key
    return key('lcontrol') -- Pause Key
    -- or '@bbLib.bossMods' -- Boss Pause
    or unit('player').buff(5384)' -- Feign Death
    end)
    @@ -69,18 +69,18 @@ local combat = {
    and not unit('target').status('stun') and not unit('target').status('snare') and not unit('target').immune('all') and not unit('target').immune('disorient')
    end),
    spell(19503, unit('mouseover'), function() -- Scatter Shot on Mouseover
    return ( (toggle('mouseovers') and toggle('pvpmode')) or modifier('rcontrol') ) and unit('mouseover').exists() and unit('mouseover').enemy() and unit('mouseover').alive() and not unit('mouseover').status('disorient')
    return ( (toggle('mouseovers') and toggle('pvpmode')) or key('rcontrol') ) and unit('mouseover').exists() and unit('mouseover').enemy() and unit('mouseover').alive() and not unit('mouseover').status('disorient')
    and not unit('mouseover').status('sleep') and not unit('mouseover').status('incapacitate') and not unit('mouseover').status('fear') and not unit('mouseover').status('misc') and not unit('mouseover').status('root')
    and not unit('mouseover').status('stun') and not unit('mouseover').status('snare') and not unit('mouseover').immune('all') and not unit('mouseover').immune('disorient')
    end),
    spell(19386, unit('mouseover'), function() -- Wyvern Sting on Mouseover
    return ( (toggle('mouseovers') and toggle('pvpmode')) or modifier('rcontrol') ) and unit('player').spell(19503).cooldown() > 0 and unit('mouseover').exists() and unit('mouseover').enemy() and unit('mouseover').alive()
    return ( (toggle('mouseovers') and toggle('pvpmode')) or key('rcontrol') ) and unit('player').spell(19503).cooldown() > 0 and unit('mouseover').exists() and unit('mouseover').enemy() and unit('mouseover').alive()
    and not unit('mouseover').status('disorient') and not unit('mouseover').status('sleep') and not unit('mouseover').status('incapacitate') and not unit('mouseover').status('fear')
    and not unit('mouseover').status('misc') and not unit('mouseover').status('root') and not unit('mouseover').status('stun') and not unit('mouseover').status('snare') and not unit('mouseover').immune('all')
    and not unit('mouseover').immune('sleep')
    end),
    spell(13809, ground, function() -- Ice Trap on Scatter Shot targets
    return modifier('rcontrol') and unit('player').spell(19503).cooldown > 0 and unit('mouseover').exists and unit('mouseover').enemy and unit('mouseover').alive and unit('mouseover').status('disorient')
    return key('rcontrol') and unit('player').spell(19503).cooldown > 0 and unit('mouseover').exists and unit('mouseover').enemy and unit('mouseover').alive and unit('mouseover').status('disorient')
    and not unit('mouseover').immune('all') and not unit('mouseover').immune('sleep')
    end),
    }
  3. @backburn backburn revised this gist Jul 18, 2014. 1 changed file with 6 additions and 2 deletions.
    8 changes: 6 additions & 2 deletions gistfile1.lua
    Original file line number Diff line number Diff line change
    @@ -30,7 +30,7 @@ local combat = {
    -- TODO: DPS Test Function
    pause('Pause Rotation', function()
    return modifier('lcontrol') -- Pause Key
    or '@bbLib.bossMods' -- Boss Pause
    -- or '@bbLib.bossMods' -- Boss Pause
    or unit('player').buff(5384)' -- Feign Death
    end)

    @@ -61,7 +61,7 @@ local combat = {

    -- PvP Abilities
    spell(53271, unit('player'), function() -- Master's Call
    return player.state.disorient or player.state.stun or player.state.root or player.state.snare
    return unit('player').state('disorient') or unit('player').state('stun') or unit('player').state('root') or unit('player').state('snare')
    end),
    spell(19503, unit('target'), function() -- Scatter Shot on Target
    return toggle('pvpmode') and unit('target').exists() and unit('target').enemy() and unit('target').alive() and not unit('target').status('disorient')
    @@ -79,6 +79,10 @@ local combat = {
    and not unit('mouseover').status('misc') and not unit('mouseover').status('root') and not unit('mouseover').status('stun') and not unit('mouseover').status('snare') and not unit('mouseover').immune('all')
    and not unit('mouseover').immune('sleep')
    end),
    spell(13809, ground, function() -- Ice Trap on Scatter Shot targets
    return modifier('rcontrol') and unit('player').spell(19503).cooldown > 0 and unit('mouseover').exists and unit('mouseover').enemy and unit('mouseover').alive and unit('mouseover').status('disorient')
    and not unit('mouseover').immune('all') and not unit('mouseover').immune('sleep')
    end),
    }

    local nocombat = {
  4. @backburn backburn revised this gist Jul 18, 2014. 1 changed file with 9 additions and 3 deletions.
    12 changes: 9 additions & 3 deletions gistfile1.lua
    Original file line number Diff line number Diff line change
    @@ -10,6 +10,7 @@ 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..'},
    @@ -65,14 +66,19 @@ local combat = {
    spell(19503, unit('target'), function() -- Scatter Shot on Target
    return toggle('pvpmode') and unit('target').exists() and unit('target').enemy() and unit('target').alive() and not unit('target').status('disorient')
    and not unit('target').status('sleep') and not unit('target').status('incapacitate') and not unit('target').status('fear') and not unit('target').status('misc') and not unit('target').status('root')
    and not unit('target').status('stun') and not unit('target').status('snare') and not unit('target').status('immune', 'all') and not unit('target').status('immune', 'disorient')
    and not unit('target').status('stun') and not unit('target').status('snare') and not unit('target').immune('all') and not unit('target').immune('disorient')
    end),
    spell(19503, unit('mouseover'), function() -- Scatter Shot on Mouseover
    return ( (toggle('mouseovers') and toggle('pvpmode')) or modifier('rcontrol') ) and unit('mouseover').exists() and unit('mouseover').enemy() and unit('mouseover').alive() and not unit('mouseover').status('disorient')
    and not unit('mouseover').status('sleep') and not unit('mouseover').status('incapacitate') and not unit('mouseover').status('fear') and not unit('mouseover').status('misc') and not unit('mouseover').status('root')
    and not unit('mouseover').status('stun') and not unit('mouseover').status('snare') and not unit('mouseover').status('immune', 'all') and not unit('mouseover').status('immune', 'disorient')
    and not unit('mouseover').status('stun') and not unit('mouseover').status('snare') and not unit('mouseover').immune('all') and not unit('mouseover').immune('disorient')
    end),
    spell(19386, unit('mouseover'), function() -- Wyvern Sting on Mouseover
    return ( (toggle('mouseovers') and toggle('pvpmode')) or modifier('rcontrol') ) and unit('player').spell(19503).cooldown() > 0 and unit('mouseover').exists() and unit('mouseover').enemy() and unit('mouseover').alive()
    and not unit('mouseover').status('disorient') and not unit('mouseover').status('sleep') and not unit('mouseover').status('incapacitate') and not unit('mouseover').status('fear')
    and not unit('mouseover').status('misc') and not unit('mouseover').status('root') and not unit('mouseover').status('stun') and not unit('mouseover').status('snare') and not unit('mouseover').immune('all')
    and not unit('mouseover').immune('sleep')
    end),

    }

    local nocombat = {
  5. @backburn backburn revised this gist Jul 18, 2014. 1 changed file with 27 additions and 10 deletions.
    37 changes: 27 additions & 10 deletions gistfile1.lua
    Original file line number Diff line number Diff line change
    @@ -8,6 +8,19 @@
    local class = 'Hunter'
    local spec = 'Survival'

    -- TOGGLES
    local toggles = {
    {'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
    @@ -17,13 +30,13 @@ local combat = {
    pause('Pause Rotation', function()
    return modifier('lcontrol') -- Pause Key
    or '@bbLib.bossMods' -- Boss Pause
    or 'player.buff(5384)' -- Feign Death
    or unit('player').buff(5384)' -- Feign Death
    end)

    --bbLib.BGFlag

    macro('/targetenemy [noexists]', function()
    return toggle('autotarget') and !unit('target').exists()
    return toggle('autotarget') and not unit('target').exists()
    end),
    macro('/targetenemy [dead]', function()
    return toggle('autotarget') and unit('target').exists() and unit('target').dead()
    @@ -36,28 +49,32 @@ local combat = {

    -- Pet
    spell(883, unit('player'), function() -- Call Pet 1
    return toggle('callpet') and !unit('pet').exists()
    return toggle('callpet') and not unit('pet').exists()
    end),
    spell(55709, unit('pet'), function() -- Heart of the Phoenix
    return toggle('callpet') and unit('pet').dead()
    end),
    spell(136, unit('pet'), function() -- Mend Pet
    return unit('pet').exists() and unit('pet').health() < 50 and !unit('pet').buff('136') and unit('pet').range() < 40
    return unit('pet').exists() and unit('pet').health() < 50 and not unit('pet').buff('136') and unit('pet').range() < 40
    end),

    -- PvP Abilities
    spell(53271, unit('player'), function() -- Master's Call
    return player.state.disorient or player.state.stun or player.state.root or player.state.snare
    end),
    spell(19503, unit('target'), function() -- Scatter Shot on Target
    return toggle('pvpmode') and unit('target').exists() and unit('target').enemy() and unit('target').alive() and !unit('target').status('disorient')
    and !unit('target').status('sleep') and !unit('target').status('incapacitate') and !unit('target').status('fear') and !unit('target').status('misc') and !unit('target').status('root')
    and !unit('target').status('stun') and !unit('target').status('snare') and !unit('target').status('immune', 'all') and !unit('target').status('immune', 'disorient')
    return toggle('pvpmode') and unit('target').exists() and unit('target').enemy() and unit('target').alive() and not unit('target').status('disorient')
    and not unit('target').status('sleep') and not unit('target').status('incapacitate') and not unit('target').status('fear') and not unit('target').status('misc') and not unit('target').status('root')
    and not unit('target').status('stun') and not unit('target').status('snare') and not unit('target').status('immune', 'all') and not unit('target').status('immune', 'disorient')
    end),
    spell(19503, unit('mouseover'), function() -- Scatter Shot on Mouseover
    return ((toggle('mouseovers') and toggle('pvpmode')) or modifier('rcontrol')) and unit('mouseover').exists() and unit('mouseover').enemy() and unit('mouseover').alive() and !unit('mouseover').status('disorient')
    and !unit('mouseover').status('sleep') and !unit('mouseover').status('incapacitate') and !unit('mouseover').status('fear') and !unit('mouseover').status('misc') and !unit('mouseover').status('root')
    and !unit('mouseover').status('stun') and !unit('mouseover').status('snare') and !unit('mouseover').status('immune', 'all') and !unit('mouseover').status('immune', 'disorient')
    return ( (toggle('mouseovers') and toggle('pvpmode')) or modifier('rcontrol') ) and unit('mouseover').exists() and unit('mouseover').enemy() and unit('mouseover').alive() and not unit('mouseover').status('disorient')
    and not unit('mouseover').status('sleep') and not unit('mouseover').status('incapacitate') and not unit('mouseover').status('fear') and not unit('mouseover').status('misc') and not unit('mouseover').status('root')
    and not unit('mouseover').status('stun') and not unit('mouseover').status('snare') and not unit('mouseover').status('immune', 'all') and not unit('mouseover').status('immune', 'disorient')
    end),

    }

    local nocombat = {

    }
  6. @backburn backburn revised this gist Jul 18, 2014. 1 changed file with 1 addition and 5 deletions.
    6 changes: 1 addition & 5 deletions gistfile1.lua
    Original file line number Diff line number Diff line change
    @@ -55,13 +55,9 @@ local combat = {
    and !unit('target').status('stun') and !unit('target').status('snare') and !unit('target').status('immune', 'all') and !unit('target').status('immune', 'disorient')
    end),
    spell(19503, unit('mouseover'), function() -- Scatter Shot on Mouseover
    return (toggle('mouseovers') or modifier('rcontrol')) and toggle('pvpmode') and unit('mouseover').exists() and unit('mouseover').enemy() and unit('mouseover').alive() and !unit('mouseover').status('disorient')
    return ((toggle('mouseovers') and toggle('pvpmode')) or modifier('rcontrol')) and unit('mouseover').exists() and unit('mouseover').enemy() and unit('mouseover').alive() and !unit('mouseover').status('disorient')
    and !unit('mouseover').status('sleep') and !unit('mouseover').status('incapacitate') and !unit('mouseover').status('fear') and !unit('mouseover').status('misc') and !unit('mouseover').status('root')
    and !unit('mouseover').status('stun') and !unit('mouseover').status('snare') and !unit('mouseover').status('immune', 'all') and !unit('mouseover').status('immune', 'disorient')
    end),

    }

    local nocombat = {

    }
  7. @backburn backburn revised this gist Jul 18, 2014. 1 changed file with 24 additions and 21 deletions.
    45 changes: 24 additions & 21 deletions gistfile1.lua
    Original file line number Diff line number Diff line change
    @@ -5,28 +5,28 @@
    -- SUGGESTED TALENTS:
    -- CONTROLS: Pause - Left Control, Explosive/Ice/Snake Traps - Left Alt, Freezing Trap - Right Alt, Scatter Shot - Right Control

    local class = "Hunter"
    local spec = "Survival"
    local class = 'Hunter'
    local spec = 'Survival'

    -- 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 "modifier.lcontrol" -- Pause Key
    or "@bbLib.bossMods" -- Boss Pause
    or "player.buff(5384)" -- Feign Death
    pause('Pause Rotation', function()
    return modifier('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 !unit('target').exists()
    macro('/targetenemy [noexists]', function()
    return toggle('autotarget') and !unit('target').exists()
    end),
    macro("/targetenemy [dead]", function()
    return toggle("autotarget") and unit('target').exists() and unit('target').dead()
    macro('/targetenemy [dead]', function()
    return toggle('autotarget') and unit('target').exists() and unit('target').dead()
    end),

    -- Interrupts
    @@ -35,30 +35,33 @@ local combat = {
    end),

    -- Pet
    spell(883, unit("player"), function() -- Call Pet 1
    return toggle("callpet") and !unit('pet').exists()
    spell(883, unit('player'), function() -- Call Pet 1
    return toggle('callpet') and !unit('pet').exists()
    end),
    spell(55709, unit("pet"), function() -- Heart of the Phoenix
    return toggle("callpet") and unit('pet').dead()
    spell(55709, unit('pet'), function() -- Heart of the Phoenix
    return toggle('callpet') and unit('pet').dead()
    end),
    spell(136, unit("pet"), function() -- Mend Pet
    spell(136, unit('pet'), function() -- Mend Pet
    return unit('pet').exists() and unit('pet').health() < 50 and !unit('pet').buff('136') and unit('pet').range() < 40
    end),

    -- PvP Abilities
    spell(53271, unit("player"), function() -- Master's Call
    spell(53271, unit('player'), function() -- Master's Call
    return player.state.disorient or player.state.stun or player.state.root or player.state.snare
    end),

    spell(19503, unit("target"), function() -- Scatter Shot on Target
    spell(19503, unit('target'), function() -- Scatter Shot on Target
    return toggle('pvpmode') and unit('target').exists() and unit('target').enemy() and unit('target').alive() and !unit('target').status('disorient')
    and !unit('target').status('sleep') and !unit('target').status('incapacitate') and !unit('target').status('fear') and !unit('target').status('misc') and !unit('target').status('root')
    and !unit('target').status('stun') and !unit('target').status('snare') and !unit('target').status('immune', 'all') and !unit('target').status('immune', 'disorient')
    end),

    spell(19503, unit('target'), function() -- Scatter Shot on Mouseover
    return toggle('mouseovers') and toggle('pvpmode') and unit('mouseover').exists() and unit('mouseover').enemy() and unit('mouseover').alive() and !unit('mouseover').status('disorient')
    spell(19503, unit('mouseover'), function() -- Scatter Shot on Mouseover
    return (toggle('mouseovers') or modifier('rcontrol')) and toggle('pvpmode') and unit('mouseover').exists() and unit('mouseover').enemy() and unit('mouseover').alive() and !unit('mouseover').status('disorient')
    and !unit('mouseover').status('sleep') and !unit('mouseover').status('incapacitate') and !unit('mouseover').status('fear') and !unit('mouseover').status('misc') and !unit('mouseover').status('root')
    and !unit('mouseover').status('stun') and !unit('mouseover').status('snare') and !unit('mouseover').status('immune', 'all') and !unit('mouseover').status('immune', 'disorient')
    end),

    }

    local nocombat = {

    }
  8. @backburn backburn revised this gist Jul 18, 2014. 1 changed file with 20 additions and 9 deletions.
    29 changes: 20 additions & 9 deletions gistfile1.lua
    Original file line number Diff line number Diff line change
    @@ -30,24 +30,35 @@ local combat = {
    end),

    -- Interrupts
    spell('147362', unit('target'), function() -- Counter Shot
    spell(147362, unit('target'), function() -- Counter Shot
    return unit('target').range() < 40 and unit('target').randinterrupt()
    end),

    -- Pet
    spell('883', unit("player"), function() -- Call Pet 1
    spell(883, unit("player"), function() -- Call Pet 1
    return toggle("callpet") and !unit('pet').exists()
    end),
    spell('55709', unit("pet"), function() -- Heart of the Phoenix
    spell(55709, unit("pet"), function() -- Heart of the Phoenix
    return toggle("callpet") and unit('pet').dead()
    end),
    spell('136', unit("pet"), function() -- Mend Pet
    spell(136, unit("pet"), function() -- Mend Pet
    return unit('pet').exists() and unit('pet').health() < 50 and !unit('pet').buff('136') and unit('pet').range() < 40
    end),


    }

    local nocombat = {

    -- PvP Abilities
    spell(53271, unit("player"), function() -- Master's Call
    return player.state.disorient or player.state.stun or player.state.root or player.state.snare
    end),

    spell(19503, unit("target"), function() -- Scatter Shot on Target
    return toggle('pvpmode') and unit('target').exists() and unit('target').enemy() and unit('target').alive() and !unit('target').status('disorient')
    and !unit('target').status('sleep') and !unit('target').status('incapacitate') and !unit('target').status('fear') and !unit('target').status('misc') and !unit('target').status('root')
    and !unit('target').status('stun') and !unit('target').status('snare') and !unit('target').status('immune', 'all') and !unit('target').status('immune', 'disorient')
    end),

    spell(19503, unit('target'), function() -- Scatter Shot on Mouseover
    return toggle('mouseovers') and toggle('pvpmode') and unit('mouseover').exists() and unit('mouseover').enemy() and unit('mouseover').alive() and !unit('mouseover').status('disorient')
    and !unit('mouseover').status('sleep') and !unit('mouseover').status('incapacitate') and !unit('mouseover').status('fear') and !unit('mouseover').status('misc') and !unit('mouseover').status('root')
    and !unit('mouseover').status('stun') and !unit('mouseover').status('snare') and !unit('mouseover').status('immune', 'all') and !unit('mouseover').status('immune', 'disorient')
    end),
    }
  9. @backburn backburn created this gist Jul 18, 2014.
    53 changes: 53 additions & 0 deletions gistfile1.lua
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,53 @@
    -- 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

    local class = "Hunter"
    local spec = "Survival"

    -- 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 "modifier.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 !unit('target').exists()
    end),
    macro("/targetenemy [dead]", function()
    return toggle("autotarget") and unit('target').exists() and unit('target').dead()
    end),

    -- Interrupts
    spell('147362', unit('target'), function() -- Counter Shot
    return unit('target').range() < 40 and unit('target').randinterrupt()
    end),

    -- Pet
    spell('883', unit("player"), function() -- Call Pet 1
    return toggle("callpet") and !unit('pet').exists()
    end),
    spell('55709', unit("pet"), function() -- Heart of the Phoenix
    return toggle("callpet") and unit('pet').dead()
    end),
    spell('136', unit("pet"), function() -- Mend Pet
    return unit('pet').exists() and unit('pet').health() < 50 and !unit('pet').buff('136') and unit('pet').range() < 40
    end),


    }

    local nocombat = {

    }