ADD

Syntax: #AD variable amount

This command allows you to perform simple arithmetic to variables. The value given by the amount parameter is added to the current value of the variable. If amount is not numeric, an error occurs. amount can also be a reference to another variable, adding its current value to the value of the listed variable. To subtract a value, use a negative amount.

This is the only specific math function separately implemented in zMUD (for compatibility). A full MATH command, ala TINTIN, is also available.

ADD example

#AD moves 1
Add one to the @moves variable
 
#ACTION {You get (%d) coins} {#AD gold %1}
When you pick up some coins, add their value to the @gold variable.


Contents ACTION ADDITEM