Posted by: innerfire | March 8, 2006

Macros FAQ and Basics

Today’s post, which will sadly be the last for two weeks while I go on vacation (unless I manage to get the week’s MC pictures uploaded) will be on Macros. Macros can do incredible things, and folks often look to mods for what a simple macro can accomplish. I will list a few specific macros with links to their places of origin, along with threads from the UI/Macro forums which can help with your macroing needs. The other post is all actual examples of macros, but the explaination/FAQ/How To is all here. However, first we need to explain a mod called SuperMacro.

What SuperMacro does is increase the limit for macros from the standard UI of 255 to 7000. This important lengthening allows for complex functions, such as randomized “sayings” when performing a spell or action, actions on actions (like the old Shadowmeld when eating/drinking) and so forth. Without this, the form is incredibly limited. That said, onto the macroing!

First off, the Macro FAQ. A blue post from the incredibly active Slouken, this goes over the basic slash commands (ie; /pvp, /played NOT the emote commands). I’ll copy-past some basics that aren’t addressed in Slouken’s part, but which are taken up by the members of the community. This post gets long, so here’s your warning. I’ll cut it off at some point to a “Read More”.

First off, the basic commands of the WoW API system, thanks to WoW Wiki. Also important are units for targetting, a How To for making macros, step-by-step.

Q: How do I cast a spell in a macro?

A: By using the /cast command. For example:

/cast Renew(Rank 1)

The easiest way to get the correct /cast command in your macro is to open the spellbook while you’re editing the macro, and shift-click on the spell. This will stuff the proper /cast text into your macro.

Q: Is it possible to use multiple abilities in one macro, such as cast Corruption, Curse of Agony, and then Shadowbolt?

A: No. The reason is that it is not possible to wait in a macro, but to cast one spell after another, you would have to cast the first one, wait for it to finish, then cast the other.
Even instant spells activate a global recast timer, which is somewhere in the neighborhood of one second, I believe, and you cannot cast another spell until this timer is done. So, without the ability to wait in a macro, it is impossible to cast multiple spells.
It is, however, possible to do multiple things that don’t require waiting. You could, for example, cast a spell and turn on attack. Or use two items (as long as they had independant refresh timers). (Both by Skrag of Shadow Council)

Q: How are macros executed?

A: Macros are executed virtually instantaneously as a whole, not line-by-line, as one would assume. (Evic of Mannoroth)

Abilities that trigger the global recast timer:
Casting a spell or ability

Abilities that do not trigger the global recast timer:
Talking in a chat window
Entering Attack Mode
Telling your pet to attack
Using an item (Ygrane of Genjuros)

For Using an Item:

/target YourNameHere (you may also do “player”)
/script UseContainerItem(Bag#, Item#);
/script TargetLastEnemy();

bag# (0-4)0 is the Back Pack (right to Left), Item# (1-16) depends on the bag size they count from left to right top to bottom

Q. How Does A Rogue Switch Dual Wield Weapons from Dagger/Dagger to Sword/Mace?

A. Here is one I made to switch Dagger/Dagger in your hands at the moment to Sword/Mace that is in your inventory, or visa versa at the push of a button. (Also this would work for any combo for dual weilding. ie: Sw/Dg >> Mc/Dg >>> Back or what ever)

There is the two commands:
1. PickupInventoryItem(xx) [Which picks the main hand or off hand slot to place a weapon]
2. PickupContainerItem(x, y) [Which picks the weapon to place from your bag]

The locations of the items in the commands (x’s):
1. PickupInventoryItem(xx) [The x’s are represnted by 16 being the main hand, and 17 being the off hand]

2. PickupContainerItem(x, y) [The x represents the bag number Starting at 0,1,2,3,4 going Right to Left on your screen (Looks like this on screen 4,3,2,1,0 Zero being your bag and 4 being your quiver if you have one). The y represents the location in the bag that Starts from the Top to Bottom of the bag, Left to Right. You can change the locations of the items by putting in different x,y locations.]

The macro:

/script PickupInventoryItem(16);
/script PickupContainerItem(0, 1);
/script PickupInventoryItem(17);
/script PickupContainerItem(0, 2);

Enjoy. (Dagget of Trollbane)

Q: How do I make my pet attack the current target in a macro?

A: Use the following line.
/script PetAttack(); (Ienen of Zul’jin)

Targetting Units based on Level or Sex:

For the Unit’s Level, you can use UnitLevel(“unit”);
“unit” has the options listed here:

As for the Unit’s Sex, you can use UnitSex(“unit”);
(According to the function description – Returns non-zero for female and zero otherwise…)


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: