Quantcast WoWInterface - View Single Post - The Definitive AddOn and Macro FAQ, yet again
View Single Post
02-25-06, 12:20 AM   #16
Credendo Vides
Cairenn's Avatar
Premium Member
WoWInterface Admin
Join Date: Mar 2004
Posts: 7,076
More Section 11

Q: How do you link multiple spells together in a single macro? (Credit Guillotine)
A: Spells can be linked into one macro if the first one does not activate the global cooldown (such as Nature's Swiftness). To do so, simply put /script SpellStopCasting(); in between the two spells. E.g.
Q u o t e:

/cast Presence of Mind
/script SpellStopCasting();
/cast Pyroblast(Rank 1)

Addendum (Credit Astryl and Ungnoticed):

Despite the popular (and usually correct) notion that you can only cast a single spell or use a single item per button press, it is possible to do so. However, what spells you can chain together is extremely limited. If you read nothing else in this post, at least read the Limitations section before posting questions.

You can only cast spells during a button press. You cannot have the macro wait for any period of time and then cast the spell. The limiting factor is cooldowns. Casting a spell (usually when you start to cast) usually activates a global cooldown. You can only chain together spells that could otherwise be cast together near-instantly. This means that the first spell must be instant, and it must not activate a cooldown that prevents the second spell from being used immediately.

---What You Can't Do---
All of you that are looking for a way to cast Frostbolt, followed by Arcane Missles, followed by Frost Nova, followed by Blink, can just give up now. The first spell must be instant, and the next spell must be able to cast immediately following the first. There's no waiting 1 second for the global cooldown to pass allowed.

---What You Can Do---
There are a few spells, usually a couple per class, that fit the rules for chaining spells. They're usually spells that affect the next casted spell, or abilities that affect the next used ability. This means things like Nature's Swiftness, Presence of Mind, Heroic Strike, Raptor Strike, etc. They have no casting time (instant) and they do not activate the global cooldown.

---How Do You Do It---
The script for doing it is relatively simple. Make a macro to cast the first spell that fits the above rules. After that, you need to call the script function SpellStopCasting(). This is the key. After that, you can cast whatever you want that isn't on cooldown. For example:
/cast Nature's Swiftness

/script SpellStopCasting();

/cast Healing Wave

That gives you a single button press to cast an instant Healing Wave. Another example:
/cast Presence of Mind

/script SpellStopCasting();

/cast Pyroblast

That gives you an instant Pyroblast. Here's a nice one for Rogues with First Aid:
/cast Gouge

/script SpellStopCasting()

/script UseContainerItem(0,1) --Bandage

There is an exception to this. Spell that are 'On next Attack', like Heroic Strike or Raptor Strike should not have the SpellStopCasting(), as it will cancel the spell from happening. Hunters should like this one:
/cast Raptor Strike

/cast Wing Clip

That's will do a Wing Clip immediately, and a Raptor Strike on the next attack (which might be immediately following the Wing Clip, if the weapon speed timer is up). Warriors could do the same thing with Heroic Strike and Hamstring, though that's quite alot of rage to burn through in their case.

---Items Can Be Used As Well---
Most items aren't hit by the global cooldown, which means that spells that activate the global cooldown, can still be chained with many items. Druids could make an emergency self heal that chained Rejuvenation with using a healing potion. I like to have my Lightning Shield up at all times, so I chain that before using my mount. Some trinkets can be used and immediately followed by casting spells (such as the fire trinket from the new lvl50 Mage quest).

---Tips for Effective Use---
This functionality is best used to enhance your existing play style, not totally change it. For example, a warrior (especially one who has the talents to reduce their bloodrage damage) could chain bloodrage before some/all attacks (Bloodrage+Execute would be useful), to make sure they're using it whenever possible. You could add logic so that it only uses the bloodrage if you have more than half health or something. You could make sure you're making the most of your Elemental Mastery/Presence of Mind by attempting to cast it with every Chain Lightning/Pyroblast you cast. Explore the many possabilities!

Many of these macros are best used in emergency situations, especially the NS+Heal ones. If you were to already have a spell casting when you hit the emergency heal button, it would begin casting the heal without NS. To get around this, if you have the room in the macro (macros can only be 255 characters long, remember), add another '/script SpellStopCasting()' line at the top of your macro. That will make it abort whatever spell you might already have been casting, and do the NS+Heal. Note that this doesn't just apply to NS+Heal; I use it for my EM+ChainLightning.

Please note that the examples here are just examples of how to chain spells together. In order to be very useful, some of them (ie the healing ones) will require some other addon or script to handle their targeting, so that your heal targets yourself if you don't have another friendly unit targeted, or automatically targets a certain party member, or whatever target you want.

---Chaining More Than 2 Spells---
Though even more rarely useful, it is possible to chain more than just 2 spells/items. For example, we could enhance that druid emergency heal even further:
/cast Nature's Swiftness

/script SpellStopCasting()

/cast Healing Touch

/script SpellStopCasting()

/script UseContainerItem(0,1) --Potion

One thing to note about this is that if you chain Nature's Swiftness or Presence of Mind together with a spell with a cast time, it won't work while moving, whereas it would if you casted them seperately.

The reason for this is because the client doesn't know that Nature's Swiftness or PoM is up so therefore denies the spell from being cast. This is due to the time required to communicate with the server - even latency of 1ms would cause this issue. Your latency would have to be effectively 0 (in actuality somewhere in the nanosecond range, the exact latency would depend on how fast your computer would be able to process the macro) which is not possible. This is a limitation of current technology and I suspect that it will always be the case.

This functionality also doesn't work with form or stance switches. I really wanted a 'switch-back-to-caster-form-and-start-healing' macro, but it doesn't look like that's possible. If anyone has any way to get it to work, I'd love to know.

A few more examples:
Vanish+(anything that requires Stealth) - this will never work unless you're in Stealth already when you vanish, since the client will deny use of abilities that require stealth until the server tells it you're in stealth.

Any Seal+Judgement - this will fail unless you have an active Seal. This doesn't have to be the same seal as the one you are trying to Judge, any seal will do for the purposes of validating the Judgement spell in the client. However, I know of no issues with Divine Favor+Holy Light macros.

---Is This An Exploit?---
Nope. Slouken has confirmed that this is an allowed practice. It doesn't get around cooldowns in any way. Have fun!

Last edited by Cairenn : 02-25-06 at 04:06 PM.
  Reply With Quote