Help Entries starting with 'U'
@ulock
This is an abbreviation of @lock/use.
This lock determines who is allowed to "use" the object or to set off any of the $-commands on the object.
Example:
"@ulock toy=!*Bob". If I want only Bob to be able to use it, I would
"@ulock toy=*Bob".
@unfollow
- @unfollow <object>=<message>
Sets the message shown to someone after they stop following the object (using the 'unfollow' command).
@unlink
- @unlink <exit>
- @unlink <room>
The first form of this command unlinks an exit from its destination room. Unlinked exits may be picked up and dropped elsewhere or relinked by anyone else. (Note that relinking an unlinked exit will @chown it to you if you do not already own it.)
The second form removes the DROP-TO on the room.
@unlock
- @unlock[/<switch>] <object>
Removes the lock on <object>. It can take as many switches as @lock can.
@uptime
This command, for mortals, gives the time until the next database dump. For wizards, it also gives the system uptime (just as if 'uptime' had been typed at the shell prompt) and process statistics, some of which are explained in the next help entry. Wizards can use the /mortal switch to avoid seeing the extra process statistics.
Continued in HELP @UPTIME2
@UPTIME2
While the exact statistics displayed depends on the operating system of the game's server, typical things might include the process ID, the machine page size, the maximum resident set size utilized (in K), "integral" memory (in K x seconds-of-execution), the number of page faults ("hard" ones require I/O activity, "soft" ones do not), the number of times the process was "swapped" out of main memory, the number of times the process had to perform disk I/O, the number of network packets sent and received, the number of context switches, and the number of signals delivered to the process.
Under Linux, memory usage is split into a number of different categories including shared libraries, resident set size, stack size, and some other figures. Also under linux, more information on signals is printed.
@use
- @use <object>[=<message>]
Sets the message that is displayed to someone who successfully uses <object>. If =<message> is omitted, the message is reset to nothing.
@uunlock
Un-use-locks the object. See also: @lock, @ulock
U()
- u([<object>/]<user function name>[, <arg0>[, ... , <arg 9>]])
- ufun([<object>/]<user function name>[, <arg0>[, ... , <arg9>]])
- ulambda([<object>/]<user function name>[, <arg0>[, ... , <arg9>]])
This allows you to create your own functions and evaluate them. <user function name> is the attribute that contains the desired user-defined function. Supplying <object> is optional; if you do not, the attribute will be read off the object that is evaluating the UFUN().
<arg0>, <arg1>, ... are the arguments that get passed to the user function as %0, %1, etc. (as in @trigger). You can pass up to 10 arguments (%0 through %9).
This function is also known as U() (alias for TinyMUSH compatibility).
ulambda() also accepts anonymous attributes.
See 'help UFUN2' for more.
U2
Example:
Example:
> @va Object=$test *:say [ufun(testfun, %0)]; @emit %0
> &testfun object=[strlen(%0)] [ucstr(%0)]
> test string
Object says, "6 STRING"
string
A user-defined function may be as complex as you want it to be, subject to limits on recursion depth, number of function invocations, or cpu time that may be configured in the MUSH. If the evaluation order doesn't quite seem right, adding escapes or breaking up the expression will probably help.
See 'help UFUN3' for more.
U3
A user-defined function called with ufun() is always evaluated with the permissions (powers and flags) of the object the function resides on. An object may evaluate an attribute on any object it controls, the attributes it owns on other objects, and publically accessible attributes.
Because the user-defined functions are evaluated with the permissions of the object they're stored on, allowing arbitrary use of the ufun() function can be insecure.
By default, the safer_ufun @config is enabled, preventing objects from running code on objects more privileged than themselves. Being more privileged means being higher up on the mortal/royalty/wizard hierarchy. However, attributes with the 'public' flag can always be evaluated by anyone. This is necessary for attributes such as 'describe', but should not be used for code.
UCSTR()
Returns <string> with all letters converted to uppercase. Example: ucstr(Foo BAR baz) returns "FOO BAR BAZ"
UDEFAULT()
- udefault([<obj>/]<attr>, <default case>[, <arg0>[, ... , <arg9>]])
This function returns the value of the user-defined function as defined by <attr> (or <obj>/<attr>), as if retrieved via the u() function, with <args>, if the attribute exists and is readable by you.
Otherwise, it evaluates the default case, and returns that. The default case is only evaluated if the attribute does not exist or cannot be read.
Example:
> &TEST me=[center(%0,5,*)]
> say udefault(Test,-- BOOM --,ACK)
You say "*ACK*"
> &TEST me
> say udefault(me/Test,-- BOOM --,ACK)
You say "-- BOOM --"
ULDEFAULT()
- uldefault([<obj>/]<attr>, <default case>[, <arg0>[, ... <arg9>]])
Just like UDEFAULT(), but it preserves registers like ULOCAL().
ULOCAL()
- ulocal([<obj>/]<attr>[, <arg0>[, ... , <arg9>]])
The ulocal() function is almost identical to u() in function: it evaluates an attribute, either from the object performing the function, or another object that you control or has the same owner as you, passing in arguments and returning the result. When evaluating the fetched attribute, %# refers to the original enactor and not the 'calling' object; 'me' refers to the object that supplied the attribute.
However, unlike the u() function, the evaluated attribute receives only a temporary copy of the global registers r(0)-r(9) and r(A)-r(Z) (%q0-%q9, %qa-%qz). This means that functions "below" the level of the ulocal() can reset global registers for temporary calculations, without needing to worry about "clobbering" the original values (which are restored when ulocal() returns).
This makes ulocal() particularly useful for global or shared code which calls arbitrary u() functions, where global register values need to be preserved from accidental user clobbering.
See 'help ulocal2' for examples.
ULOCAL2
Examples of ulocal():
> &FRUIT me=apples bananas oranges pears
> &SUB-FUNCTION me=[setq(0,v(FRUIT))][extract(%q0,match(%q0,%0),1)]
> &TOP-FUNCTION me=[setq(0,are delicious!)][ulocal(SUB-FUNCTION,%0)] %q0
> say u(TOP-FUNCTION,b*)
You say "bananas are delicious!"
If SUB-FUNCTION had been called with u() instead of ulocal():
> &TOP-FUNCTION me=[setq(0,are delicious!)][u(SUB-FUNCTION,%0)] %q0
> say u(TOP-FUNCTION,b*)
You say "bananas apples bananas oranges pears"
In this second example, in SUB-FUNCTION, %q0 was set to "apples bananas oranges pears", so that when the u() "returned" and TOP-FUNCTION evaluated %q0, this is what was printed. In the first example, ulocal() reset the value of %q0 to its original "are delicious!"
UNFINDABLE
Flag: UNFINDABLE (all types)
If a player is set UNFINDABLE, he cannot be found by the @whereis command. You also cannot use loc(), locate(), and similar functions to find his location, unless you have the see_all power or equivalent.
If a room is set UNFINDABLE, you cannot locate any of its contents via any means (@whereis, the loc() function, etc.) unless you are see_all or equivalent.
If a player who can @hide and idle is set UNFINDABLE, and he is idle past the allowable maximum idle time, he will be hidden automatically.
unfollow
- unfollow
- unfollow <object>
This command stops you from following an object that you were formerly following. If no object is given, you stop following everyone you were following.
UNINSPECTED
Flag: UNINSPECTED (rooms)
This flag may be used by the MUSH to indicate rooms which have not been inspected by the Building Council, Administration, etc.
UNIQUE()
- unique(<list>[, <sort type>[,<sep>[, <osep>]]])
unique() returns a copy of <list> with consecutive duplicate items removed. It does not sort the list. The optional <sort type> describes what type of data is in the list; see 'help sorting' for details. If no type is given, the elements are compared as strings. The optional third and fourth arguments are the list delimiter and output seperator.
Example:
> think unique(a b b c b)
a b c b
> think unique(1 2 2.0 3, f)
1 2 3
> think unique(1|2|3|3, n, |, _)
1_2_3
UNREGISTERED
Flag: UNREGISTERED (players)
This flag may be used by the MUSH to support on-line registration. The only restriction on UNREGISTERED players is that they may not be granted @powers.
use
Attempts to use an object, triggering its @use/@ouse/@ause attributes. The person using the object must pass its uselock; no inheritance check is necessary. This is may be done remotely, by using a dbref number; it provides an easy way for non-TRUST objects to perform commands on TRUST objects.
If the person fails to pass the object's uselock, the object's @ufail/@oufail/@aufail attributes are triggered.
Utility functions
These functions don't quite fit into any other category.
allof() ansi() atrlock() beep() checkpass()
clone() create() die() dig() firstof()
functions() isdbref() isint() isnum() isobjid()
isword() letq() localize() link() list()
lnum() null() numversion() objeval() open()
pcreate() r-function rand() s-function scan()
set() setq() setr() soundex() soundslike()
speak() tel() textentries() textfile() valid()
wipe() @@()
Generated at Mon Jul 2 00:35:04 2007