Warrior Macro

Contents this is a general classification – you may find what you're after, or the basic commands in different areas...
Weapon swaps
Stance dances
Charge/intercepts
PvP / DPS / Leveling
Tanking
Multi Tanking
Miscellaneous & others (TBC)
Common macro commands
Weapon Swaps

(you shift-click your weapon / shield etc. into your macro ..)
Dual wielding to 2h and back to DW :

/equipslot 16 Maladath, Runed Blade of the Black Flight
/equipslot 17 Qiraji Sacrificial Dagger
/equipslot 16 The Untamed Blade

Shield : (first line puts you into def stance)

/cast [stance:1/3]Defensive Stance
/equipslot 16 Maladath, Runed Blade of the Black Flight
/equipslot 17 Drillborer Disk

A one button version of the quick equip macro. Normal is tank, ctrl is DW, alt is resist shield. You can modify this any number of ways for 2H wep and different button combos.

/equipslot 16 Thunderfury, Blessed Blade of the Windseeker
/equipslot 17 Elementium Reinforced Bulwark
/equipslot [modifier:ctrl] 17 Sickle of Unyielding Strength
/equipslot [modifier:alt] 17 Draconian Deflector

for particlular bag spots: 'PickupContainerItem' is where you want to put your shield.
/script PickupInventoryItem(17); if CursorHasItem()then PickupContainerItem(4,4);EquipItemByName("The Unstoppable Force");else EquipItemByName("Stormstrike Hammer"); EquipItemByName("The Immovable Object");end;

Stance Dances

Simple 1 ability dances, will put you in correct stance and cast ability as well as show cooldowns

# show Overpower
/cast [stance:1] Overpower; Battle Stance

# show Mocking Blow
/cast [stance:1] Mocking Blow; Battle Stance

# show Taunt
/cast [stance:2] Taunt; Defensive Stance

# show Whirlwind
/cast [stance:3] Whirlwind; Berserker Stance

Stance change "loop" macro. Access all stances from any stance with just 2 keybinds.

/cast [stance:1]Berserker Stance;[stance:3]Defensive Stance;[stance:2]Battle Stance

This one goes in the opposite direction:

/cast [stance:1]Defensive Stance;[stance:2]Berserker Stance;[Stance:3]Battle Stance

Toggles stances between def and battle stance and if control clicked, it will go to zerker stance.

/cast [modifier:ctrl,nostance:3] Berserker Stance; [stance:1] Defensive Stance; Battle Stance

Generic Stance Macro: Replace <* Stance Ability> with whatever you want.

/cast [stance:1] ; [stance:2] ; [stance:3]

Example: Will cast Overpower in Battle stance, Sunder Armor in Defensive, and Whirlwind in Berserker stance

/cast [stance:1] Overpower; [stance:2] Sunder Armor; [stance:3] Whirlwind

Fear Dance - think Mag Onyxia... will put you into zerker stance, pop zerker rage and then (back) to def stance

# show Berserker Rage
/cast [stance:1/2]Berserker Stance;Berserker Rage
/cast [stance:3]Defensive Stance

Charge /intercept

It either charges/intercepts, or puts you into the correct stance, another click and you charge/intercept. It will also leave you in zerker while in combat...

/cast [nocombat,stance:1] Charge; [combat,nostance:3] Berserker Stance; [nocombat,nostance:1] Battle Stance; [combat,stance:3] Intercept

A seperate charge/intercept macro for each of the stance bars. Put them in the same slot on their respective bar and then just spam that button/key and it will perform the appropriate logic as it switches around from bar to bar.

Charge/Intercept - (Battle Stance Bar)
Note, if you are out of range the charge will fail, but it will still pop bloodrage and zerker stance.

/cast [stance:1, combat] Berserker Stance;
/cast [stance:1, nocombat] Charge;
/StopCasting
/cast [stance:1, nocombat] Berserker Stance;
/StopCasting
/cast [stance:1, nocombat] Bloodrage;

Charge/Intercept - (Berserker Stance Bar)

/cast [stance:3, combat] Bloodrage;
/StopCasting
/cast [stance:3, combat] Intercept;
/cast [stance:3, nocombat] Battle Stance;

Charge/Intercept - (Defensive Stance Bar)

/cast [stance:2, combat] Berserker Stance;
/cast [stance:2, nocombat] Battle Stance;
PvP / DPS / Lvling

Execute: in def stance will switch to battle; in battle or zerker will execute
/cast [stance:1] Execute; [stance:2] Battle Stance; [stance:3] Execute

Will cast Overpower in Battle stance, Sunder Armor in Defensive, and Whirlwind in Berserker
/cast [stance:1] Overpower; [stance:2] Sunder Armor; [stance:3] Whirlwind

