Finding Database Items (@find and friends)

After building your one thousand room Palace, complete with servants, fountains, and the occasional stray chicken; you would probably be having problems keeping track of all the dbrefs, exits, rooms, and things. Fortunately, there are a group of commands designed specifically to help you find database items. All of these commands have similar options which will be explained in more detail after explaining what the "default" behavior of the commands.

@find [options]
The first of these commands is @find. If you are a non-wizard, @find lists all the database items that you own. If you are a wizard, @find lists EVERY LAST database item on the muck, including database items that are "garbage" (recycled). If you are a wizard--be careful! Typing @find by itself may take a long time--during which your connection to the muck is completely tied up with @find's output.

B. @owned [options]
For mortals, there is no difference between @owned and @find, both list every item you own. For wizards, it is a safer alternative to @find, since it either only lists items you own and can be used to list items that another player owns.

C. @contents [options]
@contents lists the database items that you control that are contained by the database item specified (or the current room if none is specified). You have to own/control the item to list its contents. Note that actions/exits are listed as contents of a database item if the item is their source. Also, using @contents on a parent will include the child rooms of the parent in the output.

D. @entrances [options]
This command lists the 'entrances' to the specified database item, or the current room if none is specified. The command is handy to see what exits are linked TO the specified item.

@find will take an optional parameter that filters the list to the items matching it:

'@find food' will list all the database items with 'food' in their name, regardless of type.

'@find apples' will list all the database items with 'apples' in their name, regardless of type.

You can also refine the search by using ? to match any single character:

@find f??d will list items with an f followed by any two characters followed by a d. Food, faad, feed, faed, would all be listed.

Or use a * to match any number of characters:

@find f*d will match 'fed' 'feed' 'food' 'foeruqoruweurworuwd' :)

Refining the search further:
Adding a = sign and a flag to any of these commands will filter the list by the flag. For example:

@owned =E will list all the items you own that are exits/actions.
@find apples=R will list all of your rooms with 'apples' in their name.
@owned =C will list all of your items that are CHOWN_OK

Additionally, you can use the flag % to find items that are 'unlinked', for example:

@owned =E% will list all exits you own that are not linked.

You can also use an @ sign to list items that haven't been used for more than
90 days:

@owned =R@ would list all rooms that haven't been used for 90 days.

Changing the Output Style:
Normally these commands only list the name of the item and its dbref#. You can refine the output by adding a 2nd equals sign and specify the style. The possible styles are: owners, links, and location. For example, if you wanted to list all your database items, and what they're linked to:

@owned ==links

Or perhaps more usefully, all of your exits and what they're linked to:

@owned =E=links.

Another possibility would be to use the 'location' output to see where your items are, the source of an exit, or what the parent of all your rooms are:

@owned =T=location (All things owned by you, displaying their location)
@owned =R=location (All rooms owned by you, displaying their 'location' which is their parent)
@owned =E=location (All exits owned by you, displaying their source)

Again, you can use these with @entrances or @contents as well:

@entrances ==location (list all entrances to the current room, and their 'location' (where they come from).

For mortals, the 'owners' option is largely unuseful. Since the only items these commands list are the ones a mortal owns, 'owners' would simply display your name and dbref over and over. For wizards, it can be more useful:

@find food=R=owners (find all rooms with 'food' in the name, and display their owners)

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <h3> <h4> <h5> <h6> <blockquote> <iframe>
  • Lines and paragraphs break automatically.
  • Use [fn]...[/fn] (or <fn>...</fn>) to insert automatically numbered footnotes.
  • Use [# ...] to insert automatically numbered footnotes. Textile variant.
  • Web page addresses and e-mail addresses turn into links automatically. (Better URL filter.)
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <c>, <cpp>, <drupal5>, <drupal6>, <glow>, <muf>, <java>, <javascript>, <php>, <python>, <ruby>. The supported tag styles are: <foo>, [foo].
  • Images can be added to this post.

More information about formatting options