zMUD Features

Many people play MUDs using simple programs such as Telnet. One of the reasons that MUDs are so popular is that you don’t need special software or computer systems to play them. However, using an advanced MUD client such as zMUD can make MUD playing easier and more fun. Starting in this chapter, we will return to our sample DIKU MUD and start using some of the features of zMUD to improve our play.

The Character Database

In Chapter X we created a character on a DIKU MUD using the Connection Wizard. While this is an easy way to connect to new MUDs, it doesn’t allow you to connect to a previously created character. To view the characters you have created so far, open the zMUD Character Database. You can do this by clicking the Character Database button in the initial zMUD startup screen, or you can select Another Character from the File menu.

As shown in Figure 1, a list of your previously created characters is displayed in the list box on the left side of the dialog window. You can select one of these characters by simply clicking on it. The selected character is highlighted and information about the selected character is shown on the right: the title, Internet hostname and port number, the name of your character, and your characters password. There is also a space for the Internet Address of the MUD. If the address is not shown, you can look up the address by clicking on the small button containing a picture of a calculator. Also shown is a space for comments about this MUD, the last time you connected to the MUD, and how long you have been playing this character on the MUD.

Figure 1: Character Database dialog

Any of the information that is shown can be changed by clicking on the while text box and typing new information, or using the backspace key to erase old information. Any changes you make will automatically be saved. You can connect to the MUD by clicking the Connect button, or you can work with your character without being connected to the MUD using the Offline button.

Locate the character that you created in Chapter X in the list box on the left and select it by left-clicking on it. The information about this character will be shown on the right. Click in the Comment field and enter zMUD DIKU tutorial. Click the Connect button to save the comment and connect to the MUD. If you successfully followed the tutorial in Chapter X, then zMUD should automatically log you into the MUD. If not, enter your character name and password when prompted by the MUD.

The zMUD Interface

There are several important components of the zMUD user interface as shown in Figure 2: the background application window, the current MUD output window, the command input line, the main menu, the toolbar, the status line, and the scrollbars. Think of the background window as the zMUD container for all of the other elements. The color or pattern of this window can be changed as described in Chapter X. The MUD output window contains all of the text sent to you by the MUD server. You can have several MUD output windows contained within the background window, allowing you to play several MUDs (or different characters on the same MUD) at the same time. This is called "multiplaying" and is described in Chapter X. The command line is located at the bottom of the background window and is where you enter the commands you want to send to the MUD.

Figure 2: Main zMUD screen

The main menu along the top of the background window allows you to select various commands and works just like menus in other programs. The toolbar below the main menu contains buttons that act as shortcuts to common menu commands. In zMUD, there are always many ways to accomplish the same task: you can select a command from the main menu, you can press one of the toolbar buttons, or you can enter a command on the command line. This allows zMUD to accommodate many different types of users.

The scrollbars in the output window allow you to view previous text sent to you by the MUD. When you scroll by clicking on the scrollbar, dragging the scrollbar, or by clicking on the arrow buttons at the top and bottom of the scrollbar, a horizontal line appears splitting the output window into two sections. The scrollbar moves to the top part of the window, which is now frozen in place, allowing you to read the text sent by the MUD. The bottom section of the window is still "live" and continues to update to show you the latest information received from the MUD. This behavior allows you to read the previous text from the MUD without missing anything important that is currently happening. You wouldn’t want to be attacked by a monster while reading previous text without knowing about it!

While the scrollback region is active, you can use the scrollbars to move around and view previous MUD output. You can also use the page-up and page-dn keys to scroll. To scroll one line at a time, you can press the Shift along with the up-arrow or down-arrow keys. You can move the horizontal split bar by left-clicking on it, holding down the left mouse button, and dragging the split bar. To close the scrollback region and remove the horizontal split bar, scroll to the bottom of the text output, or click the Pause button in the lower-right corner of the window. You can also press the scroll-lock key on the keyboard, or you can select the Freeze option from the Window menu, or you can enter the #FR command in the command line. Again, there are many ways to do the same thing in zMUD.

By now there should have been a lot of text displayed by the MUD while you were reading this chapter. Press the pg-up key to activate the split-screen scrollback region. Then press page-up again to view the previous page. After playing around with the scrollback controls, press the scroll-lock key on your keyboard to return the window to normal.

Keyboard Macros

In Chapter X you moved around the MUD using commands such as "north" and "east." While the MUD allows you to abbreviate these commands as "n" and "e," it still requires two keystrokes to move your character (you press N then press Enter). zMUD can make playing easier by allowing you to assign commands to keys on your keyboard. Then you can enter an entire command by just pressing a single key! To assign a command to a key, select the Make Macro option from the Actions menu, or press ctrl-k. You will then be prompted to press the key you want to assign a command to. Then you will be asked to enter the command you want to assign. Almost any key on the keyboard can be redefined. Also, you can use the alt, shift, and ctrl keys in different combinations to create new key sequences. If you can remember them, you can assign hundreds of commands to keys!