Casts overpower then HS (it still works 'cos it is not on the GCD - it is a "on next attack" ability, and that means it can work with Overpower in this macro. same for Cleave...
/cast Overpower
/cast Heroic Strike

Always attempts to use Execute, but will use Heroic Strike if not available. Ctrl uses Cleave instead of Heroic Strike.
/cast Execute
/stopcasting
/cast [modifier:ctrl] Cleave; Heroic Strike

change to berserker stance, intercept, and hamstring
/cast [stance:3] Intercept; Berserker Stance
/stopcasting
/cast [stance:3] Hamstring

This is a great farming macro – it will dismount you (shift-click your mount to replace my Stormpike), charge, bloodthirst, queue HS and WW – anytime the target flees or otherwise gets out of range you will intercept – just watch your rage ;). Rinse repeat..
/cancelaura Stormpike Battle Charger
/cast [nocombat,stance:1] Charge; [combat,nostance:3] Berserker Stance; [nocombat,nostance:1] Battle Stance; [combat,stance:3] Intercept
/stopcasting
/castsequence reset=5 Bloodthirst, Heroic Strike, Whirlwind

for PvP, I use the same macro above and replace the last line (i.e. beginning with /castsequence..) with
/cast Hamstring

Disarm (From Battle/Berserker Stance):
# show Disarm
/cast [nostance:2] Defensive Stance; Disarm
Depending on the stance you want to swap back to you could put another line like:
/cast [nostance:3] Berserker Stance

Interrupt - Shield bash or Pummel macro depending on whether or not a shield is equipped
/cast [stance:1/2,noequipped:Shields] Berserker Stance; [stance:1/2,equipped:Shields] Shield Bash; [stance:3] Pummel

Overpower/Execute
#show Execute
/castrandom [nostance:1] Battle Stance; Overpower, Execute

Mortal/Heroic Strike w Bloodrage
#show Mortal Strike
/cast Bloodrage
/cast Mortal Strike
/cast Heroic Strike

Universal shoot macro - if you use a different type of ranged weapon for multiple gear sets:
/cast [equipped:Bows] Shoot Bow; [equipped:Crossbows] Shoot Crossbow; [equipped:Guns] Shoot Gun; [equipped:Thrown] Throw

Tanking

I use a combination of two macros for your basic tank & spank encounters

/cast Sunder Armor
/stopcasting
/cast Heroic Strike

&

/cast Revenge
/stopcasting
/cast Shield Block

I use the HS/SA one first to get excellent threat, then the revenge/SB to give good mitigation and threat, adding in the other now and then... ;)

Taunt-MB-CS - Taunt/Def Stance switch. Ctrl is Mocking Blow/Battle Stance switch. Alt is Challenging Shout.

# show Taunt
/cast [modifier:alt] Challenging Shout;[modifier:ctrl,nostance:1] Battle Stance;
[modifier:ctrl,stance:1] Mocking Blow; [stance:2] Taunt; [nostance:2] Defensive Stance

a 'castsequence' tanking macro
/castsequence reset=5 Shield Block, Revenge, Sunder Armor

Devastate, Shield Slam, and Heroic Strike. Keeps HS queued and uses Devastate and Shield Slam for your supplemental aggro. Ctrl uses Cleave instead of Heroic Strike.
/castrandom Devastate, Shield Slam
/stopcasting
/cast [modifier:ctrl] Cleave; Heroic Strike

Mocking Blow: swaps you to Battle stance and then casts Mocking Blow, then switches you back to Defensive Stance.
# show Mocking Blow
/cast [nostance:1] Battle Stance; Mocking Blow
/cast [nostance:2]Defensive Stance


Multi tanking

Seamlessly tab to the nearest target, sunder them and switch back to your current target – you won't even see the switch but they'll be sundered... ;)
/targetenemy
/cast Sunder Armor
/targetlasttarget

This macro will sunder the mob your mouse pointer is over without losing your current target (the mob must still be in melee range, of course). It also checks if the target is actually hostile and alive before doing this.
#show Sunder Armor
/cast [target=mouseover, harm, nodead] Sunder Armor

To overcome the 'tab' key's propensity to target anything, this macro first reduces the distance at which tab works to 10 units, performs the equivalent of a Tab (/targetenemy), then restores the default value.
/script SetCVar("targetNearestDistance", 10)
/targetenemy
/script SetCVar("targetNearestDistance", 41)

Thunderclap - alt to use excess rage with sunder, switch to battle stance, TC, (back) to def stance
#show Thunder Clap
/cast [stance:1] Thunder Clap; [stance:2, modifier:alt] Sunder Armor
/stopcasting
/cast [stance:1] Defensive Stance; Battle Stance

misc

