Help Entries starting with 'A'
@aahear
- @aahear <object>=<actionlist>
An aahear on an object is activated whenever the object's listen pattern is matched by anything done/said by either anything else in the room OR the object itself. In contrast, an ahear on an object cannot be activated by anything the object itself does.
@abuy
- @abuy <object>=<actionlist>
Sets the actions to be taken after a player buys an item from PRICELIST. The item purchased is passed in as %0, and the amount paid as %1
@aclone
- @aclone <object>=<actionlist>
Sets the actions to be taken whenever <object> is @cloned. This command can be useful for notifying the owner of a vending machine or parent object when someone uses the machine.
Please note that there is no @oclone, and that @clone is always a command, not an attribute.
@aconnect
- @aconnect <object>=<actionlist>
Sets the actions to be taken by a player right after connecting to the game.
Example: @aconnect me = :stretches luxuriously, as if waking from a nap.
Note that long and spammy @aconnect messages, whether in your room or on a channel, are frequently found annoying by other players.
The player's location, and zone object/objects in the zone parent room of the location, as well as objects in the master room, are also checked for an @aconnect. If one is found, it will be executed when a player connects in that location or zone (or, in the case of the master room, anywhere). This is only done if the room_connects config option is enabled.
One descriptor variable is passed to @aconnect: %1 = number of player connections (1 if this is an initial connect)
@adeath
- @adeath <object>=<actionlist>
Sets the actions to be taken after <object> is killed.
@adescribe
- @adescribe <object>=<actionlist>
Sets the actions to be taken when <object> is looked at. A common use of this command is:
@adesc me=think %N just looked at you.
which will inform you whenever someone looks at you. %N will be replaced by the name of the person who looked. While it is possible to set a message to be broadcasted to everyone in the area when someone looks at you, this is strongly discouraged, as many people find it annoying.
@adestroy
- @adestroy <object>=<actionlist>
Sets the actions to be taken by the object when it is destroyed (via @rec or @nuke). This can only be set by a Wizard. If @adestroy doesn't work, try &adestroy. :)
@adisconnect
- @adisconnect <object>=<actionlist>
Sets the actions to be taken by a player right after disconnecting from the game.
Example: @adisconnect me = home
The player's location, and zone object/objects in the zone parent room of the location, as well as objects in the master room, are checked for an @adisconnect. If one is found, it will be executed when a player disconnects in that location or zone (or, in the case of the master room, anywhere). This is only done if the room_connects config option is enabled.
Several descriptor variables are passed to @adisconnect: %1 = number of remaining connections (0 if a full disconnect) %2 = bytes received by the disconnecting descriptor %3 = bytes sent by the disconnecting descriptor %4 = commands issued by the disconnecting descriptor
@adrop
- @adrop <object>=<actionlist>
Sets the actions to be taken when <object> is dropped. If <object> is an exit, sets an action to be done after a player has passed through the exit.
@aefail
- @aefail <object>=<actionlist>
Sets the actions to be taken by the object when someone fails to enter it.
@aenter
- @aenter <object>=<actionlist>
Sets the actions taken by the object whenever someone enters it.
@afailure
- @afailure <object>=<actionlist>
Sets the actions to be taken on failure to pass the @lock on an object. For players and things, this means failure to pick them up with get/take. For exits, this means failure to go through an exit.
May be abbreviated @afail.
@afollow
- @afollow <object>=<actionlist>
Sets the actions to be taken after someone or something begins following the object.
@ahear
- @ahear <object>=<actions>
Sets the actions to be taken after the object's @listen is matched. Note that @ahear ignores any messages that the object itself creates, so it can only be triggered by other things. If you want the object to be able to trigger itself, try using @amhear or @aahear.
@aleave
- @aleave <object>=<actionlist>
Sets the actions to be taken whenever someone leaves the object.
@alfail
- @alfail <object>=<actionlist>
Sets the actions to be taken whenever someone tries to leave the object and fails (because the object is set NO_LEAVE or because the person fails the @lock/leave on the object).
@alias
- @alias <player>=<name>;<alias>[;<alias2>[;<alias3>[...]]]
@alias is a special attribute that lists a player's names; players can be paged by their aliases, matched with *<alias>, and all other game functions which look up player names will also accept an alias. The attribute is visible to all players.
A list of aliases, separated by semicolons, may be provided. Players should include their usual @name in the alias list, because the @name command allows setting name to any alias in the list. The number of aliases allowed in the list may be limited by the game's administrators through the 'max_aliases' @config parameter.
If the page_aliases config directive is on, the first alias in the list is returned along with the player's name.
Each alias cannot be longer than the limit allowed for player names, cannot contain spaces, and must be unique -- no other player may have the same alias or name as any other player's alias or name.
@alias has no effect on non-players.
@allhalt
This command halts all objects in the game in an effort to free up the queue. Wizard-only command.
This command is equivalent to "@halt/all".
@allquota
- @allquota[/quiet] [<limit>]
This is a God level command that is only available if the quota system is being used. It displays the current max and owned objects of every player (unless the /quiet switch is used) and resets their quota left to the new limit minus the current number owned if a limit is given.
@amhear
- @amhear <object>=<actionlist>
Sets the actions to be taken whenever the @listen on the object is matched by something that the object itself does. It will not react if anyone else in the area does anything that matches the @listen pattern. If you want other objects to be able to set off the action list, try using @ahear or @aahear.
@amove
- @amove <object>=<actionlist>
This is the action to be taken whenever an object moves.
@apayment
- @apayment <object>=<actionlist>
Sets the actions to be taken after a player gives an object some amount of pennies. The amount paid is passed in as %0.
@asuccess
- @asuccess <object>=<actionlist>
Sets the actions to be taken when the @lock of an object is passed. For things/players, this means picking them up. For exits, this means going through them.
@atport
- @atport <object>=<actionlist>
Sets the list of actions that <object> will perform when it is teleported. These actions are done after <object> has arrived in its new location.
@atrchown
@atrchown <object>/<attribute> = <new_owner>. Like @chown except it changes the control of an attribute from one person to another. You may only @atrchown attributes that you can normally set, and unless you're a wizard, you can only @atrchown attributes to yourself.
@atrlock
- @atrlock <object>/<attribute>=[on|off].
If 'on' is specified, it 'locks' the specified attribute on the object. If the attribute is owned by someone other than you, you will gain ownership of it. If an attribute is unlocked, then anyone who controls the object may change it. If it is locked, only wizards and the attribute's owner (Assuming the owner controls the object) can change it. Wizards may lock/unlock anyones attributes. If you specify 'off' it will unlock a locked attribute. Specifying neither will return the current value of the lock. You can only lock or unlock attributes you can normally set.
@attribute
- @attribute <attrib>
- @attribute/access[/retroactive] <attrib>=<flaglistor"none">
- @attribute/delete <attrib>
- @attribute/rename <attrib>=<newname>
@attribute is a wizard-only command which modify's the MUSH's table of standard attributes (use @list/attribs to list them). A standard attribute is one that can be set with @<attrib> instead of &<attrib>, and which, when set, has a predefined set of initial permissions.
*** Unlike TinyMUSH, changes to the PennMUSH attribute table *** are not saved across shutdowns. Use these commands from *** God's @startup to insure they are run at each startup.
Used without switches, @attribute shows info about a standard attrib.
@attribute/access adds a new standard attribute into the table, associating it with the given space-separated list of full flag names. See 'help attribute flags' for possible flags. A flag list of "none" removes all flag associations. If the /retroactive switch is added, the flags are assigned to every copy of the attribute that already exists in the database.
@attribute/delete removes a standard attribute from the table. @attribute/rename renames a standard attribute.
@aufail
- @ufail <object>=<message>
- @oufail <object>=<message>
- @aufail <object>=<action>
Sets message shown to a player who fails to use an object via the 'use' command (@ufail), message shown to others in the room (@oufail), and action for the object to take (@aufail).
Note that these attributes are @ufail, NOT @ufailure, for TinyMUSH compatibility.
@aunfollow
- @aunfollow <object>=<actionlist>
Sets the actions to be taken after someone or something stops following the object.
@ause
- @ause <object>=<actionlist>
Sets the actions to be taken when an object is successfully "used".
@away
This message is sent to a player who tries to page you when you are not connected, if it evaluates to something non-null.
Example: @away me=I'm not here, please send me @mail instead.
ABODE
Flag: ABODE (rooms)
If a ROOM has the ABODE flag set, any PLAYER can set his home there, and can set the homes of THINGs there. It does not mean that a player can open an exit to that room, only that they can set their home there. This flag should not be set unless you want to make the room a public 'living area'.
To make a room your home, type '@link me=here' while standing in the room.
ABS()
Returns the absolute value of a number. i.e. ABS(-4) returns 4; ABS(2) returns 2, etc.
ACCENT()
- accent(<string>, <template>)
The accent() function will return <string>, with characters in it possibly changed to accented ones according to <template>. Both arguments must be the same size.
Whether or not the resulting string is actually displayed correctly is client-dependent. Some OSes uses different character sets than the one assumes (ISO 8859-1), and some clients strip these 8-bit characters.
See 'HELP ACCENT2' for a description of the template argument.
ACCENT2
For each character in <string>, the corresponding character of <template> is checked according to the table below, and a replacement done. If either the current <string> or <template> characters aren't in the table, the <string> character is passed through unchanged.
Accent Template String
Name Description Character Character
--------------------------------------------------------------
grave Backward slant ` A,E,I,O,U,a,e,i,o,u
above letter
acute Forward slant ' A,E,I,O,U,Y,a,e,i,o,u,y
above letter
tilde Wavy line above ~ A,N,O,a,n,o
letter
circumflex carat above ^ A,E,I,O,U,a,e,i,o,u
letter
umlaut Two dots above : A,E,I,O,U,,a,e,i,o,u,y
diaeresis letter
ring Small circle above o A,a
letter
cedilla Small tail below , C,c
letter
See 'HELP ACCENT3' for more
ACCENT3
These are non-accent special characters, mostly punctuation and non-roman letters.
Template String
Description Character Character
--------------------------------------------------------------
Upside-down ? u ?
Upside-down ! u !
<< quote mark " <
>> quote mark " >
German sharp s B s
Capital thorn | P
Lower-case thorn | p
Capital eth - D
Lower-case eth & o
See 'HELP ACCENT4' for examples
ACCENT4
Some examples of accent() and their expected outputs:
Example:
> think accent(Aule, ---:)
Aul(e-with-diaeresis)
Example:
> think accent(The Nina was a ship, The Ni~a was a ship)
The Ni(n-with-~)a was a ship
Example:
> think accent(Khazad ai-menu!, Khaz^d ai-m^nu!)
Khaz(a-with-^)d ai-m(e-with-^)nu!
ACCNAME()
accname() returns the name of object <object>, applying the object's @nameaccent, if any.
Related functions: NAME(), FULLNAME(), INAME()
ACOS()
- acos(<cosine>[,<angle type>])
Returns the angle that has the given <cosine> (arc-cosine), with the angle expressed in the given angle type, or radians by default.
See 'HELP CTU()' for more on the angle type.
ACTION LISTS
Action lists are simply lists of actions that are all executed at once. You can have an action list in a user-defined command, in one of the a-attributes, or in many other commands. Action lists may not be executed directly from a client, except in the case of a command which forces a re-insertion into the queue such as @switch or @dolist.
Actions in an action list are separated by semicolons. Each action is simply a separate MUSH command. If part of the action (such as the text in an @emit, for example) contains a semi-colon or comma, you may need to enclose that part in curly braces {}. You can also nest action lists inside each other by enclosing each action list in braces {}.
Substitution will be performed on the contents of action lists before they are executed.
(continued in help action2)
ACTION2
Example 1:
> @asuccess Gift = @pemit %#={The box pops open; surprise!} ;
@name me=New Toy ; @desc me={A shiny new toy, just for %N!}
> take gift
The box pops open; surprise!
> look new toy
New Toy
A shiny new toy, just for Cyclonus!
Example 2:
> &TEST me=$test:@emit {Testing; testing; one, two.} ;
@dolist 1 2 3={think {Test ##, success.} }
> test
Testing; testing; one, two.
Test 1, success.
Test 2, success.
Test 3, success.
ADD()
- add(<number>, <number>[, ... , <numberN>])
Returns the sum of some numbers.
AFTER()
- after(<string1>, <string2>)
Returns the portion of <string1> that occurs after <string2>. If <string2> isn't in <string1>, the function returns a null string. This is case-sensitive.
Example:
> think after(foo bar baz,bar)
baz
> think after(foo bar baz,ba)
r baz
ahelp
ahelp [<topic>]
Shows the current admin help for the MUSH. Only ROYALTY and WIZARDS can use this command.
ALIAS()
- alias(<player>[, <new alias>])
Alias returns the alias of <player>. If multiple aliases are set, alias returns the first component of the alias.
If function side effects are allowed, this function, given two arguments, acts just like @alias <object>=<new alias>.
Related functions: FULLALIAS()
ALIGN()
- align(<widths>,<col1>,...,<coln>[,<filler>[,<colsep>[,<rowsep>]]])
Creates columns of text, each column designated by <col1..coln>. Each column is individually wrapped inside its own column, allowing for easy creation of book pages, newsletters, or the like.
<widths> is a space-separated list of column widths. '10 10 10' for the widths argument specifies that there are 3 columns, each 10 spaces wide. < before a number causes the field to be left-aligned (the default). A '-' causes it to be centered, and '>' makes it right-aligned. A '.' after the number implies the column is to be repeated for as long as there is text remaining in a non-repeating column. A ` (left tick) after the number implies that if the column runs out of text, it should merge with the next leftmost column (making that column flow around). A ' (right tick) after the number implies that if the column runs out of text, it should merge with the next rightmost column.
<filler> is a single character that, if given, is the character used to fill empty columns and remaining spaces. <colsep>, if given, is inserted between every column, on every row. <rowsep>, if given, is inserted between every line. By default, <filler> and <colsep> are a space, and <rowsep> is a newline.
Continued in HELP ALIGN2
ALIGN2
Examples:
Example:
> &line me=align(<5 10 20,\([left(xget(%0,sex),1)]\),name(%0),name(loc(%0)))
> th iter(lwho(),u(line,##),%b,%r)
(M) Walker Tree
(F) Jane Doe Nowhere
Example:
> &haiku me = Alignment function,%rIt justifies your writing,%rBut the
words still suck.%rLuke
> th [align(5 -40 5,,[repeat(-,40)]%r[u(haiku)]%r[repeat(-,40)],,%b,+)
+----------------------------------------+
+ Alignment function, +
+ It justifies your writing, +
+ But the words still suck. +
+ Luke +
+----------------------------------------+
ALLOF()
- allof(<expr1>[, ... , <exprN>],<osep>)
Evaluates every expression argument (including side-effects) and returns the results of those which are true, in a list separated by osep. The output separator argument is required and must be a single character, or can be left empty, in which case a space will be used to separate the results by default.
The meaning of true or false depends on configuration options as explained in the 'BOOLEAN VALUES' help topics.
Example:
> &s me=Bats are similar to Rats which are afraid of Cats
> say allof(grab(v(s),rats),grab(v(s),mats),grab(v(s),bats),)
You say, "Rats Bats"
Example:
> say allof(#-1,#101,#2970,,#-3,0,#319,null(This Doesn't Count),|)
You say, "#101|#2970|#319"
ALPHAMAX()
- alphamax(<word1>[, ... , <wordN>])
Takes any number of arguments, and returns the word which is lexicographically biggest. I.e., which word would be last in alphabetical order.
ALPHAMIN()
- alphamin(<word1>[, ... , <wordN>])
Takes any number of arguments, and returns the word which is lexicographically smallest: the word that would be first in alphabetical order.
ANCESTORS
Objects can inherit attributes from other objects through the use of parents. An object's parent, its parent's parent, its parent's parent's parent, etc. constitute the object's "parent chain" and lookups work the way up the chain until an inheritance occurs.
Ancestors are "virtual parents" that are assumed to be last on every parent chain. There is one ancestor for each object type (room, exit, thing, player), and @config lists the dbref of each ancestor object (@config ancestor_room, etc.) Under normal circumstances, if an attribute can't be retrieved from an object or any of its explicit parents, the attribute will be looked for on the appropriate ancestor. The ORPHAN flag may be set on an object to cause lookups on that object to ignore ancestors (like the pre-ancestor behavior).
Ancestors may themselves have parent chains, but these are (obviously) not virtually terminated by ancestors.
Note that the choice of which ancestor to look up is based on the type of the *child* object, as is the check of the ORPHAN flag. Also note that ancestors are *not* checked for $-commands or ^-commands; you should use the master room for global commands, instead.
AND()
- and(<boolean value 1>, <boolean value 2>[, ... , <boolean value N>])
- cand(<boolean value 1>, <boolean value 2>[, ... , <boolean value N>])
Takes boolean values, and returns 1 if all of them are equivalent to true(1). and() always evaluates all arguments (including side effects), while cand() stops evaluation after the first argument that evaluates to false.
ANDFLAGS()
- andflags(<object>,<string of flag letters>)
This function returns 1 if <object> has all the flags in a specified string, and 0 if it does not. The string is specified with a single letter standing for each flag, like the output of the FLAGS() function. A '!' preceding a flag letter means "not flag".
Thus, ANDFLAGS(me,WD) would return 1 if I was set WIZARD and DARK. ANDFLAGS(me,W!Dc) would return 1 if I was set WIZARD, not DARK, and CONNECTED.
If a letter does not correspond to any flag, <object> doesn't have it, so the function returns 0. There can be an arbitrary number of flags. Do not put spaces between flag letters.
ANDLFLAGS()
- andlflags(<object>, <list of flags>)
This function returns 1 if <object> has all the flags in a specified list, and 0 if it does not. The list is a space-separated list of flag names. A '!' preceding a flag name means "not flag".
Thus, ANDLFLAGS(me,wizard dark) would return 1 if I was set WIZARD and DARK. ANDFLAGS(me,wizard !Dark connected) would return 1 if I was set WIZARD, not DARK, and CONNECTED.
If a name does not correspond to any flag, <object> doesn't have it, so the function returns 0. There can be an arbitrary number of flags.
anews
anews [<topic>]
Shows the current admin news for the MUSH. Only ROYALTY and WIZARDS can use this command.
ANONYMOUS ATTRIBUTES
In many cases where a function expects a object/attribute pair that refers to an attribute to evaluate, you can use the form
#lambda/<code>
instead, and the code will be treated as an attribute's body. The code will normally be parsed twice, so special characters should be escaped where needed.
These anonymous attributes should be used for short and simple pieces of code. Anything long or complicated should go in an actual attribute, for readability and maintainability.
See 'HELP ANONYMOUS2' for examples.
ANONYMOUS2
A typical usage of anonymous attributes would be to convert a list of dbrefs to names, as so:
>say map(#lambda/name(\%0), #3 #12 #23) You say, "Joe Robert Sally"
Because the code is parsed twice, you can actually build parts of it in place, which is very convenient. Consider this implementation of a lattrval function, which is like lattr() but it only returns non-empty attributes:
&lattrval me=
filter(#lambda/hasattrval([secure(before(%0, /))], \%0), lattr(%0))
The first time '#lambda/hasattrval([secure(before(%0, /))], \%0)' is parsed in a call like 'u(lattrval, #1234)', it is turned into '#lambda/hasattrval(#1234, %0)', thus avoiding the need for a setq() or the like to store the top-level %0 for use in a real attribute called by filter(). However, this can lead to problems with evaluating un-trusted code. Use secure() or escape() where neccessary.
See 'HELP ANONYMOUS3' for another example.
ANONYMOUS3
You can also use lit() to avoid having the code evaluated twice, if needed. For example, this code, which returns all unlinked exits in a room:
&lunlinked me=filter(lit(#lambda/strmatch(loc(%0), #-1)), lexits(%0))
This approach is useful both for security in making it harder to evaluate a string that shouldn't be, and for making the code look nicer by not having to escape percent signs, brackets, and other special characters. However, it also makes it harder to build the code string on the fly. Use what's most appropriate.
See 'HELP ANONYMOUS4' for a list of functions that support anonymous attributes.
ANONYMOUS4
The following functions support anonymous attributes:
filter() filterbool() fold() foreach() map() mapsql()
mix() munge() sortby() sortkey() step()
ANSI
Flag: ANSI (players)
When set on a player, this flag bold-hilites the names and owners of attributes when the player "examines" an object. This makes it much easier to pick out where attributes begin and end, when examining complex objects. You must be using a terminal which supports ANSI control codes in order for this to work. Additionally, some MUSHes may not support ANSI. Check @config to see.
See also the COLOR flag. If COLOR is not set, and ANSI is, you will see vt100 ANSI codes, but not color ANSI codes.
ANSI()
This allows you to highlight a string using ANSI terminal effects. The codes are:
f - flash F - not flash
h - hilite H - not hilite
u - underscore U - not underscore
i - inverse I - not inverse
n - normal
d - default foreground D - default background
x - black foreground X - black background
r - red foreground R - red background
g - green foreground G - green background
y - yellow foreground Y - yellow background
b - blue foreground B - blue background
m - magenta foreground M - magenta background
c - cyan foreground C - cyan background
w - white foreground W - white background
For example, "ansi(fc, Test)" would hilight "Test" in flashing cyan. Default foreground and background use the client's default color for fore and back.
APOSS()
Returns the absolute possessive pronoun - his/hers/its/theirs - for an object.
ART()
This function returns the proper article, "a" or "an", based on whether or not <string> begins with a vowel.
ASIN()
- asin(<sine>[,<angle type>])
Returns the angle with the given <sine> (arc-sine), with the angle expressed in the given angle type, or radians by default.
See 'HELP CTU()' for more on the angle type.
ATAN()
- atan(<tangent>[,<angle type>])
- atan2(<number>, <number>[,<angle type>])
Returns the angle with the given <tangent> (arc-tangent), with the angle expressed in the given angle type, or radians by default.
atan2(y, x) is like atan(fdiv(y, x)), except x can be 0, and the signs of both arguments are used in determining the sign of the result. It is useful in converting between cartesian and polar coordinates.
See 'HELP CTU()' for more on the angle type.
ATRLOCK()
- atrlock(<object>/<attrib>[, <on|off>])
When given a single object/attribute pair as an argument, returns 1 if the attribute is locked, 0 if unlocked, and #-1 if the attribute doesn't exist or can't be read by the function's caller.
When given a second argument of "on" (or "off"), attempts to lock (unlock) the specified attribute, as per @atrlock.
ATTRIB-OWNERSHIP
ATTRIBUTE OWNERSHIP
The latest person to set an attribute on an object is the owner of that attribute. If you lock an attribute, using the @atrlock command, only the person who owns the attribute will be able to alter the attribute. This allows you to create standard commands on objects and then @chown them to others without letting them alter them.
Attribute ownership is NOT changed when the object itself is @chown'ed. To change attribute ownership, you must use the @atrchown command.
You must control an object in order to set attributes on it.
ATTRIB_SET()
- attrib_set(<object>/<attrib>[, <value>])
Sets or clears an attribute. With a value, it sets the attribute, without one, it clears the attribute. This is an easier-to-read replacement for the old set(<object>, <attrib>:<value>) notation, and a less destructive replacement for wipe() that won't destroy entire attribute trees in one shot.
If there is a second argument, then attrib_set() will create an attribute, even if the second argument is empty (in which case attrib_set() will create an empty attribute). This means that attrib_set(me/foo,%0) will _always_ create an attribute.
Of course, if the empty_attrs configuration option is turned off, then the above paragraph doesn't apply. See '@config attribs'.
ATTRIBUTE FLAGS
Attribute flags are set on an object's attributes using @set, or applied to attributes globally using @attrib. Their names (and, when applicable, the character used in examine as shorthand for the flag) include:
no_command ($) Attribute will not be checked for '$' commands and
'^' listen patterns.
visual (v) Attribute can be seen by anyone via get(), eval(),
ufun(), zfun(), and similar functions.
no_inherit (i) Attribute will not be inherited by the children of
this object.
no_clone (c) Attribute will not be copied if the object is @clone'd.
regexp (R) Match $-commands and ^-listens using regular expressions.
See 'help regexps'.
case (C) Match $-commands and ^-listens case sensitively.
safe (S) Attribute may not be modified, without unsetting this flag.
mortal_dark (m) Attribute cannot be seen by mortals. This flag can only
be set by royalty and wizards. "hidden" is a synonym.
Continued in 'help attribute flags2'
ATTRIBUTE FLAGS2
noname (N) Attribute won't show name in @o-* messages.
nospace (s) Attribute won't append a space in @o-* messages.
wizard (w) Attribute can only be set by wizards.
This flag can only be set by royalty and wizards.
veiled (V) Attribute value will not be shown on default examine,
but is still otherwise accessible (for spammy attribs).
debug (b) Show debug output when this attribute is evaluated.
nearby (n) Even if this attribute is visual, it can only be
retrieved if you're co-located with the object.
public (p) This attribute can be evaluated by any object, even
if safer_ufun is in use. DANGEROUS! AVOID!
aahear (A) ^-listens on this attribute match like @aahear
amhear (M) ^-listens on this attribute match like @amhear
Continued in 'help attribute flags3'
ATTRIBUTE FLAGS3
prefixmatch When a user attempts to set an attribute using @<attrib>,
this attribute will be matched down to its unique
prefixes. This flag is primarily used internally.
` This attribute is a branch. See: help ATTRIBUTE TREES
Attribute functions
The primary purpose of these functions is to access information stored in attributes on objects.
aposs() attrib_set() default() edefault() eval()
get() grep() grepi() lattr() nattr()
obj() poss() regrep() regrepi() subj()
udefault() ufun() uldefault() ulocal() v-function
wildgrep() wildgrepi() xget() zfun()
ATTRIBUTE TREES
Attributes can be arranged in a hierarchical tree; these are called "attribute trees", and a conceptually similar to the way that files and directories/folders are organized on computer filesystems. Attribute trees can be used to reduce spam when examining and to provide organized control over permissions for related attributes.
Attribute trees use the backtick (`) character to separate their components (much as filesystems use / or \). For example, the following attribute name would be a couple levels down in its tree:
CHAR`SKILLS`PHYSICAL
Attribute names may not start or end with the backtick, and may not contain two backticks in a row.
All attributes are either branch attributes or leaf attributes. A branch attribute is an attribute that has other branches or leaves beneath it; a leaf attribute is one that does not. Any attribute may act as a branch. If you try to create an unsupported leaf, branch attributes will be created as needed to support it.
See 'help attribute trees2' for more information and examples.
ATTRIBUTE TREES2
Attribute trees provide two immediate benefits. First, they reduce
spam when examining objects. The usual * and ? wildcards for attributes
do not match the ` character; the new ** wildcard does. Some
examples of using examine:
examine obj displays top-level attributes (plus object header)
examine obj/* displays top-level attributes
examine obj/BRANCH` displays only attributes immediately under BRANCH
examine obj/BRANCH`* displays only attributes immediately under BRANCH
examine obj/BRANCH`** displays entire tree under BRANCH
examine obj/** displays all attributes of object
The same principles apply to lattr(). @decompile obj is a special case, and displays all attributes.
Branch attributes will be displayed with a ` in the attribute flags on examine.
See 'help attribute trees3' for more information and examples.
ATTRIBUTE TREES3
The second benefit of attributes trees is convenient access control. Attribute flags that restrict attribute access or execution (no_inherit, no_command, mortal_dark, wizard) propagate down attribute trees, so if a branch is set mortal_dark, mortals can not read any of its leaves or subbranches either.
Attribute flags that grant access (e.g. visual) do NOT propagate down trees.
These properties make attribute trees ideal for data attributes: &DATA bank = Data for each depositor is stored here, by dbref @set bank/DATA = no_command &DATA`#30 bank = $2000 savings:$1000 loan @ 5% ...
They're also handy for things like character attributes: @attribute/access CHAR = wizard mortal_dark no_clone no_inherit &CHAR #30 = Character data &CHAR`SKILLS #30 = coding:3 documentation:1 obfuscation:5 ...
See 'help attribute trees4' for information about @parent and attribute trees.
ATTRIBUTE TREES4
Attribute trees interact with @parent in several ways.
As usual, children inherit attributes from their parent unless the child has its own overriding attribute. However, children that wish to override a leaf attribute must also have their own (overriding) copy of all branches leading to that leaf. This means that when you do:
&BRANCH parent = a branch &BRANCH`LEAF parent = a leaf &BRANCH`LEAF child = a new leaf
In this case, a new BRANCH attribute will be created on the child, so '-[get(child/BRANCH)]-' will return '--'. This may not be what you actually want.
If a branch on the parent is set no_inherit, it will not be inherited, regardless of any other flags that may be present. If a branch is inherited, the child object can not loosen any access restrictions to inherited attributes that are set by the parent (although it may loosen access restrictions to its own attributes on the same branch). The child object may impose stricter restrictions, however, and these may prevent access to inherited parent data.
ATTRIBUTES
Attributes with (*) after them are special, cannot be set by players, and may only be visible to wizards or admin. For those attributes, there is no @-command, so you can just type 'help <attribute name>' for help. For all other attributes, type 'help @<attribute name>' for help.
Standard Attributes: (see @list/attribs for the complete list)
AAHEAR ACLONE ACONNECT ADEATH ADESCRIBE
ADISCONNECT ADROP AEFAIL AENTER AFAILURE
AHEAR ALEAVE ALFAIL AMHEAR AMOVE
APAYMENT ASUCCESS AWAY CHARGES COST
DEATH DESCRIBE DROP EALIAS EFAIL
ENTER FAILURE FORWARDLIST HAVEN IDESCRIBE
IDLE LALIAS LAST (*) LASTIP (*) LASTLOGOUT(*)
LASTSITE (*) LEAVE LFAIL LISTEN MOVE
ODEATH ODESCRIBE ODROP OEFAIL OENTER
OFAILURE OLEAVE OLFAIL OMOVE OPAYMENT
OSUCCESS OXENTER OXLEAVE OXMOVE PAYMENT
QUEUE (*) RQUOTA (*) RUNOUT SEX STARTUP
SUCCESS TFPREFIX
(continued in help attributes2)
ATTRIBUTES2
An attribute is part of the code on an object that makes it unique. An attribute can contain any sort of text -- from a single word, to a long paragraph, to a piece of MUSHcode. Some attributes are standard in PennMUSH. That means that their effects are pre-set.
Standard attributes can be set using one of the following commands:
@<attribute name> <object>=<content>
@set <object>=<attribute name>:<content>
&<attribute name> <object>=<content>
It is also possible to have non-standard attributes, which can be named anything you like. Please see 'help NON-STANDARD ATTRIBUTES' for more information on those.
(continued in help attributes3)
ATTRIBUTES3
Any attribute name can be shortened, but a shorter forms run the risk of conflicting with other attribute names. This could result in you setting an unwanted attribute.
Example:
@adesc me=think %N looks at you.
will set your ADESCRIBE attribute just as
@adescribe me=think %N looks at you.
would.
To see the attributes that are set on you or on any of the objects you own, you should use the "examine" command. See 'help examine'.
(continued in help attributes4)
ATTRIBUTES4
Attributes can be owned by someone other than the object they are set on. This allows the person to change the content of just that attribute while not the rest of the object. Attributes can also be locked, which prevents them from being changed by anyone.
In addition to the standard attributes with pre-set effects, there are some special attributes that date from the days before you could set non-standard attributes with any name you wanted. These are the attributes VA-VZ, WA-WZ, XA-XZ. These attributes have no pre-set effects, and were just to allow players to store any text or MUSHcode that they wished in those attributes. Now that non-standard attributes are available, it is highly recommended that you instead use them, since you can use longer and descriptive names for attributes, which makes it much easier to examine and work on objects.
See also: ATTRIB-OWNERSHIP, @set, examine, @atrchown, @atrlock, hasattr(), get(), v(), NON-STANDARD ATTRIBUTES, SETTING-ATTRIBUTES, ATTRIBUTE TREES
AUDIBLE
Flag: AUDIBLE (all types)
Exits that are AUDIBLE propagate sound to their destinations. In other words, any message - emit, say, or pose - that is heard in the source room of the exit is passed on to the contents of the exit's destination room. The message is prepended with the exit's @prefix attribute; if there is no @prefix, the default is used:
"From <name of the exit's source room>,"
Messages matching a certain pattern may be filtered out by using @filter on an exit; read 'help @filter' for more. If the object has a @forwardlist, sounds that pass the @filter are sent on to the objects in the @forwardlist.
In order for exits in a room to propagate sound, the room must also be set AUDIBLE. If the room is audible, exits that are audible show up on a @sweep, even if they are set DARK.
See "help AUDIBLE2" for more.
AUDIBLE2
This flag is also valid for things. If an object is set AUDIBLE, any messages which originate from its contents will be broadcasted to the outside world. This makes it very simple to program vehicles. Like AUDIBLE on exits, the message is prepended with the thing's @prefix attribute, and messages matching certain patterns may be filtered with @filter. If there is no @prefix, the message will be prepended with "From <name of AUDIBLE object>," The AUDIBLE object does not receive its own propagated messages.
The AUDIBLE flag allows most "emitters" (objects that listen for messages and broadcast them to other rooms) to be eliminated. The message is propagated only to the next room and no farther, so there is no danger of looping.
Generated at Mon Jul 2 00:35:04 2007