Let’s assign the movement commands to the keypad on your keyboard. Select the Make Macro option from the Actions menu, then press the 8 key on your keypad. Then enter the command n as shown in Figure 3. Now, when you press the 8 key, the command to move north will be sent to the MUD. By default, all of the movement commands are already assigned to the keypad, so don’t worry about defining the rest of the keypad.

Figure 3: Assigning a command to a macro key

Command Aliases

In addition to assigning a MUD command to a key on the keyboard, you can also assign a MUD command to a short name. This is known as command aliasing. To assign a MUD command to a short alias, enter the MUD command into the command line, then select Make Alias from the Actions menu. You will be prompted for the short name to assign this MUD command to. Now when you enter the short name on the command line, the entire MUD command will be sent to the MUD

While playing the MUD, your character will become hungry and thirsty. To eat something, you normally enter a command like eat bread into the MUD. This is a lot of keystrokes! To make this easier, enter eat bread into the command line (but don’t press enter yet!). Then select Make Alias from the Actions menu and enter eb into the dialog box. Now when you enter eb and press enter, the command eat bread will be sent to the MUD.

There are several other ways to create an alias in zMUD. You can select Aliases from the View menu to see a list of all of your aliases and edit them. The Aliases button on the toolbar also activates this dialog. You can also use the #ALIAS command by entering

#ALIAS ShortName {MUD Command}

where you replace ShortName with the name you want for your alias, and MUD Command with the command you want to send to the MUD. This is an example of a zMUD script command which is described more in Chapter X. Almost every zMUD feature can be used from the command line, and there are many script commands that you cannot access from the menu or toolbar.

Command History

zMUD remembers the commands that you send to the MUD in the Command History. Pressing the up-arrow will recall the previous command from the history. Thus, to repeat the last command you sent to the MUD, you just press up-arrow, then Enter. You can cycle through the command history using the up-arrow and down-arrow keys. Selecting the History option from the Window menu allows you to view all of the commands that zMUD has remembered (defaults to the last 20 commands). Click on a command in the history window to move it to the edit line at the top. You can then change the command and press enter to send it to the MUD. Or, double-click on a previous command to send it to the MUD immediately.

You can also recall a previous command from the command history by entering the first character of the command, then pressing the up-arrow key. The last command that begins with the character you typed will be recalled and placed into the command line. If several commands start with the same letter, you can enter several letters before pressing up-arrow to narrow down the choice.

Enter the letters ea into the command line, then press the up-arrow key. The command eat bread will be recalled into the command line since this was the last command you entered that started with these letters

Action Triggers

One of the most powerful features of zMUD is its ability to send commands to the MUD automatically based upon the text that is received from the MUD. This feature is called Action Triggers since it allows you to trigger an action based upon a pattern of text received from the MUD. Triggers are described in great detail in the next Chapter, but it's easy to create a simple trigger. Simply select Make Trigger from the Actions menu. Then, enter the pattern of text that you want to use to trigger the action, then enter the MUD command you want to send in response to the pattern. Using the zMUD script language, you can define a Trigger using the syntax:

#TRIGGER {pattern} {MUD Command}

You can also view all of your triggers and edit them by selecting Triggers from the View menu, or clicking the Triggers button on the toolbar.

Let’s automate the feeding of your MUD character. Select the Make Trigger option from the Actions menu, and enter You are hungry into the Pattern field, and eat bread into the command field. Now, whenever the MUD sends the line You are hungry to you, zMUD will automatically respond with the eat bread command, saving you from ever going hungry again! (as long as you keep a good stock of bread on hand.)

Settings Files

All of your keyboard macros, aliases, and triggers are saved in a Settings File. This file is stored separately from your character information in the Character Database allowing you to use the same settings for different characters. By default, a Settings File is created based upon the name of the MUD you have connected to. You can view and change your settings file from the Character Database by selecting the Settings tab. Two settings files are shown: primary and inherited. The inherited settings file allows you to specify common default settings, while the primary file contains the primary settings for your character and overrides anything in the inherited file.

Whenever you add a new alias or trigger, or edit any of your existing settings, you should save your settings file. You can do this using the Save option in the Settings menu or by using the #SAVE script command. Your settings are normally stored in files that end in the .MUD extension. It is a good idea to make copies of these files or back them up in case your settings ever become corrupted.

Getting Help

While this book contains much information and many examples to help you use zMUD, reference information in only a few keystrokes away. zMUD has an extensive on-line help system. To open the command wizard and view all of the zMUD script commands, press the f1 key. Other help is available from the Help menu, including a Getting Started section.

If you have forgotten the syntax of the Trigger command, enter #TR into the command line, then press the f1 key. The command wizard will open and display a quick reminder of the Trigger syntax and allow you to enter the values of the command. Enter You are thirsty into the first parameter box, then enter drink skin into the second parameter box. Notice that the Command Wizard forms your command at the bottom of the window as you type. Click OK and the command is sent to zMUD. Now you have a second trigger to automatically keep your character from getting thirsty.