TO_OBJECT(2) SYSTEM CALLS TO_OBJECT(2) NAME to_object - "converts a string to the corresponding object SYNOPSIS object to_object(mixed target); DESCRIPTION (The following description is taken from Truilkan's comments in the source file.) Purpose: Converts a string into the object it represents. This object is intended to be used as a parser by those wizard commands that need to refer to objects by various means (such as dest and trans). to_object() returns the object that a given string refer- ences. Strings are of the form 'object' or 'object@environment' where environment can also be of the form 'object@environment'. object may also be of the form 'e(object)' which refers to the environment of object. object may optionally be prefixed with one of the following symbols: ! (what follows names an object that is not an NPC or a player) % (what follows names a player) $ (what follows names an NPC) # (what follows is an ordinal value, e.g. #3, #4, etc) / (what follows is a filename of an object) object may also be one of the words "here" or "me" where here refers to the environment of this player and "me" refers to this_player(). example usage: object obj; // find the object which has an id of "key" and is in player // truilkan's inventory. // obj = to_object("!key@%truilkan"); // // find the orc NPC which is in the bag which is in the church // MudOS Release 0.9 Last change: 3-19-93 TO_OBJECT(2) SYSTEM CALLS TO_OBJECT(2) obj = to_object("$orc@!bag@/room/church"); // // Destroy the 4th object in the inventory of the environment of // this player (0 is the first object :) // to_object("#3@here")->remove(); AUTHOR Ichabod@TMI (taken from Truilkan's comments), 3/17/93 Sun Release 4.1 Last change: 2