Speedwalking and Slow Walking

What is Speedwalking?

Moving your character through the world of a MUD is the most common, and often the most tedious, task that you will perform. Entering commands like north, south, east, and west takes your character from room to room on a MUD to interact with other players or characters. In many cases, your objective is a particular location or room on the MUD, and you just need to figure out the best and quickest way to get there. zMUD provides several methods for moving your character around the MUD. Any of the methods that involve sending a string of movement commands to the MUD very quickly is called "speedwalking". This chapter will explore some of the methods for moving from place to place on a MUD using the zMUD client. The most powerful method uses the automapper described in the next chapter, but understanding speedwalking is important before tacking the complex mapper.

Assigning directions to an alias

The simplest way to remember a set of directions and replay them at a later time is by assigning these direction commands to an alias. For example, consider a portion of a town in the map in Figure 1. To get from the Temple to the Store, you must travel: south, east, then north.

If you often need to go from the Temple to the Store, you can assign these directions to an alias.

#ALIAS store {south;east;north}

Now, when you are in the Temple, just type store and the commands to move to the store are sent to the MUD. Now, most MUDs support abbreviations for the common directions, so storing s;e;n would also work. Remember that the ; separates multiple commands on a single line.

There are several problems with using aliases for speedwalking: an alias only works from a certain starting position (the Temple in this case); you canít reverse an alias to return to your starting point; some MUDs donít accept abbreviated commands, so the aliases are long and cumbersome. The solution to some of these limitations is to use the built-in zMUD speedwalking functions.

Manual speedwalking

To handle MUDs that do not allow abbreviated directions, zMUD has a syntax for sending directions to the MUD quickly called speedwalking. To use this feature, start your command with the speedwalk character, which defaults to a period (.) then enter the directions you wish to move without using any command separators. In the example above, to move from the Temple to the Store, you would type .sen. This would cause the directions south, east, then north to be send to the MUD. To move several spaces in the same direction, you can enter them normally, or you can precede the direction with the number of spaces you wish to move. For example, if you want to move 6 rooms west, you could enter .wwwwww or you can enter .6w.

Using Paths

You could assign the manual speedwalking command to an alias, but in order for zMUD to know you are assigning a movement command you use a special type of alias called a "path". A path is an alias for speedwalking commands. For example, to create a path from the Temple to the Store, you would enter

#PATH store sen

The period in front of the speedwalk characters is optional in this case. Executing the path is the same as executing an alias, except you precede the name of the path with the speedwalk character. So, to move from the Temple to the Store using the store path, you would enter .store.

The advantage of using paths instead of aliases, is that zMUD knows how to reverse a path. Using two dots in front of the path tells zMUD to send the directions needed to reverse the path. Thus, if your character is in the store, entering ..store will return your character to the Temple by sending south, west, north to the MUD.

Recording paths

Another advantage of using paths instead of aliases is that zMUD can record a path for you automatically as you walk around the MUD. To record a path, you go to the room you want to start from, then "mark" the beginning of the path with the #MARK command. After entering #MARK, all of your movement will be recorded. So, in this example, go to the Temple, then enter the #MARK command. Then move south, east, then north so that your character is in the Store. To save the recorded path, use the #PATH command again to assign a name: #PATH store. The recorded path is then saved under the specified name.

If you enter a room by mistake while recording a path, use the #BACKUP command to undo the last movement. The proper direction will be sent to the MUD to move your character back one space, and the direction will be removed from the path you are recording.

To add a direction to your recording without actually moving in that direction, use the #MAP command. The #MAP command takes the direction you want to add as a parameter. Thus, #MAP n adds the north direction to your recording.

Using the Path dialog

All of your paths are stored and can be edited using the Path dialog. Click the Paths button in the toolbar, or select Paths from the View menu. The Path dialog is shown in Figure 2.

Figure 2: The Path dialog box

In the list box on the left, all of your paths are shown. The definition of the selected path is shown on the right in the Current Path ahead field. If you are in the middle of recording a path, the Current Path behind will show the path recorded so far, and the Start Recording button would be labeled Stop Recording instead. The buttons in this dialog perform the following actions:

Fast walk sends the directions in the Path ahead field to the MUD quickly.

Step sends the next direction in the Path ahead field to the MUD. This direction is then appended to the Path behind field so that the Backup command can be used to undo the step command.

Reverse reverses the directions in the Path ahead field and sends these reversed directions to the MUD quickly.

Slow walk begins a careful, step-by-step process of sending directions to the MUD. Slow walking is described in detail later in this chapter.

Backup takes the last direction in the Path behind field, executes it and adds it to the Path ahead field. This "undoes" a step.

Turn around swaps the Path ahead and Path behind fields. This is analogous to turning around and facing the direction you came from.

Start recording mark the current location as the start of a path and begin recording directions

Stop recording stop recording a path and prompt for the name of the path to save the recorded directions to.

