Syntax: #math {variable} {math expression}
This command evaluates math expression and stores it in the variable defined by the first part of command's argument. This command works with integer numbers only.
Example:
#action {Perfect: HP:%0} {#math {half} {%0/2}}
Using the #action command, the #math command is called then the "Perfect: HP:" line is received from the MUD. This amount, divided by two, is then stored in a variable called "half".
#action {HP:%0} {#if {%%0<$half} {flee}}
Now, using the #action command to obtain your current hitpoints, the "flee" command will be sent to the MUD if your health points are less than half your maximum HP.
See also: #if