Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
WoW
Talk
English
Views
Read
Edit
History
More
Search
Navigation
Home
Random page
Help using wiki
Editions
for WoW
for WildStar
for Solar2D
Documentation
for WoW
for WildStar
Reference
WoW
⦁ FrameXML
⦁ AddOns
⦁ API
⦁ WoW Lua
WildStar
⦁ AddOns
⦁ API
⦁ WildStar Lua
Engine
Tools
What links here
Related changes
Special pages
Page information
Site
Recent Changes
Editing
WoW:Making a macro
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Other slash commands== Now that you have a solid foundation, let's cover some of the other slash commands at your disposal. Some of these commands may seem a bit pointless at first glance, but when you combine them with the macro options from Part II, they can perform some neat tricks. ===Equipping items=== There are three commands for equipping items: /equip, /equipslot, and /equipset. /equip simply takes an item name and will equip it to the default slot as if you had right-clicked it in one of your bags (i.e., a one-handed weapon will be equipped to your main hand). /equipslot takes an [[InventorySlotId|inventory slot ID]] and an item name, and equips the item to the specified slot. Note that when using /equipslot, you must respecify the slot for each set of conditionals. If you use the Blizzard equipment manager and save an equipment set, you can use the /equipset command to use it. Examples: Equip a weapon to default slot: /equip Honed Voidaxe Equip a trinket to the lower trinket slot: /equipslot 14 Carrot on a Stick Save two equipment sets. One called Tank that has a sword and shield equipped, one called DPS that has a two handed weapon equipped. Use this macro to switch between the two: /equipset [equipped:Shields] DPS; Tank If you have a shield on, it'll equip your saved DPS set, otherwise it'll equip your saved Tank set. Swap between your offhand and a shield: /equipslot [equipped:Shields] 17 Merciless Gladiator's Cleaver; 17 Crest of the Sha'tar '''Note:''' If you are trying to equip two of the same weapon simultaneously into different slots, your macro will not work properly. '''Note:''' AddOns are allowed to use the equipping functions directly, even during combat. By the same mechanism, you can use the equipping slash commands with AddOns like AfterCast or Chronos. You might have some trouble if the AddOn first checks whether the command is secure; the equipping commands are in the secure command list, though they aren't inherently secure. ===Sequencing spells and items=== Many times you will find yourself casting a series of spells or use certain items in the same order on pretty much any mob you fight. To make this job a bit easier, we have the /castsequence command. /castsequence takes a list of spells and/or items separated by commas. These follow the same rules as /cast and /use. This means you can interchange spell names, item names, item IDs, inventory slots, and bag slot combinations. Each time you run the macro, it activates the current spell/item. If the spell or item is used successfully, the sequence will move to the next entry. '''You must repeatedly activate the macro to use all the spells in the sequence'''. Once you use the last entry in the list, it will reset to the beginning. Example: /castsequence Immolate, Corruption, Curse of Agony, Siphon Life This might be something you would use for a Warlock's opening attack. Note, however, that if Immolate fails to cast for some reason (out of mana, not in range, silenced, etc.), the sequence will remain at that point. Because of this, you cannot use a /castsequence to make a spammable macro like: /castsequence Overpower, Execute, Mortal Strike Before the spell list ('''but always ''after'' the conditionals'''), you can also specify reset conditions to start the sequence over before it reaches the end. The basic syntax for reset conditions is: reset=''n''/target/combat/shift/alt/ctrl Where ''n'' is the number of seconds of inactivity after which the macro should be reset. In other words, if more than ''n'' seconds pass without the macro being called, then the next time you call it the sequence will start from the first spell. Note that this is not the time since the ''first'' spell in the sequence was cast, but rather the time since the macro was last called (to cast ''any'' of the spells in the sequence). This is a very important distinction because it means '''you cannot use a reset timer to account for [[cooldown]]'''. As to the other conditions, "target" resets the sequence when you change targets; "combat" when you leave combat; "shift", "alt", and "ctrl" when you activate the macro with one of those keys depressed. You can specify any number of these conditions separated by slashes as shown. Example: /castsequence reset=10/shift Spell 1, Other Spell, Some Item To make a macro cycle through two different 'sets' of spells that should be used together, where each set can not be used at the same time (i.e trinkets with shared [[cooldown]]s) it is possible to use multiple instances of /castsequence to achieve this effect. Example: /castsequence Beserking, Icy Veins /castsequence Trinket 1, Trinket 2 On the first button push this macro will cast Beserking and Trinket 1, on the second it will cast Icy Veins and Trinket 2. If you used the question mark icon, WoW will automatically update the icon to the current element of the sequence. If you have other /casts or /uses (or complex conditionals) before the /castsequence, though, WoW will sometimes not be able to figure out which icon to use. In this case, you can specify the icon using #showtooltip as described above ===Random spells and items=== One of the most common requests on this forum is for a macro to use a random mount. This is extremely trivial thanks to the addition of /castrandom and /userandom. Like /castsequence, /castrandom and /userandom takes a list of spells and/or items separated by commas and picks one at random when you run the command. Example: /castrandom Swift Green Mechanostrider, Black Battlestrider, Summon Dreadsteed ===Attacking=== Change your target to ''unit'' and start auto-attacking. /startattack Cogwheel Stop auto-attacking. /stopattack ===Action bar manipulation=== There are two commands that allow you to change action bar pages: /changeactionbar and /swapactionbar. /changeactionbar takes a single number and will always switch to that page. One use of this is for hunters to emulate stances by having a pair of macros like: /cast Aspect of the Hawk /changeactionbar 1 and /cast Aspect of the Monkey /changeactionbar 2 /swapactionbar takes two page numbers and will swap between them each time it runs. If you're on a page other than one of the two specified, it will be change to the first of the two. /swapactionbar 1 2 ===Removing buffs=== The /cancelaura command allows you to remove unwanted buffs. For example, a Death Knight without the Horn of Winter minor glyph cannot cast Horn of Winter if a glyphed version of the buff is already on them (from another Death Knight). The following macro solves this problem: /cancelaura Horn of Winter /cast Horn of Winter ===Leaving a form=== With the exception of Warriors, any class with stances (Druids, Priests with [[Shadowform]], Rogues with [[Stealth]], etc.) can use /cancelform to leave their current form. Example: /cancelform /use Super Healing Potion In patch 2.3, /cancelform will be recognized instantly '''for Druids'''. Until then and for everyone else, you may have to click the button twice. === Stopping a cast=== /stopcasting was touched on briefly in other contexts but its main use, as you might guess, is used to stop another spell cast that's in progress. This is useful for making "panic buttons" that interrupt whatever you're doing at the moment in favor of something more important. On a Warlock, for instance, you can use the following macro: /stopcasting /cast Shadowburn ===Halting a macro early=== /stopmacro is one of those commands that doesn't really come into its own unless you use it with macro options. Its main use is to implement "fall-through" logic to prevent you from continuing a macro if certain conditions are true. See "Using focus" at the end of part II for an example. ===Dismounting=== /dismount Basically self-explanatory. ===Saving a target for later action=== The /focus command allows you to save a target to come back to later. For example, say your raid leader assigns you a target to sheep. First, select that mob, and type /focus. Now you can use a macro like the following to cast sheep on your focus: /cast [@focus] Polymorph Note that this is not the most efficient use of the focus feature. See "Using Focus" towards the end of Part II for a much more in-depth look at this mechanic. ===Simulating button clicks=== The /click command takes the name of a button and acts like you clicked the button with your mouse. By default, it behaves like a left-click, but you can specify other mouse buttons in the command. There are a few ways to determine the name of the frame you're interested in: * You can use an AddOn. Some AddOns, including MoveAnything, give you a way to see the name of the frame underneath your mouse. * You can look through the UI code for the frame. This is really only applicable to people who are comfortable with AddOn programming. * You can bind the following macro by a key and then run it while your mouse over the frame in question: /run local f = GetMouseFocus(); if f then DEFAULT_CHAT_FRAME:AddMessage(f:GetName()) end /click can be used for many different purposes. You can chain together multiple macros by /click'ing buttons with other macros on them. For example, you might have a really long macro that doesn't fit into 255 characters. Put as much of it as you can in one macro and end it with the following line: /click MultiBarRightButton1 The rest of the code would go into a new macro that you would then place on MultiBarRightButton1 (the first button of the right-hand vertical extra action bar). You can also do things that normally wouldn't be available to macros. For instance, turning on auto-cast for a pet spell can't be done by Lua scripts and there isn't a secure command for it (until the next patch, at least). However, you can write a macro to pretend that you right-clicked on one of your pet bar buttons: /click PetActionButton5 RightButton This command will act like you right-clicked the 5th pet button from the left. The extra button parameter can also be LeftButton (the default), MiddleButton, Button4, or Button5. On top of these uses, there are some more complex examples of /click branching towards the end of Part II. ====Action bar button names==== As shown above, MultiBarRightButton1 refers to the first button of the right-hand vertical extra action bar. MultiBarRightButton2 refers to the second button, and so on. Names for buttons on each of the standard action bars are as follows, replacing the ''#'' with an appropriate number: ActionButton''#'' Main Bar* BonusActionButton''#'' Dynamic bar that switches actions based on Druid Forms, Warrior Stances, and Rogue Stealth* MultiBarBottomLeftButton''#'' Bottom Left Bar MultiBarBottomRightButton''#'' Bottom Right Bar MultiBarRightButton''#'' Right Bar MultiBarLeftButton''#'' Right Bar 2 (to the left of "Right Bar") PetActionButton''#'' Pet Bar ShapeshiftButton''#'' Druid Forms, Paladin Auras, Warrior Stances, Death Knight Presences, Rogue Stealth, Hunter Aspects ExtraActionButton''#'' Extra Action Button for fights like Ultraxion. <nowiki>*</nowiki> The BonusActionBarFrame frame replaces the ActionBarFrame frame for all Druids, Warriors, Shadow Priests and Rogues and <code>/click ActionButton''#''</code> and <code>/click BonusActionButton''#''</code> do the same thing for these classes.
Summary:
Please note that all contributions to AddOn Studio are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
AddOn Studio Wiki:Copyrights
for details).
Submissions must be written by you, or copied from a public domain or similar free resource (see
AddOn Studio Wiki:Copyrights
for details).
Cancel
Editing help
(opens in new window)