This is going to be a quick post following up Part 2, but it will demonstrate the usefulness of the showme command, how color works, and how to keep your enhancements straight. Let’s just jump right into the code and get to the explanations afterwards.

#class {cl_help} {kill}
#class {cl_help} {open}

#nop 0 - Black       5 - Magenta
#nop 1 - Red         6 - Cyan
#nop 2 - Green       7 - White
#nop 3 - Yellow      8 - Skip
#nop 4 - Blue        9 - Default

#nop ###################################
#nop ## Help lists
#nop ###################################

#alias {thelp} {#showme <149>==        <229>LISTS<149>        ==<088>;
#showme <149>=========================<088>;
#showme herblist;
#showme ;
#showme <149>==       <229>SCRIPTS<149>       ==<088>;
#showme <149>=========================<088>;
#showme combat;
#showme herbing;
#showme logging;
#CR}

#alias {herblist} {#showme ;
#showme <229>Spell Name<088>      - <229>Potion Name<088>   - <229>Ingredients<088>;
#showme <149>======================================================================<088>;
#showme cure-poison     - <129>green<088>         - parsley, rosemary, and sage.;
#showme remove-curse    - <239>brown<088>         - parsley, sage, and thyme.;
#showme refresh         - <269>effervescent<088>  - sage, rosemary, and thyme.;
#showme warmth          - <159>pink<088>          - parsley, fennel, and valerian.;
#showme stone-skin      - <109>light grey<088>    - rosemary, fennel, and vervain.;
#CR}

Firstly, we see the standard template being used followed by some color code comments. VT100 dictates how ANSI characters, including color, are to be sent and displayed. *Tin++ supports the VT100 control set and it implements them by a three digit code. Their manual describes the codes and shows how to use them. The included comments are a simple reminder.

Next is an alias command called thelp. This serves as the internal help command for all custom scripts. It has to be manually updated, but when more than a handful exist, it is nice to have an in-game reference. The showme command prints messages locally on the client and does not transmit them to the server. This is used to show system messages. In this case, thelp prints a list of help commands and available scripts that can be toggled on or off. Each showme line ends with a semicolon so that a new line is created. #CR will print a carriage return so that text will line up correctly.

The color being used for the equal signs is 149. This will print the following text in bold (1), blue foreground (4), and the default background color (9). The color being used for “LISTS” is bright (2), green foreground (2), and the default background color (9).

The next alias is a truncated help menu showing in-game potions that can be brewed and the required herbs to make them. There are no new commands, but it seemed like a good idea to add more than one help alias. Recall at the beginning of this script that there was a script section showing “combat,” “herbing,” and “logging.” These are scripts that I keep separate with built in logic to toggle them. For example, if people start dying Gangs Of New York style, I don’t want to waste processing time on picking herbs. This allows for it to be quickly toggled off and the help entry reminds me of what the command is called.

This is just another way that aliases can be used beyond being glorified shortcuts. They do not add any advantage to players, but are handy reference guides. Hopefully this will give players new to scripting some ideas on things that they may not have thought of before.

Previous: Part 2, Aliases

Next: Part 4, Script Template