Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
Register
Advertisement

Casts the first spell for which the options are true.

/cast [options] spell name or item or bagID slot or invSlotID

You can also use /spell.

Usage[]

This command accepts secure command options. The value associated with the first satisfied condition will be interpreted as described below, and an action will be performed at the condition target (or your current target, or the implied target if the condition did not specify an explicit target). If no conditions are satisfied, no action will be performed.

Arguments[]

The clause value is interpreted as either:

spell name
Name of the spell to cast, prefixed by an exclamation mark to prevent toggling an ability off
item
The name of the item to be used.
BagID slot
The bag the item is in (0 is backpack, etc...), and the slot number containing the item, starting at 1; e.g. "0 1" would use the first item in your backpack.
invSlotID
The slot on your character in which to use an item.

If the clause value is the name of both a spell and an item in your inventory, the /cast command prefers to cast the spell.

Examples[]

  • This will revive the pet if it is out and dead, call the pet if it is not out, or mend the pet if it is out and alive
/cast [@pet,dead] Revive Pet; [nopet] Call Pet; Mend Pet
  • If activated with mouse button 2, this will cast Flash Heal on the player else if the unit saved as the player's focus can have helpful spells cast on it and is alive, it will cast Flash Heal on the player's focus else it will cast Flash Heal on the player.
/cast [@player, btn:2][@focus, help, nodead][@player] Flash Heal 
Let's analyze:
...[@player, btn:2]... 
The macro directs the spell to be cast at the player if the macro is activated with mouse button 2.
...[@focus, help, nodead]...
The macro directs the spell to be cast at the player if the unit in the player's focus can have helpful spells cast on it and is alive.
...[@player]
The macro directs the spell to be cast at the player with no additional conditions.

Patch Changes[]

Bc icon Patch 2.3.2 (2008-01-08): /cast now toggles toggleable abilities on and off, but prefixing the name with an exclamation mark prevents this.

See also[]

Advertisement