2.1.5 Registered Names
Objects can be specified by `registered names' as well as by names
and dbrefs. A registered name is an alias that can (like a dbref) be
used regardless of the object's location, but (like a name) consisting
of a memorable string. The primary use is to provide a convenient,
memorable way of specifying an item, regardless of its location and
ownership. For example, a player on a large MUCK might have
a puppet with a long, difficult to remember dbref, such as
#128629. If the player frequently wanted to teleport the
puppet to her from somewhere else, she would need to either memorize the
dbref or repeatedly retrieve it with the @find command. As
an alternative, she could give the puppet an easy-to-remember registered
name such as `pup'. From that point on, the puppet could be specified
with the name `pup' preceeded by a $ dollar sign, rather
than by dbref.
Players can create registered names usuable only by the player
with the @register command, syntax @reg #me
<object> = <registered name> . (The information is
stored in the player's _reg/ directory.)
====================================
> @find Squiggy
Squiggy(#128629XZ)
***End of List***
1 objects found.
> @reg #me #128629 = pup
Now registered as _reg/pup: Squiggy(#128629XZ) on Jessy(#2PWQX)
> @tel $pup = me
Teleported.
> i
You are carrying:
Squiggy(#128629XZ)
You have 5086 pennies.
===================================
Individual registered names may also be set when an object is
created. The standard creation commands @create, @dig,
@action , and @open each take two optional
argument fields, separated by = equals signs. The first of these fields
is specific to each command; the second field for all four may be used
to specify a registered name.
@create <name> = <cost in pennies> = <reg name>
@dig <name> = <parent room> = <reg name>
@action <name> = <source> = <reg name>
@open <name> = <link> = <reg name>
====================================
> @create Mary Poppins Umbrella == umbi
Mary Poppins Umbrella created with number 226.
Registered as $umbi
> ex $umbi
Mary Poppins Umbrella(#226) Owner: Mistral
Type: THING
Created: Fri May 09 14:33:47 1997
Modified: Fri May 09 14:33:47 1997
Last used: Fri May 09 14:33:47 1997
Usecount: 0
> ex me=_reg/
ref /_reg/umbi:Mary Poppins Umbrella(#226)
> @dig OOCafe = #143 = cafe
OOCafe created with room number 225.
Trying to set parent...
Parent set to OOC Environment(#143RL).
Room registered as $cafe
> @open Enter Garden = $garden = gogard
Exit opened with number 224.
Trying to link...
Linked to Secret Garden(#455R).
Registered as $gogard
====================================
Wizards can set global registered names usuable by all players
syntax @reg <object> = <registered name> . A
frequent and convenient use of global registered names is to provide an
alias for publicly available programs such as `do-nothing' and
`obvious-exits'. Without global registered names, players would need to
find the dbrefs of these programs each time they needed them for
building purposes. Since the players do not control these programs,
finding the dbrefs can be difficult. (To create a personal registered
name as a wizard, use the #me> option: @reg #me
<object> = <registered name>)
====================================
> @find obv
gen-Obvexits(#2002FLM3)
***End of List***
1 objects found.
> @reg #2002 = exits
Now registered as _reg/exits: gen-Obvexits(#2002) on The Void(#0R)
> @succ here = @$exits
Message set.
====================================
prev|
toc|
top|
next
|