


TinTin #variable command
This command allows you to define variables that may be used in your commands.
These are substituted into the command before the command is executed. These
differ from the automatic variables %0 through %9 in that they can have full
alphanumeric names and they exist until you terminate your connection to the
world or use the #unvariable command.
Note: Variable names can contain letters, numbers and underscores. Variable names
may not contain any punctuation symbols other than the underscore.
Command syntax
#variable
This format will list all defined variables.
#variable {name}
This format will list all variables that match name. ‘*’ may be used as a
wildcard character. For example, ‘my*’ matches all variables that start with the letters ‘my’.
#variable {name} {value}
This format will set the value of the variable $name to value. Whenever $name is found in your command, value will be substituted. Any previous value of $name is lost.
Example
Here is an excellent example of how a spell caster can use variables. First
you would define the following aliases:
#alias tkill {kill %1;#var target {%1}}
#alias blast {cast lightning at $target}
#alias mm {cast magicmissile at $target}
#alias fb {cast fireball at $target}
Now, when you type ‘tkill bugblatterbeast’, the creature is first attacked
with the world’s ‘kill’ command, and then the variable $target is set to
‘bugblatterbeast’. You can then type ‘fb’ and the following text will be sent to the
world:
cast fireball at bugblatterbeast
Also see
TinTin wildcards
#unvariable