Useful macros This is the main reference for useful custom WoW Macros . See also User defined macros in Snippets and the useful Class macros in the ' nav bar ' to the right . See also Classic WoW Useful macros ( 1 . 0 ) . " Note : for new macros - - put candidates in the " New macros " section below here . Should be moved to a more specific section in " General macros " , or place on a class specific macro page , after others verify they work as intended . Old Macros here can be moved and retired to the " Old macros " section when days are done or replaced . " General macros . Categorized list of generally useful custom macros . Heroic Throw + Charge . / cast Heroic Throw Determine current map coordinates . / run px , py = GetPlayerMapPosition ( " player " ) ; DEFAULT _ CHAT _ FRAME : AddMessage ( format ( " You are at : % s ( % 0 . 1f , % 0 . 1f ) " , GetZoneText ( ) , px * 100 , py * 100 ) ) ; Swapping Talents , Equipment and Stances . Swap Current Dual - Spec Swap Set then Spec . / equipset [ spec : 1 ] PSS ; SSS Swap Equipment and Stance . / equipset [ spec : 1 ] < Secondary Set Name > ; < Primary Set Name > Swap Equipment and Stance 2 . # show [ spec : 1 ] < Secondary Stance > ; [ spec : 2 ] < Primary Stance > One Button Spec , Stance , Equipment . / cast [ stance : 3 ] Defensive Stance ; [ Stance : 1 ] Berserker Stance Offhand Weapon Switching . # showtooltip [ mod ] 0 16 ; 17 Suppressing Sound and Error Messages . No Error Text or Sound ( Improved ) . / run sfx = GetCVar ( " Sound _ EnableSFX " ) ; No Error Text or Sound ( Improved Again ) . # showtooltip ExampleSpell1 Training and Leveling . Tank check avoid , dist to def - cap . Tanks : Check unhittability , avoidance , and dist to hard - defcap Trading , Bags and Money . Print money & currency to chat . Print Money and Currencies to Chat Frame Sell all grey items . / run local c , i , n , v = 0 ; for b = 0 , 4 do for s = 1 , GetContainerNumSlots ( b ) do i = { GetContainerItemInfo ( b , s ) } n = i [ 7 ] if n and string . find ( n , " 9d9d9d " ) then v = { GetItemInfo ( n ) } q = i [ 2 ] c = c + v [ 11 ] * q ; UseContainerItem ( b , s ) print ( n , q ) end ; end ; end ; print ( GetCoinText ( c ) ) Destroy all grey items . / run local i , n = 0 ; for b = 0 , 4 do for s = 1 , GetContainerNumSlots ( b ) do ClearCursor ( ) ; i = { GetContainerItemInfo ( b , s ) } ; n = i [ 7 ] ; if n and string . find ( n , " 9d9d9d " ) then PickupContainerItem ( b , s ) ; DeleteCursorItem ( ) end end end Item Link . / run local s = { " 10000 " } for i = 1 , # s do DEFAULT _ CHAT _ FRAME : AddMessage ( " \ 124c00ffffff \ Item Link : \ 124c00FF0033 \ 124Hitem : " . . s [ i ] . . " : 0 : 0 : 0 : 0 : 0 : 0 : 0 : 0 \ 124h [ ID : " . . s [ i ] . . " ] \ 124h \ 124r \ 124c00ffffff - Click ID for item info . " ) end Spell Link . / run local s = { " 10000 " } for i = 1 , # s do DEFAULT _ CHAT _ FRAME : AddMessage ( " \ 124c00ffffff \ Spell Link : \ 124c00ff0033 \ [ ID : " . . s [ i ] . . " ] \ 124c00ffffff \ - " . . GetSpellLink ( " " . . s [ i ] ) . . " . " ) end Professions . Link professions in trade . Link your professions in the trade channel Link a single profession . / 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 : Link two professions . One button to link both of your professions to trade chat and guild chat . Just replace " Inscription " and " Enchanting " with your two professions . Also , trade chat is not necessarily always your number 2 channel . Make sure you check it and adjust accordingly . Replace " channel " with " guild " to link it to your guild , or " raid " to link to raid chat . One - button disenchant / mill / prospect . One - Button Disenchant / Milling / Prospecting " You can of course change the order , skill and modifier to suit your needs " AIO Profession Button . " You can of course change the order , skill and modifier to suit your needs " Fishing . Fishing w / weather - beaten fishing hat . Fishing with your Weather - Beaten Fishing Hat Fishing equipset w / error supp . Fishing using Equipset with Error Sound / Text suppression Equip Set With Find Fish Toggle . / equipset [ equipped : Fishing Poles ] 1 ; Fishing Modifier Swap . # showtooltip Set Swap . / equipset [ noequipped : Fishing Pole , mod ] Fishing ; [ noequipped : Fishing Pole , nomod , spec : 1 ] [ mod , spec : 1 ] Set1 ; [ noequipped : Fishing Pole , nomod , spec : 2 ] [ mod , spec : 2 ] Set2 If your fishing set is equipped , click will cast Fishing , mod - click will equip the set fitting your current spec . Otherwise , mod - click will equip your fishing set , normal click will equip the spec - relevant set . Alternate version for toons with just one spec or equipment set : Auto equip manager fishing . Automated Equipment Manager Fishing & Lure Macro Binding this macro to a button on your mouse will allow for easy one handed casting and reeling . - - ( ) 15 : 53 , October 14 , 2009 ( UTC ) Multi Gathering Macro . " Can of course be modified to your liking and professions " Farming Macro . " Not really all that happy with this macro , best I could come up with maybe some one can tweek it a bit " Raiding and Parties . Post Random LFG Msg . Post Random Dungeon LFG Message in LFG Channel Reload UI and notify group . / afk reloading UI Autoassist tank if tank target can harm . Autoassist tank if the tank ' s target can be attacked Multi - Purpose Party / Solo Attack Spell . # showtooltip < spellname > This macro works a little differently than some others , as it does not perform a change to your playstyle , but merely limits mouse clicks ( if desired ) and encourages coordinated assaults . This casts a spell or ability on a priority based target . If you are targetting an enemy , it will cast at your target ; if you are targeting a friend who is attacking a mob , it will cast at their target ; if you have no target , but your focus is a mob ( i . e . boss fight ) , it will cast at the mob ; and finally if you have no target but your focus is friendly and has an enemy target , it will cast at the enemy . This has been particularly useful for our guild , allowing us to easily coordinate assaults without the requirement for mad AoE damage . Our Off - tanks typically select the main tank as their focus , while our DPS ( ranged and melee ) select their particular tank or off tank . When the focus changes targets , the DPS are immediately updated to the new target . Quite Handy ! For soloing or special circumstances where each person needs their own target , the macros don ' t hinder us in anyway because it chooses OUR target first . # showtooltip Fire Blast Multi - Purpose Party Healing . # showtooltip < spellname > This macro works like the above , save the order of priority is switched a little ( based on observed need ) . It can be used with a number of strategies , particularly when combined with the above macro . Priorities are as follows : If you are targeting a friendly , cast at them ; if your target is targeting a friendly , cast at the friendly ( useful for quick adds and bosses with random targeting ) ; if your focus is targeting a friendly , cast at the friendly ( useful for bosses ) ; if your focus is friendly , cast at the focus ; otherwise , cast at yourself . Particular bonus when you are using the Multi - Purpose Attack Spell above , as it means you may keep the same person targeted for both healing and harming . You may also create awesome heal groups , for parties with weak AoE heals setting one person as the " main heal " . These are just a couple of uses . Parties . Announce Vent in Party . / party My Guild Vent | abc . leetvent . com Raiding . Announce Vent in Raid . / rw Vent Details Posted List raid w / o food buff . List raid members without a food buff Use this version to list members without a food buff to yourself : Use this version to send the list to raid chat : List raid w / o active flask . List raid members without a flask active Use this version to list members without an active flask to yourself : Use this version to send the list to raid chat : Just For Fun . Below are macros that serve no real purpose in - game beyond amusement . Mounts . There ' s a whole page dedicated to Mount Macros . Vanity Pets . Wheel O ' Pets . / run q = C _ PetJournal ; v = { q . GetNumPets ( ) } r = random ( v [ 2 ] ) p = { q . GetPetInfoByIndex ( r ) } q . SummonPetByGUID ( p [ 1 ] ) SendChatMessage ( " spins the Wheel O ' Pets ! The wheel stops on [ " . . r . . " / " . . v [ 2 ] . . " ] : " . . p [ 8 ] . . " ! " , " emote " ) ; Random Pet with Announce . / run q = C _ PetJournal ; v = { q . GetNumPets ( ) } r = random ( v [ 2 ] ) g = { " their " , " his " , " her " } x = UnitSex ( " player " ) p = { q . GetPetInfoByIndex ( r ) } q . SummonPetByGUID ( p [ 1 ] ) SendChatMessage ( " gasps as " . . p [ 8 ] . . " hops out of " . . g [ x ] . . " pocket ! " , " emote " ) Random Pet with Dismiss . / run DismissCompanion ( " CRITTER " ) ; CallCompanion ( " CRITTER " , random ( GetNumCompanions ( " CRITTER " ) ) ) ; Summon random pet w / salutation . / run local z ; t = " CRITTER " u = GetNumCompanions ( t ) v = random ( u ) for i = u , 1 , - 1 do local _ , _ , _ , _ , s = GetCompanionInfo ( t , i ) ; if s = = 1 then z = 1 ; end end if ( z = = nil ) then c , n = GetCompanionInfo ( t , v ) SendChatMessage ( " Wow , it ' s a " . . n ) CallCompanion ( t , v ) else DismissCompanion ( t ) end Target ' s Gender . Have you ever wondered , " Is Razorscale a boy or a girl ? " , when directing a raid to attack " him " or " her " ? Well now you can pronoun with confidence ! Maybe not the most " useful " macro , but a fun one : ) Use this to discover your target ' s gender . You may be surprised , every once in a while Blizz slips up and flags Male NPCs as Female and vice - versa . Raid Blame ( now with Guild Blame ! ) . Have you ever been in a raid that had an unfortunate wipe ? Has your raid ever been left wondering , " What just happened ? Who should we blame this on ? " ? Well , wonder no more ! With this macro blame can always be placed upon those who most deserve it with 100 % accuracy ! [ NEW ! ] Too much blame to go around , and not enough raiders ? Well now you can blame the whole guild ! Food & Water . Eating and drinking . / use [ btn : 1 ] < name of water > Eat & drink w / dynamic food . Eating and drinking with dynamic food & water Old macros . Macros written before Patch 3 . 1 that have not been re - validated in newer patches can be found on the old macros page .