More Macro Mayhem
Continuing the thought of the first post (Macro Mayhem), I'm going to delve a bit into some of the command options and such. These mods, although tricky, offer a lot more power to a macro than just your normal /cast does. First, we'll tackle the reset for /castsequence:
/castsequence reset=5/target Polymorph,Spellsteal,Spellsteal,Spellsteal
Ok, so what we have here is a nice PvP macro that cycles through spells: one that polymprphs the targeted Hordelet, followed by 3 spellsteals. It's nice to be able to pull buffs off a sheep :) Furthermore, we have a condition set: if we stop casting that macro for 5 seconds, or if we switch targets, the macro resets and goes back to the first command, Polymorph. This is useful for a lot of things: if you have a certain sequence of casts you always start with, but your target dies after the third one, you want to be able to reset when you switch targets so you cast your opening sequence again.
The available options for reset are:
- A number which equates to the number of seconds that the button has not been pressed
- Target which performs the reset after you switch targets
- Combat which performs the reset after combat ends
- Shift, alt, and ctrl which performs the reset after the specified key(s) are pressed
So you could have a macro like the following:
/castsequence reset=ctrl/alt/shift/combat/target Arcane Blast,Arcane Missiles
That way, if the Arcane Missiles doesn't proc, you could hit the Control, Alt, or Shift key to recast Arcane Blast. After combat ends, or if you change targets, the macro also resets to Arcane Blast.
Similarly, macro options are a way to filter what commands are performed based on whether or not the criteria specified is true. The options are contained in square brackets, and looks like the following:
/cast [help] Arcane Intellect; [harm] Polymorph; [ ] Mage Ward
So, if you have a creature targeted that can benefit from beneficial spells (aka: is a friendly target), it casts the Intelligence buff. If the target is harmful, it casts Polymorph. Otherwise (if you have nothing targeted) it casts Mage Ward. The empty brackets [ ] can be used to match to an always true condition. If this is the last condition, they are not necessary, but I like putting them in. It allows me to do the following:
/cast [help] SpellX; [ ] SpellY; [harm] SpellZ; [nocombat] SpellQ
Okay, so I got tired of putting the actual spell names in. The spell I put in isn't important - I'm just introducing the syntax here...
Although only SpellX and SpellY are castable (for now), it lets me hold all the potential combinations, and if I want to activate any others, I simply cut and paste them before the empty brackets. This comes in handy for making one macro that has parts that don't always apply, so that I don't have to remember the syntax all the time. When you do this, remember that you have a 255 character limit to your macros.
Here's an important tip: the command options are negatable by putting the word "no" in front of them. So if you want the add the option of when you're not in combat, it would be [nocombat].
The macro options can also be used together to specify multiple combinations, as in the following command:
/cast [modifier:ctrl, nocombat] SpellX; [modifier:ctrl, modifier:alt] SpellY; [modifier:alt/shift] SpellZ; SpellQ
For this macro, if you are not in combat and press Control then click the macro, it casts SpellX. If you hold down the Control and Alt keys and click the macro, SpellY fires. If you press Alt or Shift and the macro, then SpellZ fires. Otherwise we cast SpellQ.
Here is a list of the modifiers, at least all that I could find:
- [@player], [@focus], [@target], [@targettarget] - Sets the target of the command to yourself, your defined focus, your current target, or you target's target, respectively
- [harm], [help] - True if the target is an enemy or ally, respectively
- [combat], [stealth], [mounted], [swimming], [flying] - True if you are in combat, stealthed (including Sneak, Shadowmeld, Invisibile, etc.), on a mount, currently swimming, or currently flying
- [flyable] - True if you are in an area that allows you to use a flying mount. Note that this does NOT check if you can fly - if you don't have cold-weather flying, Northrend is still flyable
- [indoors], [outdoors] - True if you are currently indoors or outdoors respectively
- [modifier], [modifier:shift|alt|ctrl] - True if any of the keys are pressed, or if the specified key is pressed, respectively
- [exists] - True if the target of the spell exists (so /follow [target=Parkuss, exists] Parkuss; [target=Laurelynn, exists] Laurelynn would follow Parkuss if he were targeted, then Laurelynn if she were targeted)
- [dead] - True if the target is dead (/cast [dead] Revive; [nodead] Greater Heal)
- [pet], [pet:|] - True if the summoned pet is of the creature type or has the pet name specified (/cast [pet:Voidwalker|Fluffy] Sacrifice; Summon Voidwalker would cast Sacrifice if you had a pet named Flully or a voidwalker out, or it would summon your Voidwalker otherwise)
- [party], [raid], [group:party|raid] - True if your target is in a party, if your target is in a raid, or if you are in the specified group, respectively
- [equipped:||] - True if you have an item equipped in the specified slot, or of the specified class or subclass (/cast [noequipped:16] Librarian's Paper Cutter; [equipped:Dagger] Ambush; Cheap Shot)
More to come later, including detecting what stance you're in, what button was clicked to cast the macro, and if you're channeling a spell effect.