|
|
 |
 |

TCL-Programs Reference Manual
Contents
Special Functions
These are functions which can be used inside mobprograms, but aren't
related to a special piece of the mud. They are defined in the file
rom.tcl in the area-directory.
Special Command Reference
color <colourname>
This returns the right colour code for a given colourname. Available are:
red, green, blue, cyan, magenta, yellow, white (use capitals
for bold colours) and underline, blink, inverse, strike,
black and random
| User contributed notes: special color |
A.J.Jessurun@tue.nl
Mar 15th 2000, 13:25
|
Example:
! say "[color red]What are you doing?[color]"
The [color] statement sets the color back to the default color. This is like using {x as a color code. (See help color) |
 |  |
aggreviate@fataldimensions.org
May 24th 2002, 01:19
|
[color xxx] and {x for color xxx
in other words, the color name used for mobprogs and mob themselves.
they are interchangeable for all color names except gray/black.
[color black] == {G for color gray/black. |
|
|
uses memory
Allows you to use the memory-system of the mob. If you remember
something, the key will be increased by one. To clear the
key, use forget.
Example:
uses memory
proc greet {} {
! say you've entered [memory "[char id]-enter"] and left [memory "[char id]-leave"] times.
remember "[char id]-enter"
}
proc leave {} {
remember "[char id]-leave"
! wave [char]
}
proc boo {} {
! cower [char]
forget "[char id]-leave"
forget "[char id]-enter"
}
proc keys {} {
! scratch
! say [memorykeys]
}
addtrigger 1 greet {greet} {trig true}
addtrigger 2 leave {leave} {trig true}
addtrigger 3 speech {boo} {trig words boo}
addtrigger 4 speech {keys} {trig words keys}
remember <key>
Remembers a given key. See uses
memory for an example.
forget <key>
Forgets a given key. See uses
memory for an example.
memory <key>
Returns the value of a given key. See uses memory for an example.
memorykeys
Returns the names of all keys. See uses memory for an example.
|