19.17 THE ECHO COMMAND

The echo command serves a very basic function: it will simply display to you, with some optional processing, the text you supply to it.

At its most basic, it takes the following form:

ECHO <text>

For example, if you enter the following:

ECHO This is some text!

You will see the following:

This is some text!

Not super exciting, but useful for free-form testing of triggers in your client.

The command becomes more expressive with the use of code sequences. These sequences, delimited with $'s, allow specifying some formatting of the text that is echoed back. The following code sequences are current supported:

$$ 
Displays a literal $.

$n$
Inserts a newline into the text.

$<fg>$
$[<fg>]:[<bg>]$
Inserts ANSI codes to colour the following text. For the first variation, fg must be an integer value in the range [0, 255]. For the second variation, both fg and bg must either be integer values in the range [0, 255], or omitted. Omitting the colour will insert colour codes for the default colour; $:$ in particular will set both foreground and background colours to default. Colours will be downsampled to the appropriate range if your client does not support 256 colours, or if you have it disabled in-game.

As an example, the following command:

ECHO $11:4$This is a test.$n$$:$I don't have an organic way to show $$ in an example, so this will have to do.

Will display, with the first line coloured bright yellow on blue, and the second in default colours:

This is a test.
I don't have an organic way to show $ in an example, so this will have to do.