command: if <condition> then <command>
if <condition> then <command> else <other command>
until <condition> then <command>
while <condition> then <command>
Do something if a condition is true. If you supply an 'else' clause, do
something else if the condition is untrue. Conditions currently supported
<condition1> or <condition2> or ...
<condition1> and <condition2> and ...
hp > value, hp < value, hp >= value, hp <= value,
sp > value, sp < value, sp >= value, sp <= value,
money > value, money < value, money >= value, money <= value,
exp > value, exp < value, exp >= value, exp <= value,
intoxicated, intox, drunk,
carrying <object>, carrying <object> in <other object>,
wielding, wielding <weapon>,
fighting, fighting <monster>,
If you use the 'until' verb instead of the 'if' one, this command
will repeat until the condition is true.
If you use the 'while' verb instead of the 'if' one, this command
will repeat until the condition is untrue.
if sp >= 20 then fireball else if sp >= 15 then shock else missile
if not carrying bag then do take bag;tag bag
if %fish or %fowl then parse say Either %fish or %fowl is non-zero.
if present orc and hp > 50 then kill orc
if money > 10000000 then say I am Bill Gates!
until exit south then flee
while fighting and sp >= 20 then fireball
The 'and' condition is prioritized ahead of the 'or' condition, which
means that 'if a or b and c or d' will be true:
if either a or b is true and also either c or d is true.
if a or d is true, or if b and c are both true.
Also note that abuse of these commands to annoy players or break game
rules may be considered grounds for banishment.
See also: abort, do, dotimes, parse, pending, restart, suspend, var, walk.