Documentation

#SETPROMPT

SETPROMPT

Syntax: #SETP "string" varname varname...

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

The string is the text that is displayed at the beginning of your server prompt. If your server 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

server prompt looks like:

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

The correct SETPROMPT command would be:

#SETPROMPT "<" hp maxhp mana maxmana mv maxmv

server prompt looks like:

[100 50]

The correct SETPROMPT command would be:

#SETPROMPT "[" hp mana

In these examples, once the SETPROMPT command has been used, TeSSH will automatically capture the numeric values from the server 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.

Add comment

Login or register to post comments