Posted by Kyle Hankinson August 17th, 2022
If you need a trigger or alias to match on a regular expression, here are some hints and tips to use.
As you type your regex, the main mud display will update to highlight matches.
\0
.\1
, \2
, \3
, etc.For whitespace (space, tab, linebreak) use the \s+
syntax option. While most muds will use spaces, some muds will use tabs is certain instances which may case a basic space match to fail.
Posted by Kyle Hankinson August 5th, 2022
Clears anything currently in the messages window.
Removes the main output buffer.
Displays a list of current autocomplete entries.
Clears the autocomplete entries.
Displays a list of current script variables.
Disconnects from the current session. If auto-reconnect is enabled, a countdown will be started and the connection re-attempted.
Disconnects the current connection and closes the window.
Sets the specified varaible to the specified value.
Stops any activly waiting scripts. Scripts may be in a waiting state from either a wait
or a commandAndReadFromServer
function.
Posted by Kyle Hankinson August 3rd, 2022
Autocomplete is a way to quickly turn a partial letter into a full word. For example if you were to type the letter look mer
and hit tab, it might fill the completion text in as look merchant
rather than needing to fully type out merchant.
An example:
MUD Client allows autocomplete keywords to be added via the scripting engine. An example of this could be an alias to the command look
or inventory
, or by a trigger that matches You see:
.
To have words added to the autocomplete list, you must call the processForAutocomplete
method with either an array of words or a string containing one or more words to be added. For example, you could have a login script with either of the following:
processForAutcomplete(['consider', 'kill']);
processForAutcomplete('consider kill');
A larger example based on a trigger would be as follows:
In this example a regular expression is used to match from `You see:` until > (the cursor input for this mud). Everything inbetween is added for autocomplete.