WoW:Macro FAQ: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(Moved a bunch of coding related stuff to Interface Customization FAQ. Reclassified this page as "UI".)
m (Move page script moved page Macro FAQ to Macro FAQ without leaving a redirect)
 
(10 intermediate revisions by 9 users not shown)
Line 1: Line 1:
This is the place to ask any questions about UI Customization that is ''not'' directly related to writing your own AddOns. For developing AddOns, see [[Interface Customization]]. For Cosmos-specific questions, please see the Cosmos Questions page.
{{Macronav}}[[Image:questionmark-large.png|left]]
Frequent questions and answers for [[macro]]s.
{{Clrl}}


==Macros==
{{faqq}}How do I write a Macro?
{{faqa}}See the [[Macros]] page.


; Q) How do I write a Macro?
{{faqq}}How do I write a Macro to do XXXX?
: A) See the [[Macros]] page.
{{faqa}}Check the [[Most Used Macros]] to see if someone has already done something like this. Check the question below "What can't a macro do?" to see if its going to be impossible. If neither of these help, try asking on the [http://forums.worldofwarcraft.com/board.html?forumId=11114&sid=1 World of Warcraft UI & Macros Forum].


; Q) How do I write a Macro to do XXXX?
{{faqq}}What can't a macro do?
: A) Check the [[Most Used Macros]] to see if someone has already done something like this. Check the question below "What can't a macro do?" to see if its going to be impossible. If neither of these help, try asking on the [http://www.cosmosui/forums CosmosUI forums].
{{faqa}}A Macro cannot:
 
; Q) What can't a macro do?
: A) A Macro cannot:
<!-- anyone know how to indent this but still keep the bullets? -->
*Use more than 255 characters
*Call another macro (with the addon "Supermacro" it is now easy to run other macros in your macro)
*Cast a spell/ability without you pressing a button
*Cast a spell/ability without you pressing a button
*Cast more than one spell/ability per button press
*Cast more than one spell/ability per button press, unless using an ability that isn't affected by global cooldown, like feign death or judgement.
*Insert a pause before activating a spell/ability
*Wait or pause before activating a spell/ability
*Target another player's pet automatically (you can only automatically target your own pet)
*Target another player's pet automatically (you can only automatically target your own pet)
*Output anything to file other than saved variables
*Output anything to file other than saved variables
*Use more than 255 characters
*Call another macro


; Q) So what can a macro do?
{{faqq}}So what can a macro do?
: A) You can call [[World of Warcraft API|any script command]] (/script ''ScriptFunction''), any standard WoW /command such as /say or /attack, and any additional /commands made available by the AddOns you've installed, for example if you install [[Cosmos]] you can use the [[Cosmos Slash Commands]]. If you need to write a long macro, write it as an AddOn in a lua file and bind it to a slash command, just like the Cosmos ones. See the section on Lua and XML for more details.
{{faqa}}You can call [[World of Warcraft API|any script command]] (/script ''ScriptFunction''), any standard WoW /command such as /say or /attack, and any additional /commands made available by the AddOns you've installed. (If you need to write a long macro, write it as an AddOn in a lua file and bind it to a slash command. See the section on Lua and XML for more details.)
 
; Q) What's the real deal with pauses?
: A) You can't use a pause before a spell or ability. However... you can kinda do pauses in certain ways. Firstly, the [[Cosmos]] [[Cosmos Slash Commands|slash commands]] includes a /in option. This will NOT work with spells or abilities, but works fine with chat commands. For example: "/in 5 /say Heal on the way!". You can also use certain script commands based on time, such as the movement commands. See the [[World of Warcraft API]] for more on those.
 
 
==Questions on Specific AddOns==


===Census===
{{faqq}}What's the real deal with pauses?
* ''Where can I get the census mod seperately?''
{{faqa}}You can't use a pause before a spell or ability. However... you can use certain script commands based on time, such as debug or movement commands.
*:[http://www.pieragostini.com/ian/fun/wow/mods/Census.htm Here]
*:[http://www.warcraftrealms.com/censusplus.php And updated version here]
* ''Where can I see information on other server's Census data?''
*:[http://www.warcraftrealms.com Warcraft Realms]


===Thottbot===
For example, the following script command inserted between other /commands will temporarily freeze all game input/output for the duration specified.


''Where 500 is equal to a 0.5 second delay (250=0.25sec, 1000=1sec, 10000=10sec, etc.)''
/script debugprofilestart();while debugprofilestop()<500 do end;


Though this technique does effectively pause your macro for the desired interval, there is a downside.
The game-freezing pause this script causes can be an unsettling and undesired side-effect for some players. The freeze can prevent the player from perceiving the visual results of the /command immediately preceding this script.  So depending on the duration you specify, the greater the pause, the more background action you will miss.
This effect is strictly local and does not impact the game server or other players in any way.  Though you may partially or entirely miss the results, you ''can'' be assured that the preceding /command ''is'' in actuality transmitted to the server and executed before the localized freeze takes place. 


See the [[World of Warcraft API]] for more on time based script commands.


[[Category:UI| UI Questions]]
== See also ==
* [[UI FAQ/Macros and Scripts]]
* [[Most used macros]]
[[Category:FAQs]]
[[Category:Macros]]

Latest revision as of 04:48, 15 August 2023

Macros
General guides
Questionmark-large.png

Frequent questions and answers for macros.

Questionmark.png How do I write a Macro?

- See the Macros page.

Questionmark.png How do I write a Macro to do XXXX?

- Check the Most Used Macros to see if someone has already done something like this. Check the question below "What can't a macro do?" to see if its going to be impossible. If neither of these help, try asking on the World of Warcraft UI & Macros Forum.

Questionmark.png What can't a macro do?

- A Macro cannot:

  • Cast a spell/ability without you pressing a button
  • Cast more than one spell/ability per button press, unless using an ability that isn't affected by global cooldown, like feign death or judgement.
  • Wait or pause before activating a spell/ability
  • Target another player's pet automatically (you can only automatically target your own pet)
  • Output anything to file other than saved variables
  • Use more than 255 characters
  • Call another macro

Questionmark.png So what can a macro do?

- You can call any script command (/script ScriptFunction), any standard WoW /command such as /say or /attack, and any additional /commands made available by the AddOns you've installed. (If you need to write a long macro, write it as an AddOn in a lua file and bind it to a slash command. See the section on Lua and XML for more details.)

Questionmark.png What's the real deal with pauses?

- You can't use a pause before a spell or ability. However... you can use certain script commands based on time, such as debug or movement commands.

For example, the following script command inserted between other /commands will temporarily freeze all game input/output for the duration specified.

Where 500 is equal to a 0.5 second delay (250=0.25sec, 1000=1sec, 10000=10sec, etc.)

/script debugprofilestart();while debugprofilestop()<500 do end;

Though this technique does effectively pause your macro for the desired interval, there is a downside. The game-freezing pause this script causes can be an unsettling and undesired side-effect for some players. The freeze can prevent the player from perceiving the visual results of the /command immediately preceding this script. So depending on the duration you specify, the greater the pause, the more background action you will miss. This effect is strictly local and does not impact the game server or other players in any way. Though you may partially or entirely miss the results, you can be assured that the preceding /command is in actuality transmitted to the server and executed before the localized freeze takes place.

See the World of Warcraft API for more on time based script commands.

See also