WoWMacros

From HerzbubeWiki
Jump to: navigation, search

This page lists a number of macros that I found useful for playing World of Warcraft.


References

Making a macro 
Wowpedia article on macro basics
Chat command glossary 
A full list of the available chat commands with short explanations, on worldofwarcraft.com
Official Lua Reference Manual 
Note that WoW implements only a subset of version 5.1 of the official Lua specification.
World of Warcraft API 
A possibly incomplete and out-of-date list of API functions on wowpedia.org


Lua notes

General

  • Separate commands by semicolon
  • if-then-elseif-else-end
  • condition "is not equal" is written like this: "~="
  • String concatenation
"foo".."bar"
  • Local variable declaration
local foo = "bar";   -- initialization is optional


UnitName()

  • Function takes a unit name as argument
  • Examples:
    • UnitName("Herzdruid") results in "Herzdruid"
    • UnitName("target") results in the name of whatever is currently targetted
  • UnitName() does not like nil as an argument -> check first with if


Assist macros

Overview

The macros developed here were inspired by the addon SimpleAssist. The function of the first "remembering" macro is to take the name of the currently targetted player and use it to create the second "assisting" macro. This is the one that you will actually use for doing assists.

Important references were the following pages


Remember assist player

Name this macro something like "MySASet":

/run local u=UnitName("target");local b="/assist target";if(u~=nil and UnitIsPlayer("target") and UnitIsFriend("player", "target")) then b="/assist "..u; end; EditMacro("MySA", nil, nil, b, 1, nil)


Assist the remembered player

Simply create an empty macro named "MySA" (or whatever name is used in the "remembering" macro above). The macro will be overwritten each time you execute the "remembering" macro. It will look something like this:

/assist Foo


Applying a CC spell

/stopcasting
/targetfocus
/cast Entangling Roots
/targetlasttarget

Alternative mouseover macro:

/stopcasting
/cast [target=mouseover, harm] Entangling Roots


Use a random mount or pet

Mounts:

/castrandom Swift Green Mechanostrider, Black Battlestrider, Summon Dreadsteed

Pets:

TBD


Buffing

Overview

The following macros are class-specific and are intended to simplify applying a series of buffs to a target player (including oneself). The intent is that the macro contains the knowledge which buffs to apply, and that you can simply spam it until all buffs have been applied. Benefits:

  • You don't have to remember so many buffs that you need to apply (e.g. 6 buffs in the case of my Shadow Priest!)
  • It allows you to free up valuable buttons in your UI


Priest buffing

Notes

  • Put Inner Fire, Vampiric Embrace and Shadowform at the end, this allows using the macro on other players: When the sequence reaches Inner Fire (the first spell castable only on yourself) it will fail and remain at this step until one of the reset conditions (10 seconds have elapsed, target has changed) trigger
  • Put Inner Fire before Vampiric Embrace and Shadowform, this allows using the macro both with a Holy build and a Shadow build; when using it with a Holy build, the sequence will fail when it reaches Vampiric Embrace, but that's ok
  • If you are in Shadowform when the sequence reaches the final spell, Shadowform will first toggle off; the macro can then simply be clicked one more time to toggle on Shadowform, thus completing the sequence; I have not found a way to prevent the toggling off
    • !Shadowform didn't work, resulting in an error message which was, I think, "this spell is not ready yet"
    • [nostance] didn't work because it is an option that applies to the entire /castsequence command
  • 10 seconds for a reset depends on my taste
  • Changing the target is obviously a good reason for resetting the condition
/castsequence reset=10/target Power Word: Fortitude, Divine Spirit, Shadow Protection, Inner Fire, Vampiric Embrace, Shadowform;
/castsequence [modifier:rightmousebutton] reset=10 Prayer of Fortitude, Prayer of Spirit, Prayer of Shadow Protection


Auto-attack/Auto-shot

The purpose of the following macros is to be able to use Auto-attack and Auto-shot repeatedly, without accidentally toggling the attack off if it is already on. These are the use cases:

  • My priest often uses Auto-shot after an initial opening attack; if I am not very careful in timing, the GCD is still in place and Auto-shot fails. For this reason I am used to spam Auto-shot, but this can have the unwanted effect of turning Auto-shot off if it is already on (if by accident I have managed the timing correctly :-)), wasting precious seconds in a tough fight, and - even more importantly - binding some of my precious attention span to check whether this darn Auto-shot is finally working. The macro lets me spam Auto-shot without all these concerns.
  • In the heat of battle I sometimes have trouble seeing if my melee character is actually doing its job or just standing around lazily because I have accidentally toggled Auto-attack off. Using the macro lets me spam Auto-attack without fear of accidentally turning the attack off, so I can focus more on positioning my character (e.g. if the target is out of reach)
/cast !Auto Attack
/cast !Auto Shot


Prowl-always-on

I use this macro basically with the same intentions as explained above for Auto-attack and Auto-shot: I can use the Prowl button without fear of accidentally breaking Prowl:

/cast !Prowl


Attack rotation macros

Overview

Every class has one or more typical attack rotations. When you know your rotation by heart it might by tempting to put all the abilities into a single macro whose button you can then spam without too much thought. Especially tempting during leveling...


Shadow Priest attack

Attack #1:

/castsequence reset=10/target Mind Blast, Shadow Word: Pain, Mind Flay, Vampiric Touch, Mind Blast, !Shoot

Attack #2 (a bit more economic):

/castsequence  reset=10/target Vampiric Touch, Mind Flay, Shadow Word: Pain, Mind Blast, !Shoot

Attack #3 (Leveling around 80) /castsequence reset=10/target Mind Blast, Shadow Word: Pain, Mind Flay, Mind Flay, Mind Flay, Mind Spike, Mind Spike, Mind Blast, !Shoot

