[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

10. Messages on Objects

Most objects have messages that are printed when a player succeeds or fails in manipulating the object in some way. Of course, the kinds of messages printed are specific to the kinds of manipulations and those, in turn, are specific to the kind of object. Regardless of the kind of object, though, there is a uniform means for listing the kinds of messages that can be set and then for setting them. The `@messages' command prints out all of the messages you can set on any object you own. To set a particular message on one of your objects use a command with this form:
 
@message-name object is "message"
where `message-name' is the name of the message being set, object is the name or number of the object on which you want to set that message, and message is the actual text. For example, consider the `leave' message on an exit; it is printed to a player when they successfully use the exit to leave a room. To set the `leave' message on the exit `north' from the current room, use the command
 
@leave north is "You wander in a northerly way out of the room."
This class of commands automatically applies to any property whose name ends in `_msg'. Thus, in the example above, the command is setting the `leave_msg' property of the named exit. You can get such a command to work on new kinds of objects simply by giving the appropriate properties names that end in `_msg'. Messages of this type are used on the following objects:
Command: @messages object
List all of the messages that can be set on the named object and their current values.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

10.1 Setting Messages for Exits

Several kinds of messages can be set on an exit object ; they are printed to various audiences at certain times whenever an attempt is made to go through the exit. The ones whose names begin with `o' are always shown prefixed with the name of the player making the attempt and a single space character. The standard pronoun substitutions (with respect to the player) are made on each message before it is printed. The following commands can be used to set the corresponding messages on an exit:
Command: @leave message
This command sets the message printed to the player just before they successfully use the exit. The default message is `'.
Command: @oleave message
This command sets the message printed to others in the source room when a player successfully uses the exit. The default message is ` has left.'.
Command: @arrive message
This command sets the message printed to the player just after they successfully use the exit. The default message is `'.
Command: @oarrive message
This command sets the message printed to others in the destination room when a player successfully uses the exit. The default message is `has arrived.'.
Command: @nogo message
This command sets the message printed to the player when they fail in using the exit. The default message is ` You can't go that way.'.
Command: @onogo message
This command sets the message printed to others when a player fails in using the exit. The default message is `'.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

10.2 Setting Messages for Things

Several kinds of messages can be set on things, that is, objects that have $thing as an ancestor. They are printed to various audiences under various circumstances when an attempt is made to `take' or `drop' a thing. The ones whose names begin with `o' are always shown prefixed with the name of the player making the attempt and a single space character. The standard pronoun substitutions (with respect to the player) are made on each message before it is printed. The following commands can be used to set the corresponding messages on things:
Command: @take_failed
This command is used to set the message printed to a player who fails to take the object. The default message is `You can't pick that up.'.
Command: @otake_failed
This command is used to set the message printed to others in the same room if a player fails to take the object. The default message is `'.
Command: @take_succeeded
This command is used to set the message printed to a player who succeeds in taking the object. The default message is ` You take %t.'.
Command: @otake_succeeded
This command is used to set the message printed to others in the same room if a player succeeds in taking the object. The default message is ` picks up %t.'.
Command: @drop_failed
This command is used to set the message printed to a player who fails to drop the object. The default message is ` You can't seem to drop %t here.'.
Command: @odrop_failed
This command is used to set the message printed to others in the same room if a player fails to drop the object. The default message is `tries to drop %t but fails!'.
Command: @drop_succeeded
This command is used to set the message printed to a player who succeeds in dropping the object. The default message is ` You drop %t.'.
Command: @odrop_succeeded
This command is used to set the message printed to others in the room if a player succeeds in dropping the object. The default message is ` drops %t.'.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

10.3 Setting Messages for Containers

Several kinds of messages can be set on a container object; they are printed to various audiences at certain times whenever an attempt is made to use the container. The ones whose names begin with 'o' are always shown prefixed with the name of the player making the attempt and a single space character. The standard pronoun substitutions (with respect to the player) are made on each message before it is printed. The following commands can be used to set the corresponding messages used with containers.
Command: @empty
This command is used to set the message printed in place of the contents list when the container is empty. The default message is `It is empty.'
Command: @open
This command is used to set the message printed to the player who successfully opens the container. The default message is `You open %d.'
Command: @oopen
This command is used to set the message printed to others in the same room if the player successfully opens the container. The default message is `opens %d.'
Command: @open_fail
This command is used to set the message printed to the player who cannot open the container. The default message is `You can't open that.'
Command: @oopen_fail
This command is used to set the message printed to others in the room when a player fails to open a container. The default message is `'
Command: @close
This command is used to set the message printed to the player who closes a container. The default message is `You close %d'
Command: @oclose
This command is used to set the message printed to others in the room when a player closes a container. The default message is `closes %d'
Command: @put
This command is used to set the message printed to a player when an object is successfully placed in a container. The default message is `You put %d in %i'
Command: @oput
This command is used to set the message printed to others in the room when a player successfully places an object in a container. The default message is `puts %d in %i.'
Command: @put_fail
This command is used to set the message printed when a player fails to put an object in a container. The default message is `You can't put %d in that.'
Command: @oput_fail
This command is used to set the message printed to others in the room when a player fails to place an object in a container. The default message is `'
Command: @remove
This command is used to set the message printed when a player succeeds in removing an object from a container. The default message is `You remove %d from %i'
Command: @oremove
This command is used to set the message printed to others in the room when a player succeeds in removing an object from a container. The default message is `removes %d from %i.'
Command: @remove_fail
This command is used to set the message printed when a player fails to remove an object from a container. The default message is `You can't remove that.'
Command: @oremove_fail
This command is used to set the message printed to others in the room when a player fails to remove an object from a container. The default message is `'

[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated by Joey Hess on June, 17 2001 using texi2html