Next: Verb argument specification
Up: 10.4 Verbs and command
Previous: 10.4 Verbs and command
The MOO server will parse a command that is entered according to several
principles. Here we will just look at the most important.
- It will replace some standard abbreviations (``'''', ``:'', ``;'') by corresponding verbs.
- Next the command line is split into ``items'', i.e. every string will
become an item and every word (separated by spaces and other separators (??)
NOT in an explicit string will become an item.
- Next the ``sentence'' made up by those items is broken into either
verb, direct object, preposition, indirect object or verb, direct object
- The first item in the list is taken as the name of a verb
- Next, the server looks for a proposition (one out of the predefined
set). Items between the verb and before the preposition is considered
to represent the direct object and all items after the preposition are
considered to represent the indirect object.
- If there was no preposition, everything that follows the first
item (the verb) is considered to represent a direct object.
- Next, the server will try to find MOO objects that could match
direct and indirect object. Several possible cases may exist:
- Empty strings (``'') are matched to $nothing (#-1)
- Ojbect strings (e.g. #127) are matched to objects (if it exists of course)
- ``me'' or ``here'' object ``descriptions'' are matched to the obvious (i.e. the player object or the room object).
- Otherwise, the server will try to match object ``descriptions'' to any object name that is either on the player or in the room.
- Finally, the server then tries to find the verb on each of the following objects:
- the player who typed to command
- the room the player is in
- the direct object (if it found one above)
- the indirect object (if it found one above)
In order to match, all the following conditions must be true:
- the verb ``description'' found above matches one of the names for the verb on the object
- the direct and indirect object types are allowed by the corresponding argument specifiers for the verb
- the preposition string is matched
Next: Verb argument specification
Up: 10.4 Verbs and command
Previous: 10.4 Verbs and command
Daniel K. Schneider
Thu Apr 17 12:43:52 MET DST 1997