Comments

From MacroQuest Wiki

(Difference between revisions)

Revision as of 04:52, 18 February 2005

Comments

Comments are descriptive lines in a macro to make reading easier. These are not executed when the macro runs.

Single line comments start with | |This is a single line comment Multi line comments can also be used. Multi-line comments begin with |** and end with **| |** This is a multiple line comment where you could use this form of commenting **| Pound Commands Pound commands are pre-execution commands that are not run during the macro.

  1. turbo [#]

This will prevent bad macros from locking up the client by allowing you to limit the number of commands per iteration. The default is 20, while the maximum value is 40. A value of 1 will essentially disable #turbo.

  1. turbo is active with the default of 20 in all macros even if you do not use #turbo in your macro.
  1. define replaceme replacement

Replaces all occurrences of replaceme with replacement throughout the macro.

Example

  1. define Me charactername

When the macro executes, when Me occurs, it will be replaced with charactername

  1. include "filename"

Allows you to use functions from another macro file by using /call.

Normally the filename extension .inc is used to indicate that it is an include file, but you may use any extension name that you like.

Subs present in an include file are accessible by the calling macro as if the Sub existed within the calling macro.

  1. event eventname "string"

Creates a custom event (Sub Event_eventname) that occurs whenever string is sent to the chat box.


Example

  1. event SpellFizzle "Your spell fizzles"

Matching Sub:

Sub Event_SpellFizzle


/return A matching Sub must be used. Custom events are further explained in Subroutines.