TinTin++ Mud Client Manual  
Function
space
Syntax: #function {name} {commands}
space
The function command is used much like a variable, except that you can pass along arguments. You can execute commands inside a function, and after the function is finished the line that called the function has the function call replaced with whatever the $result variable holds.
space
The result variable is also used in the echo command, so you should be careful when using #echo inside a function. You can use a function by calling it with: @<functionname>{<arguments>} the arguments are stored in %0 to %99, with %0 holding all arguments, %1 the first, %2 the second, etc. The arguments are separated by spaces.
space
Example: #function {time} {#format {epoch} {%T};#format {result} {%t} {$epoch}}
The first command of the function will store the number of seconds since 1970 in $epoch. The second command will use this number to store the current time in $result. Using: #showme @time{} will display the current military time, no arguments are used in this example.
space
See the scripts section for more complex examples.
space
Notice: You can remove functions with the #unfunction command.
space