Difference between revisions of "WoW Macro Action"

From ISBoxer
Jump to: navigation, search
(Conditional Macros)
 
(5 intermediate revisions by one user not shown)
Line 1: Line 1:
 +
{{Action}}
 +
{{WoW}}
 +
{{ISBoxer 38}}{{Round-robin}}
 
[[File:Wow macro action.png|500px|thumb|right|Editing a WoW Macro Action]]
 
[[File:Wow macro action.png|500px|thumb|right|Editing a WoW Macro Action]]
 +
 +
'''As of ISBoxer 38, [[WoW:Macro|WoW Macros]] should be kept in the [[World of Warcraft Macro Library]] and used via [[Named World of Warcraft Macro Action]]. It is recommended that you use the new system instead of using the original WoW Macro Action; the new system is less confusing!'''
 +
 +
 +
 
A [[WoW Macro Action]] is a special action for [[World of Warcraft]] (as the name implies, this type of [[Action]] will not work for other games). This is the same as a [[Keystroke Action]], but generates a WoW Macro specifically for each [[Character]] in each [[Character Set]] in the [[WoW:ISBoxer Addon|ISBoxer Addon]]; The Addon will assign a WoW Key Binding (configured by the Key combination) to the WoW Macro.
 
A [[WoW Macro Action]] is a special action for [[World of Warcraft]] (as the name implies, this type of [[Action]] will not work for other games). This is the same as a [[Keystroke Action]], but generates a WoW Macro specifically for each [[Character]] in each [[Character Set]] in the [[WoW:ISBoxer Addon|ISBoxer Addon]]; The Addon will assign a WoW Key Binding (configured by the Key combination) to the WoW Macro.
  
Line 14: Line 22:
 
* The '''Final macro text''' demonstrates how the macro will actually look, as applied to a given Character. The '''as applied to''' box selects the Character to show the macro for. The asterisk (*) button next to the [[Target]] picker can be used to select the Character Set.
 
* The '''Final macro text''' demonstrates how the macro will actually look, as applied to a given Character. The '''as applied to''' box selects the Character to show the macro for. The asterisk (*) button next to the [[Target]] picker can be used to select the Character Set.
 
* The '''Name for use with /click''' can be used to create WoW Macros for use with the /click command. If this option is not used, the name of the WoW Macro is automatically generated and not easily predictable.
 
* The '''Name for use with /click''' can be used to create WoW Macros for use with the /click command. If this option is not used, the name of the WoW Macro is automatically generated and not easily predictable.
 
== Dynamic macros ==
 
Dynamic Macros are those that include variables. Variables are resolved at the time the [[WoW:ISBoxer Addon|ISBoxer Addon]] is generated, when you [[Export to Inner Space]]. Any of the pre-defined variables can be used anywhere in your Macro, and will be replaced for the final Macro with the desired value. For example, if you place the text '''{CHARACTER}''' in your Macro, it will be replaced with the name of the Character it is executed on, e.g.:
 
/say Hi, my name is {CHARACTER}
 
... might translate to:
 
/say Hi, my name is Bob
 
or
 
/say Hi, my name is Alice
 
... depending on the name of the Character.
 
 
=== List of Variables ===
 
The following is a complete list of available variables:
 
* '''{SLOT}''' will be replaced with the current Slot number, e.g. 1
 
* '''{SLOTS}''' will be replaced with the number of Slots assigned to the current Character Set, e.g. 5
 
* '''{SLOT'''#'''}''' where # is a number, e.g. {SLOT1}, will be replaced with the name of the Character in that Slot, e.g. Alice
 
* '''{CHARACTER}''' will be replaced with the current Character name, e.g. Alice
 
* '''{CHARACTERSET}''' will be replaced with the current Character Set name, e.g. Team Bob and Alice
 
* '''{FTL}''' will be replaced with FTL conditionals as defined by the Character Set, e.g. <tt>[nomod:alt,mod:lshift,mod:lctrl]ToonA;[mod:lalt,nomod:shift,mod:lctrl]ToonB</tt>
 
* '''{MYFTL}''' will be replaced with FTL conditionals as defined by the Character Set for the '''current Slot''', e.g. <tt>[nomod:alt,mod:lshift,mod:lctrl]</tt>
 
* '''{FTL#}''' where # is a number, e.g. {FTL1}, will be replaced with FTL conditionals as defined by the Character Set for that Slot, e.g. <tt>[nomod:alt,mod:lshift,mod:lctrl]</tt>
 
* '''{ASSISTHOTCHARACTER}''' will be replaced with /assist {FTL} or /assist focus, depending on whether FTL is enabled for the Mapped Key
 
* '''{TARGETHOTCHARACTER}''' will be replaced with /targetexact {FTL} or /target focus, depending on whether FTL is enabled for the Mapped Key
 
 
Variables '''are''' case sensitive -- they must be in upper case as shown.
 
 
== Conditional Macros ==
 
Conditional Macros are those that may include or omit lines depending on available conditions. Conditions are resolved at the time the [[WoW:ISBoxer Addon|ISBoxer Addon]] is generated, when you [[Export to Inner Space]].
 
 
The following conditions can be tested:
 
