prev | toc | next

Dbrefs and Names:

A dbref is assigned to each object when it is created. In most cases, when specifying an object by its dbref, the number should be preceded by an # octothorpe. (Some user-created programs require that the octothorpe be omitted when the dbref is stored in a property.) The server assigns either the next available number or that of the most recently recycled object. For example, if the database holds 1,000 objects and all are valid (have not been recycled), the next object created will be given dbref #1001. If someone then recycles an object, say #123, the next object created would be given dbref #123. So, dbrefs are not a reliable guide to an object's age. Dbrefs cannot be changed. Unused dbrefs of recycled objects are `garbage'.

Multiple objects can have the same name, except for players: there can be several hundred exits named `out' on a MUCK, but only one player named `Ruffin'... and there could (conceivably) be many things, exits, and programs named `Ruffin'. All names can be changed with the @name command, syntax @name <object> = <new name>. To rename a player, the password must be supplied as well: @name <'me' or old name> = <new name> <password>. A player must have control of an object to rename it; programs can rename objects if the object and the program have the same controller, or if the program is set W. (Programs can only name players indirectly: if the player's password is available, a wizbitted program can force the player or a wizard to rename a player.).

Player names cannot include spaces. `Madame_Bovary' is an acceptable player name, but `Madame Bovary' is not. The names of other types of objects can include spaces.

When handling or modifying an object in the same vacinity as you, you can specify it by its name or part of its name. Partial names will work, provided that you specify enough characters to distinguish the object from others in the vacinity: @desc super = <description> will describe `Superball', provided that `Superman' or something else with a name beginning with `Super-' is not in the same vacinity.

When handling or modifying an object that has the same name as something else in the vacinity, or an object not in the same vacinity as your character, the object will need to be specified by dbref. You can determine the dbref of an object controlled by you and in the same vacinity by examining it (ex <object>). You can determine the dbref of objects that you control but are not in the same vacinity with the @find command, syntax @find <object's name>.

Two substitution strings can be used in place of either a name or dbref: `me' and `here'. `Me' matches your character's dbref; `here' matches the dbref of the room you are in.

> @name here = Waterloo Station
  Name set.
> @name pen = Bic Four-Color Ballpoint
  I don't see that here.    (* You left the pen at home. *)
> @find pen
  Nyest Penal Colony, Massage Room(#855RJ) (* Includes `pen'. Ignore. *)
  End of list
  2 objects found.
> @name #1237 = Bic Four-Color Ballpoint
  Name set.

> @name me = Ruffin flipFlap
  You can't give a player that name. (* Already a player named Ruffin. *)
> @name me = Nebuchudnezer flipFlap
  Name set. (* But Nebuchudnezer works. *)

prev | toc | top | next