Register forum user name Search FAQ

MUSHclient scripting

Description of MUSHclient world function: world.EvaluateSpeedwalk


Name EvaluateSpeedwalk
Type Method
Summary Evaluates a speed walk string
Prototype BSTR EvaluateSpeedwalk(BSTR SpeedWalkString)
Description

Converts a supplied string based on the rules for "speed walking".

For example:

#4n3esuwdLW

This would move you: 4 times North, 3 times East, South, Up, West, Down and then "lock west"

Actions

Actions recognised are: C:close; O:open; L:lock; K:unlock (or nothing for no special action, just walk in that direction)

Directions

The directions recognised are: N:north, S:south, E:east, W:west, U:up, D:down.

Filler

You can also enter "F" for a speed walk "filler". This is for MUDs that reject multiple identical commands. For example, if you need to walk West 30 times, but your MUD disconnects you after 20 identical commands, enter:

#15w f 15w

The exact text that is sent by the "filler" is customisable from the "Input" world configuration screen. A suggested filler command would be something harmless, like LOOK.

Multipliers

You may also enter a one or two-digit multiplier in the range 1 to 99. The multiplier affects the *next* direction entered, e.g. "5s" means go South 5 times.

Spaces are accepted in the speed walk string, and ignored.

Non-standard directions

You can supply non-standard directions (eg. NE for NorthEast) by putting them in brackets.

For example:

5N 4W (ne) (say open sesame) 5U 4(se)

You can also supply the "reverse" direction after a "/" character, in case you want to reverse the speedwalk direction later.

For example:

5N 4W (ne/sw) (say open sesame/kick door) 5U 4(se/nw)

When speedwalking, only the characters before the slash are evaluated.

VBscript example
world.note world.EvaluateSpeedwalk ("4n3esuwdLW")
Jscript example
world.note(world.EvaluateSpeedwalk ("4n3esuwdLW"));
PerlScript example
$world->note($world->EvaluateSpeedwalk ("4n3esuwdLW"));
Python example
world.note(world.EvaluateSpeedwalk ("4n3esuwdLW"))
Lua example
Note(EvaluateSpeedwalk ("4n3esuwdLW"))
Returns The supplied string, converted from speed walk characters to directions, with a "newline" between each direction.
If there is an error in the speed walk string then the first character of the returned string will be an asterisk ("*"), and the rest will be an English error message.

See also ...

Function Description
Queue Queues a command for sending at the "speed walk" rate.
ReverseSpeedwalk Reverses a speed walk string
Send Sends a message to the MUD

Search for script function

Enter a word or phrase in the box below to narrow the list down to those that match.

The function name, prototype, summary, and description are searched.

Search for:   

Leave blank to show all functions.


Return codes

Many functions return a "code" which indicates the success or otherwise of the function.

You can view a list of the return codes


Function prototypes

The "prototype" part of each function description lists exactly how the function is called (what arguments, if any, to pass to it).

You can view a list of the data types used in function prototypes


View all functions

[Back]

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.