* Is there a Character in Slot #? (e.g. Slot 1) Note that if a Character Set does not have 5 slots, the answer to "Is there a Character in Slot 5?" is no.
 
* Is a Character (the current Character, any Character by name, or the Character in a Slot #) in..
 
** .. a given Action Target Group? (any Action Target Group by name)
 
** .. a given Character Set? (the current Character Set, or any Character Set by name)
 
* Is the Character in Slot # (e.g. Slot 1) the same as a given Character? (the current Character, any Character by name)
 
* Is FTL enabled for the Mapped Key?
 
 
Conditionals are comprised of keywords or operators, and strings enclosed in quotes. Strings are resolved contextually, based on the operators used on them, as a Character, a Character Set, or an Action Target Group. If no operator is used on the string, it is resolved as a Character. Variables may be used in the strings, but this should not be necessary under normal circumstances. These are '''not''' case sensitive, but using lower case for keywords is recommended for clarity.
 
 
=== Specifying a Character in conditionals ===
 
Character strings can use certain special words to grab a specific Character, by Slot number, or for the current Character. This can ''also'' be done using variables.
 
* <tt>"me"</tt> (including quotes) is equivalent to <tt>"{CHARACTER}"</tt> (including quotes) is equivalent to <tt>character</tt> (no quotes, this is a Keyword from the list in the next section).
 
* <tt>"slot #"</tt> (including quotes, where # is a number such as 1) is equivalent to <tt>"{SLOT#}"</tt> (including quotes, where # is a number such as 1)
 
* Otherwise, the name of the Character is used to indicate a specific Character, such as <tt>"Alice"</tt>
 
 
=== List of Keywords ===
 
The following keywords are available (if it says "operates on" it is an operator, if it says "evaluates to" it :
 
; not
 
: Operates on whatever is immediately to the right of it, and giving it the opposite meaning.
 
; and
 
: Operates on whatever is to the left and right of it, meaning that both conditions must be met.
 
; or
 
: Operates on whatever is to the left and right of it, meaning that either of the conditions must be met.
 
; is
 
: Operates on a Character to the left of it, and a Character to the right of it, to test equality. Can be combined with '''not''' as follows: '''is not''', '''isnt''' or '''isn't''' for a relatively natural English feel. Examples: <tt>"Character A" is "Character B"</tt> or <tt>"Character A" is not "Character B"</tt>
 
; in
 
: Operates on a Character to the left of it, and a Character Set or Action Target Group to the right of it, to test whether a Character is in a given Character Set or Action Target Group. Can be combined with '''is''' and '''not''' as follows: '''is in''', '''is not in''', '''isnt in''', or '''isn't in''' for a relatively natural English feel. Examples: <tt>"Character A" is in "deathkights"</tt> or <tt>"Character B" is not in "shamans"</tt> or <tt>"Character C" is not in "My Character Set"</tt>
 
; ftl
 
: Evaluates as true if FTL Modifiers are enabled for the Mapped Key, otherwise false
 
; character
 
: Evaluates to the name of the Character the Macro is being generated for (if it will be generated for multiple Characters, will resolve to the name of each Character individually). Examples: <tt>character is "ToonA"</tt> or <tt>character in "deathknights"</tt>. Equivalent to <tt>"{CHARACTER}"</tt> (including quotes).
 
; character set
 
: Evaluates to the name of the Character Set the Macro is being generated for (if it will be generated for multiple Character Sets, will resolve to the name of each Character Set individually). Examples: <tt>"Someone" is in characterset</tt>. Equivalent to <tt>"{CHARACTERSET}"</tt> (including quotes).
 
 
=== Operator precedence and grouping ===
 
Operators are processed in order of precedence, to arrive at the final result of the conditions (true or false). This means that if operators are not manually grouped with parentheses, grouping is implied by order of precedence.
 
 
;Operators are processed in the following order:
 
#'''in''', '''is'''
 
#'''not'''
 
#'''and'''
 
#'''or'''
 
 
Conditions may be grouped by using parentheses.
 
 
=== Applying conditions ===
 
Conditions may be applied on a per-line basis. Conditional state from the previous line is kept in order to handle chaining, however no ''nesting'' is allowed, and there are no ''code blocks'' (see the description of !also).
 
 
Lines starting with ! are interpreted as conditional statements. Available conditional statements are as follows:
 
;!if (conditions) /command
 
: The given command will only be applied to the macro if the given <tt>conditions</tt> are met. Examples: <tt>!if (character is in "deathknights") /cast Icy Touch</tt>, or <tt>!if (ftl or not ftl) /say That is the question...</tt>
 
;!elseif (conditions) /command
 
: The given command will only be applied to the macro if the given <tt>conditions</tt> are met '''and''' the previously chained conditions were '''not''' met. Example: <tt>!elseif (character is in "paladins") /startattack</tt>
 
;!else /command
 
: The given command will only be applied to the macro if the previously chained conditions were '''not''' met. Example: <tt>!else /petattack</tt>
 
;!also /command
 
: The given command will only be applied to the macro if the previously chained line was '''also''' applied (using any of !if, !elseif, !else, or !also). Example: <tt>!also /cast Auto Shot</tt>
 
 
== Example Advanced Macros ==
 
=== Universal 5-man /invite macro ===
 
; Invites all 5 Characters in a 5-man Set
 
/invite {SLOT1}
 
/invite {SLOT2}
 
/invite {SLOT3}
 
/invite {SLOT4}
 
/invite {SLOT5}
 
 
=== Universal up-to-5-man /invite macro ===
 
; This version has conditions to a) not invite current character, and b) not invite if the slot is empty (which it can't be when exported, but for example...) or the Character Set doesn't have that many slots
 
!if ("slot 1" and character is not "slot 1") /invite {SLOT1}
 
!if ("slot 2" and character is not "slot 2") /invite {SLOT2}
 
!if ("slot 3" and character is not "slot 3") /invite {SLOT3}
 
!if ("slot 4" and character is not "slot 4") /invite {SLOT4}
 
!if ("slot 5" and character is not "slot 5") /invite {SLOT5}
 
 
=== Combined multi-class attack macro ===
 
; I made up different attacks, you'd probably want your own
 
!if (character is in "shamans") /cast Lightning Bolt
 
!elseif (character is in "deathknights") /startattack
 
!also /cast Icy Touch
 
!elseif (character is in "paladins") /startattack
 
!elseif (character is in "rogues") /startattack
 
!also /cast Sinister Strike
 
!elseif (character is in "druids") /cast Wrath
 
 
;This will resolve to the following:
 
*shamans
 
/cast Lightning Bolt
 
*deathknights
 
/startattack
 
/cast Icy Touch
 
*paladins
 
/startattack
 
*rogues
 
/startattack
 
/cast Sinister Strike
 
*druids
 
/cast Wrath
 
  
 
== See Also ==
 
== See Also ==
 +
* [[WoW:Macro|ISBoxer features for WoW Macros]]
 +
* WoWPedia: [http://www.wowpedia.org/HOWTO:_Make_a_Macro HOWTO: Make a macro]
 
* [[WoW:ISBoxer Addon|ISBoxer Addon]]
 
* [[WoW:ISBoxer Addon|ISBoxer Addon]]
 
* [[WoW:Quick Setup Wizard|Quick Setup Wizard]]
 
* [[WoW:Quick Setup Wizard|Quick Setup Wizard]]

Latest revision as of 19:38, 24 May 2011

Editing a WoW Macro Action

As of ISBoxer 38, WoW Macros should be kept in the World of Warcraft Macro Library and used via Named World of Warcraft Macro Action. It is recommended that you use the new system instead of using the original WoW Macro Action; the new system is less confusing!


A WoW Macro Action is a special action for World of Warcraft (as the name implies, this type of Action will not work for other games). This is the same as a Keystroke Action, but generates a WoW Macro specifically for each Character in each Character Set in the ISBoxer Addon; The Addon will assign a WoW Key Binding (configured by the Key combination) to the WoW Macro.

This cannot be used to place a macro on an Action Bar -- those macros must be created in-game. The macros created by ISBoxer are invisible, and can be up to 1023 characters in length, the same as macros created by other Addons.

Controls

  • The Target indicates which windows the Key Combination will be sent to
  • The Key Combination is what will be passed to the game. This cannot match the Hotkey for an Action Bar button; if it does, the macro will not be assigned because World of Warcraft prevents it. If "Use FTL Modifiers" is enabled for this Mapped Key, the Key Combination should be an unmodified key (as the modifiers Alt, Shift and Ctrl are then reserved for FTL Modifiers).
  • The Different WoW Macros using this key combination will tell you how many different (not identical) WoW Macro Actions are already using the selected Key Combination. This will help prevent conflicting WoW Macros, as only one WoW Macro can be bound to a particular Key Combination by the game. This number is more of a guide than an absolute, as it does not determine which WoW Macros are not going to be applied to a given Character or Character Set.
  • The Display as (in Step) option can change the text in the Step and serves no other purpose. In the picture, this option has been set to say Invites and the effect can be seen underneath Actions: Invites -> self
  • The drop-down box next to "Display as" that says <Copy from...> can be used to copy from another WoW Macro Action
  • The Commands box is where you put the actual WoW Macro
  • The Targeting helper options are outdated and no longer necessary, but available for backwards compatibility. They were originally used to facilitate switching between Focus-based and FTL-based configuration. Now, the Quick Setup Wizard generates a simplified FTL-based configuration instead, so the Targeting helper options should generally be avoided.
  • The Final macro text demonstrates how the macro will actually look, as applied to a given Character. The as applied to box selects the Character to show the macro for. The asterisk (*) button next to the Target picker can be used to select the Character Set.
  • The Name for use with /click can be used to create WoW Macros for use with the /click command. If this option is not used, the name of the WoW Macro is automatically generated and not easily predictable.

See Also