Talk:Making a macro

Untitled
In the Commands section, the /cancelaura command is listed twice - once in General and once in Buffs/Auras. --Dorenthas 13:49, 22 February 2007 (EST)

Broken Cross-References
Several places on this page make a cross-reference like "(see Part III for a workaround)". Part III does not appear to exist - did this information move somewhere else?

Stances
Paladin Blessings also use the "stance" keyword. I don't know why they're not included on the table there. I would add them, but I don't know what order they go in.


 * These are the numbers for paladin auras


 * 1 = Devotion Aura
 * 2 = Retribution Aura
 * 3 = Concentration Aura
 * 4 = Shadow Resistance Aura
 * 5 = Frost Resistance Aura
 * 6 = Fire Resistance Aura
 * 7 = Crusader Aura
 * ? = Sanctity Aura (Retribution Talent, unknown where it fits.)


 * However, consensus seems to be that they don't work.


 * -Cowlinator (talk) 19:02, 22 September 2008 (UTC)

New Guide
I recently revamped my macro guide on the UI & Macros forum and decided to post it here. I write my posts in HTML and then use a script to convert them to WoW forum format, so it was trivial to convert it to wiki as well. However, since it is just a dumb translation, there are some things that need tweaking (like internal links, and maybe it should be split into a couple different pages). I'll be paying attention to any changes made here and incorporate any content changes into my private copy and the posts on the forum. Cogwheel 19:34, 6 June 2007 (UTC)

Changes to passive voice
I undid the changes made by DaAznSaN. While I agree with some of the changes and will incorporate them into another edit, I find it strange that he purposefully reworded some phrases INTO the passive voice. Cogwheel 14:18, 13 June 2007 (UTC)

Combining options with, and /
The following (taken from the article) does not seem to be exact:
 * Note: "," combines options by boolean And; "/" combines by boolean Or; prefacing an option with "no" e.g. "nochanneling" from "channeling", negates it.

It seems that "," works as a boolean And option separator, while "/" works as a boolean Or option argument separator. Let's say I want a macro that uses the Hearthstone while not in combat; however, I want to be able to use it in certain combat situations (perhaps I'm an experienced PvP paladin ;) ), so I want to be able to use it if I hold down the Alt key, no matter my combat state. I could try the following:
 * /use [nocombat/modifier:alt] Hearthstone

According to the wiki, that should mean "(No (Combat)) Or (Modifier)", but what it really does is "No (Combat Or Modifier)", and this is rejected by WoW with a message stating "Unknown option combat/modifier". This allows me to conclude that "/" cannot be used as a boolean Or on options themselves.

Now, let's say I want a macro that uses the Hearthstone only when I hold both Ctrl AND Alt. (Perhaps I don't trust my unl33t clicking skills and I'm afraid of using the macro accidentally, and 10 seconds isn't long enough for me to realize I'm hearthstoning accidentally. :P ) I could try the following:
 * /use [modifier:alt,ctrl] Hearthstone

Well, it's pretty obvious it won't work, because "," separates options, not option arguments. So WoW rejects this with an "Unknown option ctrl" (that is, assuming I'm holding down Alt, otherwise the first condition is false and the rest of the conditions aren't even evaluated), which is expected.

I recommend modifying the article to reflect this different use between "," and "/": "," separates options with a boolean And, "/" separates option arguments (after a ":") with a boolean Or. --Dorenthas 10:56, 1 April 2007 (EDT)

Macro help
Hi can any one tell me if you can make a macro for a warrior to use execute but if the target HP isnt low enough use mortel strike? If so can you please tell me how?