activating a trinket into a macro?
/use 13
/use 14
(13 = top trinket, 14 = bottom)

left click to sharpen MH, right click to do off hand
# show Dense Sharpening Stone
/use Dense Sharpening Stone
/use [button:2] 17; 16

self bandage (1st is bandages in bag 1 position 1, 2nd position does not matter)
/use [target=player] 1 1
or
/use [target=player] Heavy Runecloth Bandage

Oh crap button: intim shout, bandage and then re-target - 3 clicks, pause for bandage after second...
/cast Intimidating Shout
/use [target=player] Heavy Runecloth Bandage
/targetlasttarget
/startattack

Lifegiving Gem-Last Stand – 1 click for LGG, then another if needed for LS..
/castsequence Lifegiving Gem, Last Stand

others

Spell reflect (not tested) If you do not have a shield equipped, it will equip the one you designate. If you have a shield equipped and are in Battle or Defensive Stance, use Spell Reflect. If you have a shield equipped and are in Berserker Stance, it will change to Defensive Stance so that Spell Reflect can be cast.
/cast [stance:1/2,equipped:Shields] Spell Reflection; [stance:3,equipped:Shields] Defensive Stance
/equip [noequipped:Shields] Elementium Reinforced Bulwark

Intervene Macro (not tested):
Right now Intervene seems like it would be quite clicky to use… First you have to notice a mob going for a teammate, click that mob, then click the target of the mob (your teammate), then cast the spell. This helps cut that down.
/cast [nostance: 2] Defensive Stance; [help] Intervene; [target=targettarget, help] Intervene
Some common macro commands...

Targeting:

/targetenemy
/targetfriend
/targetparty
/targetraid
/targetlasttarget
/targetlastenemy
/assist [name] - Assist your target or the named unit if specified

Using Items:

/use
/equip
/equipslot
/userandom , , item3, …

Examples of /equip and /use:

/equip
/equip
/equipslot
/use
/use
/use
/userandom , , will attempt to use a randomly selected one of the specified items

Pets:

/petattack
/petstay
/petpassive
/petdefensive
/petaggressive
/petautocaston
/petautocastoff

Casting:

/stopcasting
/cast [option]
/castrandom , , …
/castsequence [reset=N/target/combat/shift/alt/ctrl] , , …

Sequenced Casting

* A new command /castsequence reset=N/target/combat/shift/alt/ctrl spell1, spell2, spell3
* The reset line can specify a number of seconds after which a sequence resets, or if it should reset on target change or leaving combat.
* The sequence tracks the 'next' spell in the sequence until it resets, the next spell only advances on a successful cast.
* You can specify a conditional at the start of the command before the reset to filter whether the sequence is used (You cannot use per-spell conditionals)
* You can specify items as well as spells

Action Bars:

/changeactionbar
/swapactionbar

Attacking:

/startattack [unit]
/stopattack

Buffs/Auras:

/cancelaura [Stormpike Battle Charger]

Macros:

/stopmacro [option]

OPTIONS

If multiple options are provided for an action, they must all be met before the action will happen. The options supported are as follows:
* target=unit - Run the command and perform tests on the specified unit (only applicable to spell casting or item use). You can specify 'none' as a target unit to act as if you have no target.
* help/harm - Choose depending on whether target is assistable or attackable
* combat - Choose depending on whether you're in combat or not
* stance or stance:# - Choose depending on your stance/shapeshift ("stance" alone matches any stance)
* stealth - Choose depending on whether you are stealthed
* mounted - Choose depending on whether you are mounted
* swimming - Choose depending on whether you are swimming
* flying - Choose depending on whether you are flying
* indoors - Choose depending on whether you are indoors
* outdoors - Choose depending on whether you are outdoors
* modifier or modifier:shift|ctrl|alt - Choose depending on any modifier keys you're holding at the time the macro runs
* equipped:|| - Choose if you have the specific item type equipped
* actionbar: - Choose if a specific actionbar is shown
* button:Z - Choose if the specified button is held down
* pet:| - Choose if your current active pet has the specified name or family (e.g. pet:bear/wolf)
* channeling or channeling:spell - Choose if you are channeling (possibly a specific spell)
* exists - Choose if the target exists
* dead - Choose if the target is dead

For stance and modifier you can list multiple matching values separated by the / character for the option to be true if ANY of them are true. For example modifier:shift/ctrl matches if shift or control is held down.
Any option can be prefixed with 'no' to select if it does NOT match. For example [nocombat]

# and - are comment characters in macros
A macro that starts with "# show " will show feedback for that item or spell. A macro that starts with "# show none" will show no feedback. Otherwise the first /cast, /randomcast, /castsequence, /use, or /random use command will be used to show feedback for the macro.
--------------------
macros within macros?

/click

No comments: