Loc()

From TinyMUX
Jump to navigation Jump to search

Description

Function: loc(<object>)

Returns the dbref of the location where <object> is. You must either control the object or be nearby for it to work unless one is specifying the object by dbref or by preceding a player-object's name with an asterisk. For historical reasons, when used on an exit it returns the destination of the exit, not the room it appears in. To find an exit's source use home() or where(). You can also use loc() to find the location of players that are not set UNFINDABLE, unless they or their location is set VISUAL. Room objects do not have a location.

Example

> look
Mortal's Room(#367R)
A bare room with nothing in it but a bed and a chair.
Contents:
hat(#368)
> say loc(me)
You say "#367"
> enter hat
hat(#368)
Contents:
cat(#325)
> say loc(me)
You say "#368"
> say loc(here)
You say "#367"

Related Topics

rloc(), room(), where(), home()