Search Functions for Mocha


Searches for objects and persons can use one or more of the flags defined in the following list. If multiple flags are to be used for a single call, use the bitwise or operator, |, to join the flags together.
When searching for the next item in a particular list, only the find_global and find_visible flags are applicable. If more than one flag is given to a function, the locations are searched in the order listed above (e.g., the pc's room is searched before looking at a global list).

room find_room_by_vnum (integer vnum);
Returns the room with the specified virtual number, or none if the room does not exist.

object find_object (person pc, string name, integer flags);
Returns an object with keyword name using the flags specified, or none if no such object is found.

object find_object_by_vnum (person pc, integer number, integer flags);
Returns an object with virtual number number using the flags specified, or none if no such object is found.

object find_next_object ();
Returns next object from the last object search, or none if no such object is found.

person find_person (person pc, string name, integer flags);
Returns a person with keyword name using the flags specified, or none if no such person is found.

person find_person_by_vnum (person pc, integer number, integer flags);
Returns a person with virtual number number using the flags specified, or none if no such person is found.

person find_next_person ();
Returns the next person from the last person search, or none if no such person is found.


Return to Mocha's Main Page