TinTin++ Mud Client Manual
Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads
If
space
Syntax: #if {condition} {true} {false}
space
The condition is a c style mathematical or regular expression. Strings must be surrounded by quotes " ". Any none zero result will be executed as a command in the true part. If the result equals zero it will be executed as a command in the optional false part.
space
When comparing strings using == or != the string on the left is the raw string and the string on the right is a regular expression. When using < and > or <= and >= a basic string comparison is performed instead.
space
See the help file on Mathexp and Regexp for more information.
space
Example:
#action {%0 gives you %1 gold coins.}
{
    #if {%1 > 5000} {thank %0}
}
space
If someone gives you more than 5000 gold coins you will thank them.
space
Comment: See also #else, #elseif, #switch and #while.
space