To summarize, imagine that you are standing in the MUD facing a certain direction. The directions ahead of you to a particular location is shown in the Path Ahead field. The directions to a previous location behind you are shown in the Path Behind field. The Step button moves you forward, decreasing the directions ahead of you, and increasing the directions behind you. These buttons are all labeled to remind you of the analogy of walking around the MUD just as you would in "real life."

Follow your leader

Letís combine the power of triggers along with paths to start creating a database of locations on your MUD. Letís assume you are part of a group and your group leader is about to take you someplace you have never been before. Youíd like to record the directions taken so that you can use them yourself later. To keep track of where your leader is going, use the following variable and trigger:

#VAR leader Zugg
#TRIGGER {@leader leaves (%w)} {#MAP %1}

Remember that the %w matches a word, and the parenthesis stores the matched value into the %1 parameter. The #MAP command is then used to store this direction into your path. So, before the leader leaves, enter #MARK to start your path, then let the leader run. As you follow the leader around the MUD, each direction that the leader uses is captured by the trigger and added to your path. When the leader stops, use the #PATH command to save the path to a particular name, such as #PATH test to create a path called test.

How speedwalking really works

To grasp the power of zMUD, it is important to understand how paths really work. For example, a common question is: "How do you use multi-character directions such as nw for northwest?" The key to paths is the direction settings. To take a look at the direction settings, select Directions from the View menu, or click the Directions tab in the Path dialog.

Figure 3: The zMUD direction settings

Each character in a path is called a "direction code." A list of defined direction codes is shown in the direction settings in the list box on the left. zMUD comes predefined (stored in the DEFAULT.MUD settings file) with a set of direction codes for the normal directions: north, south, east, west, up, down. It also defines special codes for the diagonal directions. For example, the direction code h shown in Figure 3 is defined as nw or northwest. A direction code can only be a single letter. However, the MUD command associated with the direction code can be anything at all. The vertical bar | is used to separate multiple MUD commands that you want to assign to the same direction code.

When you record a path, zMUD looks at the command you send to the MUD and compares it to the commands stored for the direction codes. If it finds a match, the matching direction code is added to the path. Thus, when you enter northwest to the MUD, the direction code h is added to the path. When a path is executed, each letter is the path is compared with the direction codes, and the first command defined for the code is sent to the MUD. Thus, when the code h is executed, the command nw will be sent to the MUD.

The Reverse Code field indicates the direction code to use when reversing the path. In the example shown in Figure 3, the reverse code for direction code h is direction code l. Direction code l is defined as the commands se|southeast which is the reverse of northwest. The Map direction field is used to assign a direction code to a physical direction on a map and is used by the automapper described in the next chapter.

Customized directions

You can add your own directions to the direction settings. These custom directions can be used to create a single character shortcut for any command on the MUD. For example, you can assign the command enter portal to the direction code p. When you are recording a path and enter: north;enter portal;east, the characters npe are added to your current path.

As an example, letís add a speedwalk direction for opening doors. In the Direction settings dialog, click the New button to define a new direction code. Enter o in the Direction code field, and also enter o in the Reverse code field. In the Commands field, enter open door. Use none in the Map direction field. Click OK to save your new direction and close the dialog. Now, when you enter the open door command, zMUD stores an o character into your current path. When you later replay this path, the open door command is sent to the MUD, whether going forward or in reverse.

International MUDding

Another common use of direction codes is in using zMUD for MUDs in different languages. For example, if you are playing a German MUD, you probably want to enter the command nördlich instead of north, and südlich instead of south. To do this, just edit your direction settings and change the commands assigned to each direction code. Now when you enter the nördlich command, the direction code n will be added to your path.

Speedwalking hazards

On some MUDs, speedwalking is not allowed, and using this feature of zMUD can cause your character to be banned or deleted from the MUD. Consult the rules for the MUD you are playing for details. On other MUDs, speedwalking is allowed, but you might find that the MUD cannot accept commands as fast as zMUD can send them. Or, commands sent as quickly as the speedwalking directions might simply be ignored by the MUD. Experiment on your own MUD to determine how well speedwalking works.

Pay attention when you use speedwalking on a MUD. While speedwalking can be a useful way to walk quickly past a mob that normally attacks, sometimes the MUD will slow down a bit, just as you are entering the dangerous room, and the mob will have time to see you and attack. In other cases, if you use a speedwalking command from the wrong location, you will send a list of directions to the MUD and cause your character to go somewhere else, with no way to stop it. Once your commands have been sent to the MUD, there is no way to cancel them, so make sure you use your path from the same location that you recorded it.

Slow Walking

Speedwalking is a somewhat reckless way to travel through the MUD. Once you send a list of direction commands to the MUD, there is no going back. If you get stopped along the way by a mob or a closed door, the MUD will continue to execute your commands and your character could wind up lost in an unknown area. Speedwalking is like running through the MUD with your eyes closed. Sometimes it is better to walk carefully with your eyes open; that is what "Slow walking" is all about.

