SETPROMPT

Syntax: #SETP string varname [varname...]

Creates an internal trigger to capture numeric values from your MUD prompt. If your MUD prompt can be captured using this simply trigger, then SETPROMPT will be faster than creating a normal trigger.

The string is the text that is displayed at the beginning of your MUD prompt. If your MUD prompt does not start with any special text or characters, then you will have to set up a normal #TRIGGER to capture values from your prompt.

varname is the name of the variable to contain the first numeric value from the prompt. You can list as many varnames as there are numeric values on your prompt.

SETPROMPT example

MUD prompt looks like:

<100/150hp 50/60ma 90/100mv>

The correct SETPROMPT command would be:

#SETPROMPT "<" hp maxhp mana maxmana mv maxmv

MUD prompt looks like:

[100 50]

The correct SETPROMPT command would be:

#SETPROMPT "[" hp mana
 

In these examples, once the SETPROMPT command has been used, zMUD will automatically capture the numeric values from the MUD prompt whenever it is displayed. You could then access the value of the @hp variable, for example, to see what your hitpoints were. Typically, you would then put @hp in your status bar, or create a gauge to track your hitpoints.



Contents SESSION SHOW