START OF DOCUMENT PREVIOUS PAGE
Copyright © 1995 Robert M. Free - publishing rights reserved
MUTT(tm) and MUTTER(tm) are trademarks of Robert M. Free

This document may be freely copied and distributed, provided that: this copyright notice is included, the entire body of text is included, and the textual content of this document is unchanged.

For written permission to use portions of this document in other publications, send email to bfree@graphcomp.com.


[] Tips on Writing MUTTER(tm) Scripts

MUTT(tm) Lite is by design a "light" application with little robustness regarding command and script parsing. Code space and time were instead devoted towards maximizing its flexibility to connect to and deal with a wide range of mud host flavors.

As such, strict adherence to command syntax is essential for successful MUTTER(tm) script writting.


Using Commands and Functions

Commands and functions must be followed by an adjacent "("; "Lite" depends on this for correct parsing.

Each command must be terminated by a ";"; strings of commands should be separated by "; ".


Sending Strings of Text

Most mud hosts expect user commands to be separated by cariage returns and line feeds (CRLF). Each "say" command is automatically terminated by a CRLF. "\n" may be used to embed a CRLF in a string of text.

The following demonstrates 3 ways of sending a series of user commands to the mud host:

The code in the first example is the easiest to read; the last example executes the fastest.


Keep Scripts Short

Long, convoluted scripts are difficult to modify and debug. Keep your scripts short and modular. When possible, limit a script to one task, such as responding to a trigger or condition.

For complex operations, separate each task into a separate script, and then create a script that links all the operations in sequence.


NEXT PAGE Script Examples


For more information on MUTT(tm), email mutt@graphcomp.com.