facebook tweet

World of Warcraft macros guides → How to write a /cast macro for Wow with proper syntax guide

Posted on: 09-07-2012 - Updated on: 10-18-2012

First off, you don’t have to learn how to make your own macros for Wow, simply search ours or you can request a macro. We’ll write a custom one for you! However, if you want to learn something new, check this guide out. In this guide, I’ll explain how the /cast macro syntax works, what and how conditionals work, and how targeting works in macros for World of Warcraft. First of all, we’ll define various terms to get you understanding the basics of making Wow macros. After reading this guide, you’ll be able to cast spells with a macro, know how to target macros and how to combine spells into one key press.


  • Macro Syntax: the rules around how the commands in a macro should appear along with the correct punctuation. Most macro errors are due to improper syntax.
  • Macro Conditional: a question that you want the macro to ask itself before it continues on to the next bit of macro code. See a complete list of Wow macro conditionals
  • Macro Command: the function you want the macro for Wow to perform. In this macro guide, we’ll be using the command “/cast”, which obviously casts a spell. See a complete list of Wow macro commands.

The simplest /cast macro is something like this:

/cast Shadow Bolt

Right now, don’t worry about the #showtooltip part. Just always use that as the first line. When you are done with this guide, read the #showtooltip guide. Enter the PVP or PVE spell name exactly as it appears in the Wow interface. So “Flash of Light” spell should be capitals and with spaces. Here’s what the syntax of a Wow macro is supposed to be, with the right terminology:

/command [conditionals] item or spell

You can use two different macro syntax methods for conditionals as well:

/cast [condition, AND condition] Spell
/cast [this condition][OR condition] Spell

As you can see, there’s the conditionals we talked about earlier. A conditional is like an IF statement and sort of like a parameter of a method in a programming language. Wow macros conditionals are a little weird, but easy to grasp, even for beginners. Here’s a macro that will /cast a spell at your focus:

/cast [@focus] Spellname

The @focus conditional tells the macro where to target the spell. There’s also @player you can use for yourself. See this guide on all of the macro conditionals you can use. Next, let’s take a look at stringing multiple conditionals in one macro for Wow. It is done by separating each with a comma (,) like this:

/cast [@focus,harm] Spellname

This macro for Wow will cast the spell at your focus, but ONLY if it is harmful to you. Pretty cool huh? You can even string multiple sets of conditionals in the same macro withe a semicolon (;) like this:

/cast [@focus,exists] Spellname; [@player] Spellname

That macro will first look to cast the spell at your focus, if that fails or it doesn’t meet the conditions, it moves on to the next series and casts the spell on yourself (if possible of course). All of this happens within the same button click. There are also mouse button conditionals and key press conditionals as well as checks to see if the target is friendly or not. 

Next, you can string together lots of different /cast macros in the same button press. If you have class abilities, items or spells that don’t set off the global cooldown, then you can string them together, like this:

/use Potion Name
/cast Class Cooldown Buff
/cast Spell Name 

That macro will use a potion, activate a class cooldown and then finally cast a spell. For a complete list of class abilities off the GCD, view this macro guide.

You can get creative with your macros and really extend World of Warcraft and make you a better player in both PVP and PVE. Please let us know how you are doing making your own Wow macros and we’ll post them up here to share with everyone!

7 responses to “How to write a /cast macro for Wow with proper syntax guide”

  1. Walter says:

    I right click to copy a macro but when I try to right click and paste it in the WOW macro window nothing happens. What am I doing wrong?

    • Laurel Raven says:

      The right-click menu doesn’t work inside WoW, but you can still copy and paste. Just use Ctrl+C to copy, and Ctrl+V to paste.

  2. alex says:

    I want to create so that when i cast prayer of healing with heal bot it will also cast Power Word: solace to my current target

  3. Tez says:

    Is it possible to make a macro for first casting flash heal, then cast shadowform, all in one click? Meaning not first click to cast heal, then click to cast shadowform.

  4. joe says:

    I was trying to create a rotation macro for windwalker monk but not sure where to start:
    here is the rotation please I direct me how to make the macro.

    rising sun kick, jab, tiger palm, jab, blackout kick, jab, tiger palm, rising sun kick,

  5. Gworf (Blackrock) 90 Moonkin says:

    I’m trying to make a macro conditional that will help me target faster than tab to improve my dps.

    I’m a Moonkin, and I kind of want the same rule for all my spells but I’ll use moonfire as an example.

    If I cast moonfire at a mob in a raid and he is already dead, it will tell me I have to target something first. I want it to pick the closest mob that isn’t at 100 percent health and automatically move to that target.


    If my enemy target is dead, auto target the next mob that isn’t at 100 percent health if one exists.

    Otherwise I want it just to act like the normal spell.

    Any ideas about how to add enemy NPC health conditions into a macro?


  6. Ryn says:

    Nice macro guide, you explained conditionals very well. THanks!

Leave a Reply

Your email address will not be published. Required fields are marked *