Introduction to msgs and omsgs

From TwistedMUCK
Jump to: navigation, search

Introduction to msgs and omsgs

You've probably noticed that there are three groups of messages that can be set on objects. These are the fail and ofail, drop and odrop, and succ and osucc. For each message group, the <message> (fail, drop, succ) is shown to the person that triggers the message. The <omessage> (ofail, odrop, osucc) is shown to the other people in the room. In addition, the omessages are automatically prepended with the name of the person that triggered the message. For example, suppose an exit had a succ message of "You walk onto the street." and an osucc message of "walks onto the street." If "Confucious" walks through the exit, he will see the succ message. The people that were in the room with Confucious will see <omessage> is a convention followed by most programs that take omessage fields.

The behavior of these messages varies depending if they are set on a room, person, thing, or action.


The succ and fail messages depend on whether an object is @locked.

succ and osucc are displayed if you pass the lock on an object. For a room, succ is displayed when you successfully look around the room. For a player, it is displayed when you successfully rob him. For an object, it is displayed when you pick it up. For an exit or action, it is displayed when you pass through the exit or perform the action.

fail and ofail are conversely displayed if you do not pass the lock on an object. For a room, fail is displayed when you "look" and can't pass the lock on the room. For a player, it is displayed when you fail in a robbery attempt. For a thing, it is displayed when you are unable to pick it up. For an action or exit, it is displayed when you can not use the exit or perform the action.

drop and odrop have very varying behavior. The drop message is displayed for a room when an object is dropped in it. For a player, drop is shown when he is killed. For a thing, drop is shown when it is dropped. For an exit, it is displayed when the person using the exit enters the room the exit is linked to. For actions, the drop messages have no defined behavior though they are used by some programs.


In summary and tabular form:

=== succ and osucc are shown if
room:   a person 'look's at a room and passes the lock.
player: a person 'rob's a person and passes the lock.
thing:  a person 'get's or 'take's an object and passes the lock.
exit:   a person attempts to use an exit and passes the lock.
action: a person tries to perform an action and passes the lock.
=== fail and ofail are shown if
room:   a person 'look's at a room and doesn't pass the lock.
player: a person 'rob's a person and doesn't pass the lock.
thing:  a person 'get's or 'take's and object and doesn't pass the lock.
exit:   a person attempts to use an exit and can't pass the lock.
action: a person tries to perform an action and can't pass the lock.
=== drop and odrop are shown if
room:   a person 'drop's and object in that room.
player: a person successfully 'kill's the player.
thing:  a person 'drop's the object.
exit:   a person successfully uses the exit. They will be shown in the
        room the person enters.
action: no default behavior though some programs use the fields.

Some additional notes

Passing a lock means you can perform that action.

~ Author Unknown

Personal tools