Notes about macro 3

  • Although Mind Blast is more expensive than Mind Spike, we start with Mind Blast to get the potential benefit of Paralysis (if Mind Blast hits critically the target will be unable to move for 2 or 4 seconds (depending if you spent 1 or 2 skill points on Paralysis)).
  • Mind Flay is the bread & butter spell of a Shadow Priest, so we apply it 3 times
  • At this time the target is probably either dead, or close to dead, and you can apply a "Shadow Word: Death". This is not part of the macro because its appliance requires your judgment
  • If the target is strong you can simply continue with the macro to finish it off
  • 2x Mind Spike will get you 2 stacks of Mind Melt, so the final Mind Blast is cast instantly. If your target is finished off before that, so much the better, because the initial Mind Blast of your next attack will benefit from those Mind Melt stacks


Hunter attack

The following macro combines an attack sequence with using a Fishing Pole, if one is equipped. A useful addition would be to automatically equip a weapon if a Fishing Pole is equipped but we are in combat. Unfortunately, the macro would get too long...

/castsequence [noequipped:Fishing Poles] reset=10/target Hunter's Mark, Serpent Sting, Concussive Shot, Kill Command, Steady Shot,  Arcane Shot, Arcane Shot
/cast [equipped:Fishing Poles,nocombat] Fishing

Notes:

  • An earlier version of the macro included the /petattack command. In recent versions of WoW, however, you can now tell your pet to take the "assist" stance, which is much better than /petattack because the pet will only attack if your macro attack actually succeeds.


Frost Mage attack

Based on the Hunter macro, this also uses the Fishing Pole trick:

/petattack
/castsequence [noequipped:Fishing Poles] reset=10/target Frostbolt, Ice Lance, Ice Lance, Ice Lance, Fire Blast, Ice Lance, Ice Lance, !Shoot
/cast [equipped:Fishing Poles,nocombat] Fishing

Note: If the "!Shoot" spell is not included, the macro starts over when it reaches the end.


Warlock attack

Based on the Hunter macro, this also uses the Fishing Pole trick:

/petattack
/castsequence [noequipped:Fishing Poles] reset=10/target Shadow Bolt, Shadow Bolt, Shadow Bolt, !Shoot
/cast [equipped:Fishing Poles,nocombat] Fishing


Other macros

Target something

This macro targets the named unit, but immediately clears the target if the acquired target is dead.

/target Congealed Void Horror
/cleartarget [dead]


Quickly kill critters

The following macro helped me with The Turkinator achievement. The idea is to quickly find a specific kind of small, almost invisible critter and then to use an ability that marks or even kills the critter. Obviously the abilities used depend on the character's class.

/targetexact Wild Turkey
/cleartarget [dead]
#/script SetRaidTarget("target", 8);
#/cast Moonfire
/cast Faerie Fire (Feral)


Find out which tabards you have already equipped

This macro lists for each tabard that exists in the game whether the character has already equipped it at one time or another in the past. The macro is useful for getting the achievement Twenty-Five Tabards.

/run y=GetAchievementCriteriaInfo for z=1,85 do a,b,c,d,e,f,g,h,i,j = y(1021,z); k,l,m,n,o,p,q,r,s,t = y(j) if m==false then print("\124cffff0000\You have NOT YET equipped:\124r",k) else print("\124cff00ff00\You have equipped:\124r",k) end; end

This macro is duplicated from this page:


Equipment macros

Cycle through several weapons

This macro cycles through a number of pre-determined weapons that I carry around with me at all times:

/equip [noequipped:Fishing Poles,noequipped:Polearms,nocombat] Orca-Hunter's Harpoon
/equip [equipped:Polearms,nocombat] Bone Fishing Pole
/equip [equipped:Fishing Poles,nocombat] Alliance Lance

Note: I don't know the weapon type of the weapon "Alliance Lance", which is why there is such a complicated condition on the first line.


Technical macros

Display the name of a button

/run local f = GetMouseFocus(); if f then DEFAULT_CHAT_FRAME:AddMessage(f:GetName()) end


Set the maximum camera distance

/script SetCVar("cameraDistanceMax",45)


Quickly complete (repeatable) quest

The following macro allows to spam the macro button to quickly cycle through the dialog pages of a "Complete quest" dialog. This is most useful if you have to turn in a repeatable quest many times, such as the Timbermaw Hold reputation quests. It may also help in a situation where you need to complete a quest against a time-limit (e.g. to get the Sha'tari Skyguard bomberman achievement) or be quicker than another player (Master Angler of Azeroth achievement).

/script SelectGossipAvailableQuest(1) 
/script CompleteQuest() 
/script GetQuestReward() 

Note: You still have to open the initial dialog page by manually right-clicking the quest giver NPC. The macro will then select the first quest offered by the quest-giver. Change the number in the first line of the macro to select a different quest.


Say "yes" on Auctioneer's bid/buy confirmation dialog

Trigger the "yes" button when Auctioneer asks for confirmation to bid/buy something on its "Search" tab. This allows to quickly bid/buy a lot of things without having to move the mouse between the "bid/buy" button in the Auctioneer window and the "yes" button in the confirmation dialog. Only a one-liner, but very helpful!

/click AucAdvancedBuyPromptYes

Note: I found out the name of the button with the "Display the name of a button" macro above.


Say "yes" on Enchantrix' disenchang confirmation dialog

Trigger the "yes" button when Auto-Disenchant is on in Enchantrix, and Enchantrix asks for confirmation for each item it wants to disenchant. This is useful when mass-disenchanting a batch of items, e.g. stuff that was sent by mail to the Enchanter from various sources.

/click AutoDEPromptYes

Note: I found out the name of the button with the "Display the name of a button" macro above.