Help Entries starting with 'F'
@failure
- @failure <object>[=<message>]
Sets the message shown to someone who fails to pass the object's basic @lock. For a thing or player, this would be when someone tries to pick the object up and fails. For an exit, this occurs when someone tries to go through the exit and fails.
If [=<message>] is omitted, any currently set message will be reset.
Can be abbreviated @fail. It is recommended that you put an @fail message on any locked object.
@filter
- @filter <object>=<pattern1>,<pattern2>,<pattern3>,...
This attribute is meant to be used in conjunction with the AUDIBLE flag. The @filter of an object is a comma-separated list of wildcard patterns (like @switch patterns). Any messages which match one of the patterns is suppressed and not propagated through the AUDIBLE object with the @filter set. (Note: @filter on rooms has no effect!)
Please note that you should NOT use curly brackets {} in an @filter pattern. If you want to filter a message containing a comma, you need to put a \ before it. Also note that AUDIBLE exits will not take effect unless the room they lead from is also set AUDIBLE.
See 'help @filter2' for more.
@filter2
If the @filter attribute is flagged REGEXP, the patterns are considered regular expressions, not wildcards. The CASE attribute flag is also respected.
Example: An exit leads from the room where Wizard is standing to another room where the puppet "Wiztoy" is standing. The exit is set AUDIBLE.
@prefix exit=From inside,
:tests.
> Wizard tests.
Wiztoy> From inside, Wizard tests.
@filter exit=* jumps.,* tests.
:jumps.
> Wizard jumps.
:tests.
> Wizard tests.
(Wiztoy doesn't hear anything, because it is filtered out.)
:tests again.
> Wizard tests again.
Wiztoy> From inside, Wizard tests again.
@find
- @find [<name>][=<begin>,<end>]
Displays the name and number of every room, thing, or player that you control whose name matches <name>. Because the command is computationally expensive, this costs 100 pennies. You can limit the range of the @find by specifying <begin> and <end>, where these are the first and last dbrefs to examine.
Some MUSHes may choose to restrict @find only to Royalty. Even if not, it is recommended that you use @search instead, as it can be limited more effectively.
@firstexit
Makes the named exit the first in the listing of Obvious Exits in a room. You must control the room in order to use this command.
@flag
- @flag <flagname>
- @flag/list [<flagnamepattern>]
- @flag/add <flagname>=[<letter>],[<type(s)>],[<setperms>],[<unsetperms>]
- @flag/delete <flagname>
- @flag/alias <flagname>=<alias>
- @flag/letter <flagname>[=<letter>]
- @flag/restrict <flagname>=[<setperms>],[<unsetperms>]
- @flag/type <flagname>=<type(s)>
- @flag/enable <flagname>
- @flag/disable <flagname>
This command manipulates the list of flags in the database. When given a flag name as an argument, the command displays information about the flag, including aliases and permissions. @flag/list lists names of enabled flags, and may be given a wildcarded pattern to restrict which names it will show.
All other switches to this command are restricted to God:
/disable disables a flag, making it invisible and unusable
/enable re-enables a disabled flag
/alias adds a new alias for an existing flag; use !<alias> to delete one.
/letter changes or removes a single-letter alias for an existing flag.
/restrict changes flag permissions (see help @flag2)
/type changes flag type(s) (see help @flag2)
/delete deletes a flag completely, removing it from all objects
in the database and the removing it permanently from the
flag table. It requires the exact flag name or alias to be used.
Be very very careful with this.
@flag2
@flag/add is used to add a new flag with the given name. Arguments other than the flag name are optional:
<letter> gives the flag's one-letter abbreviation, which must
not conflict with the one-letter abbreviation of another flag that
could be applied to the same object type(s). It defaults to none, which
means it won't appear in a list of flag characters but can still be
tested for with hasflag(), andlflags(), and orlflags().
<type> specifies the space-separated list of types to which the flag
applies, and may be 'any' or one or more of 'room', 'thing', 'player',
or 'exit'. It defaults to 'any'.
<setperms> specifies the space-separated list of permissions for who can
set and/or see the flag. See 'help flag permissions' for details.
It defaults to 'any'
<unsetperms> specifies the space-separated list of permissions for who
can clear the flag on an object they control. It defaults to
whatever <setperms> is given, or 'any'.
Flags added with @flag/add are saved with the database when it is dumped, and do not need to be re-added at startup. They are treated exactly as any other flag in the server.
@follow
- @follow <object>=<message>
Sets the message shown to someone after they begin following the object (using the 'follow' command).
@force
- @force[/noeval] <object>=<command>
This forces the object to perform the command just as if it had typed it in itself. Only wizards may @force other players. You can @force any object which you own or control. Useful for manipulating puppets. If <object> is not in the same room as you, you can instead use the object's dbref number.
@force can be shortened to @fo or @for, or abbreviated as:
<dbref #> <command>
(continued in help @force2)
@force2
Normally, the command is parsed for function evaluation and substitutions twice - once when @force is run, once when the forcee runs the command. @force/noeval will only evaluate the command when the forcee runs it.
Examples: @create Lackey > Created: Object #103 @fo Lackey = go east > Lackey goes east. > Lackey has left. @fo #103 = page Cyclonus = Hi there! > Lackey pages: Hi there! #103 page Cyclonus = Whee > Lackey pages: Whee
@FORWARDLIST
- @forwardlist <object>[=<listofdbrefs>]
When an object set AUDIBLE hears sound that passes its @filter, its @forwardlist attribute is checked, and if present, the sound (Prefixed by the object's @prefix attribute) is forwarded to all the dbrefs in the @forwardlist, like puppets do to their owners.
The @forwardlist must be a space-seperated list of dbrefs. In order to forward to an object, you must either control it, have the pemit_all power, or, if it has a @lock/forward set, pass its @lock/forward. (If you want to allow all objects you own to forward to you, regardless of whether or not they control you, use @lock/forward me=$me)
@function
@function [<function name>]
@function[/preserve] <name>=<obj>,<attrib>[,<min args>,
<max args>[,<restrictions>]]
or @function <function name>=<object>/<attribute>
@function/<switch> <function name>
@function/restrict[/builtin] <function name>=<restrictions>
When used without any arguments, this command lists all global user-defined functions. For wizards and others with the Functions power, it also lists the dbref number and attribute corresponding to the listed functions.
When used with a function name, it displays some information about how that function is parsed, and how many arguments it takes.
<switch> can be one of: /disable, to disable a built in function. /enable, to re-enable it. /delete, to remove a user-defined function. /restrict, to change the restriction flags on an existing function.
Otherwise, this command defines a global function with the name <function name>, which evaluates to <attribute> on <object>. (continued in help @function2)
@function2
<object> can be anything that the player using the @function command controls (if safer_ufun is enabled) or can examine (if not). <function name> must be 30 characters or less.
A function defined using @function works just like any of the normal MUSH functions, from the user's perspective. The functions are executed by the object, with its powers.
Functions defined via @function should follow the format used by UFUN() - %0 is the first argument passed, %1 is the second argument passed, and so forth. Optional third and fourth arguments to @function can be used to set a parser-enforced number of arguments for the function. An optional fifth argument will set restriction flags.
The /preserve switch, for MUX compability, does the same thing as the 'localize' restriction - treats the attribute that's evaluated as if it were called with ulocal() instead of u().
Example:
Example:
> &WORD_CONCAT #10=%0 %1
> say "[ufun(#10/word_concat,foo,bar)]
You say, "foo bar"
Example:
> @function word_concat = #10, word_concat
> say "[word_concat(foo,bar)]
You say, "foo bar"
(continued in help @function3)
@function3
Global user-defined functions are not automatically loaded when the game is restarted. In order to avoid objects which attempt to use functions that have not been loaded, a @startup containing @function commands should be set on a wizard object with as low a dbref number as possible; object #1 (generally God) is suggested for this use.
For example, if you have one object that stores all your global functions, you could set the following command (the object is #100 in the example):
@startup #1=@dol lattr(#100)=@function ##=#100,##
And then store each function as an attribute of the same name on object #100. (continued in help @function4)
@function4
Normally, built in functions cannot be overriden by @functions. However, if a built-in function is deleted with @function/delete, you can then make a @function with the same name. "Deleted" built-ins can still be called through the FN() function, and can have restrictions applied with @function/restrict/builtin. @function/restore will delete the @function and turn the built in version back on.
Using @function on an already-added @function will delete the old one and install a new function with none of the settings of the old one kept.
Example:
@function/delete ansi
&ansi_fun #1234=%1
@function ansi=#1234, ansi_fun, 2, 2, noguest
will create a new version of ansi() that doesn't do any colorization, and that requires it to be called with exactly 2 arguments, like the built-in version. It will be restricted to non-guest players.
FAILURE
FAILURE
A "failure" usually occurs when you try to do something that is governed by an @lock and you don't pass the lock. If you try to take a player or thing, and you don't pass their @lock, you will set off their @fail/@ofail/@afail attributes. If you try to go through an exit, and you don't pass its @lock, you will similarly set off its @fail/@ofail/@afail. Other failure sets include:
Failing to enter an object (@efail, @oefail, @aefail)
Failing to leave an object (@lfail, @olfail, @alfail)
Failing to use an object (@ufail, @oufail, @aufail)
Other failures (&<lock>`FAILURE, &<lock>`OFAILURE, &<lock>`AFAILURE)
where the <lock> can be: FOLLOW_LOCK, PAGE_LOCK
Many other things can also be locked -- see @lock and locktypes for more information. However, there are failure messages at this time only for the above.
FDIV()
- fdiv(<numerator>, <denominator>)
Returns the quotient of the two numbers. Note that the DIV() and MOD() functions cannot be used on floating point numbers.
FILTER()
- filter([<obj>/]<attr>, <list>[,<delimiter>[, <osep>]])
- filterbool([<obj>]/<attr>, <list>[,<delimiter>[, <osep>]])
This function returns the elements of <list> for which a user-defined function evaluates to "1", or to a boolean true value if filterbool() is used. That function is specified by the first argument (just as with the ufun() function), and the element of the list being tested is passed to that user-defined function as %0.
Thus, "filter(obj/attr, x1 x2 x3)" is nearly equivalent to "iter(x1 x2 x3, switch(ufun(obj/attr, ##),1,##,))" though the iter version may have extra blank spaces.
Example:
Example:
> &IS_ODD test=[mod(%0,2)]
> say [filter(test/is_odd, 1 2 3 4 5 6)]
You say, "1 3 5"
FINDABLE()
- findable(<object>, <victim>)
This function returns 1 if <object> can locate <victim>, or 0, if it cannot. If one of the objects does not exist, it will return #-1 ARGN NOT FOUND (where N is the argument which is the invalid object).
FIRST()
- first(<list>[,<delimiter>])
Returns the first element of a list.
FIRSTOF()
- firstof(<expr1>, <expr2>[, ... , <exprN>])
Returns the first evaluated expression that is true. If no arguments are true, then the last argument, <exprN>, is returned as the default expression, whether it is true or false.
The meaning of true or false is dependent on configuration options as explained in the 'BOOLEAN VALUES' help topics.
This function does evaluate each argument while testing, including side-effects, stopping (short-circuits) when the true expression is found.
Example:
> say firstof(0,2)
You say, "2"
> say firstof(10,11,0)
You say, "10"
> say firstof(grab(the cat,mommy),grab(in the hat,daddy),#-1 Error)
You say, "#-1 Error"
> say firstof(get(%#/royal cheese),#-1 This Has No Meaning,0,)
You say, ""
FIXED
Flag: FIXED (players)
When this flag is set on a player, it prevents them or any of their objects from using the @tel or home command. The only exception is that a player's objects are permitted to @tel themselves to the player's inventory.
FLAG LIST
Flag Title Flag Title Flag Title
-----------------------------------------------------------------------
A - Abode, Ansi C - Chown_Ok, Color D - Dark
E - Exit (type) F - Floating, Fixed G - Going
H - Haven I - Trust/Inherit J - Jump_Ok, Judge
L - Link_Ok M - Monitor N - No_Tel, No_Leave
O - Opaque P - Player (type) Q - Quiet
R - Room (type) S - Sticky T - Thing (type)
U - Unfindable V - Visual W - Wizard
X - Safe Z - Shared, Z_Tel
a - Audible b - Debug c - Connected
d - Destroy_Ok e - Enter_Ok g - Gagged
h - Halt i - Orphan j - Jury_Ok
k - Keepalive l - Light m - Myopic, Mistrust
n - No_Command o - On-Vacation p - Puppet, Paranoid
r - Royalty s - Suspect t - Transparent
u - Uninspected v - Verbose w - No_Warn
x - Terse, Cloudy ? - Unregistered ^ - Listen_Parent
~ - Noaccents " - NoSpoof
-----------------------------------------------------------------------
Some flags may not be enabled on some MUSHes. @flag/list will show
which are available.
flag permissions
The following permissions can be used when specifying whether <actor> may set or clear a flag on an <object> they control:
trusted <actor> must pass a TRUST check (see help TRUST)
royalty <actor> must be ROYALTY or WIZARD
wizard <actor> must be WIZARD
god <actor> must be God (#1)
The following permissions can be used to specify whether <looker> can see the flag on an <object>, and are given along with the <setperms> in @flag/add. By default, anyone can see the flag:
dark <actor> must be Only God (#1) to see the flag on objects.
mdark <actor> must be WIZARD or ROYALTY
odark <actor> must own the <object> (or be WIZARD or ROYALTY)
The following permissions control other behavior related to the flag:
log Log when the flag is set or cleared. Only meaningful in
<setperms>.
FLAGS
- @set <object>=[!]<flagname>
Flags give objects certain abilities or qualities. For example, a wizard player has wiz powers because s/he has the WIZARD flag set.
Some flags can only be set on certain types of objects, such as just players or just rooms. Other flags, like VISUAL, can be set on any type of object (player, room, exit, thing).
To un-set a flag, use the exclamation point (!) before the flag name. For help on any particular flag, type: help <flag name>
A descriptive list of flags is available in: help flag list A complete list of flags is available through: @flag/list
(continued in help flags2)
FLAGS()
- flags(<object>)
- flags(<object>/<attribute>)
- flags()
Flags returns a string consisting of the flags attached to the object or the attribute on the object. The string is a single word made up of all the appropriate flag letters.
Given no arguments, this function returns a string consisting of all the flag letters of all the flags the server knows. Note that some flags may not have flag letters, and multiple flags may have the same letter (and will appear twice).
FLAGS2
You can see the list of flags set on an object in several ways.
1. If you are allowed to examine the object. The flags are listed in expanded word format on the line just below the object's name, after the word "Flags:". 2. Flag abbreviations are also visible after the object's name in the room description (if the object is not set OPAQUE and you are not set MYOPIC). 3. The flags() function will also return the object's list of flag abbreviations.
Note: ROOM, PLAYER, EXIT, and GARBAGE are special flags which indicate the TYPE of an object. The absence of these four special flags indicates the object is of type THING.
See also: examine, flags(), hasflag(), orflags(), andflags(), orlflags(), andlflags(), types of objects, type(), hastype(), @flag
FLIP()
- flip(<string>)
- reverse(<string>)
This function reverses a string. For example, "flip(foo bar baz)" returns "zab rab oof".
FLOATING
Flag: FLOATING (rooms)
If a room is set floating, you will not be notified every 10 minutes or so that you have a disconnected room. A disconnected room may mean (depending on how the MUSH is configured) a room that can't be reached from room #0, or a room that can't be reached from room #0 and has no exits.
FLOOR()
Returns the greatest integral value less than or equal to <number>.
FMOD()
- fmod(<number>, <divisor>)
Identical to mod() but may take floating point arguments. The return value is the (possibly floating point) smallest positive remainder left after subtracting the largest number of multiples of <divisor> from <number>.
Example:
> think fmod(6.1,2.5)
1.1
FN()
- fn(<function name>,<arguments>...)
This function performs the given <function name> using only built-in functions (that is, it prevents any @functions from being evaluated). It is thus useful within @functions that override built-ins in order to be able to call the built-in. Example:
Example:
> &BRIGHT_PEMIT #10 = [fn(pemit,%0,-->[ansi(h,%1)])]
> @function/delete PEMIT
> @function PEMIT=#10,BRIGHT_PEMIT
> think pemit(me,test)
-->test (in highlighted letters)
To restrict the use of fn() to @functions only (to prevent players from skirting softcoded replacements), use @function/restrict fn=userfn.
See also: @function, RESTRICT
FOLD()
- fold([<obj>/]<attr>, <list>[, <base case>[,<delimiter>]])
This function "folds" a list through a user-defined function, specified by the first argument to fold(), which is analogous to ufun()'s first argument.
If no base case is provided, fold() passes the first element of <list> as %0, and the second element of <list> as %1, to the user-defined function. The user-defined function is then called again, with the result of the first evaluation being %0, and the next (third) element of the list as %1. This is repeated until all the elements of the list have been used.
If a base case is provided, it is passed as %0, and the first element of list is passed as %1, to the user-defined function. The process for the no-base-case fold() is then used.
See 'help FOLD2' for examples.
FOLD2
Examples:
Example:
> &REP_NUM test=%0[repeat(%1,%1)]
> say [fold(test/rep_num,1 2 3 4 5)]
You say, "122333444455555"
> say [fold(test/rep_num,1 2 3 4 5,List:)]
You say, "List:122333444455555"
Example:
> &ADD_NUMS test=add(%0,%1)
> say [fold(test/add_nums,1 2 3 4 5)]
You say, "15"
FOLDERSTATS()
- folderstats()
- folderstats(folder#)
- folderstats(player)
- folderstats(player,folder#)
FOLDERSTATS() returns the number of read, unread, and cleared messages in a specific folder, or, if none is given, the player's current folder. Only Wizards may use forms which get other players' mail information.
follow
If you pass the object's follow lock, you begin following it. As the object moves around (except if it @teleports away or goes home), you will automatically move around with it, so long as you pass all the locks and enter/leave locks on the exits and things the object moves through. This doesn't prevent you from going somewhere else on your own.
See also: unfollow, dismiss, desert, followers(), following(), @follow, @ofollow, @afollow
FOLLOWERS()
Returns the list of things and players following object. You must control object.
FOLLOWING()
Returns the list of things and players that the object is following. You must control object.
FOREACH()
- foreach([<object>/]<attribute>, <string>[, <start>[, <end>]])
Maps a function onto a string.
Each character in <string> has the user-defined function of the first argument performed on it; the character is passed to the function as %0, and its position in the string as %1 (the first character has position 0). The results are concatenated. If a start character is given, everything before that character is copied without passing it to the function, and everything after it until the end of the string or an end character is passed to the function. Anything left after the end character is also copied unevaluated. The start and end characters themselves are not copied.
Continued in HELP FOREACH2
FOREACH2
Examples:
Example:
> &add_one me=[add(%0,1)]
> say [foreach(add_one, 54321)]
You say, "65432"
Example:
> say [foreach(add_one, This is #0# number, #, #)]
You say, "This is 1 number"
Example:
> &is_alphanum me=[regmatch(%0, \[\[:alnum:\]\])]%b
> say [foreach(is_alphanum,jt1o+)]
You say, "1 1 1 1 0 "
FRACTION()
This function returns a fraction representing the floating-point <number>. Since not all numbers can be expressed as a fraction, dividing the numerator by the denominator of the results will not always return the original <number>, but something close to it.
Example:
> think fraction(.75)
3/4
> think fraction(pi())
348987/111086
> think fraction(2)
2
FULLALIAS()
fullalias() returns the alias of <player>. It is identical to alias() except when multiple aliases are set, fullalias() returns the complete alias list.
>"[fullalias(Noltar)] You say, "$;No;Nol;Noli;Nolt"
Related functions: ALIAS()
FULLNAME()
Fullname() returns the name of object <object>. It is identical to name() except that for exits, fullname() returns the complete exit name, including all aliases.
>"[fullname(south)] You say, "South;sout;sou;so;s"
Related functions: NAME(), ACCNAME(), INAME()
FUNCTION LIST
Several major variants of functions are available. The help topics are listed below, together with a quick summary of the function type and some examples of that type of function.
Attribute functions: attribute-related manipulations (GET, UFUN) Bitwise functions: Manipulation of individual bits of numbers (SHL, BOR) Boolean functions: produce 0 or 1 (false or true) answers (OR, AND) Channel functions: Get information about channels (CTITLE, CWHO) Communication functions: Send messages to objects (PEMIT, OEMIT) Connection functions: Get information about a player's connection (CONN) Dbref functions: return dbref info related to objects (LOC, LEXITS) Html functions: output html tags for Pueblo-compatible clients Information functions: find out something about objects (FLAGS, MONEY) List functions: manipulate lists (REVWORDS, FIRST) Mail functions: manipulate @mail (MAIL, FOLDERSTATS) Math functions: number manipulation, generic or integers only (ADD, DIV) Regular expression functions: Regular expressions (REGMATCH, REGEDIT) SQL functions: Access SQL databases (SQL, SQLESCAPE) String functions: string manipulation (ESCAPE, FLIP) Time functions: Formatting and display of time (TIME, CONVSECS) Utility functions: general utilities (ISINT, COMP)
The command "@config/functions" lists all of the game's built-in functions.
The command "@function" lists all of the game's custom global functions
defined via the @function command.
FUNCTIONS
Functions are specialized commands used to manipulate strings and other input. Function take the general form: [FUNCTION(<input>)]
The brackets are used to delimit and force evaluation of the function (or nested functions). The brackets can also be used to group functions for the purposes of string concatenation. In general, more than one pair of brackets is not required, but you can nest an arbitrary number of brackets.
Example:
> say [first(rest(This is a nice day))]
You say, "is"
> @va me=This is a
Wizard - Set.
> @vb me=nice day
Wizard - Set.
> say [first([rest([v(va)] [v(vb)])])]
You say, "is"
See "help FUNCTIONS2" for more.
FUNCTIONS()
Returns a space-separated list of the names of functions. If <arg> is "local", only @functions are listed. If "builtin", only builtin functions. If "all" or omitted, both are returned.
FUNCTIONS2
A list of available built-in functions can be obtained via the command "@config/functions". In the help text, the list is under the topic "FUNCTION LIST".
In addition to these built-in functions are MUSH-defined "global user functions." These are defined by wizards or those with the "Function" power, via the "@function" command. To the user, they act just like the built-in game functions. For details on global user functions, see "help @function".
Generated at Mon Jul 2 00:35:04 2007