Gaming
 

Useful macros

From WoWWiki

(Redirected from Most used macros)
Macros
General guides

Macros Beginners Guide
Making a macro
UI FAQ/Macros and scripts
Macro API
Category:Macros

Useful macros (by class)

Useful macros for death knights Useful macros for druids Useful macros for hunters Useful macros for mages Useful macros for paladins Useful macros for priests Useful macros for rogues Useful macros for shamans Useful macros for warlocks Useful macros for warriors

Contents

New Macro Format Request

NOTE: There were substantial changes to macros in 3.1. Many spells were renamed, and much of the scripted command functionality has been modified. In an effort to keep WoWWiki posts relevant please re-validate and re-post macros that work in 3.1. When re-creating a macro please describe what it does, and note the version of WoW that you tested it in. Please follow the example format posted below:

(to get the frame around your macro, don't forget to add space before you start your macro)


Example Macro

/y Hooray, I made a macro!
  • Use: This yells, "Hooray, I made a macro!"
  • Works in 3.2


Useful Macros

Announce Vent in Raid

/rw Vent Details Posted
/raid My Guild Vent | abc.leetvent.com
/raid My Guild Vent | 1234
/raid My Guild Vent | secretpassword
/raid Normalize Vent - http://some.vent.server/somewhere
/threshold epic
/master player
  • Use: Announces your Vent details to your raid, sets your loot threshold Epic master looter (with yourself as the master looter) if you are the leader.
  • Works in 3.1.1

Announce Vent in Party

/rw Vent Details Posted
/party My Guild Vent | abc.leetvent.com
/party My Guild Vent | 1234
/party My Guild Vent | secretpassword
/party Normalize Vent - http://some.vent.server/somewhere
/threshold rare
  • Use: Announces your Vent details to your party, sets your loot threshold Rare if you are the leader.
  • Works in 3.1.1

Swap Current Dual-Spec Talent

/run if( GetActiveTalentGroup() == 1 ) then DEFAULT_CHAT_FRAME:AddMessage("Activating Secondary Spec...");SetActiveTalentGroup(2) else DEFAULT_CHAT_FRAME:AddMessage("Activating Primary Spec...");SetActiveTalentGroup(1) end
  • Use: "Quickly" swaps your Primary/Secondary talent specs.
  • Works in 3.1.1



Recommended for dual spec players who are frequently asked to swap. It announces what you're doing to whatever group you're in, configures your gear and setups your UI.

/run SendChatMessage(GetActiveTalentGroup()==2 and"Going Primary"or"Going Secondary",UnitInRaid"PlayerName"and"RAID"or GetNumPartyMembers()>0 and"PARTY"or"SAY")
/equipset [spec:2]Eq1;Eq2
/usetalents [spec:2]1;2
/changeactionbar [spec:2]1;2
  • Credit: Desiday of Antonidas
  • Replace PlayerName with the name of your character
  • Replace Primary and Secondary with something more descriptive i.e. pvp, tank, dps, heals. Note keep it short to remain under the 255 character cap
  • Make two ingame equipment sets, and name them Eq1 and Eq2. Eq1 is associated to your primary spec whereas Eq2 is associated to your secondary spec. Or replace Eq1 & Eq2 with the names of your already created equipment sets
  • Setup action bar 1 with your primary spec actions, and setup action bar 2 with your secondary spec actions. This is only necessary for players who have overlapping builds and who frequently use macros.
  • Works in 3.2.2

Swap Talents, Equipment, and Stance

This macro will switch your talent spec and put you into the respective gear and stance.

/equipset [spec:1] <Secondary Set Name>; <Primary Set Name> 
/cast [spec:1] <Secondary Stance>; <Primary Stance> 
/usetalents [spec:1] 2; 1

Here is an alternate version for fury warriors that cannot use the above macro due to Titan's Grip. Left click swaps the talent spec, right click swaps gear and stance.

#show [spec:1] <Secondary Stance>; [spec:2] <Primary Stance> 
/usetalents [button:1,spec:1] 2; [button:1,spec:2] 1 
/equipset [button:2,spec:1] <Primary Set Name>; [button:2,spec:2] <Secondary Set Name> 
/cast [spec:1] <Primary Stance>; [spec:2] <Secondary Stance>

Vanity Pets

/run DismissCompanion("CRITTER"); CallCompanion("CRITTER", random(GetNumCompanions("CRITTER")));
  • Use: This will first attempt to dismiss any vanity pet you have summoned, and then attempt to randomly summon a new one.
  • Works in 3.1.2
/run local z;for i=GetNumCompanions("CRITTER"),1,-1 do local _,_,_,_,s = GetCompanionInfo("CRITTER",i); if s==1 then z=1;end end if (z==nil) then CallCompanion("CRITTER", random(GetNumCompanions("CRITTER"))) else DismissCompanion("CRITTER") end
  • Use: This is a more advanced version of the above macro, as it first attempts to determine whether or not you already have a pet summoned. If not, it summons one, else it dismisses it. (Note: There's no IsMounted() equivalent for pets, hence the for loop)
  • Works in 3.1.2

Autojoin LFG

If you just want to join the LFG channel with one button without choosing a specific instance, the following macro will select "Zone" in the first pull-down (instead of Dungeon, Raid, etc.) and then select the first Zone in the second pull-down:

/run SetLookingForGroup(1, 5, 1)
  • Works in 3.1.3
  • Validated in 3.2.0

Autojoin LFM scouting mode

Just like the Autojoin LFG above, this will autojoin the LFG, but it will join the Zone -> Wintergrasp and then open the LFM pane, enabling you to scout for existing groups without announcing your interest:

/run SetLookingForGroup(1, 5, 3)
/lfm
  • Works in 3.2

Note: It might be necessary to change Zone -> Wintergrasp if that LFG-channel has high usage on your particular realm, as that would in a way defeat the purpose of this macro.

Offhand weapon switching

You might find yourself in a situation where you have two offhand weapons with the same name but different poisons on them and you want to switch between them quickly. Or perhaps you just want to alternate between two offhand weapons with just one hotkey.

#showtooltip [mod] 0 16; 17
/equipslot 17 0 16
  • Keep your alternate dagger in the sixteenth slot (lower right corner) of your main (rightmost) backpack.
  • The number 17 refers to your offhand weapon slot.
  • #showtooltip makes the macro's icon and tooltip display the icon of the equipped weapon, or hold down a modifier key (say Alt) and it will display the icon of the weapon that's ready to be switched in.
  • Works in 3.2.2

Professions

Fishing

Modifier Swap

#showtooltip
/cast [nomod] Fishing
/equip [noequipped:Fishing Poles, mod] Nat Pagle's Extreme Angler FC-5000
/equip [equipped:Fishing Poles, mod] Titansteel Guardian
/equip [equipped:Fishing Poles, mod] Matriarch's Spawn
  • Credit: Xaeros of Shadowmoon
  • Use:(Make sure to replace the fishing pole/weapons with your own)
    • On click, you will attempt to cast fishing.
    • On mod+click you will switch between your fishing pole and your weapon(s).
  • Works in 3.2.0a




====Automated Equipment Manager Fishing & Lure Macro==== --Taurolyon (talk) 15:53, October 14, 2009 (UTC)

/equipset [noequipped:Fishing Poles, nomod] Fishing
/cast [equipped:Fishing Poles, nomod] fishing
/use [modifier:shift] Bright Baubles
/use [modifier:shift] 16
/equipset [modifier:alt] Normal
/equipset [modifier:ctrl] DPS
  • Credit: Taurolyon of Sargeras-US --Taurolyon (talk) 15:53, October 14, 2009 (UTC)
  • To use:
  1. Create a Fishing outfit in your equipment manager (or if you use the Outfitter Addon, save the outfit to server)
    • Outfit must be named Fishing
  1. Create a Normal outfit for your primary spec
  2. Create a DPS outfit for your secondary spec (or remove the last line in the macro if you only have one set of gear/spec)
  • If you don't have your fishing pole equipped, it will automatically equip your "Fishing" outfit from your equipment manager
  • Clicking on this macro after your fishing pole is equipped, will automatically cast your line and start fishing.
  • Shift-Clicking on this macro will apply a lure to your equipped fishing pole (Change Bright Baubles to any lure you'd like. I.E. Weather-Beaten Fishing Hat)
  • Alt-Clicking on this macro will equip your Normal set of gear.
  • Ctrl-Clicking on this macro will equip your DPS set of gear.

Binding this macro to a button on your mouse will allow for easy one handed casting and reeling. --Taurolyon (talk) 15:53, October 14, 2009 (UTC)

Raiding

List raid members without a food buff

Use this version to list members without a food buff to yourself:

/run nfb="[Eat!]: ";for i=1,GetNumRaidMembers()do for b=1,40 do ua=UnitAura('raid'..i,b);if ua=="Well Fed"or ua=="Food"then break;elseif b==40 and ua~="Well Fed"then nfb=nfb..UnitName('raid'..i).." ";end;end;end;print(nfb);

Use this version to send the list to raid chat:

/run nfb="[Eat!]: ";for i=1,GetNumRaidMembers()do for b=1,40 do ua=UnitAura('raid'..i,b);if ua=="Well Fed"or ua=="Food"then break;elseif b==40 and ua~="Well Fed"then nfb=nfb..UnitName('raid'..i).." ";end;end;end;SendChatMessage(nfb,"raid");
  • Credit: Xaeros of Shadowmoon
  • Use: Click the macro to report members in raid that are neither food buffed nor eating.
  • Works in 3.2.0a

List raid members without an flask active

Use this version to list members without an active flask to yourself:

/run nf="[Flask!]: ";for i=1,GetNumRaidMembers()do for b=1,41 do ufl=UnitAura('raid'..i,b);if ufl then if strfind(ufl,"Flask")then break;end;elseif b==41 then nf=nf..UnitName('raid'..i).." ";end;end;end;print(nf);

Use this version to send the list to raid chat:

/run nf="[Flask!]: ";for i=1,GetNumRaidMembers()do for b=1,41 do ufl=UnitAura('raid'..i,b);if ufl then if strfind(ufl,"Flask")then break;end;elseif b==41 then nf=nf..UnitName('raid'..i).." ";end;end;end;SendChatMessage(nf,"raid");
  • Credit: Xaeros of Shadowmoon
  • Use: Click the macro to report members in raid that are neither food buffed nor eating.
  • Works in 3.2.0a

Reload UI and notify group

Reload your UI, send a message to your party/raid telling them you're doing so and set an appropriate /afk message.

/afk reloading UI
/run SendChatMessage("reloading my UI - afk for a sec", ((UnitInRaid("player")and "RAID")or(GetNumPartyMembers()>0 and "PARTY")or "AFK")); 
/console reloadui
  • Credit: Ashel of Antonidas
  • Works in 3.2.0a

OLD MACROS BELOW

The macros below this line have not been validated to work in 3.1. Use at your own risk.

General

For more info on the new macro syntax introduced in Patch 2.0, see HOWTO: Make a Macro.

Where Am I?

/script local px,py=GetPlayerMapPosition("player"); print(format("%s (%.1f, %.1f)",GetZoneText(),px*100,py*100))
  • Use: Prints your current location in your zone to your chat frame, with one decimal place precision (that's the "1" in "%.1f").
  • Works in 3.2.2.

Attack / Shoot / Throw

#showtooltip [nomodifier] attack; [modifier] Shoot (or Throw)
/startattack
/cast [modifier] Shoot (or Throw)

This will act like a normal Attack button, except that it won't toggle autoattack off in combat (hit escape if you need to do that). It will also show your current weapon when assigned to a quickslot. You may want to leave out the references to Shoot or Throw, or perhaps make them more precise by using [modifier:shift] or some such, depending on your style of play.

#showtooltip
/cast [equipped:Fishing Pole] Fishing; [equipped:Thrown] Throw; Shoot

The above will attempt to shoot, throw or even fish (depending on what you have equipped) For Hunters change "Thrown" to "Gun" "Crossbow" or "Bow", remove "Throw" and change "Shoot" to "Auto Shot".

#shoot
/cast !Shoot

This macro will start shooting wand, but will not toggle it off.

Keeping space, switching actions

Template

This principle is for those of us who like to keep buttons as few as possible or to bind as much actions as possible.

#showtooltip
/cast [combat] [harm,nodead] <Badass spell>
/cast [target=mouseover,help,nodead,exists] [help,nodead] [] <Fluffy spell>

or

#showtooltip
/cast [mod:ctrl,target=player] [target=mouseover,help,nodead,exists] [help,nodead] <Fluffy spell>
/cast [harm,nodead] <Badass spell>; <Fluffy spell>

will select actions based on the situation.

The first template is better to combine with exclusively non-combat beneficial spells and items, like Arcane Intellect or food & water (see below). The second template is better for use with beneficial spells which you're likely to use in combat (any heal or blessing, for example). The icon will allow you to see what exactly you're going to cast. Note that you can cast the beneficial spell on yourself by mouseovering the player frame, so "mod:ctrl" (or "alt") condition can better be used to modify the spells (example below).

Direct damage / buff spell

#showtooltip
/cast [nomod:ctrl,harm,nodead] Fireball, [mod:ctrl,harm,nodead] Pyroblast
/cast [target=mouseover,help,nodead,exists] [nomod:ctrl,help,nodead] Arcane Intellect
/cast [mod:ctrl,help,nodead] Arcane Brilliance

This convenient macro will cast Fireball / Pyroblast (depending on whether or not "Ctrl" was pressed) on a harmable target, Arcane Intellect on selected or mouseovered friendly target (mouseover the player frame to buff yourself), and Arcane Brilliance on a friendly target if "Ctrl" was pressed.

AoE harmful / direct beneficial

#showtooltip
/cast [target=mouseover,help,nodead,exists] [help,nodead] Flash of Light
/cast [nomod:ctrl] Consecration; [mod:ctrl] Consecration(Rank 1)

Since AoE spells are often used to search for rogues, they require a template which will force them to be used under any circumstances except when something friendly is mouseovered or directly targeted.

Combat spell / food & drink

#showtooltip
/cast [combat] [harm,nodead] <Combat spell>
/use <Water>
/use <Food>

A very good use for these macros is to put food & water on them so you'll never have to click something by mouse when grinding!


Some of these macros have not yet been tested directly but the overall principle works.

Targets

Swap focus / target

/stopmacro [noexists][target=focus,noexists]
/target focus
/targetlasttarget
/focus
/targetlasttarget 

For more information about the focus and how to use it, see Focus target.

Advanced swap focus / target

/focus [target=focus, noexists]
/target [combat, noexists] focus
/clearfocus [nocombat, noexists]
/stopmacro [target=focus, noexists]
/target focus
/targetlasttarget
/focus [exists]
/targetlasttarget

Sets the focus if you don't have one; clears the focus if you're out of combat and don't have a target; targets the focus if you're in combat and don't have a target; otherwise swaps the target and focus.

Cast on moused-over unit

/cast [target=mouseover, exists][] Name Of Spell

The player or mob that is under your mouse pointer will be the one that is hit or healed by your spell. If there is nothing there, your selected target will be used.

Autoassist tank if the tank's target can be attacked

/target [target=focustarget, harm, nodead]

Use /focus to set focus on the main tank. Your target will be set to the main tank's target, but only if the tank is targeting an enemy which is alive.

#show Attack
/target [target=focustarget, harm, nodead]
/startattack

The melee dps version also starts attacking, and sets the icon to your attack ability.

Crowd Control stays on 1 mob

Macro Behavior
"First use" or right-clickMarks the mob as your "focus" and attempts to control it.
Until focus is deadAttempts to control the focus without changing targets.
No targetCancel the focus; next cast will be the "first use".
/focus [target=focus, exists, nodead] focus; [btn:2][] target
/cast [target=focus] Shackle Undead

Replace Shackle Undead with a spell name appropriate to your class.

The purpose of this macro is to eliminate micro-management of CC. Once a target is identified for control, another target may be selected for healing or damage, and the controlled target will be the victim of renewed control until it is dead.

It is common for people to add a shout (e.g.: /y Controlling >>%t<<... You spank it, you tank it!) to warn off would-be sheep-breakers.

Raid icons, Lucky Charms

/script SetRaidTarget("target", n)

where n is:

  1. Yellow 4-point Star
  2. Orange Circle
  3. Purple Diamond
  4. Green Triangle
  5. White Crescent Moon
  6. Blue Square
  7. Red "X" Cross
  8. White Skull

and 0 is no icon. It's more helpful when used in the same macro call as preparing to sheep (when you as mage are leader) and other CC preps. Alone, this command line isn't that useful unless with a key binding, since you can just rightclick the unit frame to change the icon.

Lucky Charms with Mouseover

/script SetRaidTarget("mouseover", n)

Combined with key bindings, this macro makes for extremely fast marking. See above for corresponding values for "n."

Tank assist macros

/focus [modifier:shift] target
/target [modifier:alt] focus
/target [nomodifier:shift/alt] targettarget

This macro sets the focus with shift-button, targets it with alt-button, and targets the target of the focus with the button itself. Useful for DPS trying to target what the tank is targeting in a pack, or just to keep track of a polymorphed target.

or:

/focus [modifier:alt]
/stopmacro [modifier:alt]
/cleartarget
/assist focus

Begin by selecting the MT/MA and then click the assist macro with the alt pressed. If no Focus (MT/MA) has been set and the macro is clicked, you will receive a UI message stating "Unknown Unit." If you have set your Focus and just click the macro, you will assist the MT/MA and target his or her target.

Mounts

There's a whole page dedicated to Mount Macros.

Bandages

Heavy Netherweave Bandage on self

/use [target=player] Heavy Netherweave Bandage

This macro will always use Heavy Netherweave Bandages on yourself, regardless of target.

Heavy Netherweave Bandage friendly then self

/use [help,nomodifier:alt] Heavy Netherweave Bandage; [target=player] Heavy Netherweave Bandage

This macro will use a Heavy Netherweave Bandage on your target if you can, yourself otherwise. If you hold down ALT, you will always bandage yourself.

Specify target by modifier key

/use [modifier:alt,target=player] Heavy Netherweave Bandage
/use [modifier:ctrl,target=pet] Heavy Netherweave Bandage
/use [help] Heavy Netherweave Bandage
  1. If you Click the macro while holding down the ALT key, you will bandage yourself.
  2. If you Click the macro while holding down the CTRL key, you will bandage your pet.
  3. If you Click the macro by it self, you will bandage a friendly target.

Bags and money

Sell all grey items

/script for bag = 0, 4 do for slot = 1, GetContainerNumSlots(bag) do local name = GetContainerItemLink(bag,slot) if name and string.find(name,"ff9d9d9d") then DEFAULT_CHAT_FRAME:AddMessage("Selling "..name) UseContainerItem(bag,slot) end end end

Mail all green items (Good for mailing greens to be disenchanted)

/run for bag=0,4 do for slot=1,GetContainerNumSlots(bag) do local texture,itemCount,locked,quality=GetContainerItemInfo(bag,slot) if quality==2 then UseContainerItem(bag,slot) end end end

The mailbox must be open on the Send tab (preferably with a To: name typed in) to use this.

Get all money from mail items (Good for Auction House sales)

/script CheckInbox() for m = GetInboxNumItems(), 1, -1 do TakeInboxMoney( m ) end

If there is any money in any of your mail messages it will be collected. As for the Auction House messages, once the money is collected the message will be removed. Your mailbox must be open before the script will work.

Get all items from mail (edit of macro above)

/script CheckInbox() for m = GetInboxNumItems(), 1, -1 do TakeInboxItem( m ) end

This macro will remove any items in your mailbox. Your mailbox must be open before the script will work.

Swap carried & bank bags

/script PickupInventoryItem(20) PickupInventoryItem(71)
/script PickupInventoryItem(21) PickupInventoryItem(70)
/script PickupInventoryItem(22) PickupInventoryItem(69)
/script PickupInventoryItem(23) PickupInventoryItem(68)

Use: Swap your four bags with the first four bags in the bank. You have to be in the bank and open the window before you use the macro. It is very helpful if you have bags with your tools and other stuff you need for your jobs.

Open all bags

/script OpenAllBags()

This macro opens all bags, the same as pressing shift-B in the default keybindings. Useful if you want to put a button for this on an action bar.

Open all bags but leftmost one

/run o=OpenAllBags c=CloseAllBags i=IsBagOpen cw=CloseBag if i(0) and i(1) and i(2) and i(3) and not i(4) then c() cw(0); else if i(0) or i(1) or i(2) or i(3) or i(4) then c() cw(0) o() cw(4) else o() cw(4) end;end

One could find this macro useful if playing as a Warlock and wanting to open all bags at once but the SoulBag. Please note: My SoulBag is the leftmost one but one can easily replace the code in the script above to leave closed whichever she prefers.

Background information: In v2.3.3.7799 the "CloseAllBags" function is buggy: under certain conditions, it ignores the backpack. This fact led the macro author to create a longer macro than he would have preferred.

Quests

One-click Northrend dailies

/use item:42246
/use item:42164
/use item:40946
/use item:34127
/use item:42480
/use item:40587
/use item:43147
/use item:43101
/use item:43149
/use item:43142
/use item:35506
/use item:38566
/use item:38556
/use item:38544
/use item:38574
/use item:42479

This macro has the Ebon Blade Banner, Darkmender's Tincture, Hodir's Horn, Essence of Ice, Raelorasz's Spear, Dalaran cooking dailies (ie:the stewpots), Steel Spade, Incinerating Oil, Argent Crusade Banner, High Impact Grenade, Ethereal Worg's Fang, Anuniaq's Net and Tasty Reef Fish. Please feel free to request in the discussion page other dailies you would like to see added here, and anything you find wrong with this daily. Hotkey this and enjoy never searching your bags for your quest items that need using every day. 255 characters exactly!

One-click Skyguard / Ogri'la / Netherwing dailies

#show [mounted]Skyguard Bombs; Fel Gland
/use [mounted]Skyguard Bombs
/use [mounted]Skyguard Blasting Charges
/target [mounted]Diso
/use [mounted]Booterang
/stopmacro [mounted]
/use Banishing Crystal
/use Yarzill's Mutton
/use Wrangling Rope

These are all items used in the pre-2.4 daily quests put together in a single button. If you choose the Question Mark for the icon, it will show [Skyguard Bombs] while mounted and the number of [Fel Glands] you have while dismounted. It won't show the cooldown on the blasting charges nor the number of Apexis Shards you possess - unless you change the #show line, of course.

Note that this will not work for druids in flight form.

One-click Shattered Sun Offensive dailies

#show [mounted]item:34475;item:34338
/use item:34414
/use item:34533
/use item:34368
/use item:34338
/use item:34255
/use item:34248
/use item:34500
/use item:34483
/use item:34475
/use 1
/use [btn:2]item:34489

There are so many quest items associated with Quel'Danas dailies that they all had to be converted to item ID format to save space. If you choose the Question Mark for the icon, it will show [Arcane Charges] while mounted and the number of [Mana Remnants] you have while dismounted.

The macro normally attempts to use every item available to the quests except Flaming Oil. To use the oil, right-click the macro button instead. (If you prefer the ALT key, change btn:2 to mod:alt.) This distinction was made due to the oil's ability to override Arcane Charges.

Equipment of Multiphase Spectrographic Goggles has also been omitted from the macro since it would become equipped too early, and decrease player stats for the other dailies. Here are the omitted lines, but they make the macro too long. Remove any 1 quest that you prefer to skip, and replace /use 1 with:

/equip [mounted]item:35233
/use 1
/equip [noworn:1]item:#####

... where ##### is the item number of your standard helm. Be sure to use the macro as you fly into Nagrand.

List objectives

/script i = GetNumQuestLeaderBoards(); for j = 1, i, 1 do a1, a2, a3 = GetQuestLogLeaderBoard(j); SendChatMessage(a1, "PARTY"); end;

Use: Sends your current quest objectives to party chat. This way, you don't have to constantly type to party members how many of each creature you need to complete a quest.

bugged: always displays the first item, even if it's not being tracked.

Bypass turn-in dialogue

/script SelectGossipAvailableQuest(1)
/script SelectGossipActiveQuest(1)
/script CompleteQuest()
/script SelectGossipOption(1)
/script AcceptQuest()
/script GetQuestReward(1)

This macro will do the following: Attempt to bypass any initial dialogue with an NPC (such as a banker or flightmaster, or any NPC with only one quest available), Select the first quest reward available (can be dangerous if you get too addicted to this macro), Turn in a quest. Credit goes to www.Feign.org from back in the halcyon days of CC Rep farming when it was possible to get a quest done twice in one go - with a fast mount and mad skills.

Do not add the command /startattack no matter how tempting it is, you'll inevitably find yourself turning in a quest in a neutral town with an opposing-faction player standing in close proximity behind the quest NPC - with hilarious consequences. Add the line /cast [insert skill/spell of choice here] at the end of macro to make it truly vital. The druid version, for example, casts Faerie Fire or Faerie Fire (Feral) depending on whether the druid is in form or not.

Automatically Abandon the First Quest in the Quest Log

This macro can be used to abandon a quest without clicking the abandon button and confirming your decision. It's most useful to perform this repeatedly to clear out your quest log.

/script SelectQuestLogEntry(1); SetAbandonQuest(); AbandonQuest();

Drinking

Mana Potion / Water

This macro will use a mana potion if you're in combat, or your favorite beverage when not in combat. Use the icon and it will show which one will be used. Substitute your item names:

/use [combat] Super Mana Potion; [nocombat] Filtered Draenic Water

Water / Manna Biscuit

This will use Purified Dranic Water on normal click and Conjured Manna Biscuits on shift-, alt- or ctrl-click if found in your inventory.

#showtooltip
/use [nomodifier]Purified Draenic Water; [modifier] Conjured Manna Biscuit

This macro will use your Manna Biscuits if you have any, if not will use your Naaru Rations.

#showtooltip Naaru Ration
/use Conjured Manna Biscuit
/use Naaru Ration

Mana / Healing / Dreamless Sleep Potions

This macro will use a Super Mana Potion with a normal click, a Super Healing Potion with a alt- click or a Major Dreamless Sleep Potion with a ctrl- click. You can change the potions to whatever suits you best.

/use [nomodifier]Super Mana Potion; [modifier:alt ] Super Healing Potion;[modifier:ctrl] Major Dreamless Sleep Potion

Racial abilities

Forsaken

One-key Will of the Forsaken and Cannibalize

This macro will use Will of the Forsaken if in combat, or Cannibalize if not in combat:

#showtooltip
/cast [nocombat,mod:alt] Will of the Forsaken
/cast [combat,mod:alt] Cannibalize
/cast [combat] Will of the Forsaken
/cast [nocombat] Cannibalize

Notice that holding down the alt button will reverse the abilities, letting the user execute Will of the Forsaken outside of combat or Cannibalize inside of combat. This manual override is included because though Will of the Forsaken is mostly a combat ability and Cannibalize is a non-combat ability, there are times when it is useful otherwise. For example, if a mob fears the player just before dying, the combat condition might be cancelled but the player runs the risk of inadventently moving into the aggro range of another mob and adding. Likewise, during a particularly long encounter a player may need to break from combat and Cannibalize to regain health while the rest of the party is still engaged.

Cooking

This consolidates the cooking button, and creating a fire. This is separated with simple left/right-click logic.

#showtooltip Cooking
/use [button:1] Cooking
/cast [button:2] Basic Campfire

Fishing

Two Modifier Swap

/equip [noequipped:Fishing Poles, nomodifier:alt] Seth's Graphite Fishing Pole
/equip [modifier:alt] Mana Wrath
/equip [modifier:alt] Lamp of Peaceful Radiance
/cast [equipped:Fishing Poles, nomodifier:alt] Fishing

This macro is handy in that on a regular click (or hotkey press) it will equip your fishing pole (simply change Seth's Graphite Fishing Pole to the name of whichever pole you use), and when pressed again will begin fishing. On an alt-click (or alt+hotkey) it will re-equip your normal weapon(s). If you use a two hand weapon, simply take out the third line and change Mana Wrath to your own main weapon, otherwise if you use two change Mana Wrath and Lamp of Peaceful Radiance to your own particular weapons. This macro also avoids any error messages from popping up. You could also add to this macro to have it swap out a Lucky Fishing Hat or gloves with the fishing enchant as well, if you had them.

2H Coordinate Swap 1

Another, more simple, fishing macro is this:

#showtooltip Fishing
/cast [button:1] Fishing
/use [button:2] x y

Replace x and y with the container location of your fishing pole (bag slot and item slot respectively.) A right-click will equip or unequip a fishing pole, and a left click will cast a lure. Note though that this macro only works with two-handed weapons and not a single-handed weapon and an offhand item, shield, or weapon; if you are going to use other than a two-handed item, use the first macro.

2H Coordinate Swap 2

Here is a more elaborate version:

#showtooltip Fishing
/equip [noequipped:Fishing Poles, nomodifier:alt] x y
/equip [modifier:alt] x y
/cast [equipped:Fishing Poles, nomodifier:alt, nomodifier:ctrl] Fishing
/use [modifier:ctrl] x z
/use [modifier:ctrl] 16

It will equip your fishing pole if not equipped, or cast Fishing. If you hold alt it will equip your weapon. If you hold ctrl it will use a fishing lure. The bag number is x, y is the slot your fishing pole is in, z is the slot for the lures. Again this works best if you have a two-handed weapon.

Outfitter + Coordinate Swap

Here is a complete fishing macro that utilizes the Outfitter add-on:

#showtooltip [mod:shift] 4 17; [mod:ctrl] 4 13;Fishing
/cast [equipped:Fishing Pole, nomod:shift, nomod:ctrl] Fishing
/use [mod:shift, equipped:Fishing Pole] 4 17
/use [mod:shift, equipped:Fishing Pole] 16
/stopmacro [nomod:ctrl]
/outfitter toggle Fishing

Where x y and z i are the bag locations of your lure and your pole, respectively. With no modifiers and a fishing pole equipped, this will cast fishing. With shift held and a fishing pole equipped, it will use your lure. With control pressed, it will toggle the "Fishing" outfit using Outfitter, which will automatically unequip your fishing outfit if you enter combat.

Fishing with your Weather-Beaten Fishing Hat

This macro will equip your fishing pole and Weather-Beaten Fishing Hat, attach lure and start fishing just by repeatedly clicking the button. One-button fishing never was easier. Change the name of your fishing pole if you are not exalted with the Tuskar yet.

#showtooltip
#show Fishing
/equip Mastercraft Kalu'ak Fishing Pole;
/stopmacro [noequipped:Fishing Poles]
/equip Weather-Beaten Fishing Hat
/use Weather-Beaten Fishing Hat
/run UIErrorsFrame:Clear()
/cast Fishing

Count fish

#show Speckled Tastyfish

If you want to keep track of how many of a specific kind of fish you have, use the icon and this macro.

Autolure

This macro is useful to automatically set a lure to your fishing pole, if you're a using a shortcut to /cast fishing.

/cast Lure
/equip Pole
/cast Fishing

If no lure is active, then it'll cast one, if a lure is active, then it'll simply just fish. Change Lure to the name of whichever lure you are using and Pole to the name of whichever pole you are using.

Announce resurrection target

/run R=R or CreateFrame("Frame")R:RegisterEvent("UNIT_SPELLCAST_SENT")R:SetScript("OnEvent",function(R,E,T,T,T,T)SendChatMessage("Rezzing "..(T or UnitName("mouseover")),"YELL")R:UnregisterEvent(E)end)
/cast Rebirth

This macro yells out the intent to resurrect someone ("Rezzing Name", or Corpse of Name if released) as the spell is cast. Coordination of rezzers saves mana and time, especially after a raid wipe.

Rebirth is the druid rez; it leaves you with 40 letters to improve upon the message. The longest-named rez in the game, Ancestral Spirit, leaves 31 letters.

It may be possible to find an AddOn that does the work of this macro - however, it was not always possible to identify a ghost player with a spell. Many rezzers have been witnessed making the bizarre claim "Rezzing <no target>".

Toggle gathering

/castsequence [nocombat] find herbs, find minerals

Simple macro now that changes between Find Herbs, Find Minerals - bind it to a mouse key and you can change it every few second or so as you run along.

For hunters, warlocks, druids and paladins it is easy to add in the other tracks, or make your own. Simply substitute for one of the finds below, or add on to the end, separated only by a comma. I have included some examples here.

The [nocombat] check in the macros is so you don't accidentally trigger a global cooldown in combat.

/script T,F=T or 0,F or CreateFrame("frame")if X then X=nil else X=function()local t=GetTime()if t-T<3 or not IsMounted() or UnitAffectingCombat("player")then return;end;SetTracking(t%2+1)T=t end end F:SetScript("OnUpdate",X) 

Macro that allow you alternate tracking automatically,once active tracking herb and tracking mine will be alternated every 3 sec,it will be inactive if you run this macro again. This macro will not active if you are mounted or in combat,you can delete [or not IsMounted()]or[or UnitAffectingCombat("player")] to have it be active when you are mounted and in combat

Follow with emote

/follow
/script if UnitIsPlayer("target") and UnitIsFriend("player","target") and CheckInteractDistance("target",4) and not IsControlKeyDown() then SendChatMessage("is following "..UnitName("target")..".","EMOTE") end

This macro is equivalent to following a unit - like using the "/f" command - and typing "/me is following %t."

If /follow is likely to fail or the control key is down, there is no emote.

Battleground

/yell "%n, stop running so I can heal you!"

This is a simple macro for a healer in a battleground. Often your heal targets will be running away from battle, so you must tell them to stop running.

Battle map

/script BattlefieldMinimap_LoadUI() if BattlefieldMinimap:IsVisible() then MiniMapBattlefieldFrame.status = ""; BattlefieldMinimap:Hide() else MiniMapBattlefieldFrame.status = "active"; BattlefieldMinimap:Show() end

This macro will toggle the battle map in every region, just like in the battlegrounds and the areas with outdoor pvp. Take care to combine lines 2 through 4 as shown above into a single line (put a space at the end of each line and remove the linebreak).

Shift- M toggles the battlemap for all zones without the need for this macro. There is also an option in the menu <esc> <Interface Options> to control default settings of the battlemap.

World map

/script ToggleFrame(WorldMapFrame);

This macro will toggle the world map, just like pressing "M" with the default keybinding. The ToggleWorldMap() API apparently does not work in a macro. Useful if you want to put a button for this on an action bar.

While these macros are useful for switching weapons with different names, if you have 2 weapons with the same name, which often happens when you wish to have different enchants, WoW will not know which you are referring to using a name or an item ID. This is remedied by using a mod like Baud Gear which keeps track of individual pieces of gear.


Easy equip off-hand

See the top section for an offhand swapping macro.

/equipslot 17 *Your weapon name*

Use: Equips the weapon you choose into your off-hand instead of your main, so you can switch back and forth between 2-Handed/1-Handed+Shield sets and Dual Wielding easily. (Select the question mark for your picture, so the icon is your weapon of choice.)

/equipslot [equipped:Two-Hand] 16 *One-Hand Weapon name*
/equipslot [equipped:Two-Hand] 17 *Shield name*
/equipslot [equipped:One-Hand] 16 *Two-Hand Weapon name*

Above macro allows you to quickly interchange your One-Handed+Shield with Two-Handed weapon. When One-Hand+Shield is equipped it will equip Two-Handed weapon and viceversa. Select the question mark for your picture, so the icon is your weapon of choice. Change the names of weapons and shield to the ones you currently use. If you wish to use Dual-Wield instead of One-Hand+Shield just change the second line to the weapon instead of the shield

/equip [equipped:Two-Hand] *DPS One-Hand Weapon name*
/equip [equipped:Two-Hand] *Off-Hand Weapon name*
/equip [equipped:One-Hand] *Tanking Weapon name*
/equip [equipped:One-Hand] *Shield name*
/equip [equipped:Shields] *Two-Hand Weapon name*

This macro will cycle through three sets of weapons (NOTE: If you use the same main-hand weapon for both DPS and Tanking the third line is not necessary)

Cycle (Starting with Two-Hand equipped):

  • Cycles to Dual Wield weapons
  • Cycles to Tanking weapon + Shield
  • Cycles to *Two-Hand weapon

Note: Will "double switch" trying to re-equip tanking weapons prior to Two-Hand. At the moment, I don't know how to check for One-Hand weapon in Off-Hand slot (if I did this "double switch" would not exist as that would be the requirement for equipping a shield.

Possible Work around is to configure this to Cntrl Alt Shift and/or no modifier

/equipslot [modifier:alt] 17 *Shield name*
/equipslot [modifier:alt] 16 *One-Hand Weapon name*
/equipslot [nomodifier] 16 *Two-Hand Weapon name*
/equipslot [modifier:shift] 17 *Offhand Weapon*
/equipslot [modifier:shift] 16 *MainHand Weapon name*

Use or swap trinket

#showtooltip
/use [nobutton:2] Z
/equipslot [button:2] Z X Y

This will use the trinket in slot Z, unless you click button 2, in which case it will equip the trinket at bag coordinates X,Y. Useful for engineers with multiple trinkets on separate cooldowns (i.e. Goblin Mortar and Goblin Dragon Gun in slot 13, Goblin Bomb Dispenser and Mithril Mechanical Dragonling in slot 14).

Use either trinket

This macro activates the upper trinket if it is not on cooldown. If it is on cooldown, the macro tries to activate the lower trinket. This is useful if you have two trinkets on short cooldowns that do similar things (add attack power, add spell damage, add healing, etc.). You will get an error that one item is not ready every time you use this macro.

/use 13
/use 14

Here is another example using /castsequence and setting the reset timer to your primary trinket's cooldown. When you use the first trinket (use the '?' icon!) you will see the icon switch to your second trinket. If you use your second trinket or wait the reset time it will switch back to your primary trink. Like above, this is useful for trinkets that do similar things, as shown in this example.

/castsequence reset=90 Bladefist's Breadth, Blackhand's Breadth

Another version of this macro is this:

/use [button:1] 13
/use [button:2] 14

This macro is useful if you have trinkets that do dissimilar things. Left-clicking the macro will use the first trinket, right-clicking the macro will use the second trinket.

This example disables the annoying sound you get when your trinkets are on cooldown (credit to Syrloin on Steemwheedle Cartel):

/run SetCVar("Sound_EnableSFX","0")
/use 13
/use 14
/run SetCVar("Sound_EnableSFX","1")
/castsequence X, Y, Z

This is the same as the previous one but also disables the red error messages. In addition, the sound issue can be solved with fewer characters leaving you with extra characters for those long spell names.

/script UIErrorsFrame:UnregisterEvent("UI_ERROR_MESSAGE");
/console Sound_EnableSFX 0
/use 13
/use 14
/cast Spellname
/script UIErrorsFrame:RegisterEvent("UI_ERROR_MESSAGE");
/console Sound_EnableSFX 1

This next macro moves the spellcast to the end, outside of the sound toggling. This allows the "that spell is not ready yet" warning if the final spell is indeed not ready, but still prevents the voice emote for the trinkets. Also, in recent release you no longer need any more error management than clearing the error frame.

/console Sound_EnableSFX 0
/use 13
/use 14
/script UIErrorsFrame:Clear()
/console Sound_EnableSFX 1
/cast Mind Blast

For offensive spells, the following line can be added at the top to prevent trinket use if there is no target selected, or the target is not an enemy.

/stopmacro [help] [noexists]

Interface (How to find hidden program information)

Some AddOns include a library that provides the /print command. When the command is available, it can replace any DEFAULT_CHAT_FRAME:AddMessage( &ltcode&gt ) phrase in a macro with /print &ltcode&gt.

Get itemNumber (Used to shrink a macro)

/script local infoType, info1, info2 = GetCursorInfo(); if infoType == "item" then DEFAULT_CHAT_FRAME:AddMessage( info1 ); end

This macro uses the script language to obtain the item number of what is on the cursor and displays it in the chat window. Assign the macro to a hotkey, pick up an item with the cursor, and hit the hotkey of the macro to see the item's number. This is useful for shortening macros by replacing long item names with item:#####.

Get frame name

/script DEFAULT_CHAT_FRAME:AddMessage( GetMouseFocus():GetName() );

You can bind this macro to a hotkey, then hover your mouse over a frame and press this macro, and the name of the frame under your mouse will go to the chat frame. This is mostly useful to help identify AddOns that are making odd frames on the screen.

Get icon name / "texture"

/script local type, id, book = GetCursorInfo();DEFAULT_CHAT_FRAME:AddMessage((type=="item") and GetItemIcon(id) or (type=="spell") and GetSpellTexture(id,book) or (type=="macro") and select(2,GetMacroInfo(id)))

Assign the macro to a hotkey, pick up an item, spell, or macro with the cursor, and hit the hotkey of the macro to see the filename of the object's image. The filename is relative to the World of Warcraft installation folder, and may not actually be 'there' on your hard drive since the program has a virtual directory system. This is useful only to programmers and those curious enough to ask.

Profession Macros

Easy Milling/Prospecting

#showtooltip
/script SetCVar("AutoLootDefault", 1)
/cast Milling
/use Herb A
/use Herb B
/use Herb C
/in 1 /script SetCVar("AutoLootDefault", 0)
  • Replace Milling with Prospecting for Jewelcrafters.
  • Replace "Herb A" "Herb B" "Herb C" with the Herbs/Ores you wish to use. You can add more or less, just follow the same format.
  • You can remove the script lines if you already have autoloot on by default.


Link your profession in the trade channel

/script CastSpellByName(#prof#);SendChatMessage("I'll create items against mats, look out: "..GetTradeSkillListLink(),"CHANNEL",nil,GetChannelName("Trade - City"));CloseTradeSkill();

This macro sends a link with your Profession recipes to a Channel.

Replace #prof# with your profession. If your Profession is Engineering, then write:

/script CastSpellByName("Engineering");SendChatMessage("I'll create items against mats, look out: "..GetTradeSkillListLink(),"CHANNEL",nil,GetChannelName("Trade - City"));CloseTradeSkill();


Link two professions in trade channel and guild chat

One button to link both of your professions to trade chat and guild chat. Just replace "Jewelcrafting" and "Enchanting" with your two professions. It's not very well documented, but the GetSpellLink() function now returns profession links, when available, in addition to the regular spell link, as of 3.0.1. The trick is to use select() to pull the desired link from the array.

/script SendChatMessage(select(2,GetSpellLink("Jewelcrafting"))..select(2,GetSpellLink("Enchanting")),"CHANNEL",nil,GetChannelName("Trade - City")); SendChatMessage(select(2,GetSpellLink("Jewelcrafting"))..select(2,GetSpellLink("Enchanting")),"Guild");


Easy Borean Leather

This macro was made by Pyroshen of Wowhead. Just spam this macro and you'll make a few Borean Leather from Borean Leather Scraps.

/use Borean Leather scraps
/use Borean Leather scraps
/use Borean Leather scraps
/use Borean Leather scraps
/use Borean Leather scraps
/use Borean Leather scraps

This is also easily accomplished by simply putting your stack of Borean Leather Scraps on a hotbar button, and clicking the item as you would when using a scroll or a potion. It's not affected by the Global Cool-Down, so you can spam it as well. An advantange to using this method is that you will not only be shown you how many Scraps you have in your bags/containers, but it will accomplish the same task without actually using one of your available macro slots.

As an alternative, you could make something like

/use Jaggal Clam
/use Thick-shelled Clam
/use Big-mouth Clam
/use Borean Leather scraps
/use Darkwater Clam
/use Crystallized Air
/use Crystallized Earth
/use Crystallized Fire
/use Crystallized Life
/use Crystallized Shadow
/use Crystallized Water

To easily open clams and combine a variety of combinable items. One advantage is that you can use the macro while having the bank screen opened.