Macro Equip Trinket Slot
2021年11月25日Register here: http://gg.gg/x0vh7
Cogwheel’s Complete Macro Guide
Last updated: 2008-01-10 21:21 PDT
Blizzard has recently started their own official guide to creating macros (http://www.worldofwarcraft.com/info/basics/macroguide-one.html). If you find yourself confused by anything in my guide, take a look at theirs. The different approach may help clarify things. As of this moment, Blizzard’s guide only covers a subset of Part I but they will be making additions in the future.
*Part I: Basic Macros
*What is a macro?
*How do I make a macro?
*How do I cast spells?
*Casting without toggling
*Notes about spell names and ranks
*How do I use an item/trinket?
*Multiple actions with one click
*Targeting
*/target, /targetexact
*Other targeting commands
*/assist
*/cleartarget
*/targetlasttarget
*/targetlastenemy, /targetlastfriend
*/targetenemy, /targetfriend
*/targetparty, /targetraid
*How do I control my pet?
*/petattack
*/petfollow
*/petpassive, /petdefensive, /petaggressive
*/petautocaston, /petautocastoff, /petautocasttoggle
*Controlling button feedback and the question mark (?) icon with #show
*Other slash commands
*Equipping items
*Sequencing spells and items
*Random spells and items
*Attacking
*Action bar manipulation
*Removing buffs
*Leaving a form
*Stopping a cast
*Halting a macro early
*Dismounting
*Saving a target for later action
*Simulating button clicks
*Advanced Scripting
*What scripts can’t do
*So, what is a script?
*Part II: Macro Options
*What are macro options?
*Commands that accept options
*[target=unit]
*Syntax overview
*General options syntax
*Condition syntax
*Empty parameters
*Empty conditions
*[target=] vs. unit parameters
*Conditionals
*Complete list
*help & harm
*exists
*dead
*stance (form)
*stealth
*modifier (mod)
*modifier variables
*button (btn)
*equipped (worn)
*channeling
*actionbar (bar)
*bonusbar
*pet
*combat
*mounted, swimming, flying, indoors & outdoors
*flyable
*party & raid
*group
*Macro Option Applications
*Using Focus
*Macro Branching with /click
*Part III: Miscellany
*Custom Icons
*Keeping macros on multiple computers
*More Information
*Acknowledgments
Np, I never used any weapon switch macros so the first response was a kick in the dark then I realized you could do the /equipslot thing since you can do it with trinkets. Without Purpose, You Cannot Exist. Equip slots in Macros When creating macros based on ’click to use’ items (especially trinkets), the common practice is to enter the actual item name. However Using the numeric designations for an equipment slot is a much more effective method as it eliminates the need to manually modify your macro when you upgrade a particular item. Equip a weapon to default slot: /equip Honed Voidaxe. Equip a trinket to the lower trinket slot: /equipslot 14 Carrot on a Stick. 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.What is a macro?
A macro is simply a list of slash commands. I’m sure you are familiar with some of the more common slash commands:
*/say (/s)
*/whisper (/w, /talk, /t)
*/emote (/e, /em, /me)
*/dance
*Oh, and for you PvPers out there, I mustn’t forget /spit
With macros, not only can we issue commands like these from action buttons, but we can also use many of them at once. Each unique command goes on its own line and is written exactly as you would type it in the chat box. For instance, if you wanted a macro that yelled ’Everybody, dance now!’ and burst you into dance, you would write it thus:
A mostly complete list of slash commands is available at http://www.wowwiki.com/List_of_Slash_Commands though at the time of this writing some of the new commands in 2.0 haven’t been added. WoWWiki is a great source of additional information for macros, especially scripts using the /run command (which will be covered later).
Note: I will take this early opportunity to let you know that macros run all at once. This means that when you click the button, the macro runs each command from start to finish before returning control to the game. This has two important effects. First, if you write a macro that takes a long time to execute (like /run for i=1, 100000000 do end), the game will freeze for as long as it takes to run the macro.
Second, and arguably more important, there is no way to wait in a macro without freezing the game. This fact will become much more apparent when we start dealing with the /cast command and its ilk. Some addons can provide a way to issue a command at a later time, but they can only be used for ’benign’ functions like chatting, emotes, and issuing commands to other addons (though equipping weapons in combat is allowed). How do I make a macro?
First, open up the macro window. You can do this either by opening the main menu and selecting Macros, or by typing /macro (/m) in the chat box. At the top of the window, you’ll see two tabs: General Macros and Yourname Specific Macros. General macros are stored on an account-by-account basis and are shared by all your characters. Character specific macros are, well, I think you can figure this one out yourself. :P Immediately under the tabs is a grid of 18 boxes where the macros are displayed. Under those, there is a single box which displays your currently-selected macro with a Change Name/Icon button next to it. Below that is the edit box where you actually type the macro. Finally, at the bottom you have a number of self-explanatory buttons.
To create a macro, click the New button at the bottom of the window. This brings up another small window off to the side where you choose the icon and type a name for the macro. If you choose the question mark (?) icon, WoW will automatically pick an icon for your macro based on what spells or items are listed in the macro. Once you have chosen an icon and a name, click the Okay button.
A few notes: You can control what icon is shown in place of the question mark with the #show commands. Although you can name two macros the same, it is better to avoid this since some functions of addons or even certain macro commands reference macros by name. You can also add custom icons to the list (see the Part III).
Now you will notice that the macro icon you chose has been added to the 18 boxes mentioned earlier (as much of the name as will fit is also displayed on the icon). The newly created macro will also be selected so now it’s time to start writing your macro. Click in the edit box of the macro window to start typing.
Note: Macros have a 255 character limit. Rumor has it this is because they intend to store macros on the servers some day. For now, though, see Part III below for information on preserving your macros among multiple computers. Note that some addons can provide extended macro capabilities using secure templates.
When you are done typing your macro, simply drag its icon from the grid and place it on an action button. The macro will be automatically saved when you first try to use it or when you close the macros window. Click the button, and there you have it! How do I cast spells?
During the normal course of play, you aren’t likely to type many slash commands that are generally useful for macros. Sure, the occasional emote macro can make for some interesting role playing, but c’mon.. There’s got to be more to it than that..
There is. Enter /cast, the most common command you will see in macros. The /cast command allows you to cast any spell from your (or your pet’s) spell book by name. The simplest case is a command like:
This macro will cast your highest-rank Shadow Word: Pain on your target. It behaves exactly as if you had dragged SW:P onto that spot on your action bar. The action bar code recognizes the spell and will show cooldown and range feedback on the icon. In fact, if you choose the question mark icon I mentioned earlier, the action bar will even show the icon for SW:P.
’Ho, hum,’ you might be thinking.. Why not just put the spell on your bar? Well, that’s where combining multiple commands comes in handy, and this is exactly what makes macros so useful. What if you’re a mage and you want to let your party know that you’re about to sheep something? Well, simply put the cast & /p message in a macro (there are better macros for this task--[insert shameless plug for my CCWarn addon here]--but this is a nice, easy to understand example):
Note: Since the macro is executed all at once, the /p command will be issued when you start the cast, and will not care either way whether you have a valid target or whether Polymorph is on cooldown. This also means you can put the two commands in either order and it will have the same effect. If you want to say something only when you actually cast the spell, check out the addon AfterCast. AfterCast schedules a slash command to run.. well.. after you cast a spell (within the limitations mentioned at the end of ’What is a macro?’). For example: Casting without toggling
As mentioned above, /cast Spell will behave just like you had put Spell on an action bar. This means that toggleable abilities will be toggled on or off each time you run the macro. If instead you want the macro to always activate the spell without toggling, you can add an exclamation mark to the beginning of the spell name. For example, this macro will attempt to activate Auto Shot regardless of whether you are already shooting or not.
This can be used with /castsequence (detailed later) to create a common shot rotation macro for hunters:Notes about spell names and ranks
The /cast command is pretty picky when it comes to your spell name. In order for it to sucessfully cast a spell you must use correct spelling, punctuation, spacing, etc. The best way to guarantee you enter the right name is to open your spell book while writing the macro, place your cursor in the macro where the spell should be, and shift-click the spell in your spell book. This will enter the exact name of the spell including its rank like the following:
You can safely remove the (Rank 5) from the macro and it will automatically pick the highest rank--assuming you want to, of course; there are many situations where it is advantageous to use a particular rank (like specific timing on a Warlock’s banish). Beware, though.. Some spells with parentheses in their name may need some coddling. For example, using shift-click on a Druid’s feral Faerie Fire spell produces the following macro:
If you remove the entire (Rank 2), the internal code that translates the spell name gets confused by (Feral) thinking it is a rank and the spell doesn’t cast. You will have to change it to the following in order for it to work as expected:
The empty parentheses are seen as the rank since they’re at the end. Because they’re empty, the parser picks your highest rank and casts the spell. You can also use empty parentheses for other spells, but with the 255 character limit, space is definitely an issue. How do I use an item/trinket?
Simple answer: the same way you cast a spell. The command for using an item is (you guessed it) /use. Like /cast, its simplest form takes the name of the item you want to use:
There are also a couple other forms of the /use command: /use <inventory slot>
This form of use allows you to use an item in the specified slot. See http://www.wowwiki.com/InventorySlotId for a list of the slot numbers. Example:
Uses whatever is in your top trinket slot. /use <bag> <slot>
You can also use an item in a specific bag location. Lets say you always keep the food you want to feed your pet in the first slot of your backpack. You can easily write a macro to feed your pet as follows:
Bags are numbered 0-4 from right to left (0 is always the backpack) and the slots are numbered starting at 1 going left to right, top to bottom (like reading):
or
Trading risk of confusion for completeness, I’ll let you know that /cast and /use function exactly the same way. /cast can use items and /use can cast spells. This isn’t very useful for simple macros like you’ve seen so far. However, when you start dealing with macro options and sequences you’ll be happy to know that you can intermingle items and spells in the same command.Multiple actions with one click
In general, you cannot cast more than one spell with a single click of a macro. Most spells and some items trigger the global cooldown (GCD) which keeps you from taking too many actions at once. Even if a spell fails to cast, if it would trigger the GCD, it prevents subsequent /casts in the macro from running. This was not the case prior to patch 2.0 which is why you may still come across macros like the following:
Macros like this do not work anymore. As soon as Overpower fails to cast, the game will block all the other spells from casting as well, even though the GCD is not actually triggered.
There is a bit of good news, though. Certain spells can actually be cast at the same time in a single macro. Any spell that is instant and does not trigger the GCD can be followed by another cast (’Next Melee’ abilities like Heroic Strike fall under this category too). The spell’s tooltip will tell you if it’s instant, but you have to use the spell (or check a spell database site like thottbot.com) to know if it triggers the GCD. Example: Targeting
Targeting is another common task in macros. This is accomplished either by using dedicated targeting slash commands which actually change your target or by using the [target=] macro option on commands that accept them. When you use the macro option, you are actually casting the spell or using the item directly on the unit without changing targets. Macro options will be covered in great detail in Part II. For now, I’ll show you how to use the targeting commands.
The most basic targeting command (unsurprisingly) is /target. Its use is as simple as
/target does a closest match which means if you do /target Cog and I’m standing near you (and no one named Cog is) it will target me. This is a plus or a minus depending on your situation. Unfortunately, it will also target irrelevant units (like corpses). This makes macros like the following much less useful than they might first appear.
If no Blackwing Mages are around, this might target someone in your raid who happens to have the letters B and L in their name. While they’re safe from the wrath of your curse, it’s still a bit disconcerting. To remedy this situation, patch 2.3 introduced the /targetexact command.
This macro will work more like you might expect though it may target something 100 yards behind you that you don’t really care about.
In addition to specifying the name of someone you would like to target, you can also provide a unit ID. Unit IDs are a way to identify a particular character, mob, NPC, etc. For instance, your current target can always be accessed by the ’target’ unit ID (obviously not the most useful for the command we’re discussing at the moment :P). You yourself are accessed by the ’player’ ID, and if you have a pet it would be referenced by ’pet.’ You can also append ’target’ to the end of any valid unit ID to arrive at that unit’s target. There is a joke about Kevin Bacon involving a macro like:
http://wowprogramming.com/docs/api_types#unitID has a full list of allowed IDs.Other targeting commands
Here is a brief overview of the other targeting commands: /assist
By itself, assist targets your target’s target (e.g. if you are targeting me, and I’m targeting Iriel, /assist would make you target Iriel). You can also provide a name or unit to /assist and you will assist the specified entity:
There is an interface option which will automatically start you attacking if you end up with a hostile target. /cleartarget
Leaves you with no target /targetlasttarget
As the name suggests, this will target your previous target. If you previously had no target, this command will do nothing./targetlastenemy, /targetlastfriend
These commands behave much like /targetlasttarget but will specifically pick your most recent hostile or friendly target. Casino atrium prague poker. /targetenemy, /targetfriend
These commands cycle through the specified type of unit. /targetenemy is like pressing TAB, and /targetfriend is like pressing CTRL-TAB (in the default key bindings). You can also add a parameter of 1 which reverses the direction of the cycle (/targetenemy 1 is like pressing SHIFT-TAB).
Note: You can only use these commands once per macro. /targetparty, /targetraid
Cycles through your nearest party or raid members. Like /targetenemy, you can add a 1 to reverse the direction.How do I control my pet?
As mentioned in the spell casting section, you can use /cast to cast your pet’s abilities by name. In fact, Blizzard had to change the name of the Mage elemental’s Frost Nova to Freeze because there was no way to use it in a macro. :P But as everyone with a pet is aware, that’s nowhere near the end of the line for pet control. Luckily the Burning Crusade patches brought us a host of new pet commands:/petattack
Sends your pet to attack your target. You can also specify a name or unit ID and your pet will attack that instead./petfollow
Causes your pet to follow you, cancelling its attack if necessary./petpassive, /petdefensive, /petaggressive
Sets the reaction mode of your pet just like the buttons on your pet bar./petautocaston, /petautocastoff, /petautocasttoggle
These commands manipulate the auto-cast of a given pet spell. The first will always turn auto-cast on, the second will turn it off, and the third will toggle it (just like right-clicking the button). Example:Controlling button feedback and the question mark (?) icon with #show
By default, WoW uses the first spell or item that appears in a macro to show cooldown, range, and availability feedback on the button, and to pick which icon to display when you use the question mark icon. Take our multi-spell macro from earlier as an example:
With this macro, WoW chooses Arcane Power for the feedback. However, this is probably not what you really want. The main point of this spell is to cast Pyroblast. The first few lines merely exist as support spells to make the Pyroblast more effective. You can make the button behave as if Pyroblast were the first spell by adding the following line to the top of the macro:
If you used the question mark icon for the macro, the button will even have the icon of Pyroblast without any extra effort on your part. The parameter to #show (in this case Pyroblast) works the same way as the /cast and /use commands. You can use a spell name, item name, item id (item:12345), inventory slot, or bag and slot numbers.
Similar to #show is #showtooltip. Normally when you mouse over a macro on an action bar, your tooltip displays the name of the macro. This is not incredibly useful most of the time (espe
https://diarynote-jp.indered.space
Cogwheel’s Complete Macro Guide
Last updated: 2008-01-10 21:21 PDT
Blizzard has recently started their own official guide to creating macros (http://www.worldofwarcraft.com/info/basics/macroguide-one.html). If you find yourself confused by anything in my guide, take a look at theirs. The different approach may help clarify things. As of this moment, Blizzard’s guide only covers a subset of Part I but they will be making additions in the future.
*Part I: Basic Macros
*What is a macro?
*How do I make a macro?
*How do I cast spells?
*Casting without toggling
*Notes about spell names and ranks
*How do I use an item/trinket?
*Multiple actions with one click
*Targeting
*/target, /targetexact
*Other targeting commands
*/assist
*/cleartarget
*/targetlasttarget
*/targetlastenemy, /targetlastfriend
*/targetenemy, /targetfriend
*/targetparty, /targetraid
*How do I control my pet?
*/petattack
*/petfollow
*/petpassive, /petdefensive, /petaggressive
*/petautocaston, /petautocastoff, /petautocasttoggle
*Controlling button feedback and the question mark (?) icon with #show
*Other slash commands
*Equipping items
*Sequencing spells and items
*Random spells and items
*Attacking
*Action bar manipulation
*Removing buffs
*Leaving a form
*Stopping a cast
*Halting a macro early
*Dismounting
*Saving a target for later action
*Simulating button clicks
*Advanced Scripting
*What scripts can’t do
*So, what is a script?
*Part II: Macro Options
*What are macro options?
*Commands that accept options
*[target=unit]
*Syntax overview
*General options syntax
*Condition syntax
*Empty parameters
*Empty conditions
*[target=] vs. unit parameters
*Conditionals
*Complete list
*help & harm
*exists
*dead
*stance (form)
*stealth
*modifier (mod)
*modifier variables
*button (btn)
*equipped (worn)
*channeling
*actionbar (bar)
*bonusbar
*pet
*combat
*mounted, swimming, flying, indoors & outdoors
*flyable
*party & raid
*group
*Macro Option Applications
*Using Focus
*Macro Branching with /click
*Part III: Miscellany
*Custom Icons
*Keeping macros on multiple computers
*More Information
*Acknowledgments
Np, I never used any weapon switch macros so the first response was a kick in the dark then I realized you could do the /equipslot thing since you can do it with trinkets. Without Purpose, You Cannot Exist. Equip slots in Macros When creating macros based on ’click to use’ items (especially trinkets), the common practice is to enter the actual item name. However Using the numeric designations for an equipment slot is a much more effective method as it eliminates the need to manually modify your macro when you upgrade a particular item. Equip a weapon to default slot: /equip Honed Voidaxe. Equip a trinket to the lower trinket slot: /equipslot 14 Carrot on a Stick. 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.What is a macro?
A macro is simply a list of slash commands. I’m sure you are familiar with some of the more common slash commands:
*/say (/s)
*/whisper (/w, /talk, /t)
*/emote (/e, /em, /me)
*/dance
*Oh, and for you PvPers out there, I mustn’t forget /spit
With macros, not only can we issue commands like these from action buttons, but we can also use many of them at once. Each unique command goes on its own line and is written exactly as you would type it in the chat box. For instance, if you wanted a macro that yelled ’Everybody, dance now!’ and burst you into dance, you would write it thus:
A mostly complete list of slash commands is available at http://www.wowwiki.com/List_of_Slash_Commands though at the time of this writing some of the new commands in 2.0 haven’t been added. WoWWiki is a great source of additional information for macros, especially scripts using the /run command (which will be covered later).
Note: I will take this early opportunity to let you know that macros run all at once. This means that when you click the button, the macro runs each command from start to finish before returning control to the game. This has two important effects. First, if you write a macro that takes a long time to execute (like /run for i=1, 100000000 do end), the game will freeze for as long as it takes to run the macro.
Second, and arguably more important, there is no way to wait in a macro without freezing the game. This fact will become much more apparent when we start dealing with the /cast command and its ilk. Some addons can provide a way to issue a command at a later time, but they can only be used for ’benign’ functions like chatting, emotes, and issuing commands to other addons (though equipping weapons in combat is allowed). How do I make a macro?
First, open up the macro window. You can do this either by opening the main menu and selecting Macros, or by typing /macro (/m) in the chat box. At the top of the window, you’ll see two tabs: General Macros and Yourname Specific Macros. General macros are stored on an account-by-account basis and are shared by all your characters. Character specific macros are, well, I think you can figure this one out yourself. :P Immediately under the tabs is a grid of 18 boxes where the macros are displayed. Under those, there is a single box which displays your currently-selected macro with a Change Name/Icon button next to it. Below that is the edit box where you actually type the macro. Finally, at the bottom you have a number of self-explanatory buttons.
To create a macro, click the New button at the bottom of the window. This brings up another small window off to the side where you choose the icon and type a name for the macro. If you choose the question mark (?) icon, WoW will automatically pick an icon for your macro based on what spells or items are listed in the macro. Once you have chosen an icon and a name, click the Okay button.
A few notes: You can control what icon is shown in place of the question mark with the #show commands. Although you can name two macros the same, it is better to avoid this since some functions of addons or even certain macro commands reference macros by name. You can also add custom icons to the list (see the Part III).
Now you will notice that the macro icon you chose has been added to the 18 boxes mentioned earlier (as much of the name as will fit is also displayed on the icon). The newly created macro will also be selected so now it’s time to start writing your macro. Click in the edit box of the macro window to start typing.
Note: Macros have a 255 character limit. Rumor has it this is because they intend to store macros on the servers some day. For now, though, see Part III below for information on preserving your macros among multiple computers. Note that some addons can provide extended macro capabilities using secure templates.
When you are done typing your macro, simply drag its icon from the grid and place it on an action button. The macro will be automatically saved when you first try to use it or when you close the macros window. Click the button, and there you have it! How do I cast spells?
During the normal course of play, you aren’t likely to type many slash commands that are generally useful for macros. Sure, the occasional emote macro can make for some interesting role playing, but c’mon.. There’s got to be more to it than that..
There is. Enter /cast, the most common command you will see in macros. The /cast command allows you to cast any spell from your (or your pet’s) spell book by name. The simplest case is a command like:
This macro will cast your highest-rank Shadow Word: Pain on your target. It behaves exactly as if you had dragged SW:P onto that spot on your action bar. The action bar code recognizes the spell and will show cooldown and range feedback on the icon. In fact, if you choose the question mark icon I mentioned earlier, the action bar will even show the icon for SW:P.
’Ho, hum,’ you might be thinking.. Why not just put the spell on your bar? Well, that’s where combining multiple commands comes in handy, and this is exactly what makes macros so useful. What if you’re a mage and you want to let your party know that you’re about to sheep something? Well, simply put the cast & /p message in a macro (there are better macros for this task--[insert shameless plug for my CCWarn addon here]--but this is a nice, easy to understand example):
Note: Since the macro is executed all at once, the /p command will be issued when you start the cast, and will not care either way whether you have a valid target or whether Polymorph is on cooldown. This also means you can put the two commands in either order and it will have the same effect. If you want to say something only when you actually cast the spell, check out the addon AfterCast. AfterCast schedules a slash command to run.. well.. after you cast a spell (within the limitations mentioned at the end of ’What is a macro?’). For example: Casting without toggling
As mentioned above, /cast Spell will behave just like you had put Spell on an action bar. This means that toggleable abilities will be toggled on or off each time you run the macro. If instead you want the macro to always activate the spell without toggling, you can add an exclamation mark to the beginning of the spell name. For example, this macro will attempt to activate Auto Shot regardless of whether you are already shooting or not.
This can be used with /castsequence (detailed later) to create a common shot rotation macro for hunters:Notes about spell names and ranks
The /cast command is pretty picky when it comes to your spell name. In order for it to sucessfully cast a spell you must use correct spelling, punctuation, spacing, etc. The best way to guarantee you enter the right name is to open your spell book while writing the macro, place your cursor in the macro where the spell should be, and shift-click the spell in your spell book. This will enter the exact name of the spell including its rank like the following:
You can safely remove the (Rank 5) from the macro and it will automatically pick the highest rank--assuming you want to, of course; there are many situations where it is advantageous to use a particular rank (like specific timing on a Warlock’s banish). Beware, though.. Some spells with parentheses in their name may need some coddling. For example, using shift-click on a Druid’s feral Faerie Fire spell produces the following macro:
If you remove the entire (Rank 2), the internal code that translates the spell name gets confused by (Feral) thinking it is a rank and the spell doesn’t cast. You will have to change it to the following in order for it to work as expected:
The empty parentheses are seen as the rank since they’re at the end. Because they’re empty, the parser picks your highest rank and casts the spell. You can also use empty parentheses for other spells, but with the 255 character limit, space is definitely an issue. How do I use an item/trinket?
Simple answer: the same way you cast a spell. The command for using an item is (you guessed it) /use. Like /cast, its simplest form takes the name of the item you want to use:
There are also a couple other forms of the /use command: /use <inventory slot>
This form of use allows you to use an item in the specified slot. See http://www.wowwiki.com/InventorySlotId for a list of the slot numbers. Example:
Uses whatever is in your top trinket slot. /use <bag> <slot>
You can also use an item in a specific bag location. Lets say you always keep the food you want to feed your pet in the first slot of your backpack. You can easily write a macro to feed your pet as follows:
Bags are numbered 0-4 from right to left (0 is always the backpack) and the slots are numbered starting at 1 going left to right, top to bottom (like reading):
or
Trading risk of confusion for completeness, I’ll let you know that /cast and /use function exactly the same way. /cast can use items and /use can cast spells. This isn’t very useful for simple macros like you’ve seen so far. However, when you start dealing with macro options and sequences you’ll be happy to know that you can intermingle items and spells in the same command.Multiple actions with one click
In general, you cannot cast more than one spell with a single click of a macro. Most spells and some items trigger the global cooldown (GCD) which keeps you from taking too many actions at once. Even if a spell fails to cast, if it would trigger the GCD, it prevents subsequent /casts in the macro from running. This was not the case prior to patch 2.0 which is why you may still come across macros like the following:
Macros like this do not work anymore. As soon as Overpower fails to cast, the game will block all the other spells from casting as well, even though the GCD is not actually triggered.
There is a bit of good news, though. Certain spells can actually be cast at the same time in a single macro. Any spell that is instant and does not trigger the GCD can be followed by another cast (’Next Melee’ abilities like Heroic Strike fall under this category too). The spell’s tooltip will tell you if it’s instant, but you have to use the spell (or check a spell database site like thottbot.com) to know if it triggers the GCD. Example: Targeting
Targeting is another common task in macros. This is accomplished either by using dedicated targeting slash commands which actually change your target or by using the [target=] macro option on commands that accept them. When you use the macro option, you are actually casting the spell or using the item directly on the unit without changing targets. Macro options will be covered in great detail in Part II. For now, I’ll show you how to use the targeting commands.
The most basic targeting command (unsurprisingly) is /target. Its use is as simple as
/target does a closest match which means if you do /target Cog and I’m standing near you (and no one named Cog is) it will target me. This is a plus or a minus depending on your situation. Unfortunately, it will also target irrelevant units (like corpses). This makes macros like the following much less useful than they might first appear.
If no Blackwing Mages are around, this might target someone in your raid who happens to have the letters B and L in their name. While they’re safe from the wrath of your curse, it’s still a bit disconcerting. To remedy this situation, patch 2.3 introduced the /targetexact command.
This macro will work more like you might expect though it may target something 100 yards behind you that you don’t really care about.
In addition to specifying the name of someone you would like to target, you can also provide a unit ID. Unit IDs are a way to identify a particular character, mob, NPC, etc. For instance, your current target can always be accessed by the ’target’ unit ID (obviously not the most useful for the command we’re discussing at the moment :P). You yourself are accessed by the ’player’ ID, and if you have a pet it would be referenced by ’pet.’ You can also append ’target’ to the end of any valid unit ID to arrive at that unit’s target. There is a joke about Kevin Bacon involving a macro like:
http://wowprogramming.com/docs/api_types#unitID has a full list of allowed IDs.Other targeting commands
Here is a brief overview of the other targeting commands: /assist
By itself, assist targets your target’s target (e.g. if you are targeting me, and I’m targeting Iriel, /assist would make you target Iriel). You can also provide a name or unit to /assist and you will assist the specified entity:
There is an interface option which will automatically start you attacking if you end up with a hostile target. /cleartarget
Leaves you with no target /targetlasttarget
As the name suggests, this will target your previous target. If you previously had no target, this command will do nothing./targetlastenemy, /targetlastfriend
These commands behave much like /targetlasttarget but will specifically pick your most recent hostile or friendly target. Casino atrium prague poker. /targetenemy, /targetfriend
These commands cycle through the specified type of unit. /targetenemy is like pressing TAB, and /targetfriend is like pressing CTRL-TAB (in the default key bindings). You can also add a parameter of 1 which reverses the direction of the cycle (/targetenemy 1 is like pressing SHIFT-TAB).
Note: You can only use these commands once per macro. /targetparty, /targetraid
Cycles through your nearest party or raid members. Like /targetenemy, you can add a 1 to reverse the direction.How do I control my pet?
As mentioned in the spell casting section, you can use /cast to cast your pet’s abilities by name. In fact, Blizzard had to change the name of the Mage elemental’s Frost Nova to Freeze because there was no way to use it in a macro. :P But as everyone with a pet is aware, that’s nowhere near the end of the line for pet control. Luckily the Burning Crusade patches brought us a host of new pet commands:/petattack
Sends your pet to attack your target. You can also specify a name or unit ID and your pet will attack that instead./petfollow
Causes your pet to follow you, cancelling its attack if necessary./petpassive, /petdefensive, /petaggressive
Sets the reaction mode of your pet just like the buttons on your pet bar./petautocaston, /petautocastoff, /petautocasttoggle
These commands manipulate the auto-cast of a given pet spell. The first will always turn auto-cast on, the second will turn it off, and the third will toggle it (just like right-clicking the button). Example:Controlling button feedback and the question mark (?) icon with #show
By default, WoW uses the first spell or item that appears in a macro to show cooldown, range, and availability feedback on the button, and to pick which icon to display when you use the question mark icon. Take our multi-spell macro from earlier as an example:
With this macro, WoW chooses Arcane Power for the feedback. However, this is probably not what you really want. The main point of this spell is to cast Pyroblast. The first few lines merely exist as support spells to make the Pyroblast more effective. You can make the button behave as if Pyroblast were the first spell by adding the following line to the top of the macro:
If you used the question mark icon for the macro, the button will even have the icon of Pyroblast without any extra effort on your part. The parameter to #show (in this case Pyroblast) works the same way as the /cast and /use commands. You can use a spell name, item name, item id (item:12345), inventory slot, or bag and slot numbers.
Similar to #show is #showtooltip. Normally when you mouse over a macro on an action bar, your tooltip displays the name of the macro. This is not incredibly useful most of the time (espe
https://diarynote-jp.indered.space
コメント