You cannot get a macro to do something based on mob or player health/mana. :( Try

/cast Execute[modifier:alt];Mortal Strike

This will cast execute if you press down alt; otherwise it will cast Mortal Strike

I was looking at the spell reflection macro and I was woundering if you could add something to it that would equip a 2h weapon or 1h weapon with a modifier? i think it would look something like this

/equip 2hweapon [modifier:ctrl]; 1h weapon [modifier:alt] /cast [stance:1/2,equipped:Shields] Spell Reflection /equip [noequipped:Shields] shield

Obviously changing 2hweapon,1h weapon and shield with there names. would this work? would check it my self but I`m away for a couple of weeks —The preceding unsigned comment was added by. 12:47, 10 May 2007 (EDT)

#show
ever since the last major patch (2.1.2) the #show has not been working with the "?" icon like it did before - how it is still stated in the manual. Is this just me or everybody? —The preceding unsigned comment was added by.
 * Everything is working for me as it did before the patch ok. -- 01:59, 23 June 2007 (UTC)

Tracking Macro
How can I make a macro that, depending on if I have alt, shift or ctrl pressed down, swaps my Hunter Tracking between Track Herbs, Track Beasts and Track Humanoids? It would clean up my actionbars a whole lot. --Fragment 20:40, 30 July 2007 (UTC)

Shouldn't be a problem after you read the basics. /cast [modifier:alt] Track Herbs; [modifier:ctrl] ... ; Track Humanoid Very simple, very useful, especially as a hunter. I found it's also quite useful when playing a druid in cat form to switch between the "standard" Track Humanoid and profession tracking (which when active will prevent Track Humanoid from automatically being cast when switching to cat form). --Lanfear 18:35, 13 September 2007 (UTC)

Conjuring and Using
The other day before maintenance this macro worked:

/castsequence Conjure Mana Agate, Mana Agate

Now, it doesn't work. It simply doesn't respond without showing an error message. So I used this:

/cast [modifier:ctrl] Mana Agate; Conjure Mana Agate

But I was wondering if anyone could make a macro script that did something like Use the Mana Agate if it exists and cast Conjure Mana Agate if Mana Agate doesn't exist in my inventory. I'm not proficient in programming so you can imagine I tried to use something noobish like:

/cast [Mana Agate, exists] Mana Agate; [Mana Agate, noexists] Conjure Mana Agate

Please someone help me! =] -DaDragonChild 05:09, 15 August 2007 (UTC)

Update****

The first listed macro actually did not stop working. I guess I just needed to not only relaunch WoW but restart my computer. BUT I would still like to know if the third macro I mentioned is possible! =] -DaDragonChild 06:36, 17 August 2007 (UTC)


 * In the future, ask questions here: http://forums.worldofwarcraft.com/board.html?forumId=11114&sid=1 However, no, I do not believe it will. Here's what I use on my mage;

/castsequence [nocombat] Conjure Mana Citrine, Conjure Mana Jade, Conjure Mana Agate /use [combat] Mana Citrine


 * -TigerHunter9002 01:33, 23 August 2007 (UTC)

Sadly, this is not possible. I would welcome the possibility to search the inventory for an item and to trigger macro actions depending on whether it exists or not.

--Lanfear 18:44, 13 September 2007 (UTC)

You can just do the following:

/use Mana Agate; /cast Conjure Mana Agate

--Mecdemort

Changes in 2.2
There seems to be a problem casting the first spell in your spellbook in the german version. Perhaps pther languages are affected too.

--Caveira 17:15, 10 October 2007 (CET)

Print problem relieved somewhat.
Added a &lt;br&gt; after each line in boxes that exceeded the screen width. That should help with the horizontal scroll bar overlaying the bottom of the text.

In my opinion, this is a problem in wikia's software that it adds a scrollbar without adjusting the size of the box, making the last line nearly unreadable.

I thought this article was very well written. Kudos to the author!

--Gregity (talk) 01:31, 1 August 2008 (UTC)

Rogue Specific Conditions Macros
Hey, great article on macros, it really helped.

I was wondering a little more about the specific conditions macros. I have a rogue and i like to pop a +AP trinket, a Energy Regen skill and Slice and Dice(a combo point dependant finishing move, which speeds up attack speed). Its obviously best to do this when you have five combo point.

What would a macro look like that waited until I had five combo points?

Thanks, Sureptitious


 * Macros cannot make intelligent decisions like that: There's no conditional that checks the number of combo points you have on a target. - Tuhljin (talk) 21:10, 12 August 2008 (UTC)

Targeting
Does targeting work with aoe's? Isn't there any way for you to cast an aoe around your target or yourself without having to use the ground-targeting circle? -Cowlinator (talk) 18:54, 22 September 2008 (UTC)

"This page is an archive"
The page opens with this statement: "This page is an archive of Cogwheel's Complete Macro Guide // An even more complete update may be found here." Perhaps that's what this page once was and what it started as, but that's no longer the case. I and others apparently didn't notice this "it's an archive" statement and have been treating this as a normal freely-editable guide. It now contains things the original never did (and I'd say ought to include whatever "even more complete" things have been added to the guide it once mirrored, though maybe not word for word). Why would we be in the business of archiving old macro guides, anyway? ... Especially if they're titled something as direct as "Making a macro" instead of "Making a macro (archive 200X)" or something. - Tuhljin (talk) 02:29, 29 September 2008 (UTC)
 * Then simply remove the statement and move the external links to the bottom in an external links section if there isn't one. That you've been editing it is fine; that's what a wiki is for. --Sky (t · c · w) 01:07, 1 October 2008 (UTC)

group:party and group:raid
From the article: group:party/raid This lets you determine whether you are in the given group type. [group] is equivalent to [group:party]. [group:raid] implies [group:party].

This wording is a bit confusing to me. It is true that:
 * If you use [group:raid] it will return TRUE if you are in a raid.
 * If you use [group:party] it will return TRUE if you are in a group OR in a raid.

My point is that "beeing in a raid" implies "beeing in a party", but [group:raid] does not imply [group:party]. Using [group:raid] returns FALSE if you are in a group.--tlund (talk) 13:40, 6 December 2008 (UTC)

target=target
Is that not realy senseless or deprecatet? I see this in many macros. --Olliminatore (talk) 14:13, 19 January 2009 (UTC)
 * This tells the macro to only cast the specified spell on the target. It's usually used as a condition with other target= entries. Like this,
 * This is the same as:

/cast [mod:alt,target=player] Lesser Heal; [mod:ctrl,target=mouseover] Power Word: Shield; Smite
 * Anyway, there's only one target=target in the page and I think it may be removed. --Hdante (talk) 17:57, 19 January 2009 (UTC)
 * I can see how it might be redundant, but there must be a reason why it's still there. On the other hand, macros silently fail in the case of an invalid conditional, so there's really no way to tell if this condition exists or not.

Warlock Backlash
Hi!

Is it possible to make a macro which simply casts Shadowbolt, but if Backlash buff is active, then stops the current casting then immediately casts Shadowbolt. TY --Conjurus (talk) 09:28, 23 June 2009 (UTC)

Applying spellstonee/firestones
I was trying to develop a macro that would apply my spellstone to my mainhand, but i can only get as far as highlighting the hand, which i then to to manually click on my mainhand. It would seeem an inventory slot is not a valid unitid for [target=]....
 * You have to use the spellstone and then use the item to which you will apply the buff or enchant.

/use /use 16

Spell succesfull=text
Hey, i'm trying to link the use of abbylities (wonder if i spelled it right) together with text...

Here is my macro:

/cast aspect of the pack

/s Aspect of the Pack now active!

As of now, it will say that it is active even if i disable it by clicking it again... I was thinking of a macro like this:

/cast aspect of the pack

/s [previous succesful] Aspect of the Pack now active!

The [] indicates a condition. What i need here is of course the right condition, but the guide doesn't list any conditions of this kind.

This would be a great help. 13:00, February 18, 2010 (UTC)


 * There's no such condition. If you want this functionality, you'll have to use an addon. I've heard that AfterCast still works.

Shred/Mangle?
I once heard of a macro:

/castrandom Shred,Mangle (Cat)

that would cast Mangle if in front of an enemy and either Shred or Mangle if behind. I tried testing it, with no luck, but I'm holding out hope that my macro-fu simply isn't good enough. Can anyone tell me if this is possible? Sxizzor (talk) 01:24, March 19, 2010 (UTC)sxizzor
 * Macros don't have access to which direction the enemy is facing. Also, as of patch 3.2, if the spell that castrandom picks fails, it will keep trying until it succeeds before picking a different one; hence why this macro won't cast Mangle if you are in front of the target, it just keeps retrying Shred.
 * Alright, thanks. I've heard people say it works, but it seems those were just rumors. Sxizzor (talk) 01:21, March 20, 2010 (UTC)sxizzor
 * It used to work.

/castsequence with /click
ok here is my current macro /startattack /castsequence reset=5 Icy Touch,Plague Strike,Heart Strike,Heart Strike,Death Strike,Death coil,Death Strike, Heart Strike,Heart Strike,Heart Strike,Pestilence,Death Coil /click ActionButton2 then in the actionbutton 2 spot i have /castsequence reset=5 Heart Strike,Heart Strike,Heart Strike,Heart Strike,Death Strike,Death coil,Death Strike, Heart Strike,Heart Strike,Heart Strike,Pestilence /script UIErrorsFrame:Clear however when i try this and i spam the first macro it just resets after the last death coil in the first macro and goes back to icy touch, please help! Iluvatarr (talk) 10:11, June 4, 2010 (UTC)
 * That's what they're supposed to do. If you want it to keep casting Death Coil, you need to add it n times at the end (n being the number of times you want to cast it). If you want it to stop casting anything after Death Coil, you need to add a non-existent spell at the end for the cast sequence to get stuck on (e.g. "null"). Posted by: EGingell (T|C|F) 17:54, Jun 4, 2010 (UTC)
 * P.S. If you want the sequence to continue at the first Heart Strike in the second sequence only after casting the last Death Coil in the first one, then you have the wrong idea of how cast sequences work. Posted by: EGingell (T|C|F) 18:00, Jun 4, 2010 (UTC)

The ps part is exactly what i want to happen, and the article it says that you can use /click at the end of a macro if its too long and needs to be broken up into 2 macros, this is basically what im trying to do.

Essentially, this is your macro: /startattack /castsequence reset=5 Icy Touch,Plague Strike,Heart Strike,Heart Strike,Death Strike,Death coil,Death Strike, Heart Strike,Heart Strike,Heart Strike,Pestilence,Death Coil /castsequence reset=5 Heart Strike,Heart Strike,Heart Strike,Heart Strike,Death Strike,Death coil,Death Strike, Heart Strike,Heart Strike,Heart Strike,Pestilence /script UIErrorsFrame:Clear

Assuming there's no GCD or failed casts, this will do the following: Obviousely, the GCD would not allow the above to occur, but that is what happens when you have two cast sequences in the same macro. Posted by: EGingell (T|C|F) 21:16, Jun 4, 2010 (UTC) ok so my question is, is there another command that i can use to get "If you want the sequence to continue at the first Heart Strike in the second sequence only after casting the last Death Coil in the first one" to work?
 * Click 1: Cast Icy Touch and Heart Strike at the same time.
 * Click 2: Cast Plague Strike and Heart Strike at the same time.
 * Click 3: Cast Heart Strike twice.
 * Etc.
 * Nope. There are addons, however, that will allow you to make macros that are more than 255 characters. Posted by: EGingell (T|C|F) 23:42, Jun 4, 2010 (UTC)

Splitting off Conditionals section?
What possible reason could there be to do this? It's an integral part of the article and it's contents is used extensively beyond that section. Karl w w (talk) 07:31, 10 October 2012 (UTC)


 * It was suggested here. Can you give a reason as why it should stay in the article? -- 07:55, 10 October 2012 (UTC)


 * It's all part and parcel to creating a macro imo, and as I mentioned the information in the new conditionals article is applied later in this article with little explanation. You wouldn't split off slash commands - unless the aim is to completely reorganise this article, have it just be a short overview and require people to visit all different pages to piece a macro together, which seems a disjointed way of doing things. Plus I would think those of us who are familiar with macros just want 1 page that is a reference to everything macro that we can do a quick find on when we're looking for something. Karl w w (talk) 07:27, 15 October 2012 (UTC)

Article tone is improper
Much of this article is conversational rather than encyclopedic.

It needs to be rewritten to wiki standards.Mltco78dhs (talk) 23:28, 12 August 2017 (UTC)
 * I think the tone is fine, it's written as a guide. A more encyclopedic entry may be found at macro. -- (•) 23:33, 12 August 2017 (UTC)
 * First person narrative? "I would like to...."? No. It is possible, preferable, to create a guide that is done in a professional manner.  That should be done here.  I'll provide a draft sample section in a week or so when I get done with my current project.Mltco78dhs (talk) 23:42, 12 August 2017 (UTC)
 * Absolutely, sounds good. -- (•) 23:50, 12 August 2017 (UTC)

Significant Inaccuracies in First Section
I've pasted in the relevant text for readability and so anyone wishing to comment doesn't have to keep both windows open to see what I'm talking about.

A macro is a list of slash commands. Common slash commands include the following:

/say (/s)

/whisper (/w, /talk, /t)

/reply (/r)

/emote (/e, /em, /me)

/dance

With macros, these commands can be used from action buttons, and many of them can be used at once. Each unique command goes on its own line and is written exactly as it would be typed it in the chat box. For instance, a macro that makes the player yell "Everybody, dance now!" and burst into dance would be written thus.

There can be things in macros that are not slash commands (metacommands and unprefixed chat statements). Better to say that a macro is a statement or list of statements written ahead of time to be executed later. These both work work (in separate macros, not as a single macro):

1) Hey there!

2) #showtooltip

The first sends exactly that text to the last-used chat window. No /s or /r or /y or any other slash command is required to do this.

The second is a meta-command that, with proper selection of macro icon, dynamically shows the correct icon and spell/ability/item/talent tooltip on rollover. Yes, metacommands are (sloppily) discussed later in the article, but this is the thesis paragraph of this article. It should cover, very briefly, what the article is going to address. It certainly should NOT contain false generalizations about the topic subject.

I am unsure of the use of "each" and "unique" modifying the same word (command). There are two contexts in which it may be evaluated. If it is referring to the command within its own line (most likely interpretation), there can be only one command per statement. "Unique" in a set of one has no meaning. If it is referring to uniqueness across multiple lines of commands that may be placed in a macro, multiple lines in a macro may each use the same command. "Unique" in this case is incorrect. Either way, "unique" needs to be removed.

The list of slash commands, the examples, is a truly anemic list - four variations on chat and one predefined emote. A better list would be one chat, one simple combat, one use of random, sequenced command, one targeting, one metacommand, and one example of unprefixed chat response.

I do not understand the point of giving some, but not all, of the aliases for the example slash commands. Better, I think, to not attempt to do that here.

While referring to extended capability of add-ons may be outside the scope of this wiki, it is done repeatedly in this article and yet use of macros in the this section is limited to action buttons only. No mention is made of direct binding, a huge part of healing in the game. Either we're going to include functional extensibility into the use of add-ons, in which case this is an enormous omission, or we're not, in which case quite a bit of the rest of the article needs revision.

EBNF Section Is Incorrect and Incomplete
Quoting source to simplify discussion:

Complete EBNF syntax[edit | edit source]

For those who are familiar with EBNF notation, the entire macro option syntax can be represented as follows:

command = "/", command-verb, [ {command-object, ";" } command-object] ] command-verb = ? any secure command word ? command-object = { condition } parameters parameters = ? anything which may be passed to the command word ? condition = "[" condition-phrase { "," condition-phrase } "]" condition-phrase = ([ "no" ], option-word, [ ":" option-argument { "/" option-argument } ]                  | "@", target) option-argument = ? any one-word option, such as 'shift, 'ctrl', 'target', '1', '2' ? target = ? a target pattern ?

As far as this goes, it appears to be accurate. I'm using it as a guide for replacing Fitzcairn's (now unsupported and increasingly inaccurate) Macro Explain-O-Matic. There are issues, though.

Issue one:  There is no previous use of or definition of "macro option" and the syntax seems to describe what is referred to in the thesis section as a "slash command". Introducing a new, undefined, term at this point is probably not a great idea.

Issue two:  There is no previous use of or definition of what "secure command word" means, nor is there any reference to abbreviated forms of these words - I understand that a list of macro slash commands is given elsewhere, but this purports to be representation of "the entire macro options syntax" and as such, this is incomplete. Yes, it's in the ? here a miracle occurs ? EBNF syntactic form, but still - this is the heart of the command - I think it needs better treatment than this. Perhaps if there were a source for what constitutes secure command words that could be linked?

Issue three: There is no caveat that this will not (necessarily) work with anything except Blizzard's pre-defined slash commands (there are references in this article to add-on-created slash commands - there's no reason any of those should use this syntax beyond the command and command-verb).

Issue four: With very little extension, this could be made to cover metacommands (alternative to "/" shown as "#"). The handling of conditionals for metacommands is identical to that for slash commands (there seems to be a false implication otherwise in parts of this article).

Issue five: With very little extension, this could be made to cover add-on slash commands (alternative to command-verb shown as add-on-command-verb and everything after add-on-command-verb listed as ? defined by and specific to each add-on ?

Issue six:  With very little extension, this could be made to cover unprefixed text messages (alternative to "/" and "#" shown as ? any printable, non-empty string not prefixed by "/" or "#" ? (possibly need to include that the text ends with first occurrence of "\n", end-of-line, or end-of-macro).

Issue seven: With very little extension, this could be made to define a macro, not a line from a macro (repetition of lines shown with "\n" as a delimiter between and some indication that if a metacommand appears, it must be the first line).Mltco78dhs (talk) 14:37, 13 August 2017 (UTC)