Quantcast WoWInterface - View Single Post - The Definitive AddOn and Macro FAQ, yet again
View Single Post
02-25-06, 12:15 AM   #12
Credendo Vides
Cairenn's Avatar
Premium Member
WoWInterface Admin
Join Date: Mar 2004
Posts: 7,083
Section 9 What? (Definitions)

Q: No, really. What the heck are macros and scripts? (Credit Legorol, as posted at http://www.WoWWiki.com)

A: Macros:
Macros are series of commands designed to be executed in series.

A macro can consist of any number of /<command>s or pure text to up 255 characters. Users wishing to use more advanced commands are recommended to see the Interface Customization and World of Warcraft API sections at wowwiki.com.

Usually, not just in WoW, the term Script refers to a short to medium length program, written in some kind of simple programming language (called a scripting language). The purpose of a script is usually to control another program.

World of Warcraft has a powerful programming language called Lua embedded inside it, which is used for scripting. What this means is that WoW is able to understand and execute little programs written in the Lua language. However, in WoW, a script is usually not something that you use by itself, i.e. you don't just type in a script and execute it (although this is also possible). Instead, there are several places in WoW where you have the option to enter scripts as part of something else.

The kind of places that you can use a script:

/script [command] : If you type the slash command "/script" in the chat box, you can follow it with one or more valid Lua language statements (i.e. a script), separated by semi-colons (.

Macros: you can enter scripts as part of macros, by putting one or more "/script" commands in your macro.

So what can a script do? There are many resources on Lua scripts (the main one being http://www.wowwiki.com); However, the most important point is that scripts are able to perform many more game actions than slash commands. This is done via a set of functions (called API or Application Programming Interface) that WoW makes available for use in scripts. There is a quite extensive list of all the API functions available for use in scripts at http://www.wowwiki.com
  Reply With Quote