Slow walking allows you to execute a path a step at a time with the ability to abort a path if something happens. The tricky part about using slow walking is defining how you want it to work. The settings for Slow walking are in the Slow walk dialog, which is displayed by clicking the Settings tab of the Path dialog.

Figure 4: Slow walking settings dialog

When slow walking, a single direction is sent to the MUD, then the output of the MUD is monitored for a line that contains one of the strings shown in the slow walking list box in Figure 4. If a successful match is made, then another cautious step is made. At each step, a timer is also started. If the timer runs out before a successful match is seen, the slow walk process is stopped.

You can modify this behavior using the slow walk settings. If you uncheck the Timeout aborts walk option, then when the timer runs out, success is assumed instead of failure.

Several zMUD commands can also be used to control your slow walking. At any time, you can abort your walking using the #STOP command. Or, you can force a successful pattern match using the #OK command. If you have stopped in the middle of a slow walk path, you can resume your walking using the #STEP command to take another cautious step.

All of this can also be controlled by triggers. In fact, the strings shown in the list box in Figure 4 are just special triggers for the #OK command. The example shown in Figure 4 is the same as the trigger:

#TRIGGER {Exits} {#OK}

Using Slow walking

To execute a slow walk instead of a speedwalk, use the #SLOW command followed by the name of the path. For example, to slow walk from the Temple to the Store, enter #SLOW store. You can also execute a slow walk by opening the Path dialog, selecting the path you want, and clicking the Slow walk button.

If you have a MUD that cannot accept directions at the full speed of speedwalking, set the timer in the slow walk settings to a value like 1000 (1 second), and uncheck the Timeout aborts walk option. Now, when you use the #SLOW store command, each direction will be sent to the MUD followed by a one second pause. During this pause you can use the #STOP command to abort the slow walking process.

Stop your walking

In addition to the triggers that use the #OK command to continue walking, you can define triggers to stop walking if something like a mob or closed door is detected. For example

#TRIGGER {hits you} {#STOP}

can be used to abort your slow walking is something or someone tries to hit you. After killing the mob that attacked you, you can start walking again using the #STEP command.

Creating a robot

Slow walking is the key to creating an automated robot character. As an example, letís create a robot whose purpose is to roam an area killing all of the mobs. Here is a map of this sample area:

The first step in creating a robot is to define the path that the robot will roam. In this case, from the Start location, the path shown by the arrows in Figure 5 is: 4e2s2wnwsw2n. Assign this to the robot path using the #PATH command or Path dialog. The next step is to determine if you want to use a timer to automatically move the robot. In this case, we set the slow walk timer to 5000 (5 seconds) and turn off the Timeout aborts walk option. This causes our robot to move to a new room along the path every five seconds unless something causes it to stop.

Now that the robot is programmed to walk along the path step by step, the final work is to determine how the robot stops along the way, and what it does. Letís say that this is an area containing rats, goblins, and trolls. We want to kill the rats and goblins, but leave the trolls alone. Here is a set of triggers to accomplish this:

#VAR victim "rat|goblin"
#TRIGGER {There is a ({@victim}) here} {#STOP;kill %1}

Remember that the {} syntax in triggers matches any of the words separated by the bar | character. Thus, this trigger will match either: There is a rat here or There is a goblin here. The parenthesis around the {} stores the matched value into the %1 parameter. The action issues the #STOP command to abort the slow walking, then kills the rat or goblin. All we need is a final trigger to start up the walking when the mob is dead:

#TRIGGER {is DEAD} {get all corpse;sac corpse;#STEP}

Using this trigger, when the mob is killed, everything is looted from the corpse, the corpse is sacrificed, and the #STEP command is used to resume the slow walking.

To start your robot, go to the start location and enter #SLOW robot. This starts the robot along the path killing all of the rats and goblins that it finds. Of course, this example is primitive: it doesnít handle the case where more that one rat or goblin are in the same room; it stops at the end of the path without looping through again automatically; and it is easily confused if there are other players in the area killing mobs. By adding more triggers you can overcome these problems. A complete robot example is shown in the Sample Scripts chapter.

Ultimate speedwalking

The speedwalking and slow walking commands described in this chapter provide great convience for MUDding. However, they all share a common problem: each path can only be execute from the location is was started at. Wouldnít it be nice if zMUD "knew" where you were on the MUD and you could just say something like #WALK store to get to the store from anywhere in the MUD? Well, zMUD allows that type of power using the automapper, which is described in the next chapter.


  1. Create a trigger that follows any person on the MUD (not just your group leader) and record their path.
  2. Add the directions Enter and Exit to zMUD
  3. Modify the example robot to open any doors along the path as they are encountered.