@-ATTRIBUTES
These '@' commands set standard message/action sets on objects. Each comes
in 3 versions: @<whatever>, @o<whatever>, and @a<whatever>. Only the
@<whatever> version is listed below, but help is available for each:
@death @describe @drop @efail @enter
@failure @follow @give @idescribe @leave
@lfail @move @payment @receive @success
@tport @ufail @unfollow @use @zenter
@zleave
These '@' command set other standard attributes on objects that don't
follow the pattern above:
@aahear @aclone @aconnect @adisconnect @amail
@amhear @away @charges @conformat @cost
@descformat @ealias @exitformat @filter @forwardlist
@haven @idescformat @idle @infilter @inprefix
@lalias @listen @nameformat @oxenter @oxleave
@oxmove @oxtport @prefix @runout @sex
@startup
See also: ATTRIBUTES, NON-STANDARD ATTRIBUTES
@-BUILDING
These '@' commands are building-related (they create or modify objects):
@atrlock @atrchown @chown @chzone @clone
@cpattr @create @destroy @dig @elock
@eunlock @firstexit @link @lock @mvattr
@name @nuke @open @parent @recycle
@set @undestroy @ulock @unlink @unlock
@uunlock @wipe
@-GENERAL
These '@' commands are general utility and programming commands:
@@ @alias @break @channel @chat
@cemit @command @config @decompile @doing
@dolist @drain @edit @emit @entrances
@find @force @function @gedit @grep
@halt @lemit @listmotd @mail @notify
@nsemit @nslemit @nsoemit @nspemit @nsprompt
@nsremit @nszemit @oemit @password @pemit
@prompt @ps @remit @restart @scan
@search @select @stats @sweep @switch
@teleport @trigger @verb @version @wait
@whereis @zemit
@-WIZARD
These '@' commands are only usable by wizards or privileged players:
@allhalt @allquota @boot @chownall @chzoneall
@comment @dbck @disable @dump @enable
@flag @hide @hook @kick @log
@motd @newpassword @pcreate @poll @poor
@power @purge @quota @readcache @rejectmotd
@shutdown @sitelock @sql @squota @uptime
@wall @wizmotd @wizwall cd ch
cv
@@
@@ [<text>]
The "@@" command does nothing; it does not evaluate its input or show
any messages to the executor. It can be used for commenting code.
Example:
> @va me=$testing: @emit Test ; @@ Just a test ; @vb me=Testing
See also: @@(), null()
@@()
@@(<expression>)
null(<expression>[, ... , <expression>])
The @@() function does nothing and returns nothing. It does not evaluate
its argument. It could be used for commenting, perhaps.
The null() function is similar, but does evaluate its argument(s),
so side-effects can occur within a null(). Useful for eating the
output of functions when you don't use that output.
See also: @@
@AAHEAR
@ahear <object>[=<action list>]
@amhear <object>[=<action list>]
@aahear <object>[=<action list>]
Sets the actions to be taken after the object's @listen is matched.
@ahear will only be triggered by sound made by other objects, and
@amhear is only triggered by sound made by <object> itself. @aahear
will be triggered by all matching sound, regardless of the source.
See also: @listen, LISTENING, ACTION LISTS
@ABUY
@buy <object>[=<message>]
@obuy <object>[=<message>]
@abuy <object>[=<message>]
These attributes contain the message shown to a player who successfully
buys something from <object> using the "buy" command, the message shown to
others in the room when something is bought from <object> (prefixed with
the buyer's name), and the actions to be taken by <object> when something
is bought from it, respectively. Each attribute is passed the item being
purchased as %0 and the amount paid for it as %1.
Example:
> @buy Vendor=udefault(me/buy`%0,You buy %0 for %1 [money(%1)]., %0, %1)
> @obuy Vendor=hands some money to [name(me)] for [art(%0)] %0.
> @abuy Vendor=:goes into the storeroom. ; @wait 2=:returns with %n's %0.
See also: buy, @pricelist, MONEY, @lock, VERBS, @cost, give
@ACLONE
@aclone <object>=<action list>
Sets the actions to be taken by <object> whenever it's @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 are no @clone or @oclone attributes.
See also: @clone, @create, ACTION LISTS
@ACONNECT
@aconnect <object>=<action list>
Sets the actions to be taken by <object> when a player connects to the game.
@aconnects are triggered on connecting players, their locations (if the
room_connects @config option is true), their zone object/objects in their
zone master room, and objects in the Master Room.
Note that long and spammy @aconnect messages, whether in your room or
on a channel, are frequently found annoying by other players.
One argument is passed to @aconnect:
%1 = number of player connections (1 if this is an initial connect)
Example:
> @aconnect me=+who ; +bbscan
See also: @adisconnect, ACTION LISTS
@ADEATH
@death <object>[=<message>]
@odeath <object>[=<message>]
@adeath <object>[=<action list>]
These attributes contain the message shown to the killer, the message
shown to others in the room, and the actions to be taken when <object>
is killed.
Example:
> @death me=You have just slain Cyclonus!
> @odeath me=falls to the ground and vanishes.
See also: kill, BEING KILLED, ACTION LISTS, VERBS
@ADESCRIBE
@odescribe <object>[=<message>]
@adescribe <object>[=<action list>]
These attributes contain the message shown to others in the enactor's
location when he looks at <object>, and the actions to be taken by <object>
when someone looks at it. (See 'help @describe' for the attribute shown
to the enactor when he looks at <object>.) When the enactor is inside
<object>, the @oidescribe and @aidescribe attributes will be used instead,
if set. Please note that using these attributes to show long messages is
often found annoying.
Examples:
> @odescribe Walker=glances at Walker and sniggers.
> @adescribe me=think %n just looked at you.
See also: look, @describe, @idescribe, ACTION LISTS
@ADESTROY
@adestroy <object>[=<action list>]
The adestroy attribute is triggered when <object> is @destroyed. It can
only be set by wizards. Because the attribute is triggered when <object>
is @destroyed, not when the object is actually purged from the database,
it's possible for <object> to be @undestroyed after the adestroy has run.
Please note that there are no destroy or odestroy attributes.
See also: @destroy, @undestroy
@ADISCONNECT
@adisconnect <object>[=<action list>]
Sets the actions to be taken by <object> when a player disconnects
from the game. @adisconnects are triggered on disconnecting players,
their locations (if the room_connects @config option is true),
their zone object/objects in their zone master room, and objects in
the Master Room.
Several arguments 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
%5 = 1 if the descriptor was hidden on disconnect, 0 otherwise
Example:
> @adisconnect me = home
See also: @aconnect, ACTION LISTS, recv(), sent(), cmds()
@ADROP
@drop <object>[=<message>]
@odrop <object>[=<message>]
@adrop <object>[=<action list>]
When <object> is a player or thing, the @drop attribute is shown to whoever
drops <object>, and @odrop to others in the location <object> is dropped
in. The @adrop attribute is triggered when <object> is dropped.
When <object> is an exit, @drop is shown to objects going through <object>,
and @odrop is shown to objects in the exit's destination. @adrop is
triggered when someone passes through the exit.
Example:
> @drop Box=You put the box down gently.
> @odrop Box=puts the box down gently.
> @odrop South=arrives from the North.
See also: drop, empty, ACTION LISTS, VERBS, @success
@AEFAIL
@efail <object>[=<message>]
@oefail <object>[=<message>]
@aefail <object>[=<action list>]
These attributes contain the message shown to someone who fails to enter
<object>, the message shown to others when someone fails to enter <object>,
and the actions to be taken when someone fails to enter it, respectively.
See also: enter, @enter, FAILURE, ACTION LISTS, VERBS
@AENTER
@enter <object>[=<message>]
@oenter <object>[=<message>]
@oxenter <object>[=<message>]
@aenter <object>[=<action list>]
These attributes contain the messages shown to someone who enters <object>,
the message shown to others inside <object> when someone enters it, the
message shown to those in <object>'s location when someone enters it, and
the actions to be taken by <object> when someone enters it, respectively.
The old location of the entering object is passed in %0, if <object>
had permission to see it there.
Example:
> @enter Sofa=You sit on the comfy sofa.
> @oenter Sofa=sits with you on the sofa.
> @oxenter Sofa=sits down on the sofa. It looks comfy.
> @aenter Sofa=@pemit/silent owner(me)=%n sat down on [name(me)]!
See also: enter, @ealias, leave, ACTION LISTS, VERBS
@AFAILURE
@failure <object>[=<message>]
@ofailure <object>[=<message>]
@afailure <object>[=<action list>]
@failure contains the message shown to someone who fails to pass <object>'s
Basic @lock. @ofailure contains the message shown to others, and @afailure
contains the actions to be taken by <object>.
For players and things, this means failure to get/take. For exits, it means
failure to go through the exit. For rooms the lock is checked when objects
"look" inside the room, though failure to pass the lock does not prevent
the object from looking.
See also: get, move, @lock, ACTION LISTS, VERBS, @success
@AFOLLOW
@follow <object>[=<message>]
@ofollow <object>[= <message>]
@aunfollow <object>[=<action list>]
Sets the message shown to someone who begins following <object>,
the message shown to others in the room, and the actions to be taken
by <object> when someone begins following it, respectively. The name
of the person following <object> is automatically prepended to the
@ofollow message.
See also: follow, unfollow, @unfollow, followers(), ACTION LISTS, VERBS
@AGIVE
@give <giver>[=<message>]
@ogive <giver>[=<message>]
@agive <giver>[=<action list>]
These attributes contain the message shown to <giver> when he gives an
object, the message shown to others in <giver>'s location when he gives an
object, and the actions to be taken by <giver> when he gives an object,
respectively.
In all cases, %0 is the dbref of the object being given, and %1 is the
dbref of the recipient.
See also: give, @receive, ACTION LISTS, VERBS
@AHEAR
@ahear <object>[=<action list>]
@amhear <object>[=<action list>]
@aahear <object>[=<action list>]
Sets the actions to be taken after the object's @listen is matched.
@ahear will only be triggered by sound made by other objects, and
@amhear is only triggered by sound made by <object> itself. @aahear
will be triggered by all matching sound, regardless of the source.
See also: @listen, LISTENING, ACTION LISTS
@AIDESCRIBE
@idescribe <object>[=<description>]
@oidescribe <object>[=<message>]
@aidescribe <object>[=<action list>]
@idescribe command sets the internal description for an object, which is
shown to anyone who enters or looks while inside the object. It's only
used for players and things; rooms and exits always use @describe.
The @oidescribe attribute is shown to others inside <object> when someone
looks at the @idescribe, and the @aidescribe is triggered when someone
lookst at the @idescribe.
If there is no IDESCRIBE set for an object, those who enter or look inside
it will see its @describe. In this case, others in the object will see
nothing, and the @aidescribe will not be triggered. If you want to use
@aidescribe without @idescribe, set @idescribe to a blank string, or to
u(describe) to show the description.
See also: enter, @enter, ENTER_OK, @describe, look, @idescformat, VERBS
@ALEAVE
@leave <object>[=<message>]
@oleave <object>[=<message>]
@oxleave <object>[=<message>]
@aleave <object>[=<action list>]
These attributes contain the message shown to anyone leaving <object>,
the message shown to others inside <object> when someone leaves it, the
message shown to others in <object>'s location when someone leaves it, and
the actions to be taken by <object> when someone leaves it, respectively.
The leaver's new location is passed in %0, if <object> has
permission to see it there.
See also: leave, @oxleave, @lfail, ACTION LISTS, VERBS
@ALFAIL
@lfail <object>[=<message>]
@olfail <object>[=<message>]
@alfail <object>[=<action list>]
These attributes contain the message shown to objects who try to leave
<object> and fail, the message shown to others inside <object> when
someone fails to leave, and the actions to be taken by <object> when
someone attempts to leave it and fails.
Such a failure usually occurs because <object> is set NO_LEAVE, or
because the person trying to leave does not pass <object>'s @lock/leave.
See also: leave, @leave, NO_LEAVE, locktypes, ACTION LISTS, VERBS
@ALIAS
@alias <player>[=<name1>[;<name2>[;...;<nameN>]]]
@alias <object>[=<string>]
For players and exits, the ALIAS attribute has special meaning: it contains
a list of aliases (separated by semicolons) which can be used instead of
its name to refer to the player or exit.
Players can only have a limited number of aliases; the number is controlled
by the 'max_aliases' @config option. The same rules which apply to player
names also apply to aliases, and you cannot use another player's name as
your alias (though you can include your own name in your aliases, and can
change your name to one of your aliases).
If the 'page_aliases' @config option is on, the first alias in the list is
shown along with the player's name when they page others.
Exit aliases used to be a part of their name, though all newly created
exits use @alias instead.
For other types of object, @alias has no special meaning.
See also: @name, alias(), fullalias()
@ALLHALT
@halt <object>[=<action list>]
@halt/pid <pid>
@halt/all
@allhalt
The @halt command removes all queued actions for <object>. If given,
<action list> is placed in the queue for the object instead. If no action
list is specified, the object is set HALT.
If <object> is a player, it clears the queue for the player and all of
his objects. You can use "@halt me" to clear your own queue without
setting yourself HALT.
Only wizards and objects with the halt @power can @halt other player's
objects. Note that halting an object does NOT affect any objects waiting
on it as a semaphore.
@halt/pid will cancel a single queue entry with the given pid (the
number in parenthesis before it in @ps). You must control the object
that queued the command or have the halt power to do this.
@halt/all is a synonym for @allhalt, and is a wizard-only command
which halts all objects in the game in an effort to free up the queue.
See also: @wait, @ps, SEMAPHORES, @drain, @notify
@ALLQUOTA
@allquota[/quiet] [<limit>]
This is a God-only command which is only available if the use_quota @config
option is true. If /quiet is not given, it displays a list of all players,
showing how many objects they own and how many more they can create. If a
<limit> is given, every players quota is altered either to <limit> or to
the number of objects they currently own, whichever is higher.
See also: @quota, @squota
@AMAIL
@amail <object>=<action list>
Sets the actions to be taken by <object> whenever it receives @mail.
Admin-only, and is only triggered if enabled via the amail configuration
option.
See also: @mail
@AMHEAR
@ahear <object>[=<action list>]
@amhear <object>[=<action list>]
@aahear <object>[=<action list>]
Sets the actions to be taken after the object's @listen is matched.
@ahear will only be triggered by sound made by other objects, and
@amhear is only triggered by sound made by <object> itself. @aahear
will be triggered by all matching sound, regardless of the source.
See also: @listen, LISTENING, ACTION LISTS
@AMOVE
@move <object>[=<message>]
@omove <object>[=<message>]
@oxmove <object>[=<message>]
@amove <object>[=<action list>]
These attributes contain the message shown to <object> immediately after
it moves, the message shown to others in the room <object> moves into, the
message shown to objects in the location <object> leaves, and the actions
to be taken when <object> moves, respectively. Please note that long
@omoves are frequently found annoying.
The <object>'s new location is in %0 and the old location it moved
from in %1.
Example:
> @move me=You moved! You are now in the room: [name(here)].
> @omove me=stalks into the room wearing a malevolent expression.
> @oxmove me=stalks away, glaring.
See also: goto, @oxmove, ACTION LISTS, VERBS
@ANAME
@oname <object>[=<message>]
@aname <object>[=<action list>]
Whenever <object>'s name is changed (via @name), others in the same
location will see the contents of <object>'s ONAME attribute, prepended
with <object>'s new name. At the same time, <object>'s ANAME attribute
will be triggered. Both attributes receive the old name as %0, and the new
name as %1.
Example:
> @oname me=has regenerated from %0!
> @aname me=think >> Renamed from %0 to %1 at [time()] by %n(%#).
See also: @name, name(), VERBS
@APAYMENT
@payment <object>[=<message>]
@opayment <object>[=<message>]
@apayment <object>[=<action list>]
These attributes contain the messages shown to someone who pays <object>
pennies with the "give" command, the message shown to others when someone
pays <object>, and the actions to be taken by <object> when it's paid. Each
attribute is passed the number of pennies paid as %0.
Example:
> @payment Collecting Tin=Thank you for your donation!
> @opayment Collecting Tin=makes a donation to charity.
> @apayment Collecting Tin=&%# me=%0 at [time()]
See also: give, @cost, buy, MONEY, ACTION LISTS, VERBS
@ARECEIVE
@receive <recipient>[=<message>]
@oreceive <recipient>[=<message>]
@areceive <recipient>[=<action list>]
These attributes contain the message shown <recipient> when he receives an
object (via 'get' or 'give'), the message shown to others in <recipient>'s
location when he receives an object, and the actions to be taken by
<recipient> when he receives an object, respectively.
In all cases, %0 is the dbref of the object received. If the object was
'give'n, %1 will be the dbref of the giver.
See also: give, get, @give, @success, ACTION LISTS, VERBS
@ASSERT
@break[/queued] <boolean>[=<action list>]
@assert[/queued] <boolean>[=<action list>]
@break stops the execution of further commands in the current action list
if <boolean> is a true value. It doesn't affect new queue entries made by
previous commands in the action list. It can be useful for doing error
checking without having to nest @switches and suffer from delayed execution
because of queueing.
If <action list> is given, it is executed instead of the rest of the
commands in the current action list. By default, <action list> is run
immediately, replacing the rest of the action list @break was called in. If
the /queued switch is given, <action list> will instead be queued to be run
later. @break also accepts an /inline switch, for Rhost compatability; this
switch does nothing on PennMUSH.
@assert does the inverse: it stops execution if <boolean> evaluates to
false.
See 'help @break2' for examples.
See also: ACTION LISTS, QUEUE, BOOLEAN VALUES, @switch
@ASSERT2
Examples:
> @va obj=$testme *: @pemit %#=You try a test ;
@break lt(%0,10)=@pemit %#=But you're too low! ;
@pemit %#=And you succeed!
> testme 0
You try a test
But you're too low!
> testme 10
You try a test
And you succeed!
> @force me={@switch 1=1, think Third; think First; @break 1; think Second}
First
Third
(The @switch is run, which queues 'think Third', think First is
run, displaying 'First', command execution is broken (so we never
think Second), and then the queued 'think Third' is run, displaying
Third. If you figured that out, you have a very good understanding
of the PennMUSH queue. :)
@ASUCCESS
@success <object>[=<message>]
@osuccess <object>[=<message>]
@asuccess <object>[=<action list>]
For players and things, these attributes contain the message shown to
someone who picks up <object> with the "get" command, the message shown
to others when someone gets <object>, and the actions to be taken by
<object> when someone gets it, respectively.
For exits, they contain the message shown to an object passing through the
exit <object>, the message shown in the exit's source when someone passes
through it, and the actions to be taken by the exit when someone passes
through it, respectively.
Example:
> @success Door=You open the door and step inside.
> @osuccess Door=opens the door and steps inside.
> @success Box=You pick up the box.
> @osuccess Box=picks up the box.
See also: get, goto, @lock, SUCCESS, FAILURE, @odrop, ACTION LISTS, VERBS
@ATPORT
@tport <object>[=<message>]
@otport <object>[=<message>]
@oxtport <object> [=<message>]
@atport <object>[=<action list>]
These attributes contain the message shown to <object> when it is
teleported, the message shown to others in the room <object> is teleported
to, the message shown to others in the room <object> is teleported from,
and the actions to be taken by <object> when it disappears, respectively.
In all of these attributes, %0 is the object which teleported <object>,
and %1 is <object>'s old location.
Example:
> @tport me=name(%0) has teleported you from [name(%1)] to [name(here)].
> @otport me=appears in a puff of smoke.
> @oxtport me=disappears in a puff of smoke.
See also: @teleport, ACTION LISTS, VERBS
@ATRCHOWN
@atrchown <object>/<attribute>=<new owner>
This command changes the ownership of the attribute <attribute> on <object>
to <new owner>. You can only @atrchown attributes which you can set.
Wizards can @atrchown to any player, while mortals can only @atrchown
attributes to themselves. Only players can own attributes; if <new owner>
is not a player, <new owner>'s owner is used instead.
See also: @atrlock, ATTRIBUTES, NON-STANDARD ATTRIBUTES
@ATRLOCK
@atrlock <object>/<attribute>
@atrlock <object>/<attribute=[on|off]
The first form of this command tells you whether or not the given attribute
is locked.
The second form attempts to lock (for 'on') or unlock (for 'off') the given
attribute. You automatically gain ownership of the attribute (as per
@atrchown) when you lock it. Locked attributes cannot be altered by anyone
but Wizards and the attribute's owner (though the owner may be unable to
alter the attribute for other reasons, such as not controlling <object>).
You must be able to set an attribute in order to lock it.
See also: atrlock(), @atrchown, ATTRIBUTES, NON-STANDARD ATTRIBUTES
@ATTRIBUTE
@attribute <attrib>
The @attribute command displays and modifies the MUSH's standard attributes
(see "@list/attribs" for a list of them).
Since 1.8.5p1, changes to the attribute table are saved across reboots and
shutdowns, and don't need to be placed in an @startup.
The first form of the command displays the full name of the attribute
<attrib>, along with the its attribute flags, and the dbref of the object
which added it to the attribute table.
Continued in 'help @attribute2'.
@ATTRIBUTE2
@attribute/access[/retroactive] <attrib>=<flag list>
@attribute/delete <attrib>
@attribute/rename <attrib>=<new name>
@attribute/access adds <attrib> as a new standard attribute, with the
default attribute flags <flag list>. If <attrib> is already a standard
attribute, this command modifies its default attribute flags. Use "none"
for <flag list> if you don't want any default attribute flags.
If the /retroactive switch is given with /access, all existing copies of
the attribute will be @atrchown'd to the player running the command, and
will have its flags changed to <flag list>.
@attribute/delete removes a standard attribute from the table.
@attribute/rename renames a standard attribute.
Only Wizards can modify the attribute table.
Continued in 'help @attribute3'.
@ATTRIBUTE3
@attribute/limit <attrib>=<regexp pattern>
@attribute/enum [<delim>] <attrib>=<list of choices>
@attribute/limit lets you restrict all _new_ values for an attribute to
those that match a regexp pattern. Case insensitive. (Use (?-i) to make
your regexp case-sensitive.)
@attribute/enum lets you restrict all _new_ values for an attribute to
match an item in a list. It will also perform partial matching on the
list, much like a grab. Delimiter is optional, and defaults to a space.
Examples:
@attribute/enum sex=male female <-- requires 'male' or 'female' as @sex
@attribute/enum | race=Wookie|Indy 500 <- Your race can be 'wookie' or
'Indy 500'
@attribute/limit score=^\\d+$ <-- @score can only contain digits.
(Remember, Penn parser eats a \)
See also: ATTRIBUTEs, STANDARD ATTRIBUTES, attribute flags, @set, @atrchown,
@atrlock, @list
@AUFAIL
@ufail <object>=[<message>]
@oufail <object>=[<message>]
@aufail <object>=[<action list>]
Sets the message shown to a player who fails to use an object via the 'use'
command (because they don't pass the @lock/use), the message shown to
others in the room when a player fails to use <object>, and the actions to
be taken by <object> when someone fails to use it, respectively.
Note that these attributes are @ufail, NOT @ufailure, for
TinyMUSH compatibility.
Although the Use @lock also restricts who can trigger $-commands or
^-listens on an object, these attributes will not be triggered for those
failures. Instead, the COMMAND_LOCK`* and LISTEN_LOCK`* attributes are
triggered. See 'help failure' for more information.
See also: use, @use, FAILURE, ACTION LISTS, VERBS
@AUNFOLLOW
@unfollow <object>[=<message>]
@ounfollow <object>[=<message>]
@aunfollow <object>[=<action list>]
Sets the message shown to someone who stops following <object>,
the message shown to others in the room, and the actions to be taken
by <object> when someone stops following it, respectively. The name
of the person stopping following <object> is automatically prepended
to the @ounfollow message.
See also: follow, unfollow, @follow, followers(), ACTION LISTS, VERBS
@AUSE
@use <object>[=<message>]
@ouse <object>[=<message>]
@ause <object>[=<action list>]
These attributes contain the message shown to someone who successfully uses
<object>, the message shown to others when someone uses <object>, and the
actions to be taken by <object> when it is used, respectively.
Note that, if <object> has a CHARGES attribute set and it does not contain
a number greater than 0, the RUNOUT attribute is triggered instead of the
AUSE attribute. See 'help @charges' for more information.
Example:
> @use Jack-In-The-Box=You wind the handle.
> @ouse Jack-In-The-Box=winds the handle.
> @ause Jack-In-The-Box=@wait 3=POSE pops up with a bang!
> use Jack-In-The-Box
See also: use, @charges, @runout, ACTION LISTS, VERBS
@AWAY
@away <player>[=<message>]
If <message> evaluates to something non-null, it will be shown to anyone
who pages <player> when she is not connected.
Example:
> @away me=I'm not here, please send me @mail instead.
See also: @idle, @haven
@AZENTER
@zenter <object>[=<message>]
@ozenter <object>[=<message>]
@azenter <object>[=<action list>]
These attributes set the message shown to a player when he enters the zone
<object>, the message shown to others in the room the player enters when
he enters the zone, and the action to be taken by the zone <object> when
the player moves into an area zoned to it.
Entry into a new zone is said to occur when a player goes from a room not
in the zone to a room in the zone. "Room" in this context means the
player's absolute room (outermost container), so entering and leaving
unzoned objects within a zoned room doesn't trigger these.
Zone entry is assumed to occur before room entry, so these are
triggered before the room's @[oa]enter.
See also: @zleave, ZONES, @zemit, zwho(), VERBS
@AZLEAVE
@zleave <object>[=<message>]
@ozleave <object>[=<message>]
@azleave <object>[=<action list>]
These attributes set the message shown to a player when he leaves the zone
<object>, the message shown to others in the room he left when leaving
the zone, and the actions to be taken by <object> with a player leaves
an area zoned to it.
a zone (@zleave), the message shown to others in the room in the
old zone when the player leaves (@ozleave), and the action triggered
by the leave-taking (@azleave).
Leaving a zone is said to occur when a player goes from a room in the zone
to a room not in the zone. "Room" in this context means the player's
absolute room (outermost container), so entering and leaving unzoned
objects within a zoned room doesn't trigger these.
Zone leaving is assumed to occur after room leaving, so these are
triggered after the room's @[oa]leave.
See also: @zenter, ZONES, @zemit, zwho(), VERBS
@BOOT
@boot[/silent] <player>
@boot/port[/silent] <descriptor number>
@boot/me
The first form of this command disconnects all of <player>'s connections
from the game.
The /port switch disconnects a particular descriptor (as shown under "Des"
in the Wizard WHO, returned by lports() and ports(), etc).
If the /silent switch is given, the message telling <player> he was booted
is suppressed.
The /me switch boots all descriptors for the player using the command
which have been idle for over 1 minute. Players can use this command to
terminate hung connections.
Only admin and those with the "boot" power can @boot other players.
See also: QUIT, LOGOUT
@BREAK
@break[/queued] <boolean>[=<action list>]
@assert[/queued] <boolean>[=<action list>]
@break stops the execution of further commands in the current action list
if <boolean> is a true value. It doesn't affect new queue entries made by
previous commands in the action list. It can be useful for doing error
checking without having to nest @switches and suffer from delayed execution
because of queueing.
If <action list> is given, it is executed instead of the rest of the
commands in the current action list. By default, <action list> is run
immediately, replacing the rest of the action list @break was called in. If
the /queued switch is given, <action list> will instead be queued to be run
later. @break also accepts an /inline switch, for Rhost compatability; this
switch does nothing on PennMUSH.
@assert does the inverse: it stops execution if <boolean> evaluates to
false.
See 'help @break2' for examples.
See also: ACTION LISTS, QUEUE, BOOLEAN VALUES, @switch
@BREAK2
Examples:
> @va obj=$testme *: @pemit %#=You try a test ;
@break lt(%0,10)=@pemit %#=But you're too low! ;
@pemit %#=And you succeed!
> testme 0
You try a test
But you're too low!
> testme 10
You try a test
And you succeed!
> @force me={@switch 1=1, think Third; think First; @break 1; think Second}
First
Third
(The @switch is run, which queues 'think Third', think First is
run, displaying 'First', command execution is broken (so we never
think Second), and then the queued 'think Third' is run, displaying
Third. If you figured that out, you have a very good understanding
of the PennMUSH queue. :)
@BUY
@buy <object>[=<message>]
@obuy <object>[=<message>]
@abuy <object>[=<message>]
These attributes contain the message shown to a player who successfully
buys something from <object> using the "buy" command, the message shown to
others in the room when something is bought from <object> (prefixed with
the buyer's name), and the actions to be taken by <object> when something
is bought from it, respectively. Each attribute is passed the item being
purchased as %0 and the amount paid for it as %1.
Example:
> @buy Vendor=udefault(me/buy`%0,You buy %0 for %1 [money(%1)]., %0, %1)
> @obuy Vendor=hands some money to [name(me)] for [art(%0)] %0.
> @abuy Vendor=:goes into the storeroom. ; @wait 2=:returns with %n's %0.
See also: buy, @pricelist, MONEY, @lock, VERBS, @cost, give
@CEMIT
@cemit[/nosiy|/silent][/noeval] <channel>=<message>
@nscemit[/nosiy|/silent][/noeval] <channel>=<message>
cemit(<channel>, <message>[, <noisy>])
nscemit(<channel>, <message>[, <noisy>])
@cemit emits <message> on <channel>. It does not include your name. The
channel prefix is included if the /noisy switch is given, and omitted if
/silent is given - if neither is given, the default behaviour is controlled
by the noisy_cemit @config option. The /noeval switch prevents <message>
from being evaluated.
You must be able to speak on the channel, or have the See_All and Pemit_All
@powers, to @cemit on the channel.
@nscemit is exactly the same, but does not produce nospoof information when
used by players with the Can_spoof @power.
cemit() and nscemit() work the same as @cemit/silent and @nscemit/silent,
respectively. If <noisy> is given as a true value, they work like
@cemit/noisy and @nscemit/noisy, respectively, instead.
@cemit is intended for use in writing extended chat systems.
See also: @chat
@CHANNEL
The @channel command is used to add, join, list and modify channels in the
chat system. It takes many different switches.
Help for @channel is split into a number of topics. Please see 'help
@channel <topic>' for more, where <topic> is one of the words below. For
help on a specific switch to @channel, use 'help @channel/<switch>'.
Joining - How to find, join, and leave channels
Other - Setting channel titles, recalling previous chat messages
Admin - Adding, deleting and modifying channels
See also: CHAT, @chat, @cemit
@CHANNEL ADMIN
@channel/add <channel>[=<privs>]
@channel/privs <channel>=<privs>
@channel/describe <channel>=<description>
@channel/buffer <channel>=<lines>
@channel/decompile[/brief] <prefix>
@channel/add creates a new channel named <channel>, with the given <privs>.
If you don't specify the <privs>, the defaults set in the channel_flags
@config option are used. There may be a limit on the number of channels
mortals can create, and a charge for doing so; see '@config chat'.
@channel/privs changes the privs for <channel>. See 'help @channel privs'
for an explaination of all the possible priviledges.
@channel/describe sets a description for the channel, which is shown to
players in @channel/what. Limited to 256 characters. If the desc includes
commas, the whole desc should be enclosed in {}s.
@channel/buffer sets the maximum number of full-length lines (8192 bytes)
that the channel will buffer for @channel/recall. Many more shorter lines
may actually be buffered. Setting it to 0 turns off buffering.
@channel/decompile produces a decompile of all channels whose name begin
with <prefix>, showing the commands needed to recreate the channels. If
the /brief switch is also given, commands to re-add members of the channel
are omitted.
Continued in 'help @channel admin2'.
@CHANNEL ADMIN2
@channel/chown <channel>=<new owner>
@channel/rename <channel>=<new name>
@channel/wipe <channel>
@channel/delete <channel>
@channel/chown changes the owner of <channel>. It can only be used by
Wizards.
@channel/rename changes the name of <channel>.
@channel/wipe removes all players from <channel>.
@channel/delete completely removes <channel>. It can only be used by
Wizards or the owner of <channel>.
Continued in 'help @channel admin3'.
See also: @clock
@CHANNEL ADMIN3
@channel/mogrifier <channel>=<object>
@channel/mogrifier sets the mogrifier object for <channel>. <object> must
be an object that you control.
Mogrifiers let you tweak every aspect of a channel's output, before it
goes to individual players' @chatformats.
Before it begins mogrifying, three mogrifiers that alter the way chats are
handled are run, using the same arguments as @chatformat (except that %5 is
not set). First, <object>'s MOGRIFY`BLOCK attribute is called. If
MOGRIFY`BLOCK returns a non-empty string, then the resultant string is sent
back to the player, and no message is broadcast on the channel.
Next, MOGRIFY`OVERRIDE is called. If it returns a true value, player's
individual @chatformats will not be called for the message.
The MOGRIFY`NOBUFFER attribute is then called. If it returns a true value,
the message will not be included in the channel's recall buffer.
Continued in 'help mogrify2'.
@CHANNEL JOINING
@channel/list [<prefix>]
@channel/what [<prefix>]
@channel/who <channel>
@channel/on <channel>[=<player>]
@channel/off <channel>[=<player>]
@channel/list shows a list of all the channels you can see, along with some
basic information such as whether you are on the channel, how it's locked,
etc. 'help @channel list' explains the output in detail. If a <prefix> is
given, only channels whose names begin with <prefix> are shown.
@channel/what shows the name, description, owner, priv flags, mogrifier and
buffer size for all channels, or all channels whose names begin with
<prefix> if one is given.
@channel/who lists all the players on the given channel.
@channel/on and @channel/off add or remove you from the given <channel>.
You only hear messages for channels you're on, and most channels require you
to join them before you can speak on them. /join and /leave are aliases for
/on and /off.
Continued in 'help @channel joining2'.
@CHANNEL JOINING2
@channel/gag [<channel>][=<yes|no>]
@channel/mute [<channel>][=<yes|no>]
@channel/hide [<channel>][=<yes|no>]
@channel/combine [<channel>][=<yes|no>]
@channel/gag allows you to stay on a channel but stop receiving messages on
it. Channels are automatically ungagged when you disconnect. You cannot
speak on channels you're gagging unless they have the "open" priv.
Channels without the 'quiet' priv broadcast messages when players connect or
disconnect from the MUSH. You can use @channel/mute to suppress these
messages if you don't want to see them.
On channels with the 'hide_ok' priv, @channel/hide lets you hide from the
@channel/who list if you pass the channel's @clock/hide.
Connect and disconnect messages across all channels you have marked with
@channel/combine will be combined into a single message with a |-separated
list of all channel names. Only players can use this.
For all four of these commands, you can specify a single channel to affect,
or omit <channel> to affect all channels you're on. To undo the
gag/mute/hide, either use @channel/<switch> [<channel>]=no or
@channel/un<switch> [<channel>].
See also: @channel/who, cstatus(), cowner(), cflags(), channels(),
@channel/privs
@CHANNEL LIST
Here's the legend for reading the @channel/list output:
Channel Name Num Users Num Msgs Access Locks Status Buf
Sample 1 0 [DPTWQHo jsmvh*] [On QHC] 4
||||||| |||||| | ||| |
Channel is DISABLED----------------------------/|||||| |||||| | ||| |
Channel allows PLAYERS--------------------------/||||| |||||| | ||| |
Channel allows THINGS----------------------------/|||| |||||| | ||| |
Channel is Wizard-only (W) or Admin-only (A)------/||| |||||| | ||| |
Channel is QUIET-----------------------------------/|| |||||| | ||| |
Channel is HIDE_OK----------------------------------/| |||||| | ||| |
Channel is OPEN (non-members can speak on it)--------/ |||||| | ||| |
Channel has @clock/join set----------------------------|||||| | ||| |
Channel has @clock/speak set----------------------------/|||| | ||| |
Channel has @clock/mod set-------------------------------/||| | ||| |
Channel has @clock/see set--------------------------------/|| | ||| |
Channel has @clock/hide set--------------------------------/| | ||| |
Player is the owner of the channel--------------------------/ | ||| |
Player is currently on/off/gagging the channel------------------/ ||| |
If on, player has the channel muted---------------------------------/|| |
If on, player is hiding on the channel-------------------------------/| |
If on, player has @channel/combined the channel-----------------------/ |
Size of the channel buffer in full-length lines----------------------------/
@CHANNEL OTHER
@channel/title <channel>[=<message>]
@channel/recall[/quiet] <channel>[=<lines|duration>[, <start line>]]
@channel/title lets you set a channel title, which is shown before your name
whenever you speak on a channel. If =<message> is omitted, your current
title on the channel is shown. Use an empty <message> to clear your title.
The maximum length of titles is set in the 'chan_title_len' @config option.
@channel/recall shows you the most recent messages on the channel, if it has
been given a recall buffer with @channel/buffer. With no extra arguments,
the 10 most recent lines are shown. You can specify either a number of
<lines> to show, or a <duration> (such as '1h30m') to show only that many
lines/messages that recent. If <start line> is given, lines before the
<start line>th will not be shown. Timestamps are shown with the messages
unless /quiet is given.
See also: crecall(), cbufferadd(), @channel/buffer
@CHANNEL PRIVS
The <privs> for @channel/add and @channel/privs should be a space-separated
list of priv names, or a string of priv chars, from the list below:
* "player" (P) - players may use the channel
* "object" (O) - non-players may use the channel
* "admin" (A) - only royalty/wizards/chat_privs may use the channel
* "wizard" (W) - only wizards may use the channel
* "quiet" (Q) - channel will not show connection messages
* "open" (o) - you may speak even if you aren't listening to the channel
* "hide_ok" (H) - you may hide from the channel who list
* "notitles" (T) - chantitles are not displayed in channel messages
* "nonames" (N) - player names are not displayed in channel messages
* "nocemit" (C) - @cemit is prohibited on the channel
* "interact" (I) - Interaction rules (defined in local.c) are applied to
the channel
* "disabled" (D) - noone can join or speak on the channel
The default privs are determined by the 'channel_flags' @config option.
Example:
> @channel/add Public=player quiet open nocemit
See also: cflags(), clflags()
@CHANNEL/ADD
@channel/add <channel>[=<privs>]
@channel/privs <channel>=<privs>
@channel/describe <channel>=<description>
@channel/buffer <channel>=<lines>
@channel/decompile[/brief] <prefix>
@channel/add creates a new channel named <channel>, with the given <privs>.
If you don't specify the <privs>, the defaults set in the channel_flags
@config option are used. There may be a limit on the number of channels
mortals can create, and a charge for doing so; see '@config chat'.
@channel/privs changes the privs for <channel>. See 'help @channel privs'
for an explaination of all the possible priviledges.
@channel/describe sets a description for the channel, which is shown to
players in @channel/what. Limited to 256 characters. If the desc includes
commas, the whole desc should be enclosed in {}s.
@channel/buffer sets the maximum number of full-length lines (8192 bytes)
that the channel will buffer for @channel/recall. Many more shorter lines
may actually be buffered. Setting it to 0 turns off buffering.
@channel/decompile produces a decompile of all channels whose name begin
with <prefix>, showing the commands needed to recreate the channels. If
the /brief switch is also given, commands to re-add members of the channel
are omitted.
Continued in 'help @channel admin2'.
@CHANNEL/BUFFER
@channel/add <channel>[=<privs>]
@channel/privs <channel>=<privs>
@channel/describe <channel>=<description>
@channel/buffer <channel>=<lines>
@channel/decompile[/brief] <prefix>
@channel/add creates a new channel named <channel>, with the given <privs>.
If you don't specify the <privs>, the defaults set in the channel_flags
@config option are used. There may be a limit on the number of channels
mortals can create, and a charge for doing so; see '@config chat'.
@channel/privs changes the privs for <channel>. See 'help @channel privs'
for an explaination of all the possible priviledges.
@channel/describe sets a description for the channel, which is shown to
players in @channel/what. Limited to 256 characters. If the desc includes
commas, the whole desc should be enclosed in {}s.
@channel/buffer sets the maximum number of full-length lines (8192 bytes)
that the channel will buffer for @channel/recall. Many more shorter lines
may actually be buffered. Setting it to 0 turns off buffering.
@channel/decompile produces a decompile of all channels whose name begin
with <prefix>, showing the commands needed to recreate the channels. If
the /brief switch is also given, commands to re-add members of the channel
are omitted.
Continued in 'help @channel admin2'.
@CHANNEL/CHOWN
@channel/chown <channel>=<new owner>
@channel/rename <channel>=<new name>
@channel/wipe <channel>
@channel/delete <channel>
@channel/chown changes the owner of <channel>. It can only be used by
Wizards.
@channel/rename changes the name of <channel>.
@channel/wipe removes all players from <channel>.
@channel/delete completely removes <channel>. It can only be used by
Wizards or the owner of <channel>.
Continued in 'help @channel admin3'.
See also: @clock
@CHANNEL/COMBINE
@channel/gag [<channel>][=<yes|no>]
@channel/mute [<channel>][=<yes|no>]
@channel/hide [<channel>][=<yes|no>]
@channel/combine [<channel>][=<yes|no>]
@channel/gag allows you to stay on a channel but stop receiving messages on
it. Channels are automatically ungagged when you disconnect. You cannot
speak on channels you're gagging unless they have the "open" priv.
Channels without the 'quiet' priv broadcast messages when players connect or
disconnect from the MUSH. You can use @channel/mute to suppress these
messages if you don't want to see them.
On channels with the 'hide_ok' priv, @channel/hide lets you hide from the
@channel/who list if you pass the channel's @clock/hide.
Connect and disconnect messages across all channels you have marked with
@channel/combine will be combined into a single message with a |-separated
list of all channel names. Only players can use this.
For all four of these commands, you can specify a single channel to affect,
or omit <channel> to affect all channels you're on. To undo the
gag/mute/hide, either use @channel/<switch> [<channel>]=no or
@channel/un<switch> [<channel>].
See also: @channel/who, cstatus(), cowner(), cflags(), channels(),
@channel/privs
@CHANNEL/DECOMPILE
@channel/add <channel>[=<privs>]
@channel/privs <channel>=<privs>
@channel/describe <channel>=<description>
@channel/buffer <channel>=<lines>
@channel/decompile[/brief] <prefix>
@channel/add creates a new channel named <channel>, with the given <privs>.
If you don't specify the <privs>, the defaults set in the channel_flags
@config option are used. There may be a limit on the number of channels
mortals can create, and a charge for doing so; see '@config chat'.
@channel/privs changes the privs for <channel>. See 'help @channel privs'
for an explaination of all the possible priviledges.
@channel/describe sets a description for the channel, which is shown to
players in @channel/what. Limited to 256 characters. If the desc includes
commas, the whole desc should be enclosed in {}s.
@channel/buffer sets the maximum number of full-length lines (8192 bytes)
that the channel will buffer for @channel/recall. Many more shorter lines
may actually be buffered. Setting it to 0 turns off buffering.
@channel/decompile produces a decompile of all channels whose name begin
with <prefix>, showing the commands needed to recreate the channels. If
the /brief switch is also given, commands to re-add members of the channel
are omitted.
Continued in 'help @channel admin2'.
@CHANNEL/DELETE
@channel/chown <channel>=<new owner>
@channel/rename <channel>=<new name>
@channel/wipe <channel>
@channel/delete <channel>
@channel/chown changes the owner of <channel>. It can only be used by
Wizards.
@channel/rename changes the name of <channel>.
@channel/wipe removes all players from <channel>.
@channel/delete completely removes <channel>. It can only be used by
Wizards or the owner of <channel>.
Continued in 'help @channel admin3'.
See also: @clock
@CHANNEL/DESCRIBE
@channel/add <channel>[=<privs>]
@channel/privs <channel>=<privs>
@channel/describe <channel>=<description>
@channel/buffer <channel>=<lines>
@channel/decompile[/brief] <prefix>
@channel/add creates a new channel named <channel>, with the given <privs>.
If you don't specify the <privs>, the defaults set in the channel_flags
@config option are used. There may be a limit on the number of channels
mortals can create, and a charge for doing so; see '@config chat'.
@channel/privs changes the privs for <channel>. See 'help @channel privs'
for an explaination of all the possible priviledges.
@channel/describe sets a description for the channel, which is shown to
players in @channel/what. Limited to 256 characters. If the desc includes
commas, the whole desc should be enclosed in {}s.
@channel/buffer sets the maximum number of full-length lines (8192 bytes)
that the channel will buffer for @channel/recall. Many more shorter lines
may actually be buffered. Setting it to 0 turns off buffering.
@channel/decompile produces a decompile of all channels whose name begin
with <prefix>, showing the commands needed to recreate the channels. If
the /brief switch is also given, commands to re-add members of the channel
are omitted.
Continued in 'help @channel admin2'.
@CHANNEL/GAG
@channel/gag [<channel>][=<yes|no>]
@channel/mute [<channel>][=<yes|no>]
@channel/hide [<channel>][=<yes|no>]
@channel/combine [<channel>][=<yes|no>]
@channel/gag allows you to stay on a channel but stop receiving messages on
it. Channels are automatically ungagged when you disconnect. You cannot
speak on channels you're gagging unless they have the "open" priv.
Channels without the 'quiet' priv broadcast messages when players connect or
disconnect from the MUSH. You can use @channel/mute to suppress these
messages if you don't want to see them.
On channels with the 'hide_ok' priv, @channel/hide lets you hide from the
@channel/who list if you pass the channel's @clock/hide.
Connect and disconnect messages across all channels you have marked with
@channel/combine will be combined into a single message with a |-separated
list of all channel names. Only players can use this.
For all four of these commands, you can specify a single channel to affect,
or omit <channel> to affect all channels you're on. To undo the
gag/mute/hide, either use @channel/<switch> [<channel>]=no or
@channel/un<switch> [<channel>].
See also: @channel/who, cstatus(), cowner(), cflags(), channels(),
@channel/privs
@CHANNEL/HIDE
@channel/gag [<channel>][=<yes|no>]
@channel/mute [<channel>][=<yes|no>]
@channel/hide [<channel>][=<yes|no>]
@channel/combine [<channel>][=<yes|no>]
@channel/gag allows you to stay on a channel but stop receiving messages on
it. Channels are automatically ungagged when you disconnect. You cannot
speak on channels you're gagging unless they have the "open" priv.
Channels without the 'quiet' priv broadcast messages when players connect or
disconnect from the MUSH. You can use @channel/mute to suppress these
messages if you don't want to see them.
On channels with the 'hide_ok' priv, @channel/hide lets you hide from the
@channel/who list if you pass the channel's @clock/hide.
Connect and disconnect messages across all channels you have marked with
@channel/combine will be combined into a single message with a |-separated
list of all channel names. Only players can use this.
For all four of these commands, you can specify a single channel to affect,
or omit <channel> to affect all channels you're on. To undo the
gag/mute/hide, either use @channel/<switch> [<channel>]=no or
@channel/un<switch> [<channel>].
See also: @channel/who, cstatus(), cowner(), cflags(), channels(),
@channel/privs
@CHANNEL/JOIN
@channel/list [<prefix>]
@channel/what [<prefix>]
@channel/who <channel>
@channel/on <channel>[=<player>]
@channel/off <channel>[=<player>]
@channel/list shows a list of all the channels you can see, along with some
basic information such as whether you are on the channel, how it's locked,
etc. 'help @channel list' explains the output in detail. If a <prefix> is
given, only channels whose names begin with <prefix> are shown.
@channel/what shows the name, description, owner, priv flags, mogrifier and
buffer size for all channels, or all channels whose names begin with
<prefix> if one is given.
@channel/who lists all the players on the given channel.
@channel/on and @channel/off add or remove you from the given <channel>.
You only hear messages for channels you're on, and most channels require you
to join them before you can speak on them. /join and /leave are aliases for
/on and /off.
Continued in 'help @channel joining2'.
@CHANNEL/LEAVE
@channel/list [<prefix>]
@channel/what [<prefix>]
@channel/who <channel>
@channel/on <channel>[=<player>]
@channel/off <channel>[=<player>]
@channel/list shows a list of all the channels you can see, along with some
basic information such as whether you are on the channel, how it's locked,
etc. 'help @channel list' explains the output in detail. If a <prefix> is
given, only channels whose names begin with <prefix> are shown.
@channel/what shows the name, description, owner, priv flags, mogrifier and
buffer size for all channels, or all channels whose names begin with
<prefix> if one is given.
@channel/who lists all the players on the given channel.
@channel/on and @channel/off add or remove you from the given <channel>.
You only hear messages for channels you're on, and most channels require you
to join them before you can speak on them. /join and /leave are aliases for
/on and /off.
Continued in 'help @channel joining2'.
@CHANNEL/LIST
@channel/list [<prefix>]
@channel/what [<prefix>]
@channel/who <channel>
@channel/on <channel>[=<player>]
@channel/off <channel>[=<player>]
@channel/list shows a list of all the channels you can see, along with some
basic information such as whether you are on the channel, how it's locked,
etc. 'help @channel list' explains the output in detail. If a <prefix> is
given, only channels whose names begin with <prefix> are shown.
@channel/what shows the name, description, owner, priv flags, mogrifier and
buffer size for all channels, or all channels whose names begin with
<prefix> if one is given.
@channel/who lists all the players on the given channel.
@channel/on and @channel/off add or remove you from the given <channel>.
You only hear messages for channels you're on, and most channels require you
to join them before you can speak on them. /join and /leave are aliases for
/on and /off.
Continued in 'help @channel joining2'.
@CHANNEL/MOGRIFIER
@channel/mogrifier <channel>=<object>
@channel/mogrifier sets the mogrifier object for <channel>. <object> must
be an object that you control.
Mogrifiers let you tweak every aspect of a channel's output, before it
goes to individual players' @chatformats.
Before it begins mogrifying, three mogrifiers that alter the way chats are
handled are run, using the same arguments as @chatformat (except that %5 is
not set). First, <object>'s MOGRIFY`BLOCK attribute is called. If
MOGRIFY`BLOCK returns a non-empty string, then the resultant string is sent
back to the player, and no message is broadcast on the channel.
Next, MOGRIFY`OVERRIDE is called. If it returns a true value, player's
individual @chatformats will not be called for the message.
The MOGRIFY`NOBUFFER attribute is then called. If it returns a true value,
the message will not be included in the channel's recall buffer.
Continued in 'help mogrify2'.
@CHANNEL/MUTE
@channel/gag [<channel>][=<yes|no>]
@channel/mute [<channel>][=<yes|no>]
@channel/hide [<channel>][=<yes|no>]
@channel/combine [<channel>][=<yes|no>]
@channel/gag allows you to stay on a channel but stop receiving messages on
it. Channels are automatically ungagged when you disconnect. You cannot
speak on channels you're gagging unless they have the "open" priv.
Channels without the 'quiet' priv broadcast messages when players connect or
disconnect from the MUSH. You can use @channel/mute to suppress these
messages if you don't want to see them.
On channels with the 'hide_ok' priv, @channel/hide lets you hide from the
@channel/who list if you pass the channel's @clock/hide.
Connect and disconnect messages across all channels you have marked with
@channel/combine will be combined into a single message with a |-separated
list of all channel names. Only players can use this.
For all four of these commands, you can specify a single channel to affect,
or omit <channel> to affect all channels you're on. To undo the
gag/mute/hide, either use @channel/<switch> [<channel>]=no or
@channel/un<switch> [<channel>].
See also: @channel/who, cstatus(), cowner(), cflags(), channels(),
@channel/privs
@CHANNEL/NAME
@channel/chown <channel>=<new owner>
@channel/rename <channel>=<new name>
@channel/wipe <channel>
@channel/delete <channel>
@channel/chown changes the owner of <channel>. It can only be used by
Wizards.
@channel/rename changes the name of <channel>.
@channel/wipe removes all players from <channel>.
@channel/delete completely removes <channel>. It can only be used by
Wizards or the owner of <channel>.
Continued in 'help @channel admin3'.
See also: @clock
@CHANNEL/OFF
@channel/list [<prefix>]
@channel/what [<prefix>]
@channel/who <channel>
@channel/on <channel>[=<player>]
@channel/off <channel>[=<player>]
@channel/list shows a list of all the channels you can see, along with some
basic information such as whether you are on the channel, how it's locked,
etc. 'help @channel list' explains the output in detail. If a <prefix> is
given, only channels whose names begin with <prefix> are shown.
@channel/what shows the name, description, owner, priv flags, mogrifier and
buffer size for all channels, or all channels whose names begin with
<prefix> if one is given.
@channel/who lists all the players on the given channel.
@channel/on and @channel/off add or remove you from the given <channel>.
You only hear messages for channels you're on, and most channels require you
to join them before you can speak on them. /join and /leave are aliases for
/on and /off.
Continued in 'help @channel joining2'.
@CHANNEL/ON
@channel/list [<prefix>]
@channel/what [<prefix>]
@channel/who <channel>
@channel/on <channel>[=<player>]
@channel/off <channel>[=<player>]
@channel/list shows a list of all the channels you can see, along with some
basic information such as whether you are on the channel, how it's locked,
etc. 'help @channel list' explains the output in detail. If a <prefix> is
given, only channels whose names begin with <prefix> are shown.
@channel/what shows the name, description, owner, priv flags, mogrifier and
buffer size for all channels, or all channels whose names begin with
<prefix> if one is given.
@channel/who lists all the players on the given channel.
@channel/on and @channel/off add or remove you from the given <channel>.
You only hear messages for channels you're on, and most channels require you
to join them before you can speak on them. /join and /leave are aliases for
/on and /off.
Continued in 'help @channel joining2'.
@CHANNEL/PRIVS
@channel/add <channel>[=<privs>]
@channel/privs <channel>=<privs>
@channel/describe <channel>=<description>
@channel/buffer <channel>=<lines>
@channel/decompile[/brief] <prefix>
@channel/add creates a new channel named <channel>, with the given <privs>.
If you don't specify the <privs>, the defaults set in the channel_flags
@config option are used. There may be a limit on the number of channels
mortals can create, and a charge for doing so; see '@config chat'.
@channel/privs changes the privs for <channel>. See 'help @channel privs'
for an explaination of all the possible priviledges.
@channel/describe sets a description for the channel, which is shown to
players in @channel/what. Limited to 256 characters. If the desc includes
commas, the whole desc should be enclosed in {}s.
@channel/buffer sets the maximum number of full-length lines (8192 bytes)
that the channel will buffer for @channel/recall. Many more shorter lines
may actually be buffered. Setting it to 0 turns off buffering.
@channel/decompile produces a decompile of all channels whose name begin
with <prefix>, showing the commands needed to recreate the channels. If
the /brief switch is also given, commands to re-add members of the channel
are omitted.
Continued in 'help @channel admin2'.
@CHANNEL/RECALL
@channel/title <channel>[=<message>]
@channel/recall[/quiet] <channel>[=<lines|duration>[, <start line>]]
@channel/title lets you set a channel title, which is shown before your name
whenever you speak on a channel. If =<message> is omitted, your current
title on the channel is shown. Use an empty <message> to clear your title.
The maximum length of titles is set in the 'chan_title_len' @config option.
@channel/recall shows you the most recent messages on the channel, if it has
been given a recall buffer with @channel/buffer. With no extra arguments,
the 10 most recent lines are shown. You can specify either a number of
<lines> to show, or a <duration> (such as '1h30m') to show only that many
lines/messages that recent. If <start line> is given, lines before the
<start line>th will not be shown. Timestamps are shown with the messages
unless /quiet is given.
See also: crecall(), cbufferadd(), @channel/buffer
@CHANNEL/RENAME
@channel/chown <channel>=<new owner>
@channel/rename <channel>=<new name>
@channel/wipe <channel>
@channel/delete <channel>
@channel/chown changes the owner of <channel>. It can only be used by
Wizards.
@channel/rename changes the name of <channel>.
@channel/wipe removes all players from <channel>.
@channel/delete completely removes <channel>. It can only be used by
Wizards or the owner of <channel>.
Continued in 'help @channel admin3'.
See also: @clock
@CHANNEL/TITLE
@channel/title <channel>[=<message>]
@channel/recall[/quiet] <channel>[=<lines|duration>[, <start line>]]
@channel/title lets you set a channel title, which is shown before your name
whenever you speak on a channel. If =<message> is omitted, your current
title on the channel is shown. Use an empty <message> to clear your title.
The maximum length of titles is set in the 'chan_title_len' @config option.
@channel/recall shows you the most recent messages on the channel, if it has
been given a recall buffer with @channel/buffer. With no extra arguments,
the 10 most recent lines are shown. You can specify either a number of
<lines> to show, or a <duration> (such as '1h30m') to show only that many
lines/messages that recent. If <start line> is given, lines before the
<start line>th will not be shown. Timestamps are shown with the messages
unless /quiet is given.
See also: crecall(), cbufferadd(), @channel/buffer
@CHANNEL/UNCOMBINE
@channel/gag [<channel>][=<yes|no>]
@channel/mute [<channel>][=<yes|no>]
@channel/hide [<channel>][=<yes|no>]
@channel/combine [<channel>][=<yes|no>]
@channel/gag allows you to stay on a channel but stop receiving messages on
it. Channels are automatically ungagged when you disconnect. You cannot
speak on channels you're gagging unless they have the "open" priv.
Channels without the 'quiet' priv broadcast messages when players connect or
disconnect from the MUSH. You can use @channel/mute to suppress these
messages if you don't want to see them.
On channels with the 'hide_ok' priv, @channel/hide lets you hide from the
@channel/who list if you pass the channel's @clock/hide.
Connect and disconnect messages across all channels you have marked with
@channel/combine will be combined into a single message with a |-separated
list of all channel names. Only players can use this.
For all four of these commands, you can specify a single channel to affect,
or omit <channel> to affect all channels you're on. To undo the
gag/mute/hide, either use @channel/<switch> [<channel>]=no or
@channel/un<switch> [<channel>].
See also: @channel/who, cstatus(), cowner(), cflags(), channels(),
@channel/privs
@CHANNEL/UNGAG
@channel/gag [<channel>][=<yes|no>]
@channel/mute [<channel>][=<yes|no>]
@channel/hide [<channel>][=<yes|no>]
@channel/combine [<channel>][=<yes|no>]
@channel/gag allows you to stay on a channel but stop receiving messages on
it. Channels are automatically ungagged when you disconnect. You cannot
speak on channels you're gagging unless they have the "open" priv.
Channels without the 'quiet' priv broadcast messages when players connect or
disconnect from the MUSH. You can use @channel/mute to suppress these
messages if you don't want to see them.
On channels with the 'hide_ok' priv, @channel/hide lets you hide from the
@channel/who list if you pass the channel's @clock/hide.
Connect and disconnect messages across all channels you have marked with
@channel/combine will be combined into a single message with a |-separated
list of all channel names. Only players can use this.
For all four of these commands, you can specify a single channel to affect,
or omit <channel> to affect all channels you're on. To undo the
gag/mute/hide, either use @channel/<switch> [<channel>]=no or
@channel/un<switch> [<channel>].
See also: @channel/who, cstatus(), cowner(), cflags(), channels(),
@channel/privs
@CHANNEL/UNHIDE
@channel/gag [<channel>][=<yes|no>]
@channel/mute [<channel>][=<yes|no>]
@channel/hide [<channel>][=<yes|no>]
@channel/combine [<channel>][=<yes|no>]
@channel/gag allows you to stay on a channel but stop receiving messages on
it. Channels are automatically ungagged when you disconnect. You cannot
speak on channels you're gagging unless they have the "open" priv.
Channels without the 'quiet' priv broadcast messages when players connect or
disconnect from the MUSH. You can use @channel/mute to suppress these
messages if you don't want to see them.
On channels with the 'hide_ok' priv, @channel/hide lets you hide from the
@channel/who list if you pass the channel's @clock/hide.
Connect and disconnect messages across all channels you have marked with
@channel/combine will be combined into a single message with a |-separated
list of all channel names. Only players can use this.
For all four of these commands, you can specify a single channel to affect,
or omit <channel> to affect all channels you're on. To undo the
gag/mute/hide, either use @channel/<switch> [<channel>]=no or
@channel/un<switch> [<channel>].
See also: @channel/who, cstatus(), cowner(), cflags(), channels(),
@channel/privs
@CHANNEL/WHAT
@channel/list [<prefix>]
@channel/what [<prefix>]
@channel/who <channel>
@channel/on <channel>[=<player>]
@channel/off <channel>[=<player>]
@channel/list shows a list of all the channels you can see, along with some
basic information such as whether you are on the channel, how it's locked,
etc. 'help @channel list' explains the output in detail. If a <prefix> is
given, only channels whose names begin with <prefix> are shown.
@channel/what shows the name, description, owner, priv flags, mogrifier and
buffer size for all channels, or all channels whose names begin with
<prefix> if one is given.
@channel/who lists all the players on the given channel.
@channel/on and @channel/off add or remove you from the given <channel>.
You only hear messages for channels you're on, and most channels require you
to join them before you can speak on them. /join and /leave are aliases for
/on and /off.
Continued in 'help @channel joining2'.
@CHANNEL/WHO
@channel/list [<prefix>]
@channel/what [<prefix>]
@channel/who <channel>
@channel/on <channel>[=<player>]
@channel/off <channel>[=<player>]
@channel/list shows a list of all the channels you can see, along with some
basic information such as whether you are on the channel, how it's locked,
etc. 'help @channel list' explains the output in detail. If a <prefix> is
given, only channels whose names begin with <prefix> are shown.
@channel/what shows the name, description, owner, priv flags, mogrifier and
buffer size for all channels, or all channels whose names begin with
<prefix> if one is given.
@channel/who lists all the players on the given channel.
@channel/on and @channel/off add or remove you from the given <channel>.
You only hear messages for channels you're on, and most channels require you
to join them before you can speak on them. /join and /leave are aliases for
/on and /off.
Continued in 'help @channel joining2'.
@CHANNEL/WIPE
@channel/chown <channel>=<new owner>
@channel/rename <channel>=<new name>
@channel/wipe <channel>
@channel/delete <channel>
@channel/chown changes the owner of <channel>. It can only be used by
Wizards.
@channel/rename changes the name of <channel>.
@channel/wipe removes all players from <channel>.
@channel/delete completely removes <channel>. It can only be used by
Wizards or the owner of <channel>.
Continued in 'help @channel admin3'.
See also: @clock
@CHARGES
@charges <object>[=<integer>]
@runout <object>[=<action list>]
These attributes can limit how many times an object can be successfully
"use"d. When you "use" an object with a CHARGES attribute set, the object's
AUSE attribute is only triggered if CHARGES is a positive integer. When
CHARGES is less than 1 (or not a number), the object's RUNOUT attribute is
triggered instead.
When the CHARGES attribute is present and AUSE is triggered, the value of
the CHARGES attribute is automatically decreased by 1. When no CHARGES
attribute is set, AUSE is always triggered.
See 'help charges2' for an example.
See also: use, @ause, ACTION LISTS
@CHAT
@chat <channel>=<message>
+<channel> <message>
The @chat command is used to speak on channels. Everyone on the channel
will see your message, and it will be added to the channel's recall
buffer, if it has one. If <message> begins with a ':' or ';' it will be
posed (or semiposed) instead of spoken. You will usually need to join a
channel before you can speak on it.
+<channel> <message> is short-hand for the @chat command.
Example:
> @chat pub=Hello
<Public> Mike says, "Hello"
> +pub :waves
<Public> Mike waves
See also: @channel, @cemit
@CHAT MOGRIFYING
@channel/mogrifier <channel>=<object>
@channel/mogrifier sets the mogrifier object for <channel>. <object> must
be an object that you control.
Mogrifiers let you tweak every aspect of a channel's output, before it
goes to individual players' @chatformats.
Before it begins mogrifying, three mogrifiers that alter the way chats are
handled are run, using the same arguments as @chatformat (except that %5 is
not set). First, <object>'s MOGRIFY`BLOCK attribute is called. If
MOGRIFY`BLOCK returns a non-empty string, then the resultant string is sent
back to the player, and no message is broadcast on the channel.
Next, MOGRIFY`OVERRIDE is called. If it returns a true value, player's
individual @chatformats will not be called for the message.
The MOGRIFY`NOBUFFER attribute is then called. If it returns a true value,
the message will not be included in the channel's recall buffer.
Continued in 'help mogrify2'.
@CHATFORMAT
@chatformat <object>[=<message>]
The chatformat attribute is evaluated when an object receives a channel
message. If the attribute exists, its evaluated result is shown to the
object instead of the default message. If the attribute exists but returns
nothing, the object will not see anything.
Registers:
%0: The 'type' of the message. It is a single character that
will always be set:
'"', ';' or ':' for say, semipose and pose, respectively.
'|' for an @cemit.
'@' for a "system" message - such as "Walker has connected."
%1: The channel name. e.g: "Public", "Admin", "Softcode"
%2: The message as typed (post-evaluation, if necessary) by the
speaker. Be warned, though - if type is '@', then %2 will
contain the entire message, and will include the name of
the speaker that caused it.
%3: The speaker name, unless channel is set NO_NAME.
%4: The speaker's channel title, unless none is set, or the
channel is NO_TITLE.
%5: The default message, as shown when no chatformat is set.
If the channel is NO_NAME, and the speaker either has no title or
the channel is also set NO_TITLE, then %3 will be "Someone".
Continued in 'help @chatformat2'.
See also: @chat, @pageformat, @message, speak(), mogrify
@CHATFORMAT2
Examples:
Walker's preferred @chatformat, which strips all ansi out, wraps
every line to your width and prefixes them with <ChannelName>:
@chatformat me=<%1> [switch(%0,@,%2,edit(wrap(speak(&[if(%4,%4%b)]%3,
%0[stripansi(%2)]),sub(width(%!),add(4,strlen(%1)))),%r,%r<%1>%b))]
If you're on a system with chat_strip_quote set to "no", you might
want to change the "%0%2" arg to speak() to '[switch(%0,",%2,%0%2)]'
Suppose you want it just like the old version, but anytime somebody
says your name, you want it all in red:
@chatformat me=ansi(switch(%2,*[name(%!)]*,r,n),%5)
See 'help @chatformat3' for more examples.
@CHATFORMAT3
A popular feature in clients now available in PennMUSH directly:
Let's suppose you want "Public" channel chatter to all be green,
"Softcode" to be blue and "Admin" to be cyan.
@chatformat me=ansi(switch(%1,Public,g,Softcode,b,Admin,c,n),%5)
Maybe you dislike players who re-@name themselves a lot:
&playernames me=#6061:Walker #7:Javelin #6388:Cheetah
@chatformat me=<%1> [switch(%0,@,%2,speak(&[if(%4,%4%b)][firstof(
after(grab(v(playernames),%#:*),:),%3)],%2))]
Or you're writing a loggerbot, and you want to convert all channel
input to HTML:
@chatformat me=CHAT:%1:[edit(switch(%0,@,%2,speak(if(%4,%4%b)%3,%0%2)),
&,&,<,<,>,>,%r,<BR>,%b%b,%b )]
or
@chatformat me=CHAT:%1:[render(switch(%0,@,%2,speak(if(%4,%4%b)%3,%0%2)),
html)]
@CHOWN
@chown[/preserve] <object>=<player>
Changes the ownership of <object> to <player>. You can chown things, rooms
or exits. Players can't be @chown'd - they always own themselves. To chown
a thing, you have to be carrying it. If you do not own an object, you can
only chown it if it has the CHOWN_OK flag. If you're not a Wizard, you can
only @chown objects to yourself or a Zone Master whose zone-lock you pass.
Normally, @chown'ing an object clears privileged flags and powers, and sets
the object halt. Wizards can use @chown/preserve to avoid this. Doing this
to an active object with queued commands is not recommended, and may have
strange and insecure effects.
Examples:
> @chown here=me (for a room)
> @chown box=Soundwave (for a thing)
See also: CHOWN_OK, Zone Masters, @chownall, owner()
@CHOWNALL
@chownall[/preserve] <player>[=<new owner>]
This command @chowns all objects currently owned by <player> to the player
<new owner>, or to the person running the command if no <new owner> is
given. All the objects will have priviledged flags and powers cleared, and
be set halt, unless the /preserve switch is given.
This command can only be used by Wizards.
See also: @chown
@CHZONE
@chzone[/preserve] <object>=<zone>
@chzone <object>=none
The first form of this command changes the zone of <object> to
<zone>. This puts the object on that zone and may (if the
zone_control_zmp_only @config option is off) allow anyone who passes
the Zone @lock of <zone> to control <object>. Any kind of object can
be @chzoned, and any kind of object can be used as a zone.
The second form of this command removes <object> from its current
zone, leaving it unzoned. Anyone can reset the zone of an object he
owns.
If a player is @chzoned, any objects he creates from that point on will
automatically be on the same zone. Objects the player already owns are
not affected. Players can only @chzone themselves to a zone if they own
it, though wizards can @chzone players to any zone.
Continued in 'help @chzone2'.
@CHZONE2
To see the Zone of an object, you can use either 'brief' or
'examine' to examine it. The Zone is listed on the same line as the
Owner of the object.
Players can @chzone objects they own if they own the zone object or
if they pass its @lock/chzone. Wizards can @chzone objects to any
zone.
If <zone> does not have a Zone @lock when something is @chzoned to
it, the lock is automatically set to =<zone> (see 'help @lock' for
more info).
Whenever an object besides a player is @chzoned to a zone object,
the WIZARD, ROYALTY, and TRUST flags will be reset, as will all
@power's (for security purposes). For similar reasons, it is
strongly recommended that you do not @chzone admin- or wizard-owned
objects to any zone that less privileged players have access
to. Wizards can use the /preserve switch to prevent this reset.
See also: ZONES, @chzoneall, zone()
@CHZONEALL
@chzoneall[/preserve] <player>=<zone object>
Changes the zone of all objects owned by <player> to <zone object>.
If <zone object> is "none", the zone is reset to NOTHING. Only
wizards may use this command.
See also: @chzone, ZONES
@CLOCK
@clock/join <channel>[=<key>]
@clock/speak <channel>[=<key>]
@clock/see <channel>[=<key>]
@clock/hide <channel>[=<key>]
@clock/mod <channel>[=<key>]
The @clock command modifies the @lock-style lock on a chat channel. If no
<key> is specified, the lock is removed. See 'help lockkeys' for an
explaination of <key>.
The "join" lock restricts who can join the channel.
The "speak" lock restricts who can speak on the channel.
The "see" lock restricts who can see the channel on @channel/list
The "hide" lock restricts @channel/hide if the channel is hide_ok.
The "mod" lock restricts who can modify the channel. If you pass the
mod lock on the channel, you can do anything short of deleting it.
When new channels are added, the mod lock is set to the creator/owner
(=<creator>), and all other locks are unlocked.
Continued in 'help @clock2'.
@CLOCK2
Locks are checked as if they were set on the object attemping to pass
them - for example, in the channel lock:
> @clock/join Public=test/1
the attribute "test" will be evaluated on the object trying to join the
Public channel.
You can use indirect @clocks to lock a channel to an @lock on an object.
Objects attempting to pass the lock must be able to see the indirect lock,
so it's recommended you set either the lock or the object VISUAL. This
channel can only be joined by objects which aren't set UNFINDABLE:
> @clock/join unfindchannel=@#10
> @lock/user:ChanJoinLock #10=!flag^unfindable
> @lset #10/ChanJoinLock=VISUAL OR @set #10=VISUAL
@clock Corresponding default user: lock for object
join ChanJoinLock
speak ChanSpeakLock
see ChanSeeLock
hide ChanHideLock
mod ChanModLock
If you want to store different locks for different channels on the same
object, you can use a specific indirect lock instead of the default one:
> @lock/user:onechanneljoin #10=flag^foo
> @clock/join onechannel=@#10/onechanneljoin
> @lock/user:anotherchanneljoin #10=flag^bar
> @clock/join anotherchannel=@#10/anotherchanneljoin
See also: clock(), @lock
@CLONE
@clone <object>[=<new name>[, <dbref>]]
@clone/preserve <object>[=<new name>[, <dbref>]]
This command creates a copy of <object>. The clone will have the same name
as the original unless a <new name> is given for it. You can only clone
things, rooms and exits, not players. You must control <object>. The new
object will be owned by the player who performs the @clone, not the owner
of the original <object>.
When cloning things and exits, the clone will be placed in your current
location, not the location of <object>. When cloning rooms, the exits and
contents in the room are not cloned as well.
The cloned object will have the same modification time as the original
object, to make tracking revisions easier, but will have a different
creation time.
Normally, the Wizard and Royalty flags, @powers and @warnings are stripped
from the cloned object, but Wizards may use the /preserve flag to prevent
this.
The clone will normally be created with the first available dbref,
but Wizards and objects with the pick_dbref power may specify the
<dbref> of a garbage object to use that instead.
To clone a room and all its exits, use code like:
> @teleport setq(0,%L)[clone(here)]
> @dolist lexits(%q0)=@clone ##
See also: @create, clone(), create(), @cpattr
@COMMAND
@command <command>
@command/<switch> <command>
@command/alias <command>=<alias>
@command/clone <command>=<clone>
@command/restrict <command>=<restriction>
@command can be used for adding new built-in commands, altering the way
a built-in command works, and displaying information about how commands
currently work.
With no switches, @command shows all sorts of interesting information
about how a command is parsed.
The /alias switch creates an alias for <command>, allowing players to type
<alias> to run <command>. The /clone switch creates a separate copy of
<command>, which works the same initially but can be restricted, @hooked,
etc, separately.
@command/restrict can be used to restrict who can use <command>. See 'help
restrict' for more information.
Switches include:
/add : Add a new command that does nothing, but can be @hook'd
/delete : Delete a command added with @command/add or @command/alias
/disable : Disable a command added in the hardcode
/enable : Re-enable a command disabled with @command/disable
The /quiet switch can be used to suppress output from @command.
Continued in 'help @command2'.
@COMMAND2
@command/add is a powerful tool that lets you create new commands which
are matched before normal $-commands, and which can be set not to parse
their arguments, but (via @hook) can still execute softcode like an
$-command. Only Wizards can @command/add, and only God can @command/delete.
You can use these additional switches, along with @command/add, to control
how the new command parses its arguments:
/noparse : The command does not evaluate arguments passed to it.
/eqsplit : The parser parses leftside and rightside around =
/lsargs : Comma-separated arguments on the left side are parsed.
/rsargs : When used with /eqsplit, the right-side arguments are
comma-separated and are parsed individually
Any command added without the /noparse switch is provided with a
/noeval switch itself, so if you @command/add foo, then foo's arguments
are parsed by default, but you can call foo/noeval. Note: the $-command
needs to make allowances for the /noeval switch in it's matching.
Commands added with @command/add, like other standard commands,
are never case-sensitive. Commands can also be added in the alias.cnf file.
See 'help @command3' for examples.
See also: @hook, RESTRICT, EVALUATION ORDER
@COMMAND3
Examples:
> @create Dining Machine
> &eat dining=$eat *:@remit %L=%n takes a bite of %0.
> @command/add/noparse eat
> @hook/override eat=dining machine,eat
> eat meat loaf
Walker takes a bite of meat loaf.
> eat randword(apple tomato pear)
Walker takes a bite of randword(apple tomato pear)
> &drink dining=$^drink(/noeval)? (.*)$:@remit %L=%n drinks %2.
> @set dining/drink=regexp
> @command/add drink
> @hook/override drink=dining machine,drink
> drink reverse(tea)
Walker drinks aet.
> drink/noeval reverse(tea)
Walker drinks reverse(tea).
@COMMENT
@comment <object>[=<comment>]
This is a wizard-only command which sets a COMMENT attribute on
<object>. The comment can only be seen by other wizards and royalty.
See also: @@, @@()
@CONFIG
@config
@config [<category>|<option>]
@config/set <option>=<value>
@config/save <option>=<value>
With no arguments, @config lists the categories of configuration options
for the MUSH. With an argument, @config lists the options in the given
<category>, or shows the current value of the given <option>.
The wizard-only /set switch changes the value of <option> to <value>. This
change does not last across reboots. God can also use the /save switch,
which attempts to save the new <value> in the mush.cnf configuration file,
as well as changing it in-game.
For information about parameters, see 'help @config parameters'
@CONFIG ATTRIBS
These options control some attribute behavior.
adestroy=<boolean>: Is the @adestroy attribute used?
amail=<boolean>: Is the @amail attribute used?
player_listen=<boolean>: Is @listen checked on players?
player_ahear=<boolean>: Is @ahear triggered on players?
startups=<boolean>: Are @startup triggered at restart?
room_connects=<boolean>: Are @aconnect and @adisconnect triggered on rooms?
read_remote_desc=<boolean>: Can anyone remotely retrieve @descs?
empty_attrs=<boolean>: Can attributes be set to an empty string?
reverse_shs=<boolean>: Reverse the endedness of the
shs password encryption? (Playing with this will break logins)
@CONFIG CHAT
These options control chat system settings.
chan_cost=<number>: How many pennies a channel costs to create.
max_channels=<number>: How many channels can exist total.
max_player_chans=<number>: How many channels can each non-admin
player create? If 0, mortals cannot create channels.
noisy_cemit=<boolean>: Is @cemit/noisy the default?
chan_title_len=<number>: How long can @channel/title's be?
@CONFIG CMDS
These options affect command behavior.
noisy_whisper=<boolean>: Does whisper default to whisper/noisy?
possessive_get=<boolean>: Does "get container's object" work?
possessive_get_d=<boolean>: Does it work on disconnected players?
link_to_object=<boolean>: Can exits have objects as their destination?
owner_queues=<boolean>: Are command queues kept per-owner, or per-object?
full_invis=<boolean>: Should say by a dark player show up as
'Someone says,'?
wiz_noaenter=<boolean>: If yes, dark players don't trigger @aenters.
really_safe=<boolean>: Does SAFE prevent @nuking?
destroy_possessions=<boolean>: When a player is destroyed, are their objects
as well?
@CONFIG COSMETIC
These are cosmetic options of various sorts.
money_singular=<string>: What is one penny called?
money_plural=<string>: What are many pennies called?
player_name_spaces=<boolean>: Can player names have spaces in them?
ansi_names=<boolean>: Are names in look hilighted?
float_precision=<numbers>: How many digits after the decimal point in
floating point numbers are kept when formatting the result of a
floating point function?
comma_exit_list=<boolean>: Do exits show up like North, East, and West
or as North East West?
count_all=<boolean>: Does the count of connected players in WHO include
hidden connections for mortals?
Continued in help @config cosmetic2
@CONFIG COSMETIC2
More cosmetic options.
page_aliases=<boolean>: Are aliases included in page listings?
For example, Foo(F) pages: Blah
flags_on_examine=<boolean>: Are flag names included when examining
objects?
ex_public_attribs=<boolean>: Show visual attributes when examining objects
you don't control?
wizwall_prefix=<string>: Prefix for @wizwall messages.
rwall_prefix=<string>: Prefix for @rwall messages.
wall_prefix=<string>: Prefix for @wall messages.
announce_connects=<boolean>: Should (dis)connects be announced to
non-HEAR_CONNECT players and to channels?
chat_strip_quote=<boolean>: Does +chan "foo strip the "?
newline_one_char=<boolean>: Is strlen(%r) equal to 1?
only_ascii_in_names=<boolean>: Names are ascii-only or are extended
characters permitted?
@CONFIG COSTS
These options control how many pennies various things cost.
object_cost=<number>: How many pennies it costs to create an object.
exit_cost=<number>: How many pennies it costs to create an exit.
link_cost=<number>: How many pennies it costs to use @link.
room_cost=<number>: How many pennies it costs to @dig a room.
queue_cost=<number>: How many pennies it costs to queue a command.
Refunded when the command executes.
quota_cost=<number>: How much @quota goes down by for each object.
find_cost=<number>: How many pennies it costs to use @search, @find,
@entrances, and their function versions.
kill_default_cost=<number>: Default cost for kill.
kill_min_cost=<number>: Smallest amount of pennies for kill.
kill_bonus=<number>: What percent of the pennies spent for a successful
kill go to the victim.
@CONFIG DB
These are database options.
player_start=<dbref>: What room newly created players are in.
master_room=<dbref>: The location of the master room.
ancestor_room=<dbref>: If set to a good object, this is considered a global
parent for all rooms. If -1 or a nonexistant object, then disabled.
ancestor_exit=<dbref>: As ancestor_room for exits.
ancestor_thing=<dbref>: As ancestor_room for things.
ancestor_player=<dbref>: As ancestor_room for players.
base_room=<dbref>: The starting room used to determine if other rooms
are disconnected.
default_home=<dbref>: The room to send things to when they're homeless.
exits_connect_rooms=<boolean>: Is a room with any exit at all in not
considered disconnected for FLOATING checks?
zone_control_zmp_only=<boolean>: Do we only perform control checks on ZMPs,
or do we check ZMOs and ZMRs too?
@CONFIG DUMP
These options affect database saves and other periodic checks.
forking_dump=<boolean>: Does the game clone itself and save in the
copy, or just pause while the save happens?
dump_message=<string>: Notification message for a database save.
dump_complete=<string>: Notification message for the end of a save.
dump_warning_1min=<string>: Notification one minute before a save.
dump_warning_5min=<string>: Notification five minutes before a save.
dump_interval=<time>: Seconds between database saves.
warn_interval=<time>: Seconds between automatic @wchecks.
purge_interval=<time>: Seconds between automatic @purges.
dbck_interval=<time>: Seconds between automatic @dbcks.
@CONFIG FLAGS
These options set the default flags for newly-created objects and channels.
player_flags=<string>: List of flags to set on newly created players
room_flags=<string>: List of flags to set on newly created rooms
thing_flags=<string>: List of flags to set on newly created things
exit_flags=<string>: List of flags to set on newly created exits
room_flags=<string>: List of flags to set on newly created rooms
channel_flags=<string>: List of flags to set on newly created channels
@CONFIG FUNCS
These options affect the behavior of some functions.
safer_ufun=<boolean>: Are objects stopped from evaluting attributes on
objects with more privileges than themselves?
function_side_effects=<boolean>: Are function side effects (functions which
alter the database) allowed?
@CONFIG LIMITS
Limits and other constants.
max_dbref=<dbref>: The highest dbref an object can have. If 0,
there is no limit on database size.
max_attrs_per_obj=<number>: The maximum attributes an object can have.
max_logins=<number>: The maximum number of connected players.
max_guests=<number>: The maximum number of connected guests. If 0,
no limit. If -1, limited by the number of guest players in the db.
max_named_qregs=<number>: The maximum number of qregs except for a-z
and 0-9. The limit is per-localize()-call.
connect_fail_limit=<count>: The maximum number of times in a 10 minute
period that an IP can attempt to log in and fail. Maximum is 50,
0 means no limit.
idle_timeout=<time>: The number of minutes a connection can be idle
before getting booted. 0 means no limit.
unconnected_idle_timeout=<time>: The number of minutes a connection can be
sitting at the login screen before getting booted. 0 means no limit.
Continued in help @config limits2
@CONFIG LIMITS2
Limits and constants, continued.
whisper_loudness=<number>: The percentage chance of a whisper/noisy
being heard.
starting_quota=<number>: How much quota new players get.
starting_money=<number>: How many pennies new players get.
paycheck=<number>: How many pennies players get each day they log on.
max_pennies=<number>: The maximum pennies an object can have.
mail_limit=<number>: How many @mail messages someone can have.
max_depth=<number>: How deep can @parent chains can go.
player_queue_limit=<number>: The number of commands a player can have
queued at once.
queue_loss=<number>: One in <number> times, queuing a command will cost
an extra penny that doesn't get refunded.
queue_chunk=<number>: How many queued commands get executed in a row when
there's no network activity pending.
Continued in help @config limits3
@CONFIG LIMITS3
Limits and constants, continued.
active_queue_chunk=<number>: How many queued commands get executed in a
row when there is network activity pending.
function_recursion_limit=<number>: The depth to which softcode functions
can call more functions.
function_invocation_limit=<number>: The maximum number of softcode
functions that can be called in one command.
guest_paycheck=<number>: How many pennies guests get each day.
max_guest_pennies=<number>: The maximum pennies a guest can have.
player_name_len=<number>: The maximum length of a player name.
queue_entry_cpu_time=<number>: The maximum number of milliseconds a
queue entry can take to run.
use_quota=<boolean>: Controls if quotas are used to limit the number
of objects a player can own.
Continued in help @config limits4
@CONFIG LIMITS4
Limits and constants, continued
max_aliases=<number>: The maximum number of aliases a player can have.
keepalive_timeout=<time>: How often should an 'Are you still there?' query
be sent to clients, to stop players' routers booting idle connections?
max_parents=<number>: The maximum number of levels of parenting allowed.
call_limit=<number>: The maximum number of times the parser can be called
recursively for any one expression.
chunk_migrate=<number>: Maximum number of attributes that can be moved to
disk cache per second.
@CONFIG LOG
These options affect logging.
log_commands=<boolean>: Are all commands logged?
log_forces=<boolean>: Are @forces of wizard objects logged?
@CONFIG NET
Networking and connection-related options.
mud_name=<string>: The name of the mush for mudname() and @version and
the like.
mud_url=<string>: If this is set, the welcome message for the mush is
bracketed in <!-- ... --> for all clients, and web browsers are
redirected to the url described in mud_url.
use_dns=<boolean>: Are IP addresses resolved into hostnames?
logins=<boolean>: Are mortal logins enabled?
player_creation=<boolean>: Can CREATE be used from the login screen?
guests=<boolean>: Are guest logins allowed?
pueblo=<boolean>: Is Pueblo support turned on?
sql_platform=<string>: What kind of SQL server are we using?
("mysql" or "disabled")
sql_host=<string>: What is the hostname or ip address of the SQL server
ssl_require_client_cert=<boolean>: Are client certificates verified in
SSL connections?
@CONFIG PARAMETERS
Many of the mush's run-time options can be set from the game by
wizards, using @config/set <option>=<new value>. Those that can be set
with visible changes are listed below, grouped by category. See help
@config <category> for details on each.
Attribs Chat Cmds Cosmetic Costs
Db Dump Flags Funcs Limits
Log Net Tiny
The categories and groups are the same as those used by @config/list.
Values must be of the listed type for each option. They include:
<number>, <dbref>, <boolean> (Yes/No), <time>, or <string>.
Options which take a <time> will accept either a number of seconds
or a combination of numbers followed by 's' for seconds, 'm' for
minutes or 'h' for hours, making 1h30m and 5400 equivalent.
<dbref> options can be given with or without the leading '#', so
'1' and '#1' are the same.
@CONFIG TINY
Options that help control compability with TinyMUSH servers.
null_eq_zero=<boolean>: Is a null string where a number is expected
considered a 0?
tiny_booleans=<boolean>: Use Tiny-style boolean values where only
non-zero numbers are true.
tiny_trim_fun=<boolean>: Are the second and third arguments to trim()
reversed?
tiny_math=<boolean>: Is a string where a number is expected considered
a 0?
silent_pemit=<boolean>: Does @pemit default to @pemit/silent?
@CONFORMAT
@conformat <object>[=<format>]
When set, the CONFORMAT attribute is evaluated when <object> is looked at,
and the result is displayed instead of the usual "Contents:" (for rooms)
or "Carrying:" (for players and things) list of contents.
The dbrefs of the objects which would appear in the normal contents list
are passed to the attribute as %0 (you can use lcon(me) for a full contents
list). A list of the names of these objects as they would appear in the
default contents list is passed as %1, |-delimited.
Q-registers (set via setq() and similar functions) are inherited from the
@descformat, and passed on to the @exitformat.
Examples:
Show the normal contents list, but in upper-case:
> @conformat here=edit(ucstr(%1), |, %r)
Show just the object names (with no ansi) in a table:
> @conformat here=table(iter(%0, name(%i0), %b, |), 20, width(%#), |)
See also: look, @exitformat, @nameformat, @descformat, @invformat,
@idescformat
@COST
@cost <object>[=<amount>]
The COST attribute contains the number of pennies that must be given to
<object> to trigger its @pay/@opay/@apay attributes. If less than this
amount is given, the money will be refused, and if more is given, the
difference is refunded.
This attribute is evaluated, with the amount being given passed as %0.
If the attribute returns a number less than 0, the money will be refused.
Non-players must have this attribute set in order to receive pennies.
Players who don't have a COST always accept the amount of pennies given.
Example:
> @cost Exit Machine=10
> @apay Exit Machine=@open %n-exit
> @pay Exit Machine=Your exit has been created.
> give Exit Machine=10
Your exit has been created.
(The exit will also have been opened by the machine.)
> @cost charity=%0
> @pay charity=Thanks for your donation of %0 [money(%0)].
See also: give, MONEY, @pay, money(), buy
@CPATTR
@cpattr[/noflagcopy] <obj>/<attr>=<obj1>[/<attr1>][, ..., <objN>[/<attrN>]]
@mvattr[/noflagcopy] <obj>/<attr>=<obj1>[/<attr1>][, ..., <objN>[/<attrN>]]
@cpattr copies the <attr> attribute from <obj> to <obj1> (and any other
objects given). By default, the new attributes will have the same name as
the original, but you can specify a different name to be used on each
object if you wish.
@mvattr works the same, but also attempts to remove the original attribute
after copying it.
Attribute flags are copied as well, unless the /noflagcopy switch is given.
This is recommended when copying from a non-standard attribute to a
standard one.
Example:
> @cpattr box/test=box/test1, cube/random, tribble/describe
would check the object "box" for an attribute named TEST and then
copy it to the attributes TEST1 on "box", RANDOM on the object named
"cube", and DESCRIBE on the object named "tribble".
> @cpattr box/test=cube
would copy the TEST attribute from "box" to TEST on "cube".
See also: ATTRIBUTES, NON-STANDARD ATTRIBUTES, @set
@CREATE
@create <name>[=<cost>[,<dbref>]]
This command creates a new thing called <name>. Creating an object costs
a certain number of pennies (see '@config object_cost'); you can specify
a higher cost if you wish. This cost is refunded to you when the object
is destroyed.
Some MUSHes choose to limit the number of objects you can create by
setting a quota.
Wizards and objects with the pick_dbref power can also specify the
<dbref> of a garbage object to use when creating the
object. Otherwise, the object is given the next available dbref.
See also: give, @quota, MONEY, @clone, create(), @dig, @open, @pcreate
@DBCK
@dbck
This is a wizard only command. It forces the database to perform a
series of internal cleanup and consistency checks that normally run
approximately every 10 minutes:
1. For every object, make sure its location, home, next, contents,
parent, and zone fields are valid objects.
2. Check for disconnected rooms that aren't set FLOATING
3. For every exit, player, or thing, make sure there is exactly one
way to reach it from a room by following the contents fields of
non-exits, the next fields of non-rooms, and the exits fields of
rooms.
4. For every thing or player, make sure that it is in the contents
list of its location. Make sure every exit is in the exits list
of its location.
5. Check that objects being used as zones have a @lock/zone.
@dbck no longer performs an @purge. The results of @dbck are written
to the game's error log, and not reported to the Wizard.
@DEATH
@death <object>[=<message>]
@odeath <object>[=<message>]
@adeath <object>[=<action list>]
These attributes contain the message shown to the killer, the message
shown to others in the room, and the actions to be taken when <object>
is killed.
Example:
> @death me=You have just slain Cyclonus!
> @odeath me=falls to the ground and vanishes.
See also: kill, BEING KILLED, ACTION LISTS, VERBS
@DEBUGFORWARDLIST
@debugforwardlist <object>[=<list of dbrefs>]
When <object> has an @debugforwardlist attribute set, any debug output it
produces (either because it has the DEBUG flag set, or because an attribute
with the DEBUG attribute flag is evaluated) is forwarded to all the dbrefs
listed in the debugforwardlist.
The @debugforwardlist 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 pass its @lock/forward.
See also: DEBUG, @forwardlist, @lock
@DECOMPILE
@decompile[/<switches>] <object>[=<prefix>]
@decompile[/<switches>] <object>/<attribute patterns>[=<prefix>]
@decompile outputs a list of the commands that you would have to enter
in order to recreate <object>. Useful for either copying objects from
one MUSH to another, or for making logs of important objects to protect
against an accidental @nuke or a crash.
All output lines are prefixed with <prefix>, if one is given. This is
useful for creating client-side scripts for editing code.
You can either @decompile an entire object, or just certain parts of it.
To @decompile just a few attributes, for example, you could type:
@decompile <object>/<attribute pattern> [ ... <attribute patternN>]
including each attribute. Attribute patterns can be wildcards.
Continued in 'help @decompile2'.
@DECOMPILE2
@decompile takes the following switches, which can be combined:
@decompile/name
This switch causes @decompile to use the object's name, instead of its
dbref. This is the default.
@decompile/db
This switch makes @decompile use the object's dbref instead of its name,
which is useful for editing code off-MUSH.
@decompile/flags
Only the code to @create the object and set flags/powers/locks is printed.
When an <attribute pattern> is given, this switch is ignored, and
@decompile only prints the matching attributes.
@decompile/attribs
Only the code to set the object's attributes is printed. Same as
@decompile <object>/**
@decompile/skipdefaults
Don't output commands to set attribute flags if those flags are the
defaults for that attribute on that MUSH.
@decompile/tf
Explained in 'help @decompile3'.
Continued in 'help @decompile3'.
@DECOMPILE3
@decompile/tf <object>[/<attribute>]
The /tf works the same as if you'd typed:
@decompile/db <obj>[/<attrs>]=[default(me/TFPREFIX, FugueEdit >%b)]
with the exception that @decompile/tf does not include commands for setting
attribute flags. If you have a TFPREFIX attribute set, the (unevaluated)
contents of that attribute is used as the prefix. Otherwise, the string
"FugueEdit > " is used. It's useful for automatically copying @decompile
output into your client to alter. It is highly recommended that you set a
TFPREFIX attribute, to prevent others from maliciously placing code in your
client's command line.
To set up @decompile/tf:
In TinyFugue:
/def -ag -mglob -p100 -t"FugueEdit > *" fe = /grab %-2
In SimpleMU:
Set your Options -> Grab Password
@set me=tfprefix:<grabpassword>FugueEdit >%b
See also: CLIENTS, ATTRIBUTES, WILDCARDS, MUSHCODE
@DESC
@describe <object>[=<description>]
This command sets the description of the object, which will be seen
whenever something looks at the object with the 'look' command. Every
object should have a description, even if just a short one describing its
purpose. When looking at a thing, player or exit which has no description,
you will see the message "You see nothing special.". A room with no desc
set shows nothing.
The description can be formatted using the @descformat attribute. This is
particularly useful for @parents and ancestors.
When inside a thing or player, you will see its @idescribe instead, if
one is set.
@describe can be abbreviated as @desc.
See also: look, @adescribe, @idescribe, @descformat
@DESCFORMAT
@descformat <object>[=<format>]
When set, this attribute is evaluated and displayed instead of <object>'s
@describe, when someone looks at <object>. The evaluated @describe, which
would be shown if no @descformat were set, is passed to the @descformt
as %0; use v(describe) to get the unevaluted description.
This is primarily useful for room parents, to enforce a consistent look
for all rooms without having to apply formatting to ever @describe. Note
that this object is only used with @describe - to format the @idescribe,
use @idescformat.
Q-registers (set via setq() and similar functions) are inherited from the
@nameformat, and passed on to the @conformat.
Example:
> @descformat Room Parent=repeat(=, width(%#))%r%0[repeat(=, width(%#))]
See also: look, @exitformat, @nameformat, @conformat, @idescformat,
@invformat
@DESCRIBE
@describe <object>[=<description>]
This command sets the description of the object, which will be seen
whenever something looks at the object with the 'look' command. Every
object should have a description, even if just a short one describing its
purpose. When looking at a thing, player or exit which has no description,
you will see the message "You see nothing special.". A room with no desc
set shows nothing.
The description can be formatted using the @descformat attribute. This is
particularly useful for @parents and ancestors.
When inside a thing or player, you will see its @idescribe instead, if
one is set.
@describe can be abbreviated as @desc.
See also: look, @adescribe, @idescribe, @descformat
@DESTINATION
@destination <exit>[=<destination>]
@exitto <exit>[=<destination>]
The DESTINATION attribute is used by variable exits. To make a variable
exit, you create it in the usual way (with @open), then @link it to
"variable" instead of a dbref. When someone attempts to pass through the
exit, the DESTINATION attribute will be evaluated, and should return a
dbref; the dbref will be used as the location for the person to go to.
The exit name or alias the moving player used is passed to the attribute
as %0.
The exit must be able to @link itself to the dbref returned by the
attribute. This means the exit must control the destination, the
destination must be set LINK_OK, or the exit must have the Link_Anywhere
@power.
If no DESTINATION attribute is set on a variable exit, the MUSH will also
check for an EXITTO attribute, for cross-platform compatability. It works
exactly the same as the DESTINATION attribute.
Note that, unlike most attributes, @destination cannot be abbreviated and
must be typed in full.
Example:
> @open Random Exit;re
> @link re=variable
> @power re=link_anywhere
> @destination re=pickrand(#5 #123 #999 [home(%#)] %L)
See also: EXITS, @link, @open, LINK_OK, Link_Anywhere Power
@DESTROY
@destroy[/override] <object>
@nuke <object>
@undestroy <object>
The @destroy command marks <object> for destruction by setting the GOING
flag on it. If <object> is a room, all the exits in the room are marked
for destruction as well. If <object> is a player, and the @config option
destroy_possessions is on, everything he owns is marked for destruction as
well. (If really_safe is also on, his SAFE objects will not be destroyed.)
If the adestroy @config option is on, the ADESTROY attribute will be
triggered when the object is first @destroy'd.
The MUSH checks for GOING objects every ten minutes or so (see '@config
purge_interval'); each one is set with the GOING_TWICE flag, and will be
destroyed totally on the next cycle. You can save it from destruction
during this period using the @undestroy command, or @destroy it again to
destroy it instantly.
When an object is destroyed, any commands, @waits and semaphores it has
queued are drained, and the object's owner has the quota for the object,
and the initial cost of creating it, refunded.
Continued in 'help @destroy2'.
@DESTROY2
To destroy an object, you must either control it, control its source or
destination room (for exits), or it must be set DESTROY_OK and you must
pass its @lock/destroy.
To destroy objects set SAFE, you must use @destroy/override or @nuke. If
the really_safe @config option is on, even @nuke can't destroy SAFE
objects, and you must clear the safe flag first.
Players can only be @destroyed when they are not connected, and even then
can only be destroyed by a Wizard player. If the destroy_possessions
@config option is on, anything the player owns is @destroyed. If the
really_safe option is also on, his SAFE possessions are @chown'd to God
instead. If the option is off, all their possessions are @chown'd to God.
@recycle is an alias for @destroy. Some MUSHes disable @destroy and only
use @recycle, to avoid players mistyping.
See also: @undestroy, @create, @dig, @open, DESTROY_OK, SAFE
@DIG
@dig[/teleport] <room name>[=<exit to>, <exit from>, <room dbref>,
<to dbref>, <from dbref>]
This command creates a new room named <room name>. Creating a room costs
some pennies (see '@config room_cost' for exactly how many). If the
/teleport switch is given, you will be teleported to the room after it's
created, as per the @teleport command.
If <exit to> is given, the MUSH will automatically open an exit from your
current location to the new room named <exit to>, if you have permission.
You can also specify <exit from>, to create an exit from the new room back
to your current location. Opening exists also costs pennies; see
'@config exit_cost'. The exit names may contain multiple aliases, separated
with semicolons, as per 'help @name'.
Wizards and objects with the pick_dbref power can also specify the
dbrefs of garbage objects to use when creating the room and the to
and from exits.
See 'help @dig2' for examples.
@DIG2
Examples:
> @dig Kitchen
This command will create a new room named 'Kitchen'. You will be informed
what the dbref of this room is.
> @dig Kitchen=Kitchen <N>;n;north;kitchen;k
This will create the room as above, and also open an exit leading to it
named "Kitchen <N>" with the aliases n, north, kitchen and k. It will NOT
create an exit coming back from the Kitchen room.
> @dig Kitchen=Kitchen <N>;n;north;kitchen;k, Out <S>;s;south;out;o
This will do just the same as the above, except it will also create an
exit named "Out <S>" with the aliases s, south, out and o coming back from
the kitchen to whatever room you are currently in.
See also: @open, @link, EXITS, @create, DBREF, dig()
@DISABLE
@enable <option>
@disable <option>
These wizard-only commands allow for any boolean @config options to
be changed (see 'help @config paramaters' for a list).
@enable <option> is the same thing as @config/set <option>=yes
@disable <option> is the same thing as @config/set <option>=no
See also: @config
@DOING
@doing <object>[=<message>]
With a <message> argument, this command sets <object>'s DOING attribute to
<message>. The DOING attribute is only meaningful for players; the
evaluated result is shown on the output of the normal MUSH WHO command, and
on the login screen WHO.
With no <message> the attribute is cleared.
To change the message shown above player @doings in WHO, use @poll.
See also: @poll, WHO, doing()
@DOLIST
@dolist[/notify][/delimit <delim>] <list>=<action list>
@dolist queues the <action list> for execution once for each element in
<list>. <list> is space-separated, unless the /delimit switch is given,
in which case it is a <delim>-separated list.
If the string "##" appears anywhere in <action list>, it will be replaced
with the current element of <list>. The string "#@" is replaced with the
position of the current element in the list. Note that these replacements
occur before evaluation, so are unsafe on user input, and cannot be used
in nested in nested @dolists. It is HIGHLY recommended that you use itext()
and inum() instead, which serve the same purpose but are evaluated normally
and can be used with nested @dolists. The %iL substitution safely refers to
the outermost @dolist, much the same as ##.
If the /notify switch is given, the command "@notify me" is queued after
all copies of <action list> have been queued. This is useful for object
synchronization with semaphores.
See 'help @dolist2' for examples.
See also: iter(), itext(), map(), @notify, SEMAPHORES, ACTION LISTS
@DOLIST2
Examples:
> @dolist a b c=say %i0 is number [inum(0)]
You say, "a is number 1"
You say, "b is number 2"
You say, "c is number 3"
> &test me=$test: say Starting ; @wait me={say Done} ;
@dolist/notify a b c=say %i0 is [inum(0)]
> test
You say, "Starting"
You say, "a is 1"
You say, "b is 2"
You say, "c is 3"
Notified.
You say, "Done"
> @dolist a b c=@dolist 1 2 3=say %iL/%i0
You say, "a/1"
You say, "a/2"
You say, "a/3"
You say, "b/1"
You say, "b/2"
You say, "b/3"
You say, "c/1"
You say, "c/2"
You say, "c/3"
@DRAIN
@drain[/any][/all] <object>[/<attribute>][=<number>]
This command discards commands waiting on a semaphore without
executing them.
If the /any switch is given, then all semaphores associated with
<object> are @drained. Otherwise, only the specified semaphore
attribute (or SEMAPHORE if no <attribute> is specified) is @drained.
If the /all switch is given, then all queue entries associated with the
selected semaphore(s) are discarded, and the semaphore attribute(s)
are cleared. Otherwise, only the indicated <number> of queue entries are
discarded. If no <number> is given, then the /all switch is assumed.
You may not specify both the /any switch and a specific attribute.
Similarly, you may not specify both the /all switch and a number.
See also: SEMAPHORES, @wait, @notify
@DROP
@drop <object>[=<message>]
@odrop <object>[=<message>]
@adrop <object>[=<action list>]
When <object> is a player or thing, the @drop attribute is shown to whoever
drops <object>, and @odrop to others in the location <object> is dropped
in. The @adrop attribute is triggered when <object> is dropped.
When <object> is an exit, @drop is shown to objects going through <object>,
and @odrop is shown to objects in the exit's destination. @adrop is
triggered when someone passes through the exit.
Example:
> @drop Box=You put the box down gently.
> @odrop Box=puts the box down gently.
> @odrop South=arrives from the North.
See also: drop, empty, ACTION LISTS, VERBS, @success
@DUMP
@dump
@dump[/paranoid|/debug] [<check interval>]
This is a wizard-only command which saves a copy of the database from
memory into the outdb file on disk. The MUSH saves the game automatically
at a regular interval, controlled by the "dump_interval" @config option.
If the /paranoid switch is given, the game performs additional consistency
checking which corrects possible data corruption in the copy of the db
written to disk. If a check interval is specified, the game writes
confirmation of the dump to the checkpoint log file every <interval>
objects. If no interval is specified, it is taken to be the size of the
database, divided by 5.
@dump/debug is the same as @dump/paranoid, but also attempts to fix any
errors found in the running (in-memory) copy of the database. In order to
do this safely, the dump will be a non-forking dump, even if the MUSH is
configured to do forking dumps (see "@config forking_dump").
These switches should ONLY be used if a normal @dump is not being done
correctly. They should generally only be done by wizards with access to
the account on which the MUSH is running, since others will not have
access to the checkpoint log file.
See also: @shutdown
@EALIAS
@ealias <object>[=<enter alias1>[; ... ; <enter aliasN>]]
@lalias <object>[=<leave alias1>[; ... ; <leave aliasN>]]
These attributes contain lists of "enter aliases" and "leave aliases" for
<object> - any of the aliases can be used in place of "enter <object>" and
"leave <object>" to enter/leave the object.
These attributes only have meaning for players and things (as rooms/exits
cannot be "enter"ed) - the aliases for exits are stored in @alias.
Example:
> @ealias Chair=Sit down;sit
> @lalias Chair=Stand up;stand
See also: enter, leave, goto, ENTER_OK
@EDIT
@edit[/first][/check][/quiet] <object>/<attributes>=<search>, <replace>
@edit[/check][/quiet] <object>/<attributes>=$, <string to append>
@edit[/check][/quiet] <object>/<attributes>=^, <string to prepend>
This command allows you to edit the contents of attributes, without having
to retype the entire attribute.
All the attributes on <object> whose names match the wildcard pattern
<attributes> will be searched for the string <search>, and each occurrence
of it will be replaced with the string <replace>.
If <search> is "$", then <replace> will be added to the end of the
attributes. When <search> is "^", <replace> will be added to the beginning
of the attributes. (If you need to replace a single $ or ^, consider using
@edit/regexp (see help @edit2) or the edit() function.)
If the /first switch is given, only the first occurrence of <search> in
each attribute is replaced. If the /check switch is given, the attributes
are not altered, you'll just be shown what would be changed (with the
changes ansi-highlighted).
If the /quiet switch is given, you won't be shown the modified text, you'll
just be told how many of the matching attributes were/weren't edited.
Useful when edited a lot of large/spammy attributes.
<search> and <replace> are not evaluated, so you don't need to escape
special characters. If either contains commas, however, you may need to
wrap the string in {curly braces}.
Continued in 'help @edit2'.
@EDIT2
@edit/regexp[/all][/nocase][/check][/quiet]
<object>/<attributes>=<regexp>,<replace>
When the /regexp switch is given, @edit performs a regular expression
replacement, similar to the regedit() function. Normally, only the first
match per attribute will be replaced; if the /all switch is given, all
possible matches in each attribute are replaced (as per regeditall()).
Regexp matches are case-sensitive by default, but the /nocase switch can
be given to make them case-insensitive (as per regediti()/regeditalli()).
The /check and /quiet switches work the same as for non-regexp @edits.
Note that, unlike normal @edits, the <replace> for an @edit/regexp WILL
be evaluated, once for each replacement made, with the $0 token being
replaced with the overall matching text, $1 with the first subexpression,
and so on. Named subexpressions are also possible via $<name>.
Example:
> &foo me=Block of text/Wed Feb 22 22:54:02 2012/#10010
> @edit/regexp me/foo=^(.+)/([^/]+)/(#[0-9]+(?::[0-9]+)?)$,
ucstr($1) -- [convtime($2)] -- [name($3)]
FOO - Set: BLOCK OF TEXT -- 1329951242 -- Minion
Replace a literal '^' with 'v'
> @edit/regexp me/bar=\^, v
See also: edit(), regedit(), ATTRIBUTES,
@EFAIL
@efail <object>[=<message>]
@oefail <object>[=<message>]
@aefail <object>[=<action list>]
These attributes contain the message shown to someone who fails to enter
<object>, the message shown to others when someone fails to enter <object>,
and the actions to be taken when someone fails to enter it, respectively.
See also: enter, @enter, FAILURE, ACTION LISTS, VERBS
@ELOCK
@elock <object>[=<key>]
@eunlock <object>
@elock sets the Enter @lock for <object> to <key>, or clears the the lock
if no <key. is given. @eunlock removes the Enter @lock for <object>.
@elock and @eunlock are deprecated and uses of them should be replaced by
@lock/enter <object>[=<key>]
and
@lock/enter <object>
See also: @lock, locktypes, enter, ENTER_OK
@EMIT
@emit[/<switch>] <message>
\<message>
This sends <message> to everyone in your location. Nothing is added to the
message, not even your name. If you have a SPEECHMOD attribute set, it
will be evaluated with <message> as %0, and | as %1, and the result will be
shown instead of <message> as long as it evaluates to a non-empty string.
If the /room switch is given, this command acts like @lemit instead. The
/silent switch can be used with it to suppress the confirmation for @lemit.
The /noeval switch prevents the MUSH from evaluating <message>.
The /spoof switch causes nospoof notifications to show the enactor's
dbref instead of the executor's dbref, and requires control over
the enactor or the Can_spoof power.
@emit can be abbreviated "\"
See also: @nsemit, emit(), @pemit, @remit, @oemit, @lemit, @zemit, @cemit,
@speechmod, NOSPOOF and SPOOFING.
@ENABLE
@enable <option>
@disable <option>
These wizard-only commands allow for any boolean @config options to
be changed (see 'help @config paramaters' for a list).
@enable <option> is the same thing as @config/set <option>=yes
@disable <option> is the same thing as @config/set <option>=no
See also: @config
@ENTER
@enter <object>[=<message>]
@oenter <object>[=<message>]
@oxenter <object>[=<message>]
@aenter <object>[=<action list>]
These attributes contain the messages shown to someone who enters <object>,
the message shown to others inside <object> when someone enters it, the
message shown to those in <object>'s location when someone enters it, and
the actions to be taken by <object> when someone enters it, respectively.
The old location of the entering object is passed in %0, if <object>
had permission to see it there.
Example:
> @enter Sofa=You sit on the comfy sofa.
> @oenter Sofa=sits with you on the sofa.
> @oxenter Sofa=sits down on the sofa. It looks comfy.
> @aenter Sofa=@pemit/silent owner(me)=%n sat down on [name(me)]!
See also: enter, @ealias, leave, ACTION LISTS, VERBS
@ENTRANCES
@entrances[/<switch>] [<object>][=<begin>[, <end>]]
This command will show you all objects linked to <object>. If you don't
specify an <object>, your current location is used. You can limit the
range of the dbrefs searched by specifying <begin> and <end>.
You can use any combination of switches to limit the types of objects:
/exits show only exits linked to <object>
/things show only things which have their homes in <object>
/players show only players who have their homes in <object>
/rooms show only rooms which have a drop-to of <object>
If you 't control <object>, or have the Search or See_All powers, all
objects linked to <object> are listed. Otherwise, only objects which you
can examine will be shown.
See also: @link, @search, entrances()
@EUNLOCK
@elock <object>[=<key>]
@eunlock <object>
@elock sets the Enter @lock for <object> to <key>, or clears the the lock
if no <key. is given. @eunlock removes the Enter @lock for <object>.
@elock and @eunlock are deprecated and uses of them should be replaced by
@lock/enter <object>[=<key>]
and
@lock/enter <object>
See also: @lock, locktypes, enter, ENTER_OK
@EXITFORMAT
@exitformat <object>[=<format>].
When set, the exitformat attribute is evaluated and shown in place of the
"Obvious exits" list for a room. (It has no meaning when set on other types
of object.) The dbrefs of the exits which would appear in the default
"Obvious exits" list is passed to the attribute as %0 as a space-separated
list; you can use lexits(me) to get all the exits in the room.
Q-registers (set via setq() and similar functions) are inherited from the
@conformat.
Example:
> @exitformat here=Exits: [itemize(iter(%0, name(%i0)))]
See also: TRANSPARENT, @conformat, @nameformat, @descformat
@EXITTO
@destination <exit>[=<destination>]
@exitto <exit>[=<destination>]
The DESTINATION attribute is used by variable exits. To make a variable
exit, you create it in the usual way (with @open), then @link it to
"variable" instead of a dbref. When someone attempts to pass through the
exit, the DESTINATION attribute will be evaluated, and should return a
dbref; the dbref will be used as the location for the person to go to.
The exit name or alias the moving player used is passed to the attribute
as %0.
The exit must be able to @link itself to the dbref returned by the
attribute. This means the exit must control the destination, the
destination must be set LINK_OK, or the exit must have the Link_Anywhere
@power.
If no DESTINATION attribute is set on a variable exit, the MUSH will also
check for an EXITTO attribute, for cross-platform compatability. It works
exactly the same as the DESTINATION attribute.
Note that, unlike most attributes, @destination cannot be abbreviated and
must be typed in full.
Example:
> @open Random Exit;re
> @link re=variable
> @power re=link_anywhere
> @destination re=pickrand(#5 #123 #999 [home(%#)] %L)
See also: EXITS, @link, @open, LINK_OK, Link_Anywhere Power
@FAILURE
@failure <object>[=<message>]
@ofailure <object>[=<message>]
@afailure <object>[=<action list>]
@failure contains the message shown to someone who fails to pass <object>'s
Basic @lock. @ofailure contains the message shown to others, and @afailure
contains the actions to be taken by <object>.
For players and things, this means failure to get/take. For exits, it means
failure to go through the exit. For rooms the lock is checked when objects
"look" inside the room, though failure to pass the lock does not prevent
the object from looking.
See also: get, move, @lock, ACTION LISTS, VERBS, @success
@FILTER
@filter <object>[=<pattern1>[, <pattern2>[, ..., <patternN>]]
The filter attribute is used in conjunction with the AUDIBLE flag. When
set, sound which matches any of the comma-separated list of wildcard
patterns in this attribute is not propagated through the audible object.
@filter uses the type of matching described in HELP SWITCH WILDCARDS.
If you need to use a comma in one of the patterns, put a \ before it,
do not use {} curly braces.
You can set the regexp flag on the filter attribute to use regular
expressions instead of wildcard patterns, and can set the case flag to make
the patterns case-sensitive.
Sounds are only forwarded if the speaker also passes <object>'s
@lock/filter, which receives the sound heard as %0.
See 'help @filter2' for an example.
See also: AUDIBLE, @infilter, attribute flags, LISTENING, @forwardlist,
@prefix
@FILTER2
Example:
An audible exit leads from the room where Wizard is standing to another
room where the puppet "Wiztoy" is standing.
> @prefix exit=From inside,
> :tests.
Wizard tests.
Wiztoy> From inside, Wizard tests.
> @filter exit=* jumps.,* tests.
> :jumps.
Wizard jumps.
> :tests.
Wizard tests.
> :tests again.
Wizard tests again.
Wiztoy> From inside, Wizard tests again.
@FIND
@find [<name>][=<begin>, <end>]
Displays the name and dbref of every room, thing, or player you control
whose name matches <name>. If <begin> and <end> are given, @find will start
at the <begin>th object in the database, and will not search past the
<end>th object.
You may wish to use the @search command instead, which can filter the
results more complexly.
See also: @search, lsearch(), @entrances
@FIRSTEXIT
@firstexit <exit1>[, ... , <exitN>]
Normally, exits appear in a room's Obvious exits list in the order they
were created, most recent first. You can use this command to rearrange
them. @firstexit moves each exit, in the order given, to the top of the
Obvious exits list for its source room. You must control the room.
Example:
> @dig/teleport Test Room
> @open Two ; @open Three ; @open One
> look
Test Room(#3Rn)
Obvious exits:
One, Three, and Two
> @firstexit two, one
> look
Test Room(#3Rn)
Obvious exits:
One, Two, and Three
See also: EXITS, @open, @link
@FLAG
@flag <flag name>
@flag/list [<flag name pattern>]
@flag/add <flag name>=[<letter>], [<type(s)>], [<setperms>], [<unsetperms>]
@flag/delete <flag name>
@flag/alias <flag name>=<alias>
@flag/letter <flag name>[=<letter>]
@flag/restrict <flag name>=[<setperms>], [<unsetperms>]
@flag/type <flag name>=<type(s)>
@flag/enable <flag name>
@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.
See 'help @flag2' for information on @flag/add.
See also: FLAGS, @set, @power, flag permissions
@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>]
@ofollow <object>[= <message>]
@aunfollow <object>[=<action list>]
Sets the message shown to someone who begins following <object>,
the message shown to others in the room, and the actions to be taken
by <object> when someone begins following it, respectively. The name
of the person following <object> is automatically prepended to the
@ofollow message.
See also: follow, unfollow, @unfollow, followers(), ACTION LISTS, VERBS
@FORCE
@force[/noeval][/inline] <object>=<action list>
This command forces <object> to queue the given action list, as if the
object had entered the action list itself. You must control <object> to
@force it. @force is useful for manipulating puppets.
If /inline is given, <object> will run <action list> _now_, instead of
being queued for execution later. By default, <action list> will be able
to see/alter q-registers in the calling action list, and any @breaks in
<action list> will also stop the calling action list. The following switches
alter that behaviour:
/nobreak: @breaks in <action list> will not stop the calling action list
/localize: q-registers will be saved before <action list> is run, and
restored after.
/clearregs: q-registers will all be reset before <action list> is run.
You'll usually want to use /localize as well with this.
@force/inplace is an alias for @force/inline/nobreak/localize.
@force can be abbreviated as
<dbref> <action list>
Continued in 'help @force2'.
@FORCE2
Normally, the action list is evaluated twice - once when @force is run, and
again when <object> runs the action list. If the /noeval switch is given,
<action list> is not evaluated until it is run by <object>.
Examples:
> @create Lackey
Created: Object #103
> @force Lackey=go east
Lackey goes east.
Lackey has left.
> @force #103=page Cyclonus=Hi there!
Lackey pages: Hi there!
> #103 page Cyclonus=Whee
Lackey pages: Whee
Continued in 'help @force3'.
@FORCE3
Normally, @force creates a new queue entry. @force/inline does not.
Examples:
> @create Lackey
Created: Object #103
> &order me=$order *:say Lackey, %0 ; @force Lackey=%0 ; say Done?
> order pose salutes!
You say, "Lackey, pose salutes!"
You say, "Done?"
Lackey salutes!
> &order me=$order *:say Lackey, %0 ; @force/inline Lackey=%0 ; say Done?
> order pose salutes!
You say, "Lackey, pose salutes!"
Lackey salutes!
You say, "Done?"
See also: PUPPET, DBREF, objeval()
@FORWARDLIST
@forwardlist <object>[=<list of dbrefs>]
If <object> is set AUDIBLE, any sound it hears which passes its @filter
and @lock/filter will be forwarded (prefixed with its @prefix) to each
of the dbrefs given in its @forwardlist attribute, in much the same way
as puppets forward sound to their owners.
In order to forward to an object, you must either control it, have the
pemit_all power, or 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)
See also: @filter, @prefix, AUDIBLE, PUPPET, @debugforwardlist, @lock
@FUNCTION
@function [<function name>]
@function[/preserve] <name>=<obj>, <attrib>[, <min args>,
<max args>[, <restrictions>]]
@function <function name>=<object>/<attribute>
@function/<switch> <function name>
@function/restrict[/builtin] <function name>=<restrictions>
@function/alias <function name>=<alias>
@function/clone <function name>=<clone>
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 function.
/enable, to re-enable it.
/delete, to remove a user-defined or cloned function, or allow a built-in
function to be overriden by a user-defined one.
/restrict, to change the restriction flags on an existing function.
@function/alias creates an alias for the built-in function <function name>
so that it can also be called as <alias>. @function/clone creates a new
copy of <function name> named <clone>, which works the same initially but
can be restricted separately. You cannot alias or clone @functions, or
alias cloned functions.
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. If the maximum arguments is negative, any
additional comments are treated as part of the text of the last
argument. 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:
> &WORD_CONCAT #10=%0 %1
> say u(#10/word_concat, foo, bar)
You say, "foo bar"
> @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; God (#1) is suggested for this use. You can also create
functions from the alias.cnf file.
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=@dolist 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
This creates a new version of ansi() that doesn't do any colorization,
and that needs two arguments, like the built-in version. It will be
restricted to non-guest players.
See also: RESTRICT, FUNCTIONS, @startup, fn(), valid()
@GEDIT
@edit[/first][/check][/quiet] <object>/<attributes>=<search>, <replace>
@edit[/check][/quiet] <object>/<attributes>=$, <string to append>
@edit[/check][/quiet] <object>/<attributes>=^, <string to prepend>
This command allows you to edit the contents of attributes, without having
to retype the entire attribute.
All the attributes on <object> whose names match the wildcard pattern
<attributes> will be searched for the string <search>, and each occurrence
of it will be replaced with the string <replace>.
If <search> is "$", then <replace> will be added to the end of the
attributes. When <search> is "^", <replace> will be added to the beginning
of the attributes. (If you need to replace a single $ or ^, consider using
@edit/regexp (see help @edit2) or the edit() function.)
If the /first switch is given, only the first occurrence of <search> in
each attribute is replaced. If the /check switch is given, the attributes
are not altered, you'll just be shown what would be changed (with the
changes ansi-highlighted).
If the /quiet switch is given, you won't be shown the modified text, you'll
just be told how many of the matching attributes were/weren't edited.
Useful when edited a lot of large/spammy attributes.
<search> and <replace> are not evaluated, so you don't need to escape
special characters. If either contains commas, however, you may need to
wrap the string in {curly braces}.
Continued in 'help @edit2'.
@GIVE
@give <giver>[=<message>]
@ogive <giver>[=<message>]
@agive <giver>[=<action list>]
These attributes contain the message shown to <giver> when he gives an
object, the message shown to others in <giver>'s location when he gives an
object, and the actions to be taken by <giver> when he gives an object,
respectively.
In all cases, %0 is the dbref of the object being given, and %1 is the
dbref of the recipient.
See also: give, @receive, ACTION LISTS, VERBS
@GREP
@grep[/<switches>] <object>[/<attrs>]=<pattern>
@grep returns a list of all attributes on <object> which match <pattern>.
If <attrs> is specified, only attributes which match the wildcard pattern
<attrs> are checked; it defaults to "*". Use "**" for all attributes.
By default, attributes which contain the string <pattern> are returned.
However, if the /wild switch is given, <pattern> is treated as a wildcard
pattern, and attributes which match the pattern are returned. If the
/regexp switch is given, <pattern> is treated as a regular expression,
and attributes matching the regexp are returned. Please note that <pattern>
will NOT be evaluated, so you can easily grep for code strings.
All matches are case-sensitive, unless the /nocase switch is given.
@grep only shows a list of matching attributes. However, you can specify
the /print switch, in which case attribute values are also shown, with the
matching substrings ansi-highlighted if appropriate.
Continued in 'help @grep2'.
@GREP2
For backwards compatability, the /list switch provides the default
behaviour of listing attributes without printing the values, and /ilist and
/iprint are aliases for /list/nocase and /print/nocase.
See also: grep(), wildgrep(), regrep(), WILDCARDS
@HALT
@halt <object>[=<action list>]
@halt/pid <pid>
@halt/all
@allhalt
The @halt command removes all queued actions for <object>. If given,
<action list> is placed in the queue for the object instead. If no action
list is specified, the object is set HALT.
If <object> is a player, it clears the queue for the player and all of
his objects. You can use "@halt me" to clear your own queue without
setting yourself HALT.
Only wizards and objects with the halt @power can @halt other player's
objects. Note that halting an object does NOT affect any objects waiting
on it as a semaphore.
@halt/pid will cancel a single queue entry with the given pid (the
number in parenthesis before it in @ps). You must control the object
that queued the command or have the halt power to do this.
@halt/all is a synonym for @allhalt, and is a wizard-only command
which halts all objects in the game in an effort to free up the queue.
See also: @wait, @ps, SEMAPHORES, @drain, @notify
@HAVEN
@haven <player>[=<message>]
When someone attempts to page <player> and is unable to, either because
<player> is set HAVEN or because of his page lock, they will be shown
<message>, if it evaluates to something non-null.
Example:
> @set me=HAVEN
> @haven me=I'm AFK and can't answer pages. Please @mail instead.
See also: HAVEN, page, @lock, @away, @idle
@HIDE
@hide[/<switch>] <descriptor>
@hide[/<switch>] [<player>]
This command allows players to hide their online status. Hidden connections
don't show up on WHO, in lwho(), etc, when used by players without see_all.
The first form of this command affects the single connection specified by
<descriptor> (as returned by ports(), or shown on the admin WHO). The
second affects all connections for the given <player>, or the enactor if
no <player> is given. You must be a Wizard, Royalty, or have the Hide
@power to affect your own connections; only Wizards can affect other
players' connections.
The /on and /yes switches hide connections, while /off and /no unhide
connections. If no switch is given, the command acts as a toggle: for a
single descriptor, the hide status is reversed. For a player, if all his
connections are hidden, they will be unhidden. If any are unhidden, they
will all be hidden.
See also: hidden(), WHO, lwho(), lports(), ports()
@HOOK
@hook/<switch> <command>[=<object>, <attribute>]
@hook/list [<command>]
@hook makes the command parser evaluate given attributes at certain points
in command evaluation. The possible points, indicated by the proper switch:
@hook/ignore: The attribute is evaluated before the built-in command is run.
If it returns a false value, the command is skipped
(the input is still matched against softcoded commands)
@hook/override: The object/attribute is matched for a $command,
and if it matches, it is run instead of the built-in command,
but with the precedence of the built-in command (thus
overriding not only the built-in command but any local
$commands that might match). If the match fails, normal
built-in command processing continues. Note that all locks
and flags on the object (HALT, etc.) still apply.
@hook/override/inline: Same as @hook/override, but the resulting matches
are run immediately - not queued for later execution!
@hook/before: The attribute is evaluated before the built-in command is run.
@hook/after: The attribute is evaluated after the built-in command is run.
In all cases, %# is the dbref of the object doing the command, and all
hooks share the same set of q-registers. With /before and /after,
the results of the evaluated attribute is thrown away like it was
wrapped in a call of null(). Also, in cases where a command and function
do the same thing (e.g., @pemit and pemit()), only the command gets
the hooks.
Hooks can also be set in the alias.cnf file.
Leaving out the object and attribute clears an existing hook. Wizards can
see existing hooks with @command or @hook/list.
See 'help @hook2' for more information about @hook/override/inline,
and 'help @hook3' for examples.
@HOOK2
@hook/override/inline allows you to write softcoded commands which act
exactly like built-in commands - because they're run immediately, instead
of being queued, output from the command appears in the right order
relative to other commands in the action list. By default, commands hooked
with /inline have access to the q-registers of the calling action list, and
@breaks in the hooked command propagate to the calling action list,
allowing you to write your own control structures.
For example, this adds a new command, @qbreak, which works like @break but
stops command execution when %q0 contains a true value:
> &qbreak #123=$@qbreak: @break %q0=@pemit/silent %#=Stopping.
> @command/add @qbreak
> @hook/override/inline @qbreak=#123, qbreak
This behaviour can be altered by adding the following switches to
@hook/inline:
/nobreak: @breaks in the hooked command do not stop the calling action
list from running
/localize: q-registers are saved before the hooked command is run, and
restored after it completes
/clearregs: All q-registers are reset before the hooked command is run.
Most useful when used with /localize.
@hook/inplace is an alias for @hook/inline/localize/clearregs/nobreak.
See 'help @hook4' for some examples of using @hook/inline.
@HOOK3
An example of @hook:
> &top_line #3=pemit(%#, What follows is the results of a look)
> &bottom_line #3=pemit(%#, You're done looking.)
> @hook/before look=#3, top_line
> @hook/after look=#3, bottom_line
> look
What follows is the results of a look
Room Zero
You are in Room Zero. It's very dark here.
You're done looking.
> &cmd.say #3=$say *: @remit %L=if(hasflag(%#,OOC),<OOC>%b)%n says, "%0"
> @hook/override say=#3, cmd.say
> @set me=OOC
> "test
<OOC> Robert says, "test"
See 'help @hook4' for /inplace examples.
@HOOK4
> &dance me=$dance:pose sticks his right foot in ; say Do the hokey pokey
; pose sticks his right foot out
> dance
Walker sticks his right foot in
You say, "Do the hokey pokey"
Walker sticks his right foot out
> &cmd.say #3=$say *:@remit %l=%n declares, "%0"
> @hook/override say=#3,cmd.say
> dance
Walker sticks his right foot in
Walker sticks his right foot out
Walker declares, "Do the hokey pokey"
> @hook/override/inplace say=#3,cmd.say
> dance
Walker sticks his right foot in
Walker declares, "Do the hokey pokey"
Walker sticks his right foot out
@IDESCFORMAT
@idescformat <object>[=<format>]
When set, this attribute is evaluated and displayed instead of <object>'s
@idescribe, when someone looks at <object> while inside it. The evaluated
@idescribe, which would be shown if no @idescformat were set, is passed to
the @idescformt as %0; use v(idescribe) to get the unevaluted description.
Note that this attribute is only used when an @idescribe is set. When no
@idescribe is set, the @descformat (and @describe) attributes are used,
even when someone "look"s inside <object>.
This is useful for things like object parents that enforce a consistent
"look" for each object's @idescribe, without having to place formatting
into every @idescribe.
Q-registers (set via setq() and similar functions) are inherited from the
@nameformat, and passed on to the @conformat.
Example:
> @idescribe Vehicle Parent=repeat(*, width(%#))%r%0
See also: look, @exitformat, @nameformat, @conformat, @descformat,
@invformat
@IDESCRIBE
@idescribe <object>[=<description>]
@oidescribe <object>[=<message>]
@aidescribe <object>[=<action list>]
@idescribe command sets the internal description for an object, which is
shown to anyone who enters or looks while inside the object. It's only
used for players and things; rooms and exits always use @describe.
The @oidescribe attribute is shown to others inside <object> when someone
looks at the @idescribe, and the @aidescribe is triggered when someone
lookst at the @idescribe.
If there is no IDESCRIBE set for an object, those who enter or look inside
it will see its @describe. In this case, others in the object will see
nothing, and the @aidescribe will not be triggered. If you want to use
@aidescribe without @idescribe, set @idescribe to a blank string, or to
u(describe) to show the description.
See also: enter, @enter, ENTER_OK, @describe, look, @idescformat, VERBS
@IDLE
@idle <player>[=<message>]
This message is sent in return to every page which successfully reaches
you if it evaluates non-null. It is useful if you are idle for long
periods of time and wish to inform people where you are, or if you
are in a meeting and cannot quickly return pages.
Example:
> @idle me=switch(idle(me),>120,I'm idle. Use @mail)
Players paging me will only see the "I'm idle" message if I've been
idle for over 2 minutes (120 seconds).
See also: @away, @haven
@INCLUDE
@include[/<switches>] <object>/<attribute>[=<arg1>,<arg2>,...]
@include inserts the contents of the attribute provided into the
action list in-place, without adding a new queue entry. It is
useful to avoid having to copy the same code into multiple commands.
The attribute to be included must be visible to the enactor.
Example:
&CHECKS me=@assert [orflags(%#,Wr)]; @break [gt(words(lwho()),%0)]
&CMD1 me=$cmd *: @include me/CHECKS; @pemit %#=You passed.
&CMD2 me=$othercmd *: @include me/CHECKS; @@ Do something else...
When including attribute contents, @include ignores any ^...: or $...:
at the start, so the CHECKS attribute above could also be written
like this, to allow for "unit testing":
&CHECKS me=$testchk *: @assert [orflags(%#,Wr)];
@break [gt(words(lwho()),%0)]
The including environment (%0-%9) is available to the included actions.
If arguments are provided to @include, they are substituted for the
environment's %0, %1, etc. while the included action list is running.
The environment is then restored after the @include.
Continued in 'help @include2'.
@INCLUDE2
@include takes the following switches to alter its behaviour:
/nobreak: Prevents an @break/@assert in the included attribute from
breaking the including action list.
/localize: Saves all q-registers before including the attribute, and
restores them after including the attribute.
/clearregs: Clears all q-registers before including the attribute.
See also: @trigger, ufun(), @break
@INFILTER
@infilter <object>[=<pattern 1>[, <pattern 2>[, ..., <pattern N>]]]
@infilter is meant to be used on objects that have an @listen of "*"
(ie, objects that listen to everything, which is commonly used for
things like chairs so that someone inside the object can hear everything
said/done outside it). @infilter filters out any messages that match one
of the patterns and prevents those inside the object from hearing them.
It does not stop the @ahear of the listening object from being triggered
by things that match the @listen.
Sounds are only forwarded if the speaker also passes <object>'s
@lock/infilter, which receives the sound heard as %0.
For an explanation of infilter patterns, see the help for "@filter".
See also: @filter, @listen, @inprefix, AUDIBLE, LISTENING
@INPREFIX
@inprefix <object>[=<message>]
When an object has an @listen, any string it hears which is propagated to
its contents will be prefixed with <message>. Useful for vehicles, etc,
which have an @listen of "*".
Example:
> @create Vehicle
Created: Object #103.
> @create Test
Created: Object #104.
> @inprefix Vehicle=From outside,
> @listen Vehicle=*
> enter Vehicle
> @force #104=:bounces.
From outside, Test bounces.
See also: @prefix, @listen, @infilter
@INVFORMAT
@invformat <object>[=<format>]
When set, this attribute is evaluated and displayed instead of the usual
"You are carrying:" list of objects when <object> uses the "inventory"
command. The list of objects that would normally appear in the inventory
is passed as %0, and a list of the names as they would appear in the
default display, |-delimited, is passed as %1.
Example:
> @invformat me=You're holding: [itemize(iter(%0, name(%i0), %b, |), |)]
> inventory
You're holding: Red Ball, Pickle, and Piano
See also: inventory, @conformat, @exitformat, @nameformat, @descformat,
@idescformat
@KICK
@kick <number>
This wizard-only command forces the immediate execution of <number>
items from the queue. Rarely useful. If your MUSH is lagging badly,
chances are high that it stems from network problems. Check the queue
before using this command.
See also: @ps, QUEUE
@LALIAS
@ealias <object>[=<enter alias1>[; ... ; <enter aliasN>]]
@lalias <object>[=<leave alias1>[; ... ; <leave aliasN>]]
These attributes contain lists of "enter aliases" and "leave aliases" for
<object> - any of the aliases can be used in place of "enter <object>" and
"leave <object>" to enter/leave the object.
These attributes only have meaning for players and things (as rooms/exits
cannot be "enter"ed) - the aliases for exits are stored in @alias.
Example:
> @ealias Chair=Sit down;sit
> @lalias Chair=Stand up;stand
See also: enter, leave, goto, ENTER_OK
@LEAVE
@leave <object>[=<message>]
@oleave <object>[=<message>]
@oxleave <object>[=<message>]
@aleave <object>[=<action list>]
These attributes contain the message shown to anyone leaving <object>,
the message shown to others inside <object> when someone leaves it, the
message shown to others in <object>'s location when someone leaves it, and
the actions to be taken by <object> when someone leaves it, respectively.
The leaver's new location is passed in %0, if <object> has
permission to see it there.
See also: leave, @oxleave, @lfail, ACTION LISTS, VERBS
@LEMIT
@lemit[/<switch>] <message>
Emits a message to the outermost container object. For example, if you
are carrying a bird, and are inside a vehicle which is in room #10, and
you force the bird to @lemit "Cheep", everyone in room #10 will hear
"Cheep". This command is the same as "@emit/room".
With the /silent switch, no confirmation message is shown. With /noisy, it
is. If neither is given, the silent_pemit option determines if it is shown.
The /silent switch suppresses the normal confirmation message.
The /noeval switch prevents <message> from being evaluated.
The /spoof switch causes nospoof notifications to show the enactor's
dbref instead of the executor's dbref, and requires control over
the enactor or the Can_spoof power.
See also: @remit, @nslemit
@LFAIL
@lfail <object>[=<message>]
@olfail <object>[=<message>]
@alfail <object>[=<action list>]
These attributes contain the message shown to objects who try to leave
<object> and fail, the message shown to others inside <object> when
someone fails to leave, and the actions to be taken by <object> when
someone attempts to leave it and fails.
Such a failure usually occurs because <object> is set NO_LEAVE, or
because the person trying to leave does not pass <object>'s @lock/leave.
See also: leave, @leave, NO_LEAVE, locktypes, ACTION LISTS, VERBS
@LINK
@link[/preserve] <object>=[<dbref> | here | home | variable]
Links <object> to either a room or a thing. If a thing or player is
linked, that sets the object's HOME. If a room is linked, that sets
the object's drop-to room, which is where objects that are dropped
in the room will be sent to.
Most often, @link is used to link or relink an exit to a destination
room. In order to link an exit to a room, you must either own or
control the room, OR the room must be set LINK_OK. If the exit is
currently unlinked, and you pass its @lock/link, you may link it even
if you do not own it. In this case, the exit will be @chowned to you
(and set HALT). Linking an exit may have a cost (usually 1 penny.)
The Wizard-only /preserve switch can be used to link without @chowning
and HALTing the exit.
If the destination of an exit is "variable", its destination is
determined at the time of travel by the attribute DESTINATION on the
exit, which is evaluated like a U()-function. You must have permission
to link to whatever the DESTINATION evaluates to in order for the exit
to work. If there's no DESTINATION attribute, the EXITTO attribute
is also tried.
If the destination is "home", those who travel through the exit will
be sent to their homes.
LINK_OK objects can also be used as semaphores, and any object can be
@parented to them.
See also: EXITS, @open, @dig, DROP-TO, HOME
@LIST
@list/<switch>
@list[/lowercase] <switch>
The @list command lists useful MUSH information.
Switches include:
motd : Alias for @listmotd, shows current messages of the day.
functions : Lists all built-in functions and @functions.
commands : Lists all built-in commands and @commands.
attribs : Lists all standard attributes.
locks : Lists the built-in lock types.
flags : Alias for @flag/list, shows all flags.
powers : Alias for @powers/list, shows all powers.
allocations : Information about memory allocations. Admin-only.
By default, information is shown in upper-case. Add the /lowercase switch
to show output in lowercase instead.
"commands" and "functions" show built-in and local commands/functions by
default. The /builtin or /local switches can be given to limit this.
See also: list(), @config, config(), functions(), @stats, @command,
@function, @flag, @power, @attribute, @listmotd, @motd, locktypes
@LISTEN
@listen <object> = <string>
Sets the object's listen pattern to <string>, which can have wildcards.
Whenever something the object hears matches the pattern, the object's
ahear/amhear/aahear attribute will be triggered. In addition, anything
inside the object will hear it as well, if the speaker passes
@lock/infilter.
For example:
> @listen Chair=*
Since the wildcard (*) matches anything, anyone inside the object will
hear anything said outside it.
> @listen Butler=* has arrived.
> @ahear Butler=:walks over to the new arrival and takes %p coat.
In this case, the listen pattern is met whenever someone 'arrives' in
the room, and then the object does whatever is inside its @ahear
attribute.
Cyclonus has arrived.
Butler walks over to the new arrival and takes his coat.
Continued in 'help @listen2'.
@LISTEN2
An object "hears" anything that another player standing in the same room
would hear. For example, if you type in a command, the object does NOT
hear it. If the command has a result that people in the room hear, the
object will hear it.
For example:
> @listen Recorder=@emit *
> @ahear Recorder=:records %0
> @emit Whee!
Whee!
In this example, the Recorder's listen-pattern is NOT matched, because
it doesn't hear the '@emit Whee!', it only hears the 'Whee!' part, which
doesn't match.
> @listen Recorder=Cyclonus says, "*"
> say Whee!
Cyclonus says, "Whee!"
Recorder records: Whee!
See also: LISTENING, @ahear, @amhear, @aahear
@LISTMOTD
@listmotd
This command lists the current MOTD (message of the day) for the MUSH.
If used by a wizard or admin, it will also include the wizard, full, and
down MOTDs to the user.
There are two sets of MotDs: permanant ones defined in mush.cnf, and
temporary ones set in-game with @motd. Only the messages defined with
@motd are shown.
See also: @motd, @list
@LOCK
@lock[/<switch>] <object>=<key>
This command "locks" the object, specifying a key which determines who or
what can do certain things with the object. There are many different types
of locks, all of which are described in 'help locktypes' and which are
designated by the switch. The "basic" lock determines, for players and
things, who can pick them up. For exits, it determines who can go through
the exit. All other locks can be set the same way as the basic lock.
Whenever you "pass" the basic lock, you succeed in doing something with
the object. This triggers the @success/@osuccess/@asuccess messages and
actions. If you fail to pass the basic lock, you trigger the
@failure/@ofailure/@afailure messages and actions. Other locktypes may
also have such success/failure messages: see 'help failure' for info.
Just like attributes, locks can be inherited from parents. By default,
locks are set no_inherit, but this flag can be cleared using @lset. More
details and a list of flags can be found in 'help @lset'.
A listing of lock types, such as pagelocks, look at 'help locktypes'.
For the available key types, such as how to check an attribute on an
object trying to pass a lock, see 'help lockkeys'.
See also: @lock-simple, locktypes, lockkeys, @clock, failure, success.
elock(), lock(), @lset, @clock, testlock(), locks(), lockflags(),
lockowner(), clock(), llocks()
@LOCK-ATTRIBUTE
ATTRIBUTE LOCKS
You can lock an object to an attribute on the person trying to pass
the lock (as long as the object can "see" that attribute):
@lock <object>=<attribute>:<value>
<value> can contain wildcards (*), greater than (>) or less than (<)
symbols.
For example:
@lock Men's Room = sex:m*
This would lock the exit "Men's Room" to anyone with a SEX
attribute starting with the letter "m".
@lock A-F = icname:<g
This would lock the exit "A-F" to anyone with a ICNAME attribute
starting with a letter "less than" the letter "g". This assumes
that ICNAME is visual or the object with the lock can see it.
@LOCK-BIT
BIT LOCKS
You can test for set flags, powers, or object types in a lock
directly, without using an evaluation lock, with these formats:
@lock <object>=flag^<flag>
@lock <object>=type^<type>
@lock <object>=power^<power>
These locks act like the object the lock is on does a hasflag(%#,
<flag>), hastype(%#, <type>), or haspower(%#, <power>) succeeding if
the flag is set.
For example,
@lock/use Admin Commands=flag^wizard|flag^royalty
You can also test for channel membership with:
@lock <object>=channel^<channel>
@LOCK-CARRY
OWNER LOCK
An "owner" lock allows you to lock something to anything owned by
the same player:
@lock Box = $My Toy
This locks "Box" to anything owned by the owner of "My Toy"
(since players own themselves, that includes the owner as well).
CARRY LOCK
You can lock an object to something that has to be carried:
@lock Door = +Secret Door Key
This locks the exit "Door" to someone carrying the object "Secret Door
Key". Anyone carrying that object will be able to go through the exit.
You can lock an object to -either- an object or to someone carrying the
object with:
@lock Disneyworld Entrance = Child
This locks the exit "Disneyworld Entrance" to either the object
"Child" -or- to someone carrying the object "Child". (OK, so it's
a weird example.)
This is the same as @lock Entrance=+Child|=Child.
@LOCK-CHANNEL
BIT LOCKS
You can test for set flags, powers, or object types in a lock
directly, without using an evaluation lock, with these formats:
@lock <object>=flag^<flag>
@lock <object>=type^<type>
@lock <object>=power^<power>
These locks act like the object the lock is on does a hasflag(%#,
<flag>), hastype(%#, <type>), or haspower(%#, <power>) succeeding if
the flag is set.
For example,
@lock/use Admin Commands=flag^wizard|flag^royalty
You can also test for channel membership with:
@lock <object>=channel^<channel>
@LOCK-COMPLEX
A lock key can be negated by prefixing the key with an "!". For example:
> @lock North=flag^wizard
> @lock South=!flag^wizard
only lets those with the Wizard flag pass through the North exit, while
only allowin those who do NOT have the Wizard flag to go South.
You can combine keys, either allowing someone to pass a lock if they pass
any of the keys given, or requiring that they pass all of the keys, using
the "|" (or) and "&" (and) symbols. For example:
> @lock OOC Room= status:OOC | power^guest
locks the exit "OOC Room" so that only those with their STATUS attribute
set to "OOC", or those with the Guest @power, can pass, while
> @lock Men's Room= Sex:Male & +Bathroom Key
only allows those with their @sex set to Male who are carrying a "Bathroom
Key" object to pass.
You can group together different sets of keys by enclosing each group in
parenthesis "()". For instance,
> @lock Entrance=!type^player | (type^player & !flag^unregistered)
allows non-players to pass, or players who do not have the "unregistered"
flag set.
See also: @lock, locktypes, @clock, objid()
@LOCK-DBREFLIST
LIST LOCK
You can test to see if the enactor is a member of a space-separated
list of dbrefs or objids on an attribute on the object, with:
@lock <object>=dbreflist^<attributename>
For example,
&allow Commands = #1 #7 #23 #200:841701384
&deny commands = #200 #1020
@lock/use commands = !dbreflist^deny & dbreflist^allow
@LOCK-EVAL2
Example:
@lock Thursday Cafe = whichday/Thu
&whichday Thursday Cafe = first(time())
This locks the object "Thursday Cafe" (probably an exit) unless today
is Thursday.
Whenever someone tries to pass through the exit, the attribute
"whichday" will be evaluated, extracting the first word returned from
time() (the day of the week). The result is compared with the value in
the lock ("Thu"), and the lock will only be passable when the strings
match--Only on Thursdays.
If you have an evaluation lock that just does [hasflag(%#,FLAGNAME)],
you should probably use a bit lock instead.
See also: @lock-bit
@LOCK-EVALUATION
EVALUATION LOCK
An evaluation lock is set using this format:
@lock <object>=<attribute>/<value>
The difference between this and an attribute lock is that the
<attribute> is taken from <object> rather than from the person
trying to pass the lock. When someone tries, <attribute> is
evaluated, and the result is compared to <value>. If it matches,
then the person passes the lock.
The person trying to pass the lock is %# and <object> is %! when the
evaluation takes place. The evaluation is done with the powers of
<object>. If you try to do something (like [get(%#/<attribute>)])
and <object> doesn't have permission to do that, the person will
automatically fail to pass the lock.
Continued in 'help @lock-eval2'.
@LOCK-EVALUATION2
Example:
@lock Thursday Cafe = whichday/Thu
&whichday Thursday Cafe = first(time())
This locks the object "Thursday Cafe" (probably an exit) unless today
is Thursday.
Whenever someone tries to pass through the exit, the attribute
"whichday" will be evaluated, extracting the first word returned from
time() (the day of the week). The result is compared with the value in
the lock ("Thu"), and the lock will only be passable when the strings
match--Only on Thursdays.
If you have an evaluation lock that just does [hasflag(%#,FLAGNAME)],
you should probably use a bit lock instead.
See also: @lock-bit
@LOCK-FLAG
BIT LOCKS
You can test for set flags, powers, or object types in a lock
directly, without using an evaluation lock, with these formats:
@lock <object>=flag^<flag>
@lock <object>=type^<type>
@lock <object>=power^<power>
These locks act like the object the lock is on does a hasflag(%#,
<flag>), hastype(%#, <type>), or haspower(%#, <power>) succeeding if
the flag is set.
For example,
@lock/use Admin Commands=flag^wizard|flag^royalty
You can also test for channel membership with:
@lock <object>=channel^<channel>
@LOCK-HOST
HOST LOCKS
You can check to make sure an object is owned by a player connected from
a specific host or IP address using the following:
@lock <object>=ip^<ipaddress>
@lock <object>=hostname^<hostname>
<ipaddress> and <hostname> can contain wildcards. <object> must be able
to see the LASTIP attribute (for ip locks) or LASTSITE attribute (for
hostname locks) on the enactor's owner.
For example:
@lock <object>=ip^127.0.0.1
This locks <object> to players (and the objects of players) currently
connected from the computer the MUSH is running on.
See also: ipaddr(), hostname(), LASTSITE
@LOCK-INDIRECT
INDIRECT LOCKS
An "indirect" lock allows you to lock something to the same thing as
another object (very useful in setting channel locks; see help
@clock):
@lock Second Puppet = @First Puppet
This locks the object "Second Puppet" to whatever the object
"First Puppet" is locked to. Normally, the lock type that is
checked is the same as the lock on the first. You can specify a
different lock type with @object/LOCKNAME. For example:
@lock Second Puppet = @First Puppet/Use
Second Puppet's basic lock now checks First Puppet's use lock.
@LOCK-LIST
LIST LOCK
You can test to see if the enactor is a member of a space-separated
list of dbrefs or objids on an attribute on the object, with:
@lock <object>=dbreflist^<attributename>
For example,
&allow Commands = #1 #7 #23 #200:841701384
&deny commands = #200 #1020
@lock/use commands = !dbreflist^deny & dbreflist^allow
@LOCK-NAME
NAME LOCKS
You can test for objects matching a given name by using the below format
@lock <object>=name^<pattern>
It is similar to performing strmatch(%n,<pattern>), though will also match
for a player/exit with <pattern> as one of its @aliases.
For example, to lock "Bob's Tools" to only people with a name beginning
with Bob:
@lock/use Bob's Tools=name^bob*
@LOCK-OBJID
SIMPLE LOCKS
You can lock an object in several different ways. The simplest lock
is one that always succeeds (#true) or always fails (#false), or
that matches a specific object by prefixing it with an "=":
> @lock My Toy = #false
This lock will always fail.
> @lock My Toy = =me
This locks the object "My Toy" to you and you alone. It is recommended
that you @lock me = =me in order to prevent anyone else from picking
you up. The two = signs are NOT a typo! The first is part of the @lock
syntax (as shown at the top of 'help @lock') the second is a lock key
that means "only this exact object".
For backwards compatability, OBJID^<object> is an alias for =<object>.
@LOCK-OWNER
OWNER LOCK
An "owner" lock allows you to lock something to anything owned by
the same player:
@lock Box = $My Toy
This locks "Box" to anything owned by the owner of "My Toy"
(since players own themselves, that includes the owner as well).
CARRY LOCK
You can lock an object to something that has to be carried:
@lock Door = +Secret Door Key
This locks the exit "Door" to someone carrying the object "Secret Door
Key". Anyone carrying that object will be able to go through the exit.
You can lock an object to -either- an object or to someone carrying the
object with:
@lock Disneyworld Entrance = Child
This locks the exit "Disneyworld Entrance" to either the object
"Child" -or- to someone carrying the object "Child". (OK, so it's
a weird example.)
This is the same as @lock Entrance=+Child|=Child.
@LOCK-POWER
BIT LOCKS
You can test for set flags, powers, or object types in a lock
directly, without using an evaluation lock, with these formats:
@lock <object>=flag^<flag>
@lock <object>=type^<type>
@lock <object>=power^<power>
These locks act like the object the lock is on does a hasflag(%#,
<flag>), hastype(%#, <type>), or haspower(%#, <power>) succeeding if
the flag is set.
For example,
@lock/use Admin Commands=flag^wizard|flag^royalty
You can also test for channel membership with:
@lock <object>=channel^<channel>
@LOCK-SIMPLE
SIMPLE LOCKS
You can lock an object in several different ways. The simplest lock
is one that always succeeds (#true) or always fails (#false), or
that matches a specific object by prefixing it with an "=":
> @lock My Toy = #false
This lock will always fail.
> @lock My Toy = =me
This locks the object "My Toy" to you and you alone. It is recommended
that you @lock me = =me in order to prevent anyone else from picking
you up. The two = signs are NOT a typo! The first is part of the @lock
syntax (as shown at the top of 'help @lock') the second is a lock key
that means "only this exact object".
For backwards compatability, OBJID^<object> is an alias for =<object>.
@LOCK-TYPE
BIT LOCKS
You can test for set flags, powers, or object types in a lock
directly, without using an evaluation lock, with these formats:
@lock <object>=flag^<flag>
@lock <object>=type^<type>
@lock <object>=power^<power>
These locks act like the object the lock is on does a hasflag(%#,
<flag>), hastype(%#, <type>), or haspower(%#, <power>) succeeding if
the flag is set.
For example,
@lock/use Admin Commands=flag^wizard|flag^royalty
You can also test for channel membership with:
@lock <object>=channel^<channel>
@LOCK/BASIC
@lock/basic
For exits, this lock controls who can pass through the exit.
For players and things, it controls who can "get" the object.
For rooms, it determines whether the @success or @failure verbs are
triggered when someone "look"s at the room. However, even when the
lock is failed, the "look" still occurs.
See also: @success, @failure, goto, get, look
@lock/enter
For players and things, the Enter lock controls who can "enter" an
ENTER_OK object, as well as who can "empty" it. It has no meaning for
exits or rooms.
See also: @enter, @efail, ENTER_OK, enter, empty
@lock/leave
For players, things and rooms, the Leave lock controls who can leave
the object, via "leave", "@teleport" or "goto". It has no meaning for
exits.
See also: @leave, @lfail, leave
@lock/teleport
For rooms, the Teleport lock controls who can "@teleport" into the room,
if it has the JUMP_OK flag set. It has no meaning for players, things
or exits.
See also: JUMP_OK, @teleport
See also: @lock, locktypes, lockkeys
@LOCK/CHZONE
@lock/zone
Objects which pass a SHARED player's @lock/zone control all the objects
the shared player owns. If the zone_control_zmp_only @config option is
off, anything passing the @lock/zone of other objects will control
everything @chzoned to the object.
See also: @chzone, SHARED, ZONES, ZMR
@lock/chzone
If set, controls who can @chzone an object to this zone.
See also: @chzone, ZONES
@lock/parent
Controls who can @parent something to this LINK_OK object.
See also: @parent, LINK_OK
@lock/link
Controls who can @link this unlinked exit, or who can @link an exit to
this LINK_OK room/thing.
See also: @link, LINK_OK, LINK_ANYWHERE POWER
@lock/open
Controls who can @open an exit from this OPEN_OK room.
See also: @open, @dig, OPEN_OK, OPEN_ANYWHERE POWER
@LOCK/COMMAND
@lock/use
For players, things and rooms, this lock controls who may "use" the
object. You must also pass an object's Use lock to trigger $-commands
or ^-listens on it (as well as the Command/Listen lock; see below).
When an object is used as a Channel Mogrifier, only players who pass the
object's Use lock will have their speech on the channel mogrified.
Has no meaning for exits.
See also: @use, @ufail, use, $-commands, ^, MOGRIFY
@lock/command
For players, things and rooms, you must pass this lock (as well as the
Use lock) to trigger $-commands on the object. Meaningless for exits.
See also: $-commands, FAILURE
@lock/listen
For players, things and rooms, you must pass this lock (as well as the
Use lock) to trigger ^-listen patterns on the object when it's set
MONITOR. Meaningless for exits.
See also: ^
See also: @lock, locktypes, lockkeys
@LOCK/CONTROL
@lock/control
Allows objects which would not normally control something to do so. Does
not work for players.
See also: CONTROL
@lock/destroy
Limits who can @destroy a DESTROY_OK object.
See also: @destroy, DESTROY_OK
@lock/examine
Limits who can examine a VISUAL object.
See also: examine, VISUAL
@LOCK/DESTROY
@lock/control
Allows objects which would not normally control something to do so. Does
not work for players.
See also: CONTROL
@lock/destroy
Limits who can @destroy a DESTROY_OK object.
See also: @destroy, DESTROY_OK
@lock/examine
Limits who can examine a VISUAL object.
See also: examine, VISUAL
@LOCK/DROP
@lock/drop
For players and things, controls who can drop the object. Has no
meaning for exits. On rooms, has the same meaning as
@lock/dropin
See also: drop, empty
@lock/dropin
When set on a player, thing or room, controls who can drop objects
into them. Has no meaning for exits.
@lock/give
For players and things, controls who may give the object away.
Has no meaning for rooms or exits.
@lock/from
Controls who may give items to this object.
@lock/receive
Controls what may be given to this object.
@lock/take
Controls who can take this object.
See also: give, @lock/basic, @lock/enter
@LOCK/DROPIN
@lock/drop
For players and things, controls who can drop the object. Has no
meaning for exits. On rooms, has the same meaning as
@lock/dropin
See also: drop, empty
@lock/dropin
When set on a player, thing or room, controls who can drop objects
into them. Has no meaning for exits.
@lock/give
For players and things, controls who may give the object away.
Has no meaning for rooms or exits.
@lock/from
Controls who may give items to this object.
@lock/receive
Controls what may be given to this object.
@lock/take
Controls who can take this object.
See also: give, @lock/basic, @lock/enter
@LOCK/DROPTO
@lock/follow
For players and things, controls who may "follow" the object. Has no
meaning for rooms or exits.
See also: follow, FAILURE
@lock/forward
For players, things and rooms, controls who can forward sound to an
object, via @forwardlist or @debugforwardlist. Meaningless for exits.
See also: @forwardlist, @debugforwardlist, @lock/mailforward
@lock/dropto
For rooms, only objects which pass this lock will be sent to the rooms
Drop-To. Has no meaning for players, things or exits.
See also: DROP-TOS, drop, empty
See also: @lock, locktypes, lockkeys
@LOCK/ENTER
@lock/basic
For exits, this lock controls who can pass through the exit.
For players and things, it controls who can "get" the object.
For rooms, it determines whether the @success or @failure verbs are
triggered when someone "look"s at the room. However, even when the
lock is failed, the "look" still occurs.
See also: @success, @failure, goto, get, look
@lock/enter
For players and things, the Enter lock controls who can "enter" an
ENTER_OK object, as well as who can "empty" it. It has no meaning for
exits or rooms.
See also: @enter, @efail, ENTER_OK, enter, empty
@lock/leave
For players, things and rooms, the Leave lock controls who can leave
the object, via "leave", "@teleport" or "goto". It has no meaning for
exits.
See also: @leave, @lfail, leave
@lock/teleport
For rooms, the Teleport lock controls who can "@teleport" into the room,
if it has the JUMP_OK flag set. It has no meaning for players, things
or exits.
See also: JUMP_OK, @teleport
See also: @lock, locktypes, lockkeys
@LOCK/EXAMINE
@lock/control
Allows objects which would not normally control something to do so. Does
not work for players.
See also: CONTROL
@lock/destroy
Limits who can @destroy a DESTROY_OK object.
See also: @destroy, DESTROY_OK
@lock/examine
Limits who can examine a VISUAL object.
See also: examine, VISUAL
@LOCK/FILTER
@lock/filter
@lock/infilter
These are lock versions of @filter and @infilter, respectively. Anyone
who fails to pass the lock will have their speech filtered. The sound
being made is passed to evaluation locks as %0.
See also: @filter, @infilter
@LOCK/FOLLOW
@lock/follow
For players and things, controls who may "follow" the object. Has no
meaning for rooms or exits.
See also: follow, FAILURE
@lock/forward
For players, things and rooms, controls who can forward sound to an
object, via @forwardlist or @debugforwardlist. Meaningless for exits.
See also: @forwardlist, @debugforwardlist, @lock/mailforward
@lock/dropto
For rooms, only objects which pass this lock will be sent to the rooms
Drop-To. Has no meaning for players, things or exits.
See also: DROP-TOS, drop, empty
See also: @lock, locktypes, lockkeys
@LOCK/FORWARD
@lock/follow
For players and things, controls who may "follow" the object. Has no
meaning for rooms or exits.
See also: follow, FAILURE
@lock/forward
For players, things and rooms, controls who can forward sound to an
object, via @forwardlist or @debugforwardlist. Meaningless for exits.
See also: @forwardlist, @debugforwardlist, @lock/mailforward
@lock/dropto
For rooms, only objects which pass this lock will be sent to the rooms
Drop-To. Has no meaning for players, things or exits.
See also: DROP-TOS, drop, empty
See also: @lock, locktypes, lockkeys
@LOCK/FROM
@lock/drop
For players and things, controls who can drop the object. Has no
meaning for exits. On rooms, has the same meaning as
@lock/dropin
See also: drop, empty
@lock/dropin
When set on a player, thing or room, controls who can drop objects
into them. Has no meaning for exits.
@lock/give
For players and things, controls who may give the object away.
Has no meaning for rooms or exits.
@lock/from
Controls who may give items to this object.
@lock/receive
Controls what may be given to this object.
@lock/take
Controls who can take this object.
See also: give, @lock/basic, @lock/enter
@LOCK/GIVE
@lock/drop
For players and things, controls who can drop the object. Has no
meaning for exits. On rooms, has the same meaning as
@lock/dropin
See also: drop, empty
@lock/dropin
When set on a player, thing or room, controls who can drop objects
into them. Has no meaning for exits.
@lock/give
For players and things, controls who may give the object away.
Has no meaning for rooms or exits.
@lock/from
Controls who may give items to this object.
@lock/receive
Controls what may be given to this object.
@lock/take
Controls who can take this object.
See also: give, @lock/basic, @lock/enter
@LOCK/INFILTER
@lock/filter
@lock/infilter
These are lock versions of @filter and @infilter, respectively. Anyone
who fails to pass the lock will have their speech filtered. The sound
being made is passed to evaluation locks as %0.
See also: @filter, @infilter
@LOCK/INTERACT
@lock/page
For players, things and rooms, you must pass this lock to page or @pemit
to the object, or @remit inside it. Meaningless for exits.
See also: FAILURE, @haven
@lock/speech
Controls who can speak (via say, pose, @*emit or teach) inside an object.
Meaningless for exits.
See also: FAILURE
@lock/mail
Controls who can send @mail to this object.
See also: @mail, FAILURE
@lock/mailforward
Controls who can forward @mail to this object via @mailforward.
See also: @mail, @mailforward, @lock/forward
@lock/interact
Controls who can send sound of any kind (page, say, channels, etc) to
you. Note that players who fail to pass your interact lock will not be
informed you're not receiving their messages, so you may also wish to
@lock/page them and set a haven message.
See also: @lock, locktypes, lockkeys
@LOCK/LEAVE
@lock/basic
For exits, this lock controls who can pass through the exit.
For players and things, it controls who can "get" the object.
For rooms, it determines whether the @success or @failure verbs are
triggered when someone "look"s at the room. However, even when the
lock is failed, the "look" still occurs.
See also: @success, @failure, goto, get, look
@lock/enter
For players and things, the Enter lock controls who can "enter" an
ENTER_OK object, as well as who can "empty" it. It has no meaning for
exits or rooms.
See also: @enter, @efail, ENTER_OK, enter, empty
@lock/leave
For players, things and rooms, the Leave lock controls who can leave
the object, via "leave", "@teleport" or "goto". It has no meaning for
exits.
See also: @leave, @lfail, leave
@lock/teleport
For rooms, the Teleport lock controls who can "@teleport" into the room,
if it has the JUMP_OK flag set. It has no meaning for players, things
or exits.
See also: JUMP_OK, @teleport
See also: @lock, locktypes, lockkeys
@LOCK/LINK
@lock/zone
Objects which pass a SHARED player's @lock/zone control all the objects
the shared player owns. If the zone_control_zmp_only @config option is
off, anything passing the @lock/zone of other objects will control
everything @chzoned to the object.
See also: @chzone, SHARED, ZONES, ZMR
@lock/chzone
If set, controls who can @chzone an object to this zone.
See also: @chzone, ZONES
@lock/parent
Controls who can @parent something to this LINK_OK object.
See also: @parent, LINK_OK
@lock/link
Controls who can @link this unlinked exit, or who can @link an exit to
this LINK_OK room/thing.
See also: @link, LINK_OK, LINK_ANYWHERE POWER
@lock/open
Controls who can @open an exit from this OPEN_OK room.
See also: @open, @dig, OPEN_OK, OPEN_ANYWHERE POWER
@LOCK/LISTEN
@lock/use
For players, things and rooms, this lock controls who may "use" the
object. You must also pass an object's Use lock to trigger $-commands
or ^-listens on it (as well as the Command/Listen lock; see below).
When an object is used as a Channel Mogrifier, only players who pass the
object's Use lock will have their speech on the channel mogrified.
Has no meaning for exits.
See also: @use, @ufail, use, $-commands, ^, MOGRIFY
@lock/command
For players, things and rooms, you must pass this lock (as well as the
Use lock) to trigger $-commands on the object. Meaningless for exits.
See also: $-commands, FAILURE
@lock/listen
For players, things and rooms, you must pass this lock (as well as the
Use lock) to trigger ^-listen patterns on the object when it's set
MONITOR. Meaningless for exits.
See also: ^
See also: @lock, locktypes, lockkeys
@LOCK/MAIL
@lock/page
For players, things and rooms, you must pass this lock to page or @pemit
to the object, or @remit inside it. Meaningless for exits.
See also: FAILURE, @haven
@lock/speech
Controls who can speak (via say, pose, @*emit or teach) inside an object.
Meaningless for exits.
See also: FAILURE
@lock/mail
Controls who can send @mail to this object.
See also: @mail, FAILURE
@lock/mailforward
Controls who can forward @mail to this object via @mailforward.
See also: @mail, @mailforward, @lock/forward
@lock/interact
Controls who can send sound of any kind (page, say, channels, etc) to
you. Note that players who fail to pass your interact lock will not be
informed you're not receiving their messages, so you may also wish to
@lock/page them and set a haven message.
See also: @lock, locktypes, lockkeys
@LOCK/MAILFORWARD
@lock/page
For players, things and rooms, you must pass this lock to page or @pemit
to the object, or @remit inside it. Meaningless for exits.
See also: FAILURE, @haven
@lock/speech
Controls who can speak (via say, pose, @*emit or teach) inside an object.
Meaningless for exits.
See also: FAILURE
@lock/mail
Controls who can send @mail to this object.
See also: @mail, FAILURE
@lock/mailforward
Controls who can forward @mail to this object via @mailforward.
See also: @mail, @mailforward, @lock/forward
@lock/interact
Controls who can send sound of any kind (page, say, channels, etc) to
you. Note that players who fail to pass your interact lock will not be
informed you're not receiving their messages, so you may also wish to
@lock/page them and set a haven message.
See also: @lock, locktypes, lockkeys
@LOCK/OPEN
@lock/zone
Objects which pass a SHARED player's @lock/zone control all the objects
the shared player owns. If the zone_control_zmp_only @config option is
off, anything passing the @lock/zone of other objects will control
everything @chzoned to the object.
See also: @chzone, SHARED, ZONES, ZMR
@lock/chzone
If set, controls who can @chzone an object to this zone.
See also: @chzone, ZONES
@lock/parent
Controls who can @parent something to this LINK_OK object.
See also: @parent, LINK_OK
@lock/link
Controls who can @link this unlinked exit, or who can @link an exit to
this LINK_OK room/thing.
See also: @link, LINK_OK, LINK_ANYWHERE POWER
@lock/open
Controls who can @open an exit from this OPEN_OK room.
See also: @open, @dig, OPEN_OK, OPEN_ANYWHERE POWER
@LOCK/PAGE
@lock/page
For players, things and rooms, you must pass this lock to page or @pemit
to the object, or @remit inside it. Meaningless for exits.
See also: FAILURE, @haven
@lock/speech
Controls who can speak (via say, pose, @*emit or teach) inside an object.
Meaningless for exits.
See also: FAILURE
@lock/mail
Controls who can send @mail to this object.
See also: @mail, FAILURE
@lock/mailforward
Controls who can forward @mail to this object via @mailforward.
See also: @mail, @mailforward, @lock/forward
@lock/interact
Controls who can send sound of any kind (page, say, channels, etc) to
you. Note that players who fail to pass your interact lock will not be
informed you're not receiving their messages, so you may also wish to
@lock/page them and set a haven message.
See also: @lock, locktypes, lockkeys
@LOCK/PARENT
@lock/zone
Objects which pass a SHARED player's @lock/zone control all the objects
the shared player owns. If the zone_control_zmp_only @config option is
off, anything passing the @lock/zone of other objects will control
everything @chzoned to the object.
See also: @chzone, SHARED, ZONES, ZMR
@lock/chzone
If set, controls who can @chzone an object to this zone.
See also: @chzone, ZONES
@lock/parent
Controls who can @parent something to this LINK_OK object.
See also: @parent, LINK_OK
@lock/link
Controls who can @link this unlinked exit, or who can @link an exit to
this LINK_OK room/thing.
See also: @link, LINK_OK, LINK_ANYWHERE POWER
@lock/open
Controls who can @open an exit from this OPEN_OK room.
See also: @open, @dig, OPEN_OK, OPEN_ANYWHERE POWER
@LOCK/PAY
@lock/drop
For players and things, controls who can drop the object. Has no
meaning for exits. On rooms, has the same meaning as
@lock/dropin
See also: drop, empty
@lock/dropin
When set on a player, thing or room, controls who can drop objects
into them. Has no meaning for exits.
@lock/give
For players and things, controls who may give the object away.
Has no meaning for rooms or exits.
@lock/from
Controls who may give items to this object.
@lock/receive
Controls what may be given to this object.
@lock/take
Controls who can take this object.
See also: give, @lock/basic, @lock/enter
@LOCK/RECEIVE
@lock/drop
For players and things, controls who can drop the object. Has no
meaning for exits. On rooms, has the same meaning as
@lock/dropin
See also: drop, empty
@lock/dropin
When set on a player, thing or room, controls who can drop objects
into them. Has no meaning for exits.
@lock/give
For players and things, controls who may give the object away.
Has no meaning for rooms or exits.
@lock/from
Controls who may give items to this object.
@lock/receive
Controls what may be given to this object.
@lock/take
Controls who can take this object.
See also: give, @lock/basic, @lock/enter
@LOCK/SPEECH
@lock/page
For players, things and rooms, you must pass this lock to page or @pemit
to the object, or @remit inside it. Meaningless for exits.
See also: FAILURE, @haven
@lock/speech
Controls who can speak (via say, pose, @*emit or teach) inside an object.
Meaningless for exits.
See also: FAILURE
@lock/mail
Controls who can send @mail to this object.
See also: @mail, FAILURE
@lock/mailforward
Controls who can forward @mail to this object via @mailforward.
See also: @mail, @mailforward, @lock/forward
@lock/interact
Controls who can send sound of any kind (page, say, channels, etc) to
you. Note that players who fail to pass your interact lock will not be
informed you're not receiving their messages, so you may also wish to
@lock/page them and set a haven message.
See also: @lock, locktypes, lockkeys
@LOCK/TAKE
@lock/drop
For players and things, controls who can drop the object. Has no
meaning for exits. On rooms, has the same meaning as
@lock/dropin
See also: drop, empty
@lock/dropin
When set on a player, thing or room, controls who can drop objects
into them. Has no meaning for exits.
@lock/give
For players and things, controls who may give the object away.
Has no meaning for rooms or exits.
@lock/from
Controls who may give items to this object.
@lock/receive
Controls what may be given to this object.
@lock/take
Controls who can take this object.
See also: give, @lock/basic, @lock/enter
@LOCK/TELEPORT
@lock/basic
For exits, this lock controls who can pass through the exit.
For players and things, it controls who can "get" the object.
For rooms, it determines whether the @success or @failure verbs are
triggered when someone "look"s at the room. However, even when the
lock is failed, the "look" still occurs.
See also: @success, @failure, goto, get, look
@lock/enter
For players and things, the Enter lock controls who can "enter" an
ENTER_OK object, as well as who can "empty" it. It has no meaning for
exits or rooms.
See also: @enter, @efail, ENTER_OK, enter, empty
@lock/leave
For players, things and rooms, the Leave lock controls who can leave
the object, via "leave", "@teleport" or "goto". It has no meaning for
exits.
See also: @leave, @lfail, leave
@lock/teleport
For rooms, the Teleport lock controls who can "@teleport" into the room,
if it has the JUMP_OK flag set. It has no meaning for players, things
or exits.
See also: JUMP_OK, @teleport
See also: @lock, locktypes, lockkeys
@LOCK/USE
@lock/use
For players, things and rooms, this lock controls who may "use" the
object. You must also pass an object's Use lock to trigger $-commands
or ^-listens on it (as well as the Command/Listen lock; see below).
When an object is used as a Channel Mogrifier, only players who pass the
object's Use lock will have their speech on the channel mogrified.
Has no meaning for exits.
See also: @use, @ufail, use, $-commands, ^, MOGRIFY
@lock/command
For players, things and rooms, you must pass this lock (as well as the
Use lock) to trigger $-commands on the object. Meaningless for exits.
See also: $-commands, FAILURE
@lock/listen
For players, things and rooms, you must pass this lock (as well as the
Use lock) to trigger ^-listen patterns on the object when it's set
MONITOR. Meaningless for exits.
See also: ^
See also: @lock, locktypes, lockkeys
@LOCK/USER
@lock/user:<name>
User-defined locks have no hardcoded meaning. They allow you to set locks
for any purpose, which you can test using the elock() function. <name>
can be anything which is a valid attribute name. For example, in a
combat system you might use a "wield" @lock on weapons, similar to
> @lock/user:wield War Hammer=strength:>20
and then test it with elock(War Hammer/wield, %#).
See also: elock(), valid()
See also: @lock, locktypes, lockkeys
@LOCK/USER:<NAME>
@lock/user:<name>
User-defined locks have no hardcoded meaning. They allow you to set locks
for any purpose, which you can test using the elock() function. <name>
can be anything which is a valid attribute name. For example, in a
combat system you might use a "wield" @lock on weapons, similar to
> @lock/user:wield War Hammer=strength:>20
and then test it with elock(War Hammer/wield, %#).
See also: elock(), valid()
See also: @lock, locktypes, lockkeys
@LOCK/ZONE
@lock/zone
Objects which pass a SHARED player's @lock/zone control all the objects
the shared player owns. If the zone_control_zmp_only @config option is
off, anything passing the @lock/zone of other objects will control
everything @chzoned to the object.
See also: @chzone, SHARED, ZONES, ZMR
@lock/chzone
If set, controls who can @chzone an object to this zone.
See also: @chzone, ZONES
@lock/parent
Controls who can @parent something to this LINK_OK object.
See also: @parent, LINK_OK
@lock/link
Controls who can @link this unlinked exit, or who can @link an exit to
this LINK_OK room/thing.
See also: @link, LINK_OK, LINK_ANYWHERE POWER
@lock/open
Controls who can @open an exit from this OPEN_OK room.
See also: @open, @dig, OPEN_OK, OPEN_ANYWHERE POWER
@LOG
@log[/<switch>] <message>
@log/recall/<switch> [<number>]
This wizard-only command puts <message> in a log file, tagged with
the time and object executing the command. The available switches
are /check, /cmd, /conn, /err, /trace, and /wiz, specifying which
file to log to. /cmd is default.
Adding the /recall switch will display the last <number> lines
written to that log file, or the entire log buffer (Which is the
last 1 kilobyte or so of data written to the log) if omitted.
See also: @logwipe
@LOGWIPE
@logwipe/<switch> <password>
This God-only command erases one of the MUSH logs. Available switches
are /check, /cmd, /conn, /trace, and /wiz. God must give the
log wipe password from the MUSH's configuration file to use this
command.
See also: @log
@LSET
@lset <object>/<lock type>=[!]<flag>
This commands sets or clears flags on locks.
Valid flags include:
visual (v) This lock can be seen even if the object it's on
isn't visual.
no_inherit (i) This lock isn't inherited off of parents. All locks
are set no_inherit by default.
no_clone (c) This lock isn't copied by @clone.
wizard (w) This lock can only be set by wizards.
locked (+) This lock can only be set by the owner of the lock.
See also: @lock, lockflags(), llockflags(), lset()
@MAIL
@mail[/<switches>] [<msg-list>[=<target>]]
@mail[/<switches>] <player-list>=[<subject>/]<message>
@mail invokes the built-in MUSH mailer, which allows players to send
and receive mail. Pronoun/function substitution is performed on any
messages you may try to send.
A <msg-list> is one of the following:
A single msg # (ex: 3)
A message range (ex: 2-5, -7, 3-)
A folder number and message number/range (ex: 0:3, 1:2-5, 2:-7)
A sender (ex: *paul)
An age of mail in days (ex: ~3 (exactly 3), <2, >1)
"days" here means 24-hour periods from the current time.
One of the following: "read", "unread", "cleared", "tagged",
"urgent", "all" (all messages in all folders), "folder" (all
messages in current folder)
A <player-list> is a space-separated list of recipients, which may be:
Player names
Player dbref #'s
Message #'s, in which case you send to the sender of that message.
An alias name (see help @malias)
See also the following topics: mail-sending mail-reading
mail-folders mail-forward mail-other mail-admin
@malias mail-reviewing
@MAILFILTER
The @mailfilter attribute specifies automatic filing of incoming
@mail messages into folders. When an @mail message is received,
the contents of @mailfilter are evaluated, with the following
arguments passed:
%0 dbref of message sender
%1 message subject
%2 message body
%3 message status flags (a string containing U, F, and/or R,
for urgent, forwarded, and/or reply, respectively)
If @mailfilter evaluates to a folder name or number, the message
will be filed into that folder. If @mailfilter evaluates to a null
string, the message remains in the incoming folder.
Example: Filter urgent messages into folder 1
> @mailfilter me=if(strmatch(%3,*U*),1)
See also: mail-folders
@MAILFORWARDLIST
@mailforwardlist me = <space-separated list of dbrefs or objids>
@lock/mailforward me = <lock>
By setting a @mailforwardlist attribute, a player can direct that
@mail they receive should be delivered to the specified list of
dbrefs of other players. The list may include the player's own
dbref, in which case the player will receive a copy of the message,
or omit it, in which case the message will be delivered to those
listed but the player will not receive a copy.
To deliver messages to other players this way, you must control them
(i.e. you're delivering to yourself or you're a wizard) or pass
their @lock/mailforward. An empty @lock/mailforward disallows
forwarding to you, and is the default.
@MAILSIGNATURE
@mailsignature <object>[=<signature>]
When set, this attribute is evaluated and appended to any @mail messages
sent by <object>, unless the @mail/nosig command is used.
Example:
> @mailsignature me=%r%r-- %n%r%r[u(funny_quote)]
See also: @mail, mail-sending
@MALIAS
@malias [<alias>]
The @malias command is used to create, view, and manipulate @mail
aliases, or lists. An alias is a shorthand way of specifying a list of
players for @mail. Aliases begin with the '+' (plus) prefix, and
represent a list of dbrefs; aliases may not include other aliases.
@malias with no arguments lists aliases available for your use, and is
equivalent to @malias/list
@malias with a single argument (the name of an alias) lists the
members of that alias, if you're allowed to see them. Other forms of
the same command are @malias/members <alias> or @malias/who <alias>
See help @malias2 for more
@MALIAS2
@malias[/create] <alias>=<player list>
@malias/desc <alias>=<Description>
@malias/rename <alias>=<newalias>
@malias/destroy <alias>
The first form above creates a new alias for the given list of players.
@malias/desc sets the alias's description, which is shown when aliases
are listed.
@malias/rename renames an alias.
@malias/destroy destroys the alias completely.
See help @malias3 for more.
@MALIAS3
@malias/set <alias>=<player list>
@malias/add <alias>=<player list>
@malias/remove <alias>=<player list>
@malias/set resets the list of players on the alias to <player list>.
@malias/add adds players to the alias. Note that the same player
may be on an alias multiple times.
@malias/remove removes players from the alias. If a player is on the
alias more than once, a single remove will remove only one instance
of that player.
See help @malias4 for more.
@MALIAS4
@malias/use <alias>=<perm list>
@malias/see <alias>=<perm list>
@malias/use controls who may use an alias. Players who may use an
alias will see it in their @malias list, and can @mail to the
alias.
@malias/see controls who may list the members of an alias.
An empty permission list allows any player. The permission list may
also be a space-separated list of one or more of "owner", "members"
(of the alias), and "admin".
By default, the owner and alias members may see and use the alias, but
only the owner may list the members. Note that admin may always list
aliases and their members, regardless of these settings, but are
treated like anyone else when trying to @mail with an alias.
See help @malias5 for more.
@MALIAS5
@malias/all
@malias/stat
@malias/chown <alias>=<player>
@malias/nuke
@malias/all is an admin-only command that lists all aliases in the MUSH.
@malias/stat is an admin-only command that displays statistics about the
number of aliases and members of aliases in use.
@malias/chown is a wizard-only command that changes the owner of an alias.
@malias/nuke is a God-only command that destroys all aliases.
@MAPSQL
@mapsql[/notify][/colnames] <obj>/<attr>=<query>
This command issues an SQL query if the MUSH supports SQL and
can connect to an SQL server. You must be WIZARD or have the
Sql_Ok power to use @sql.
For each row returned by the query, the action list in <obj>/<attr>
is queued, with row number passed as %0 and the columns passed as
%1-%9. Row numbers start at 1.
The /notify switch causes @mapsql to do an "@notify me" after all the
rows are processed.
The /colnames switch causes @mapsql to first queue the obj/attr with
row number 0 and %0-%9 being the column names.
Example:
> &desctable me=think align(30 20 4 10 10,%0,%1,%2,%3,%4)
> @mapsql me/desctable=DESCRIBE table_name
See also: sql(), sqlescape(), mapsql(), @sql
@MESSAGE
@message[/<switches>] <recipients>=<message>,[<obj>/]<attr>
[,<arg0>[, ... , <arg9>]]]
@message is designed for the use of *format messages, such as
@pageformat or @chatformat. It is intended for use with @hooking page,
@chat, or say/pose/emit, or for coding language systems.
For each of the given <recipients>, <obj>/<attr> is evaluated (with up to
ten arguments, as if it was ufun()'d), and the object is shown the result
via @pemit. If the attribute does not exist, they are shown <message>
instead.
If <obj> is not given, or is given as "#-2", the attribute will be checked
on the recipient.
If one of the arguments matches "##", it will be replaced with the dbref of
the recipient.
Switches:
/noeval -- none of @message's arguments will be evaluated
/spoof -- the message will appear to be from the enactor, not the
recipient. Requires the Can_Spoof @power.
/remit -- Works like @remit, treating <recipients> as a list of rooms
to send <message> to
/oemit -- Works like @oemit, with <recipients> as a list of objects
not to emit to. See 'help @oemit' for more info.
/nospoof -- don't show nospoof info, as per @nspemit/@nsremit/@nsoemit
/silent -- don't show a confirmation message
/noisy -- show a confirmation message
See 'help @message2' for examples.
See also: message(), @chatformat, @pageformat, @oemit, @remit, speak()
@MESSAGE2
Example:
> &sayformat *Mike=%n sez, '%0'
> &sayformat *Walker=From %n: %0
> &cmd.fsay me=$fsay *: @message/spoof *Mike *Walker *Javelin=
%n says\, "%0", SAYFORMAT, %0
> fsay This is a test
Mike sees:
Player sez, 'This is a test'
Walker sees:
From Player: This is a test
Javelin sees:
Player says, "This is a test"
A rough implementation of @chatformat:
> &cmd.chat Globals=$^@chat (.+?)=([\:;]?)(.+?)$: @message/spoof
cwho(%1)=setr(0,<%1> [speak(&[squish(ctitle(%1, %#) %n)], %2%3)]),
CHATFORMAT, firstof(%2, "), %1, %3, %n, ctitle(%1, %#), %q0
> @set Globals/cmd.chat=regexp
See 'help @message3' for more examples.
@MESSAGE3
A (very) basic language system:
> &skill`spanish Juan=2
> &skill`spanish Bob=1
> &cmd.spanish Globals=$+spanish *: @nspemit %#=You say (Spanish), "%0";
@message/oemit/spoof %#=setr(0,%n says (Spanish)\, "%0"),
%!/TRANSLATE, ##, SPANISH, %q0
> &translate Globals=switch(default(%0/skill`%1, 2), 2, %2,
speak(%#, |%2,, %!/translate`some))
> &translate`some Globals="[iter(%0,if(rand(2),%i0,...))]"
> +spanish The rain in Spain falls mainly on the plain
You see:
You say (Spanish), "The rain in Spain falls mainly on the plain"
Bob sees (something like):
Mike says (Spanish), "The rain ... ... falls ... ... ... ..."
Juan says:
Mike says (Spanish), "The rain in Spain falls mainly on the plain"
@MOTD
@motd[/<switch>] [<message>]
The default for this command (and with the /connect) switch, is a
wizard only command that will set a temporary message that
will be shown to players when they connect. This MOTD is cleared
every time the MUSH restarts.
Note that @motd by itself clears the message. Use @motd/list or
@listmotd to see the current messages.
These messages are shown in addition to the permanent MotDs which are
defined in mush.cnf (motd_file, wizmotd_file, etc).
Other switches:
/wizard : sets the message for wizards (like @wizmotd)
/down : sets the logins-off message (like @rejectmotd)
/full : sets the max-players-logged-in message
/list : list the MOTDs (like @listmotd, can be used by anyone)
See also: @listmotd
@MOVE
@move <object>[=<message>]
@omove <object>[=<message>]
@oxmove <object>[=<message>]
@amove <object>[=<action list>]
These attributes contain the message shown to <object> immediately after
it moves, the message shown to others in the room <object> moves into, the
message shown to objects in the location <object> leaves, and the actions
to be taken when <object> moves, respectively. Please note that long
@omoves are frequently found annoying.
The <object>'s new location is in %0 and the old location it moved
from in %1.
Example:
> @move me=You moved! You are now in the room: [name(here)].
> @omove me=stalks into the room wearing a malevolent expression.
> @oxmove me=stalks away, glaring.
See also: goto, @oxmove, ACTION LISTS, VERBS
@MVATTR
@cpattr[/noflagcopy] <obj>/<attr>=<obj1>[/<attr1>][, ..., <objN>[/<attrN>]]
@mvattr[/noflagcopy] <obj>/<attr>=<obj1>[/<attr1>][, ..., <objN>[/<attrN>]]
@cpattr copies the <attr> attribute from <obj> to <obj1> (and any other
objects given). By default, the new attributes will have the same name as
the original, but you can specify a different name to be used on each
object if you wish.
@mvattr works the same, but also attempts to remove the original attribute
after copying it.
Attribute flags are copied as well, unless the /noflagcopy switch is given.
This is recommended when copying from a non-standard attribute to a
standard one.
Example:
> @cpattr box/test=box/test1, cube/random, tribble/describe
would check the object "box" for an attribute named TEST and then
copy it to the attributes TEST1 on "box", RANDOM on the object named
"cube", and DESCRIBE on the object named "tribble".
> @cpattr box/test=cube
would copy the TEST attribute from "box" to TEST on "cube".
See also: ATTRIBUTES, NON-STANDARD ATTRIBUTES, @set
@NAME
@name <object>=<new name>
@name <player|exit>=<new name>[;<alias1>[;<aliasN>]]
Changes the name of <object> to <new name>.
Players can change their name to anything valid which is not currently in
use by another player, as a name or alias. (They can change their name to
something from their own @alias.)
You can change the alias for a player or exit while renaming it, by giving
the alias(es) after the new name, each separated by a semicolon. If the
name is followed by a semicolon with no aliases, the existing alias will
be cleared instead.
When <object>'s name is changed, its ONAME and ANAME verb attributes will
be triggered. See 'help @oname' for details.
Examples:
> @name here=My Room
Name set.
> @name me=Mike;Michael;m
Alias set.
Name set.
> @name me=Obi Wan;
Alias removed;
Name set.
See also: @alias, @oname, name(), fullname()
Config options: player_name_spaces, player_name_len, only_ascii_in_names
@NAMEACCENT
@nameaccent <object>[=<accent template>]
When this attribute holds an accent template that is the same
length as <object>'s @name, it is used to change the object's name
in some situations (how it shows up in speech, look, and a few other
commands). This allows for accented names without having to use the
accented characters directly in a name, which can make it harder for
people to type.
The <accent template> is explained in 'help accents'.
If a container has both a @nameaccent and a @nameformat, the
@nameformat is used.
See also: accent(), @nameformat, accname(), stripaccents()
@NAMEFORMAT
@nameformat <object>[=<format>]
When set, this attribute is evaluated and displayed in place of <object>'s
name, when objects inside <object> "look". The room's dbref is passed as
%0, and the default-formatted name (as it would be displayed with no
@nameformat set) is passed as %1.
@nameformat is not used when people who are outside the object look at it.
Q-registers (set via setq() and similar functions) are passed on from the
nameformat to the other @*format attributes used for formatting "look"
output. Use localize() if you don't want this behaviour.
Example:
Show the room's zone after its name.
> @nameformat here = %1 [if(zone(%0),<[name(zone(%0))]>)]
See also: look, @exitformat, @conformat, @descformat, @nameaccent,
@invformat, @idescformat
@NEWPASSWORD
@newpassword <player>=<password>
This wizard-only command changes <player>'s password. If <player> is
connected, she will be informed that the password was changed and who by,
but not what it was changed to.
The <player> argument is evaluated, but the <password> argument is not.
See also: @password, checkpass()
@NOTIFY
@notify[/any][/all] <object>[/<attribute>][=<number>]
@notify/setq <object>[/<attribute>]=<qreg1>,<qval1>[,...]
This command notifies a semaphore, allowing commands queued for that
semaphore to be executed.
If the /any switch is given, then all semaphores associated with <object>
are @notified. Otherwise, only the specified semaphore <attribute> (or
SEMAPHORE if no attribute is specified) is @notified.
If the /all switch is given, then all queue entries associated with the
selected semaphore(s) are executed. Otherwise, only the first <number> of
queue entries are run. If no <number> is given, then only one queue entry
is run.
If the /all switch was not used, and there were not enough queue entries
waiting to satisfy the requested <number>, then the semaphore becomes
negative, and subsequent @waits will not block until it reaches 0 again.
You may not specify both the /any switch and a specific attribute.
Similarly, you may not specify both the /all switch and a number.
Continued in 'help @notify2'.
@NOTIFY2
@notify/setq is a special form of @notify: It requires that a queue entry
exists and is waiting on <object>[/<attr>]. When this is the case, then
@notify/setq will modify the Q-registers of the extant queue entry.
/setq supercedes all other switches: You cannot @notify/all/setq or
@notify/any/setq - it deals with just one queue entry.
Example:
> @wait me=think Hello, %q0!
> @notify/setq me=0,Walker
Hello, Walker!
See also: SEMAPHORES, @drain, @wait, @halt
@NSCEMIT
@cemit[/nosiy|/silent][/noeval] <channel>=<message>
@nscemit[/nosiy|/silent][/noeval] <channel>=<message>
cemit(<channel>, <message>[, <noisy>])
nscemit(<channel>, <message>[, <noisy>])
@cemit emits <message> on <channel>. It does not include your name. The
channel prefix is included if the /noisy switch is given, and omitted if
/silent is given - if neither is given, the default behaviour is controlled
by the noisy_cemit @config option. The /noeval switch prevents <message>
from being evaluated.
You must be able to speak on the channel, or have the See_All and Pemit_All
@powers, to @cemit on the channel.
@nscemit is exactly the same, but does not produce nospoof information when
used by players with the Can_spoof @power.
cemit() and nscemit() work the same as @cemit/silent and @nscemit/silent,
respectively. If <noisy> is given as a true value, they work like
@cemit/noisy and @nscemit/noisy, respectively, instead.
@cemit is intended for use in writing extended chat systems.
See also: @chat
@NSEMIT
@nsemit[/<switch>] [<message>]
@nslemit[/<switch>] <message>
@nspemit[/switches] <object>=<message>
@nsprompt[/switches] <object>=<message>
@nsremit[/switches] <object>=<message>.
@nsoemit[/<switch>] [<room>/]<object> [<object>...]=<message>
@nszemit <zone>=<message>
These commands work like @emit, @lemit, @pemit, @prompt, @remit,
@oemit, and @zemit, respectively, but will not include nospoof
information if used by Wizards or someone with the Can_spoof
@power. They are meant to be used by commands in the master room
where the nospoof information is just useless noise. They take the
same switches as their respective commands, with a few exceptions
(/spoof, and for @nspemit, /contents and the admin-only /port).
See also: @emit, @lemit, @pemit, @prompt, @remit, @oemit, @zemit, nsemit(),
nslemit(), nspemit(), nsprompt(), nsremit(), nsoemit(), nszemit(),
PROMPT_NEWLINES
@NSLEMIT
@nsemit[/<switch>] [<message>]
@nslemit[/<switch>] <message>
@nspemit[/switches] <object>=<message>
@nsprompt[/switches] <object>=<message>
@nsremit[/switches] <object>=<message>.
@nsoemit[/<switch>] [<room>/]<object> [<object>...]=<message>
@nszemit <zone>=<message>
These commands work like @emit, @lemit, @pemit, @prompt, @remit,
@oemit, and @zemit, respectively, but will not include nospoof
information if used by Wizards or someone with the Can_spoof
@power. They are meant to be used by commands in the master room
where the nospoof information is just useless noise. They take the
same switches as their respective commands, with a few exceptions
(/spoof, and for @nspemit, /contents and the admin-only /port).
See also: @emit, @lemit, @pemit, @prompt, @remit, @oemit, @zemit, nsemit(),
nslemit(), nspemit(), nsprompt(), nsremit(), nsoemit(), nszemit(),
PROMPT_NEWLINES
@NSOEMIT
@nsemit[/<switch>] [<message>]
@nslemit[/<switch>] <message>
@nspemit[/switches] <object>=<message>
@nsprompt[/switches] <object>=<message>
@nsremit[/switches] <object>=<message>.
@nsoemit[/<switch>] [<room>/]<object> [<object>...]=<message>
@nszemit <zone>=<message>
These commands work like @emit, @lemit, @pemit, @prompt, @remit,
@oemit, and @zemit, respectively, but will not include nospoof
information if used by Wizards or someone with the Can_spoof
@power. They are meant to be used by commands in the master room
where the nospoof information is just useless noise. They take the
same switches as their respective commands, with a few exceptions
(/spoof, and for @nspemit, /contents and the admin-only /port).
See also: @emit, @lemit, @pemit, @prompt, @remit, @oemit, @zemit, nsemit(),
nslemit(), nspemit(), nsprompt(), nsremit(), nsoemit(), nszemit(),
PROMPT_NEWLINES
@NSPEMIT
@nsemit[/<switch>] [<message>]
@nslemit[/<switch>] <message>
@nspemit[/switches] <object>=<message>
@nsprompt[/switches] <object>=<message>
@nsremit[/switches] <object>=<message>.
@nsoemit[/<switch>] [<room>/]<object> [<object>...]=<message>
@nszemit <zone>=<message>
These commands work like @emit, @lemit, @pemit, @prompt, @remit,
@oemit, and @zemit, respectively, but will not include nospoof
information if used by Wizards or someone with the Can_spoof
@power. They are meant to be used by commands in the master room
where the nospoof information is just useless noise. They take the
same switches as their respective commands, with a few exceptions
(/spoof, and for @nspemit, /contents and the admin-only /port).
See also: @emit, @lemit, @pemit, @prompt, @remit, @oemit, @zemit, nsemit(),
nslemit(), nspemit(), nsprompt(), nsremit(), nsoemit(), nszemit(),
PROMPT_NEWLINES
@NSPROMPT
@nsemit[/<switch>] [<message>]
@nslemit[/<switch>] <message>
@nspemit[/switches] <object>=<message>
@nsprompt[/switches] <object>=<message>
@nsremit[/switches] <object>=<message>.
@nsoemit[/<switch>] [<room>/]<object> [<object>...]=<message>
@nszemit <zone>=<message>
These commands work like @emit, @lemit, @pemit, @prompt, @remit,
@oemit, and @zemit, respectively, but will not include nospoof
information if used by Wizards or someone with the Can_spoof
@power. They are meant to be used by commands in the master room
where the nospoof information is just useless noise. They take the
same switches as their respective commands, with a few exceptions
(/spoof, and for @nspemit, /contents and the admin-only /port).
See also: @emit, @lemit, @pemit, @prompt, @remit, @oemit, @zemit, nsemit(),
nslemit(), nspemit(), nsprompt(), nsremit(), nsoemit(), nszemit(),
PROMPT_NEWLINES
@NSREMIT
@nsemit[/<switch>] [<message>]
@nslemit[/<switch>] <message>
@nspemit[/switches] <object>=<message>
@nsprompt[/switches] <object>=<message>
@nsremit[/switches] <object>=<message>.
@nsoemit[/<switch>] [<room>/]<object> [<object>...]=<message>
@nszemit <zone>=<message>
These commands work like @emit, @lemit, @pemit, @prompt, @remit,
@oemit, and @zemit, respectively, but will not include nospoof
information if used by Wizards or someone with the Can_spoof
@power. They are meant to be used by commands in the master room
where the nospoof information is just useless noise. They take the
same switches as their respective commands, with a few exceptions
(/spoof, and for @nspemit, /contents and the admin-only /port).
See also: @emit, @lemit, @pemit, @prompt, @remit, @oemit, @zemit, nsemit(),
nslemit(), nspemit(), nsprompt(), nsremit(), nsoemit(), nszemit(),
PROMPT_NEWLINES
@NSZEMIT
@nsemit[/<switch>] [<message>]
@nslemit[/<switch>] <message>
@nspemit[/switches] <object>=<message>
@nsprompt[/switches] <object>=<message>
@nsremit[/switches] <object>=<message>.
@nsoemit[/<switch>] [<room>/]<object> [<object>...]=<message>
@nszemit <zone>=<message>
These commands work like @emit, @lemit, @pemit, @prompt, @remit,
@oemit, and @zemit, respectively, but will not include nospoof
information if used by Wizards or someone with the Can_spoof
@power. They are meant to be used by commands in the master room
where the nospoof information is just useless noise. They take the
same switches as their respective commands, with a few exceptions
(/spoof, and for @nspemit, /contents and the admin-only /port).
See also: @emit, @lemit, @pemit, @prompt, @remit, @oemit, @zemit, nsemit(),
nslemit(), nspemit(), nsprompt(), nsremit(), nsoemit(), nszemit(),
PROMPT_NEWLINES
@NUKE
@destroy[/override] <object>
@nuke <object>
@undestroy <object>
The @destroy command marks <object> for destruction by setting the GOING
flag on it. If <object> is a room, all the exits in the room are marked
for destruction as well. If <object> is a player, and the @config option
destroy_possessions is on, everything he owns is marked for destruction as
well. (If really_safe is also on, his SAFE objects will not be destroyed.)
If the adestroy @config option is on, the ADESTROY attribute will be
triggered when the object is first @destroy'd.
The MUSH checks for GOING objects every ten minutes or so (see '@config
purge_interval'); each one is set with the GOING_TWICE flag, and will be
destroyed totally on the next cycle. You can save it from destruction
during this period using the @undestroy command, or @destroy it again to
destroy it instantly.
When an object is destroyed, any commands, @waits and semaphores it has
queued are drained, and the object's owner has the quota for the object,
and the initial cost of creating it, refunded.
Continued in 'help @destroy2'.
@OBUY
@buy <object>[=<message>]
@obuy <object>[=<message>]
@abuy <object>[=<message>]
These attributes contain the message shown to a player who successfully
buys something from <object> using the "buy" command, the message shown to
others in the room when something is bought from <object> (prefixed with
the buyer's name), and the actions to be taken by <object> when something
is bought from it, respectively. Each attribute is passed the item being
purchased as %0 and the amount paid for it as %1.
Example:
> @buy Vendor=udefault(me/buy`%0,You buy %0 for %1 [money(%1)]., %0, %1)
> @obuy Vendor=hands some money to [name(me)] for [art(%0)] %0.
> @abuy Vendor=:goes into the storeroom. ; @wait 2=:returns with %n's %0.
See also: buy, @pricelist, MONEY, @lock, VERBS, @cost, give
@ODEATH
@death <object>[=<message>]
@odeath <object>[=<message>]
@adeath <object>[=<action list>]
These attributes contain the message shown to the killer, the message
shown to others in the room, and the actions to be taken when <object>
is killed.
Example:
> @death me=You have just slain Cyclonus!
> @odeath me=falls to the ground and vanishes.
See also: kill, BEING KILLED, ACTION LISTS, VERBS
@ODESCRIBE
@odescribe <object>[=<message>]
@adescribe <object>[=<action list>]
These attributes contain the message shown to others in the enactor's
location when he looks at <object>, and the actions to be taken by <object>
when someone looks at it. (See 'help @describe' for the attribute shown
to the enactor when he looks at <object>.) When the enactor is inside
<object>, the @oidescribe and @aidescribe attributes will be used instead,
if set. Please note that using these attributes to show long messages is
often found annoying.
Examples:
> @odescribe Walker=glances at Walker and sniggers.
> @adescribe me=think %n just looked at you.
See also: look, @describe, @idescribe, ACTION LISTS
@ODROP
@drop <object>[=<message>]
@odrop <object>[=<message>]
@adrop <object>[=<action list>]
When <object> is a player or thing, the @drop attribute is shown to whoever
drops <object>, and @odrop to others in the location <object> is dropped
in. The @adrop attribute is triggered when <object> is dropped.
When <object> is an exit, @drop is shown to objects going through <object>,
and @odrop is shown to objects in the exit's destination. @adrop is
triggered when someone passes through the exit.
Example:
> @drop Box=You put the box down gently.
> @odrop Box=puts the box down gently.
> @odrop South=arrives from the North.
See also: drop, empty, ACTION LISTS, VERBS, @success
@OEFAIL
@efail <object>[=<message>]
@oefail <object>[=<message>]
@aefail <object>[=<action list>]
These attributes contain the message shown to someone who fails to enter
<object>, the message shown to others when someone fails to enter <object>,
and the actions to be taken when someone fails to enter it, respectively.
See also: enter, @enter, FAILURE, ACTION LISTS, VERBS
@OEMIT
@oemit[/<switch>] [<room>/]<object> [... <object>]=<message>
This command shows <message> to everyone in the location of <object>
EXCEPT <object>. A list of objects can be given, in which case the message
is shown in the locations of each, to everyone but those objects. If
<object> contains a space, it should be enclosed in double-quotes.
If <room> is specified (usually as a dbref), this command shows <message>
to everyone in <room> except for the given <object>s. In this case, each
<object> is matched relative to <room>. If no matching <object>s are found
in <room>, this is the equivilent of @remit <room>=<message>
The /noeval switch prevents the MUSH from evaluating <message>.
The /spoof switch causes nospoof notifications to show the enactor's
dbref instead of the executor's dbref, and requires control over
the enactor or the Can_spoof power.
See 'help @oemit2' for examples.
See also: @emit, @pemit, @nsoemit, oemit(), nsoemit(), NOSPOOF, SPOOFING
@OEMIT2
Examples:
Show a message in the locations of players Bob and Fred, to everyone
except those two players:
> @oemit *Bob *Fred=Bob throws a paper aeroplane at Fred.
Show a message in #50 to everyone except the object 'Spy'.
> @oemit #50/Spy=Sssh!
Show a message to everyone in your current location, except the 2nd
object called 'foo'.
> @oemit %L/"2nd foo"=bar
@OENTER
@enter <object>[=<message>]
@oenter <object>[=<message>]
@oxenter <object>[=<message>]
@aenter <object>[=<action list>]
These attributes contain the messages shown to someone who enters <object>,
the message shown to others inside <object> when someone enters it, the
message shown to those in <object>'s location when someone enters it, and
the actions to be taken by <object> when someone enters it, respectively.
The old location of the entering object is passed in %0, if <object>
had permission to see it there.
Example:
> @enter Sofa=You sit on the comfy sofa.
> @oenter Sofa=sits with you on the sofa.
> @oxenter Sofa=sits down on the sofa. It looks comfy.
> @aenter Sofa=@pemit/silent owner(me)=%n sat down on [name(me)]!
See also: enter, @ealias, leave, ACTION LISTS, VERBS
@OFAILURE
@failure <object>[=<message>]
@ofailure <object>[=<message>]
@afailure <object>[=<action list>]
@failure contains the message shown to someone who fails to pass <object>'s
Basic @lock. @ofailure contains the message shown to others, and @afailure
contains the actions to be taken by <object>.
For players and things, this means failure to get/take. For exits, it means
failure to go through the exit. For rooms the lock is checked when objects
"look" inside the room, though failure to pass the lock does not prevent
the object from looking.
See also: get, move, @lock, ACTION LISTS, VERBS, @success
@OFOLLOW
@follow <object>[=<message>]
@ofollow <object>[= <message>]
@aunfollow <object>[=<action list>]
Sets the message shown to someone who begins following <object>,
the message shown to others in the room, and the actions to be taken
by <object> when someone begins following it, respectively. The name
of the person following <object> is automatically prepended to the
@ofollow message.
See also: follow, unfollow, @unfollow, followers(), ACTION LISTS, VERBS
@OGIVE
@give <giver>[=<message>]
@ogive <giver>[=<message>]
@agive <giver>[=<action list>]
These attributes contain the message shown to <giver> when he gives an
object, the message shown to others in <giver>'s location when he gives an
object, and the actions to be taken by <giver> when he gives an object,
respectively.
In all cases, %0 is the dbref of the object being given, and %1 is the
dbref of the recipient.
See also: give, @receive, ACTION LISTS, VERBS
@OIDESCRIBE
@idescribe <object>[=<description>]
@oidescribe <object>[=<message>]
@aidescribe <object>[=<action list>]
@idescribe command sets the internal description for an object, which is
shown to anyone who enters or looks while inside the object. It's only
used for players and things; rooms and exits always use @describe.
The @oidescribe attribute is shown to others inside <object> when someone
looks at the @idescribe, and the @aidescribe is triggered when someone
lookst at the @idescribe.
If there is no IDESCRIBE set for an object, those who enter or look inside
it will see its @describe. In this case, others in the object will see
nothing, and the @aidescribe will not be triggered. If you want to use
@aidescribe without @idescribe, set @idescribe to a blank string, or to
u(describe) to show the description.
See also: enter, @enter, ENTER_OK, @describe, look, @idescformat, VERBS
@OLEAVE
@leave <object>[=<message>]
@oleave <object>[=<message>]
@oxleave <object>[=<message>]
@aleave <object>[=<action list>]
These attributes contain the message shown to anyone leaving <object>,
the message shown to others inside <object> when someone leaves it, the
message shown to others in <object>'s location when someone leaves it, and
the actions to be taken by <object> when someone leaves it, respectively.
The leaver's new location is passed in %0, if <object> has
permission to see it there.
See also: leave, @oxleave, @lfail, ACTION LISTS, VERBS
@OLFAIL
@lfail <object>[=<message>]
@olfail <object>[=<message>]
@alfail <object>[=<action list>]
These attributes contain the message shown to objects who try to leave
<object> and fail, the message shown to others inside <object> when
someone fails to leave, and the actions to be taken by <object> when
someone attempts to leave it and fails.
Such a failure usually occurs because <object> is set NO_LEAVE, or
because the person trying to leave does not pass <object>'s @lock/leave.
See also: leave, @leave, NO_LEAVE, locktypes, ACTION LISTS, VERBS
@OMOVE
@move <object>[=<message>]
@omove <object>[=<message>]
@oxmove <object>[=<message>]
@amove <object>[=<action list>]
These attributes contain the message shown to <object> immediately after
it moves, the message shown to others in the room <object> moves into, the
message shown to objects in the location <object> leaves, and the actions
to be taken when <object> moves, respectively. Please note that long
@omoves are frequently found annoying.
The <object>'s new location is in %0 and the old location it moved
from in %1.
Example:
> @move me=You moved! You are now in the room: [name(here)].
> @omove me=stalks into the room wearing a malevolent expression.
> @oxmove me=stalks away, glaring.
See also: goto, @oxmove, ACTION LISTS, VERBS
@ONAME
@oname <object>[=<message>]
@aname <object>[=<action list>]
Whenever <object>'s name is changed (via @name), others in the same
location will see the contents of <object>'s ONAME attribute, prepended
with <object>'s new name. At the same time, <object>'s ANAME attribute
will be triggered. Both attributes receive the old name as %0, and the new
name as %1.
Example:
> @oname me=has regenerated from %0!
> @aname me=think >> Renamed from %0 to %1 at [time()] by %n(%#).
See also: @name, name(), VERBS
@OPAYMENT
@payment <object>[=<message>]
@opayment <object>[=<message>]
@apayment <object>[=<action list>]
These attributes contain the messages shown to someone who pays <object>
pennies with the "give" command, the message shown to others when someone
pays <object>, and the actions to be taken by <object> when it's paid. Each
attribute is passed the number of pennies paid as %0.
Example:
> @payment Collecting Tin=Thank you for your donation!
> @opayment Collecting Tin=makes a donation to charity.
> @apayment Collecting Tin=&%# me=%0 at [time()]
See also: give, @cost, buy, MONEY, ACTION LISTS, VERBS
@OPEN
@open <exit name>[=<destination>,<return exit name>,<source room>,<dbref>,
<return dbref>]
This command opens an exit, named <exit name>, in your current location,
or in <source room> if one is given. Exits can only be opened from rooms.
If a <destination> is given, the exit will be linked (as per @link) to
that object. If you don't have permission to link to <destination>, the
exit will be created but unlinked.
If <return exit name> is given, the MUSH will attempt to open an exit back
from <destination> and link it to <exit name>'s source.
Both <exit name> and <return exit name> can include any number of aliases
for the exits, separated by semicolons. See 'help @name' for details.
Wizards and objects with the pick_dbref power can specify garbage
dbrefs to use for the exit and return exit.
To open an exit in a room, you must control the room, have the
Open_Anywhere @power, or the room must be set OPEN_OK and you must pass
its @lock/open.
Example:
> @open Up <U>;up;u;climb=#255, Down <D>;down;d;fall
See also: EXITS, @link, @dig, open()
@ORECEIVE
@receive <recipient>[=<message>]
@oreceive <recipient>[=<message>]
@areceive <recipient>[=<action list>]
These attributes contain the message shown <recipient> when he receives an
object (via 'get' or 'give'), the message shown to others in <recipient>'s
location when he receives an object, and the actions to be taken by
<recipient> when he receives an object, respectively.
In all cases, %0 is the dbref of the object received. If the object was
'give'n, %1 will be the dbref of the giver.
See also: give, get, @give, @success, ACTION LISTS, VERBS
@OSUCCESS
@success <object>[=<message>]
@osuccess <object>[=<message>]
@asuccess <object>[=<action list>]
For players and things, these attributes contain the message shown to
someone who picks up <object> with the "get" command, the message shown
to others when someone gets <object>, and the actions to be taken by
<object> when someone gets it, respectively.
For exits, they contain the message shown to an object passing through the
exit <object>, the message shown in the exit's source when someone passes
through it, and the actions to be taken by the exit when someone passes
through it, respectively.
Example:
> @success Door=You open the door and step inside.
> @osuccess Door=opens the door and steps inside.
> @success Box=You pick up the box.
> @osuccess Box=picks up the box.
See also: get, goto, @lock, SUCCESS, FAILURE, @odrop, ACTION LISTS, VERBS
@OTPORT
@tport <object>[=<message>]
@otport <object>[=<message>]
@oxtport <object> [=<message>]
@atport <object>[=<action list>]
These attributes contain the message shown to <object> when it is
teleported, the message shown to others in the room <object> is teleported
to, the message shown to others in the room <object> is teleported from,
and the actions to be taken by <object> when it disappears, respectively.
In all of these attributes, %0 is the object which teleported <object>,
and %1 is <object>'s old location.
Example:
> @tport me=name(%0) has teleported you from [name(%1)] to [name(here)].
> @otport me=appears in a puff of smoke.
> @oxtport me=disappears in a puff of smoke.
See also: @teleport, ACTION LISTS, VERBS
@OUFAIL
@ufail <object>=[<message>]
@oufail <object>=[<message>]
@aufail <object>=[<action list>]
Sets the message shown to a player who fails to use an object via the 'use'
command (because they don't pass the @lock/use), the message shown to
others in the room when a player fails to use <object>, and the actions to
be taken by <object> when someone fails to use it, respectively.
Note that these attributes are @ufail, NOT @ufailure, for
TinyMUSH compatibility.
Although the Use @lock also restricts who can trigger $-commands or
^-listens on an object, these attributes will not be triggered for those
failures. Instead, the COMMAND_LOCK`* and LISTEN_LOCK`* attributes are
triggered. See 'help failure' for more information.
See also: use, @use, FAILURE, ACTION LISTS, VERBS
@OUNFOLLOW
@unfollow <object>[=<message>]
@ounfollow <object>[=<message>]
@aunfollow <object>[=<action list>]
Sets the message shown to someone who stops following <object>,
the message shown to others in the room, and the actions to be taken
by <object> when someone stops following it, respectively. The name
of the person stopping following <object> is automatically prepended
to the @ounfollow message.
See also: follow, unfollow, @follow, followers(), ACTION LISTS, VERBS
@OUSE
@use <object>[=<message>]
@ouse <object>[=<message>]
@ause <object>[=<action list>]
These attributes contain the message shown to someone who successfully uses
<object>, the message shown to others when someone uses <object>, and the
actions to be taken by <object> when it is used, respectively.
Note that, if <object> has a CHARGES attribute set and it does not contain
a number greater than 0, the RUNOUT attribute is triggered instead of the
AUSE attribute. See 'help @charges' for more information.
Example:
> @use Jack-In-The-Box=You wind the handle.
> @ouse Jack-In-The-Box=winds the handle.
> @ause Jack-In-The-Box=@wait 3=POSE pops up with a bang!
> use Jack-In-The-Box
See also: use, @charges, @runout, ACTION LISTS, VERBS
@OUTPAGEFORMAT
@outpageformat <object>[=<message>]
@pageformat <object>[=<message>]
@pageformat changes the message seen by <object> when it receives a page.
@outpageformat sets the message seen by <object> when it sends a page.
%0 will be set to the page message (not including :, ; or ").
%1 will be set to ':' ';' or '"' for pose, semipose and normal page,
respectively.
%2 will be set to the alias of the pager, if any.
%3 will be a space-separated list of recipient dbrefs.
%4 will be set to the default message.
See 'help @pageformat2' for examples.
See also: page, speak(), @chatformat, @speechmod, @message
@OUTPAGEFORMAT2
For simple page timestamps:
> @pageformat me=\[[time()]\] %4
> @outpageformat me=\[[time()]\] %4
To obtain 'page_aliases' behavior:
> @pageformat me=[setq(0,%n[if(%2,%b(%2))],1,switch(%3,%!,,itemize(iter(%3,
name(##),%b,|),|)))][switch(%1,",%q0 pages[if(%q1,%b%q1)]: %0,:,From
afar[if(%q1,%b(to %q1))]\, %q0 %0,From afar[if(%q1,%b(to %q1))]\, %q0%0)]
To obtain no 'page_aliases' behavior:
> @pageformat me=[setq(1,switch(%3,%!,,itemize(iter(%3,name(##),%b,|),|)))]
[switch(%1,",%n pages[if(%q1,%b%q1)]: %0,:,From afar
[if(%q1,%b(to %q1))]\, %n %0,From afar[if(%q1,%b(to %q1))]\, %n%0)]
@OXENTER
@enter <object>[=<message>]
@oenter <object>[=<message>]
@oxenter <object>[=<message>]
@aenter <object>[=<action list>]
These attributes contain the messages shown to someone who enters <object>,
the message shown to others inside <object> when someone enters it, the
message shown to those in <object>'s location when someone enters it, and
the actions to be taken by <object> when someone enters it, respectively.
The old location of the entering object is passed in %0, if <object>
had permission to see it there.
Example:
> @enter Sofa=You sit on the comfy sofa.
> @oenter Sofa=sits with you on the sofa.
> @oxenter Sofa=sits down on the sofa. It looks comfy.
> @aenter Sofa=@pemit/silent owner(me)=%n sat down on [name(me)]!
See also: enter, @ealias, leave, ACTION LISTS, VERBS
@OXLEAVE
@leave <object>[=<message>]
@oleave <object>[=<message>]
@oxleave <object>[=<message>]
@aleave <object>[=<action list>]
These attributes contain the message shown to anyone leaving <object>,
the message shown to others inside <object> when someone leaves it, the
message shown to others in <object>'s location when someone leaves it, and
the actions to be taken by <object> when someone leaves it, respectively.
The leaver's new location is passed in %0, if <object> has
permission to see it there.
See also: leave, @oxleave, @lfail, ACTION LISTS, VERBS
@OXMOVE
@move <object>[=<message>]
@omove <object>[=<message>]
@oxmove <object>[=<message>]
@amove <object>[=<action list>]
These attributes contain the message shown to <object> immediately after
it moves, the message shown to others in the room <object> moves into, the
message shown to objects in the location <object> leaves, and the actions
to be taken when <object> moves, respectively. Please note that long
@omoves are frequently found annoying.
The <object>'s new location is in %0 and the old location it moved
from in %1.
Example:
> @move me=You moved! You are now in the room: [name(here)].
> @omove me=stalks into the room wearing a malevolent expression.
> @oxmove me=stalks away, glaring.
See also: goto, @oxmove, ACTION LISTS, VERBS
@OXTPORT
@tport <object>[=<message>]
@otport <object>[=<message>]
@oxtport <object> [=<message>]
@atport <object>[=<action list>]
These attributes contain the message shown to <object> when it is
teleported, the message shown to others in the room <object> is teleported
to, the message shown to others in the room <object> is teleported from,
and the actions to be taken by <object> when it disappears, respectively.
In all of these attributes, %0 is the object which teleported <object>,
and %1 is <object>'s old location.
Example:
> @tport me=name(%0) has teleported you from [name(%1)] to [name(here)].
> @otport me=appears in a puff of smoke.
> @oxtport me=disappears in a puff of smoke.
See also: @teleport, ACTION LISTS, VERBS
@OZENTER
@zenter <object>[=<message>]
@ozenter <object>[=<message>]
@azenter <object>[=<action list>]
These attributes set the message shown to a player when he enters the zone
<object>, the message shown to others in the room the player enters when
he enters the zone, and the action to be taken by the zone <object> when
the player moves into an area zoned to it.
Entry into a new zone is said to occur when a player goes from a room not
in the zone to a room in the zone. "Room" in this context means the
player's absolute room (outermost container), so entering and leaving
unzoned objects within a zoned room doesn't trigger these.
Zone entry is assumed to occur before room entry, so these are
triggered before the room's @[oa]enter.
See also: @zleave, ZONES, @zemit, zwho(), VERBS
@OZLEAVE
@zleave <object>[=<message>]
@ozleave <object>[=<message>]
@azleave <object>[=<action list>]
These attributes set the message shown to a player when he leaves the zone
<object>, the message shown to others in the room he left when leaving
the zone, and the actions to be taken by <object> with a player leaves
an area zoned to it.
a zone (@zleave), the message shown to others in the room in the
old zone when the player leaves (@ozleave), and the action triggered
by the leave-taking (@azleave).
Leaving a zone is said to occur when a player goes from a room in the zone
to a room not in the zone. "Room" in this context means the player's
absolute room (outermost container), so entering and leaving unzoned
objects within a zoned room doesn't trigger these.
Zone leaving is assumed to occur after room leaving, so these are
triggered after the room's @[oa]leave.
See also: @zenter, ZONES, @zemit, zwho(), VERBS
@PAGEFORMAT
@outpageformat <object>[=<message>]
@pageformat <object>[=<message>]
@pageformat changes the message seen by <object> when it receives a page.
@outpageformat sets the message seen by <object> when it sends a page.
%0 will be set to the page message (not including :, ; or ").
%1 will be set to ':' ';' or '"' for pose, semipose and normal page,
respectively.
%2 will be set to the alias of the pager, if any.
%3 will be a space-separated list of recipient dbrefs.
%4 will be set to the default message.
See 'help @pageformat2' for examples.
See also: page, speak(), @chatformat, @speechmod, @message
@PAGEFORMAT2
For simple page timestamps:
> @pageformat me=\[[time()]\] %4
> @outpageformat me=\[[time()]\] %4
To obtain 'page_aliases' behavior:
> @pageformat me=[setq(0,%n[if(%2,%b(%2))],1,switch(%3,%!,,itemize(iter(%3,
name(##),%b,|),|)))][switch(%1,",%q0 pages[if(%q1,%b%q1)]: %0,:,From
afar[if(%q1,%b(to %q1))]\, %q0 %0,From afar[if(%q1,%b(to %q1))]\, %q0%0)]
To obtain no 'page_aliases' behavior:
> @pageformat me=[setq(1,switch(%3,%!,,itemize(iter(%3,name(##),%b,|),|)))]
[switch(%1,",%n pages[if(%q1,%b%q1)]: %0,:,From afar
[if(%q1,%b(to %q1))]\, %n %0,From afar[if(%q1,%b(to %q1))]\, %n%0)]
@PARENT
@parent <object>[=<parent>]
This command sets the parent of <object> to <parent>. If no <parent> is
given, or <parent> is "none", <object>'s parent is cleared. You must
control <object>, and must either control <parent> or it must be set
LINK_OK and you must pass its @lock/parent.
See also: PARENTS, parent(), lparent(), ANCESTORS
@PASSWORD
@password <old password>=<new password>
This changes your password. Please note that passwords ARE case-sensitive.
The arguments are not evaluated.
See also: @newpassword, checkpass()
@PAYMENT
@payment <object>[=<message>]
@opayment <object>[=<message>]
@apayment <object>[=<action list>]
These attributes contain the messages shown to someone who pays <object>
pennies with the "give" command, the message shown to others when someone
pays <object>, and the actions to be taken by <object> when it's paid. Each
attribute is passed the number of pennies paid as %0.
Example:
> @payment Collecting Tin=Thank you for your donation!
> @opayment Collecting Tin=makes a donation to charity.
> @apayment Collecting Tin=&%# me=%0 at [time()]
See also: give, @cost, buy, MONEY, ACTION LISTS, VERBS
@PCREATE
@pcreate <name>=<password>[, <dbref>]
This wizard-only command creates a player with the given name and password.
If specified, <dbref> is the dbref of a garbage object to be used for the
new player.
See also: pcreate()
@PEMIT
@pemit[/<switches>] <object>=<message>
@pemit/list[/<switches>] <object list>=<message>
@pemit/port[/list][/silent] <descriptor(s)>=<message>
The basic form of this command sends <message> to <object> directly. It is
very similar in its effects to @emit except only one object will see the
message.
@pemit/list sends the message to multiple objects. You will not get a
confirmation message when using this switch.
@pemit/port can only be used by Wizards/Royalty, and sends <message> to one
or more connections. It can be used to send messages to connections which
are still at the login screen, or to send a message to just one of a
player's connections when he's logged in multiple times.
See 'help @pemit2' for more.
@PEMIT2
The @pemit command can take the following additional switches:
/contents -- equivalent to @remit.
/silent -- does not tell the @pemit'ing object a confirmation message.
/noisy -- tells the @pemit'ing object a confirmation message.
/noeval -- <message> will not be evaluated for substitutions
/spoof -- the enactor's dbref will be used for nospoof notifications
instead of the executor's dbref. Requires control
over enactor or Can_spoof power.
You cannot @pemit to objects set HAVEN, or objects whose @lock/page you do
not pass, unless you are set WIZARD or have the pemit_all @power.
See also: @emit, @nspemit, @oemit, @remit, NOSPOOF, SPOOFING, page
@POLL
@poll
@poll <message>
@poll/clear
This command manipulate the message at the top of WHO/DOING. By itself,
it displays the current poll. Wizards and those with the poll @power can
set or clear the message.
See also: @doing, WHO, DOING
@POOR
@poor <value>
This command sets the pennies of every player on the MUSH to <value>. It
can only be used by God.
See also: MONEY, give
@POWER
@power/list [<power name pattern>]
@power <power>
@power <object>=[!]<power>
@power/list lists the defined powers (see 'help powers'). A list
of standard powers with explanations is given in 'help powers list'.
When given a power name as an argument, @power displays information
about a power.
The third form manipulates powers on objects, and is limited to Wizards.
@power <object>=[!]<power> sets (or clears) the given power on an
object.
God can add, delete, and otherwise manipulate power definitions.
See help @power2 for these commands.
See also: powers(), @flag
@POWER2
@power/add <power>=[<letter>], [<type(s)>], [<setperms>], [<unsetperms>]
@power/delete <power>
@power/alias <power>=<alias>
@power/letter <power>[=<letter>]
@power/restrict <power>=[<setperms>], [<unsetperms>]
@power/type <power>=<type(s)>
@power/enable <power>
@power/disable <power>
These commands manipulate power definitions. Only God may use them.
/disable disables a power, making it invisible and unusable
/enable re-enables a disabled power
/alias adds a new alias for an existing power
/letter changes or removes a single-letter alias for an existing power.
/restrict changes power permissions (see help @power3)
/type changes power type(s) (see help @power3)
/delete deletes a power completely, removing it from all objects
in the database and the removing it permanently from the
power table. It requires the exact power name or alias to be used.
Be very very careful with this.
See help @power3 for information on @power/add
@POWER3
@power/add is used to add a new power with the given name. Arguments
other than the power name are optional:
<letter> gives the power's one-letter abbreviation, which must
not conflict with the one-letter abbreviation of another power that
could be applied to the same object type(s). It defaults to none, which
means it won't appear in a list of power characters but can still be
tested for with haspower(), andlpowers(), and orlpowers().
<type> specifies the space-separated list of types to which the power
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 power. See 'help flag permissions' for details.
It defaults to 'any'
<unsetperms> specifies the space-separated list of permissions for who
can clear the power on an object they control. It defaults to
whatever <setperms> is given, or 'any'.
Powers added with @power/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 power in the server.
@PREFIX
@prefix <object>[=<message>]
This attribute is meant to be used in conjunction with the AUDIBLE
flag. The @prefix of the object is prepended to messages propagated
via AUDIBLE. Pronoun substitution is done on @prefix messages.
For example, if you have an audible exit "Outside" leading from a room
Garden to a room Street, with @prefix "From the garden nearby," if
Joe does a ":waves to everyone." from the Garden, the people at Street
will see the message, "From the garden nearby, Joe waves to everyone."
See also: @inprefix, AUDIBLE, @listen
@PRICELIST
@pricelist <object>=<item1>:<price1>[,<price2>][ <item2>:...]
The PRICELIST attribute is a space-delimited list of item names and prices
that are checked when the 'buy' command is run.
An item name may have '_'s where the player would use a space in the name.
A price is either a number (20), a range of numbers (10-30), or a minimum
number (10+). An item can also have several different prices, separated by
commas.
A player must pass <object>'s @lock/pay in order to purchase from it.
Example::
> @PRICELIST vendor=mansion:1000+ large_house:100-200 house:20,30,50
See also: buy, @buy, MONEY, @cost, give, @lock
@PROMPT
@prompt[/<switch>] <dbref list>[=<message>]
A variation of @pemit/list that adds a telnet GOAHEAD control code to the
end of messages sent to players. Players with clients that handle GOAHEAD
may get the message as a prompt in their client's input area.
If <message> is omitted, an empty prompt is sent.
@prompt supports the following @pemit switches: /silent, /noisy,
/spoof, /noeval
See also: @pemit, @nsprompt, prompt(), nsprompt(), PROMPT_NEWLINES
@PS
@ps[/<switch>] [<player>]
@ps[/debug] <pid>
@ps lists all commands currently on your 'to be executed' queue, thus
allowing you to identify infinite (or unnecessary) loops with-out putting
in says or poses. It gives a count of the total commands in each of the
queues (Player, Object, Wait, and Semaphore), displayed in the format:
<Number of your queued commands> / <Total number of queued commands>.
Some of the queues also include a [Ndel] after the total. That number is
the number of entries made by objects that have been halted but haven't
been removed from the queue yet.
It also shows a running load average of the number of queue entries
executed per second for the last 1, 5 and 15 minutes.
@ps with no arguments will show you your own queue. Wizards may specify
the /all switch, and see the full queue. They may also specify a player.
@ps/summary just displays the queue totals for the whole queue.
@ps/quick displays the queue totals for just your queue.
Continued in 'help @ps2'.
@PS2
With a <pid> argument, @ps shows information on a single queue entry.
The /debug switch will also display the queue entry's environment:
Arguments, q registers, executor, enactor and caller dbrefs.
Each line includes the process id of the queue entry, the object and
attribute being used as a semaphore (if any), the number of seconds left
before it executes (for waits and semaphores), the object that is going
to execute the entry, and the command. To halt a specific queue entry,
use @halt/pid.
See also: @wait, @halt, @notify, @drain, SEMAPHORES
@PURGE
@purge is a wizard only command that calls the internal purge routine to
advance the clock of each object scheduled to be destroyed, and destroy
those things whose time is up. The internal purge routine is normally
run automatically approximately every 10 minutes.
The @purge command should almost never need to be performed
manually. If you do use it manually, you may want to use it twice in
a row to make sure that everything marked GOING is actually
destroyed.
See also: @dbck
@QUOTA
@quota [/<switch>] [<victim>]
This command is only available if the quota system is enabled.
It reports the victim's owned objects and the maximum number of objects
s/he may own. You must be a Wizard to see another player's quota.
The /set and /all switches are equivalent to @squota and @allquota,
respectively.
@READCACHE
@readcache
This wizard-only command reads special text files into a cache and
rebuilds the help and news indices. This must be done every time the
text files (connect text, help files, etc.) are changed while the
game is running. It does not need to be used after changing the
names.cnf file of bad player names.
A site admin can achieve the same effect by sending the MUSH process
a kill -1 or kill -HUP.
@RECEIVE
@receive <recipient>[=<message>]
@oreceive <recipient>[=<message>]
@areceive <recipient>[=<action list>]
These attributes contain the message shown <recipient> when he receives an
object (via 'get' or 'give'), the message shown to others in <recipient>'s
location when he receives an object, and the actions to be taken by
<recipient> when he receives an object, respectively.
In all cases, %0 is the dbref of the object received. If the object was
'give'n, %1 will be the dbref of the giver.
See also: give, get, @give, @success, ACTION LISTS, VERBS
@RECYCLE
@destroy[/override] <object>
@nuke <object>
@undestroy <object>
The @destroy command marks <object> for destruction by setting the GOING
flag on it. If <object> is a room, all the exits in the room are marked
for destruction as well. If <object> is a player, and the @config option
destroy_possessions is on, everything he owns is marked for destruction as
well. (If really_safe is also on, his SAFE objects will not be destroyed.)
If the adestroy @config option is on, the ADESTROY attribute will be
triggered when the object is first @destroy'd.
The MUSH checks for GOING objects every ten minutes or so (see '@config
purge_interval'); each one is set with the GOING_TWICE flag, and will be
destroyed totally on the next cycle. You can save it from destruction
during this period using the @undestroy command, or @destroy it again to
destroy it instantly.
When an object is destroyed, any commands, @waits and semaphores it has
queued are drained, and the object's owner has the quota for the object,
and the initial cost of creating it, refunded.
Continued in 'help @destroy2'.
@REJECTMOTD
@rejectmotd <message>
This is a wizard only command that will set a short (non-longterm) message
that will be shown to players that try to connect when logins are disabled.
This is the "Down MOTD" in the @listmotd listing. The siteadmin can set a
more permanent message for this by editing the file "down.txt".
See also: @motd, @list, @listmotd
@REMIT
@remit[/switches] <object>=<message>
Sends the message to all contents of <object>, which can be a room,
thing, or player. The message is also sent to the <object> itself.
(The TinyMUSH equivalent is @pemit/contents).
The /silent switch stops the remitter from getting feedback if they're
in a different location than the target.
The /noisy switch always gives feedback to the remitter if they are
not in the target location. Without /silent or /noisy, the silent_pemit
config option is used to determine noisiness.
The /list switch will send the message to the contents of multiple
objects at the same time. The <OBJECT> argument is treated as a
space-separated list of targets.
The /spoof switch causes nospoof notifications to show the enactor's
dbref instead of the executor's dbref, and requires control over
the enactor or the Can_spoof power.
See also: @emit, @pemit, @oemit, SPOOFING, NOSPOOF, CONTROL.
@RESTART
@restart <object>
@restart/all
This command halts <object> (as described in @halt), and then triggers
the STARTUP attribute on the object, if set. If <object> is a player,
it affects the player and all of their objects. Players can use
@restart me to restart their own objects. The /all switch halts
all objects (see @allhalt) and restarts them, and can only be used
by a wizard.
See also: @halt, @startup, @shutdown
@RETRY
@retry <boolean>
@retry <boolean>=<arg0>[,...[,<arg9>]]
The @retry command restarts the current queue entry, enabling people to
loop their command without requiring a wait for the next queue entry.
It can be a little tricky to understand at first. It basically tells the
parser: "If <boolean> is true, then go back to the beginning." It can also
replace %0-%9 with the arguments passed to it. (<arg0>,...).
Please note: @retry only restarts the action list it is currently in.
If you have: "@break 1=@retry 1=hello", then the action list is only
"@retry 1=hello" - which would thus create an infinite loop.
Watch out for infinite loops! @retry does respect all the limits (cpu_limit,
function_invocation_limit, etc). But because @retry causes the queue parser
to repeat itself _without_ invoking a new function, it doesn't risk hitting
any issues other than infinite loops.
See 'help @retry2' for examples.
See also: ACTION LISTS, BOOLEAN VALUES, @break, @include
@RETRY2
Example: 'while'
> &sing me=$sing *:say %0 bottles of beer! ; @retry gt(%0,0)=dec(%0) ;
say Go get some more!
> sing 3
You say, "3 bottles of beer!"
You say, "2 bottles of beer!"
You say, "1 bottles of beer!"
You say, "0 bottles of beer!"
You say, "Go get some more!"
Implementing a folding algorithm:
(Yes, I know lmath is better, but this is just an example! :D)
> &add me=$add *:@retry words(%0)=rest(%0),add(first(%0),0%1) ; think %1
> add 4 3 2 1
10
@RUNOUT
@charges <object>[=<integer>]
@runout <object>[=<action list>]
These attributes can limit how many times an object can be successfully
"use"d. When you "use" an object with a CHARGES attribute set, the object's
AUSE attribute is only triggered if CHARGES is a positive integer. When
CHARGES is less than 1 (or not a number), the object's RUNOUT attribute is
triggered instead.
When the CHARGES attribute is present and AUSE is triggered, the value of
the CHARGES attribute is automatically decreased by 1. When no CHARGES
attribute is set, AUSE is always triggered.
See 'help charges2' for an example.
See also: use, @ause, ACTION LISTS
@RWALL
@rwall[/emit] <message>
Only wizards and royalty may use this command. It broadcasts a
message to all connected wizards and royals. If the /emit switch
is given, it's done as a prefixed emit. Otherwise, it acts like
a @channel.
See also: @wall, @wizwall
@SCAN
@scan[/<switch>] <command>
@scan gives you a list of all objects containing $-commands (user-defined
commands) which could match <command>. If given no switches, it checks
you, your possessions, your location, objects in your location, the
zone/zone master room of your location, your zone, and objects in the
master room. It does NOT stop when it gets a match, but rather, finds all
possible matches. It also tells how many commands on each object were
matched, and what attributes they are in. It does NOT scan objects
that you do not control and are not set VISUAL.
This command any combination of these four switches:
/room -- just matches on your location and objects in it.
/self -- just matches on you and anything you're carrying.
/zone -- just matches on zones of your location and yourself.
/globals -- just matches on objects in the master room.
If no switch is given, all locations are checked. <command> must be
entered exactly as you would type it (so, to match the $-command
$foo *: you must type '@scan foo <something>', not just '@scan foo').
See also: $-commands, EVALUATION ORDER
@SEARCH
@search [<player>] [<classN>=<restrictionN>[,...]][,<begin>,<end>]
This command searches the database and lists objects which meet user
specified search criteria. You can limit the scope of the search by
specifying <begin> and <end> as the first and last dbrefs to search.
If a <player> argument is supplied, only objects owned by that player
will be listed, or all objects if "all" is used. Mortals attempting to
match other players (aside from ZMPs whose @lock/zone they pass) or "all"
will only get objects which they can examine.
<class> and <restriction> arguments can be given to filter the match
results. Possible <class>es include TYPE, NAME, ZONE, PARENT, EXITS,
THINGS (or OBJECTS), ROOMS, PLAYERS, FLAGS, LFLAGS, POWERS, ELOCK,
COMMAND, LISTEN, EVAL, EPLAYER, EROOM, EEXIT, and ETHING (or EOBJECT).
If <class>=TYPE, possible <restriction>s include THING (or OBJECT), ROOM,
EXIT, PLAYER, GARBAGE. This shows all objects of the specified type.
If <class>=NAME, only objects whose name begin with the string <restriction>
will be listed. If <class>=EXITS, OBJECTS, ROOMS or PLAYERS, only objects
of that type whose name begins with <restriction> are listed.
If <class>=ZONE, only objects in the zone <restriction> will be listed.
If <class>=PARENT, only children of parent <restriction> will be listed.
For ZONE and PARENT, <restriction> must be specified as a dbref number.
Continued in 'help @search2'.
@SEARCH2
If <class>=FLAGS or LFLAGS, only objects with the list of flags
specified by <restriction> will be listed. For FLAGS, flags to match
should be given as a string of single flag letters, with appropriate
case. For LFLAGS, flags to match should be given as a space-separated
list of flag names.
If <class>=POWERS, only objects with the given powers are listed.
<restriction> should be a space-separated list of power names.
If <class>=ELOCK, only objects that pass the given lock string (as in
help @lock) are listed. For purposes of indirect locks (@#123), 'search'
is the name of the lock.
If <class>=EVAL, only objects for which <restriction> evaluates to a
true boolean value will be listed. The token '##' in <restriction>, which
is a function, is replaced by each dbref sequentially. Classes EPLAYER,
EROOM, EEXIT, and ETHING work like EVAL but are restricted to a single type.
Continued in 'help @search3' for more.
@SEARCH3
If <class>=MINDB, only objects with dbrefs of <restriction> or
higher will be listed. If <class>=MAXDB, only objects with dbrefs
of <restriction> or lower will be listed.
If <class>=START, then @search will start returning results at the
<restriction>th result.
If <class>=COUNT, then @search will only return up to <restriction> results.
If <class>=COMMAND, then @search will only return objects that respond to
<restriction> as an $-command.
If <class>=LISTEN, then @search will only return objects that respond to
<restriction> through a listen.
Continued in 'help @search4'.
@SEARCH4
For the class TYPE=PLAYER, and for PLAYER=<player-name>, anyone may
obtain information on any player. In all other cases, wizards may
obtain information about other players, and players who pass a ZMP's
zone-lock may obtain information about the ZMP.
If multiple <class> and <restrictions> are given, objects must meet all
criteria in order to match successfully. The exception to this is that if
multiple 'type' searches (PLAYER, EROOM, etc) are used, only the last
type given is used in the search.
@search is only mildly computationally expensive for most of the search
classes. Computationally expensive searches are the evaluating searches
(EVAL, EPLAYER, ETHING, EROOM, EEXIT), the attribute pattern
searches (COMMAND, LISTEN), and ELOCK searches which perform evaluation
searches (attr/value) or indirect locks (@obj/lock). These searches all
cost a number of pennies (the exact amount is configurable; see
@config find_cost).
See 'help @search5' for some examples.
See also: lsearch(), @find
@SEARCH5
Examples:
@search all type=player,flags=W <-- list all Wizard players
@search type=room <-- list all rooms owned by me.
@search zone=#50 <-- list all objects belong to zone #50.
@search Joe eval=1,100,200 <-- list objects from #100-#200 owned by Joe.
@search eval=gt(money(##),10) <-- list all objects owned by me
worth more than 10 coins.
@search all elock=FLAG^WIZARD|FLAG^ROYALTY <-- list all objects with
wizard or royalty flags.
@search wizard_bc command=+who <-- Forgot what object has your +who?
@SELECT
@switch[/<switch>] <string>=<expr1>, <action1> [,<exprN>,
<actionN>]... [,<default>]
@select <string>=<expr1>, <action1> [,<exprN>, <actionN>]... [,<default>]
For those of you familiar with programming, these command acts like
if/then/else or switch/case. It compares <string> against whatever each
<expr> evaluates to. If <string> and <expr> match, the action list
associated with that <expr> is carried out. If no match is found, the
<default> action list is carried out. @switch runs <action>s for all
matching <expr>s by default, while @select only runs the <action> for the
first matching <expr>.
If <expr> is a regexp or a wildcard glob, then $0-$9 will be set with
capture data. (In wildcard globbing, every wildcard captures.)
The string "#$" in <action>'s will be replaced with the evaluated result
of <string> before it is acted on. Note that this replacement happens
BEFORE the <action> is queued and executed, and does not work well in
nested switches. It is recommended that you use the %$N substitution, or
the stext() function, instead.
@switch/all runs <action>s for all matching <expr>s. Default for @switch.
@switch/first runs <action> for the first matching <expr> only. Same as
@select, and often the desired behaviour.
@switch/notify queues "@notify me" after the last <action>.
@switch/inline runs all actions in place, instead of creating a new queue
entry for them.
@switch/regexp makes <expr>s case-insensitive regular expressions, not
wildcard/glob patterns.
Continued in 'help @switch2'.
@SET
@set <object>=[!]<flag> [[!]<flag> ...]
@<pre-defined attribute> <object>=<value>
@set <object>=<attribute>:<value>
@set <object>/<attribute>=[!]<atrflag>
The first form sets (or unsets) flag(s) on <object>. See 'help flags'.
Ex: @set me=VISUAL
Flags may be specified by full name (recommended) or by flag character.
Flags are set or reset in the order supplied.
The second form sets a pre-defined attribute on <object>
Ex: @fail Heavy Box=You can't pick that up.
The third form sets an arbitrary attribute with <value> on <object>.
You can also do this with &<attribute> <object>=<value>
Ex: @set Test Object=random:This is a random attribute.
&random Test Object=This is a random attribute.
An important difference between these two forms is that @set will
evaluate the <value> before setting it on <object>, while the
&<attribute> form will not (and is usually what you want).
The fourth form sets (or unsets) an attribute flag on the specified
attribute. See 'help attribute flags'.
@SEX
@sex <player>=<gender>
You can use this command to set yourself or any of your objects to be
male, female, neuter, or plural. The SEX attribute is used for pronoun
substitution by the MUSH, and anything not recognizable will be treated
as neuter.
@sex me=Male
@sex me=Female
@sex me=Woman
@sex me=They
@sex me=Plural
@sex me=No thank you (silly, but possible)
See also: GENDER, subj(), poss(), aposs(), obj()
@SHUTDOWN
@shutdown[/panic][/reboot][/paranoid]
@shutdown shuts down the game. It may only be used by Wizards.
@shutdown/panic performs a panic shutdown of the game, using a seperate
database file, not the normal one. It may only be used by God.
@shutdown/reboot restarts the game without disconnecting the users.
If the /paranoid switch is added, the shutdown dump will be a paranoid
dump (see @dump).
@SITELOCK
@sitelock
@sitelock/name <name>
@sitelock[/player] <host-pattern>=<options>[, <name>]
@sitelock[/<ban|register>][/player] <host-pattern>
@sitelock/check <host>
@sitelock/remove[/player] <string>
The @sitelock command adds rules to the access.cnf file, controlling a
host's level of access to the MUSH, or adds banned player names to the
names.cnf file. Only Wizards may use @sitelock.
@sitelock without arguments lists all sites in access.cnf. Rules are
processed in the order listed, and the first matching rule is applied.
@sitelock/check tells you which rule will match for a given <host>.
@sitelock/name adds a name to the list of banned player names. Use
!<name> to remove a name from the list.
@sitelock <host-pattern>=<options>[, <name>] controls the access options
for hosts which match <host-pattern>, which may include wildcard
characters "*" and "?". See help @sitelock2 for the list of options, and
help @sitelock3 for an explanation about the name argument.
For backward compatibility, @sitelock/ban is shorthand for setting options
"!connect !create !guest", and @sitelock/register is shorthand for options
"!create register".
If the /player switch is given, <host-pattern> is treated as a player name,
and sitelock rules are added for that player's LASTIP and LASTSITE, if set.
Continued in 'help @sitelock2'
@SITELOCK2
Sitelock allow/deny options:
connect -- allow this site to connect to non-guest players
!connect -- don't allow this site to connect to non-guest players
guest -- allow this site to connect to guest players
!guest -- don't allow this site to connect to guest players
create -- allow this site to create players
!create -- don't allow this site to create players
default -- allow any of the above
none -- don't allow any of the above
!god -- God can't connect from this site.
!wizard -- Wizards can't connect from this site.
!admin -- Wizards and Royalty can't connect from this site.
Allow/deny options not set are assumed to be allowed.
Sitelock special options:
register -- allow this site to use 'register <name> <email>'
at the connection screen to register players.
Players will be emailed their character's password.
This should be used with !create to be effective.
suspect -- set all players who connect from this site SUSPECT.
deny_silent -- don't log failed access attempts from this site.
regexp -- Treat the hostname pattern as a regular expression
instead of a wildcard pattern.
Continued in 'help @sitelock3'
@SITELOCK3
If you specify a character name after the options, the options
are only checked if the host pattern matches, AND the character
being checked for connect support matches the one you gave.
Use it only with connect and !connect options, since they're
the only ones where an existing character is used.
For example, to disallow anyone from connecting to 'Twink' from
one domain, but to allow connections to the character from others,
use something like:
> @sitelock *.somesite.com=!connect,Twink
If you want to disallow connections to a character from anywhere,
use @newpassword or @sitelock *=!connect,Twink.
@sitelock/remove will delete entries that were added with @sitelock
if their host-pattern matches <string> exactly. If the /player switch is
given, <string> is treated as a player name, and entries whose
host-patterns match the player's LASTIP or LASTSITE addresses exactly will
be deleted.
@SLAVE
@slave/restart [info|ssl]
@slave is a wizard-only command used to control the various
subprocesses used by the mush to do various things. The only switch
it currently takes is /restart, which will shut down and relaunch
the slave daemon process in question.
Two different daemons are used:
info: Resolves IP addresses into host names whenever a new connection
is established.
ssl: Handles encrypted SSL connections across @shutdown/reboots.
@SOCKSET
SOCKSET [<option>=<value>]
@sockset [<descriptor>][=<option>, <value>[, ..., <optionN>, <valueN>]]
SOCKSET is a socket commands which sets or queries socket-specific options.
These options are usually set automatically, or negotiated by the MUSH and
your client, but this command lets you override those settings.
With no args, SOCKSET shows the current value of the socket options. With
an <option>=<value> pair, it attempts to set the given option.
@sockset is a similar in-game command, but can specify which descriptor to
change options for, and can set multiple options at once. Only Wizards can
change the options for other players' descriptors. <descriptor> defaults to
your least-idle descriptor, when used by a player; for non-players, it has
no default.
Options:
colorstyle: See help colorstyle
outputprefix: Same as OUTPUTPREFIX
outputsuffix: Same as OUTPUTSUFFIX
pueblo: Sets Pueblo-related options. If value has md5=...", then it
will set the pueblo checksum. If empty, Pueblo mode is
turned off.
telnet: Yes or no, to enable/disable telnet negotiation
width: Set your width(), same as SCREENWIDTH
height: Set your height(), same as SCREENHEIGHT
terminaltype: Your terminal type, used by terminfo()
Note that changing 'telnet' or 'pueblo' may stop your client from parsing
or displaying output correctly; only use if you know what you're doing!
See also: SOCKET COMMANDS, terminfo(), Pueblo, colorstyle
@SPEECHMOD
@speechmod <object>[=<modifier>]
When set, this attribute modifies everything <object> says, poses,
semiposes and @emits. The original text spoken/posed/emitted is passed as
%0, with %1 passed as " (for say), : (for pose), ; (for semipose) or |
(for @emit).
If the attribute evaluates to an empty string, the original text will be
used. Otherwise, the result of the attribute is used.
Example:
> @speechmod me=ucstr(%0)!
> say hello
You say, "HELLO!"
> pose waves
Bob WAVES!
> @speechmod me=switch(%1,",ucstr(%0),:,lcstr(%0))
> say Test
You say, "TEST"
> pose Test
Bob test
> @emit Test
Test
See also: say, pose, @emit, @chatformat, @pageformat
@SQL
@sql <query>
This command issues an SQL query if the MUSH supports SQL and can connect
to an SQL server. You must be WIZARD or have the Sql_Ok power to use @sql.
Generally, the sql() function is more useful for coding, as it delimits its
return values, but @sql is handy for INSERT-type queries and quick checks.
If you pass arbitrary data to @sql, be sure you call sqlescape() on it;
see the example in help sql().
Example:
> @sql SHOW TABLES
See also: sql(), sqlescape(), mapsql(), @mapsql
@SQUOTA
@squota <victim> [= [+|-] <amount>]
This is a wizard level command that is only available if the quota
system is enabled. It reports the victim's owned objects, and sets
the maximum number of objects s/he may own to <amount>. If no limit is
specified, this shows current quota, and reminds you to set one.
Using + or - you can add <amount> to the limit, or subtract it.
@STARTUP
@startup <object>[=<action list>]
Sets the list of actions on <object> that will happen whenever the MUSH
is restarted. This lets you start up objects that need to be running
continuously. It is also useful for setting up @functions and @hooks,
which are not saved across restarts.
@startup is also triggered when an object is @restarted or @undestroyed.
See also: @restart, @undestroy, ACTION LISTS, @function, @command, @hook
@STATS
@stats [<player>]
@stats/tables
@stats/flags
@stats/chunks
@stats/regions
@stats/paging
@stats/freespace
In its first form, display the number of objects in the game broken
down by object types. Wizards can supply a player name to count only
objects owned by that player.
@stats/tables displays statistics on internal tables.
@stats/flags displays statistics about the flag and power system.
In the remaining forms, display statistics or histograms about the
chunk (attribute) memory system.
@SUCCESS
@success <object>[=<message>]
@osuccess <object>[=<message>]
@asuccess <object>[=<action list>]
For players and things, these attributes contain the message shown to
someone who picks up <object> with the "get" command, the message shown
to others when someone gets <object>, and the actions to be taken by
<object> when someone gets it, respectively.
For exits, they contain the message shown to an object passing through the
exit <object>, the message shown in the exit's source when someone passes
through it, and the actions to be taken by the exit when someone passes
through it, respectively.
Example:
> @success Door=You open the door and step inside.
> @osuccess Door=opens the door and steps inside.
> @success Box=You pick up the box.
> @osuccess Box=picks up the box.
See also: get, goto, @lock, SUCCESS, FAILURE, @odrop, ACTION LISTS, VERBS
@SWEEP
@sweep [connected | here | inventory | exits ]
@sweep gives you a list of all nearby objects that are listening,
including the room you are in and the objects you are carrying.
Most objects only listen for a particular string or phrase, so they
normally do not pose a problem if you need privacy. You will have to be
careful of players and puppets since they will hear everything you say
and do. (And might post the same to r.g.m!)
AUDIBLE exits are also shown on an ordinary sweep, if the room is
also AUDIBLE. (Audible exits aren't active unless the room is audible).
The four command options can also be used as switches (i.e., you
can use "@sweep/connected" instead of "@sweep connected").
If the connected flag is given, only connected players and puppets
owned by connected players will be shown in the @sweep.
The "here" and "inventory" flags check only your location or
inventory, respectively. "exits" only checks for AUDIBLE exits.
@SWITCH
@switch[/<switch>] <string>=<expr1>, <action1> [,<exprN>,
<actionN>]... [,<default>]
@select <string>=<expr1>, <action1> [,<exprN>, <actionN>]... [,<default>]
For those of you familiar with programming, these command acts like
if/then/else or switch/case. It compares <string> against whatever each
<expr> evaluates to. If <string> and <expr> match, the action list
associated with that <expr> is carried out. If no match is found, the
<default> action list is carried out. @switch runs <action>s for all
matching <expr>s by default, while @select only runs the <action> for the
first matching <expr>.
If <expr> is a regexp or a wildcard glob, then $0-$9 will be set with
capture data. (In wildcard globbing, every wildcard captures.)
The string "#$" in <action>'s will be replaced with the evaluated result
of <string> before it is acted on. Note that this replacement happens
BEFORE the <action> is queued and executed, and does not work well in
nested switches. It is recommended that you use the %$N substitution, or
the stext() function, instead.
@switch/all runs <action>s for all matching <expr>s. Default for @switch.
@switch/first runs <action> for the first matching <expr> only. Same as
@select, and often the desired behaviour.
@switch/notify queues "@notify me" after the last <action>.
@switch/inline runs all actions in place, instead of creating a new queue
entry for them.
@switch/regexp makes <expr>s case-insensitive regular expressions, not
wildcard/glob patterns.
Continued in 'help @switch2'.
@SWITCH2
When using @switch/inline, an @break in an <action> will stop the calling
action list (and any further <action>s) from running. Each <action> will
also be able to see/alter the q-registers for the calling action list. The
following switches can be used with /inline to alter this behaviour:
/nobreak: @breaks in <action> do not effect to the calling action list
/localize: q-registers are saved before each <action> is run, and restored
after it completes
/clearreg: q-registers are all reset before each <action> is run. Most
useful when used in combination with /localize.
@switch/inplace is an alias for @switch/inline/nobreak/localize.
See 'help @switch3' for examples.
See also: switch wildcards, switch(), @break, stext(), slev()
@SWITCH3
Examples:
> &SWITCH_EX thing=$foo *: @switch %0=*a*, :acks, *b*, :bars, :glurps
> foo abc
thing acks
thing bars
> foo xxx
thing glurps
> &SWITCH_EX thing=$foo *: @switch/first %0=*a*, :acks,
*b*, :bars, :glurps
> foo abc
thing acks
> &SWITCH_EX thing=$test: @switch hasflag(%#,PUPPET)=1, say Puppet!,
say Not Puppet!
> test
thing says, "Not Puppet!"
> &SWITCH_EX thing=$foo *: @switch %0=*a*,say Before: '$0'. After: '$1'
> foo foobarbaz
thing says, "Before: 'foob'. After: 'rbaz'
Continued in 'help @switch4'
@SWITCH4
Examples:
> &SWITCH_EX me=$foo *:think before ; @switch %0=1,think one ; think after
> foo 1
thing before
thing after
thing one
> &SWITCH_EX me=$foo *:think before ; @switch/inline %0=1,think one ;
think after
> foo 1
thing before
thing one
thing after
@TELEPORT
@teleport[/silent][/inside] [<object>=]<destination>
Teleports <object> to <destination>. <object> can be a player, thing or
exit; if you do not supply an object, it is assumed to be yourself. The
destination must be either JUMP_OK or controlled by you, and you must
either control <object> or <object>'s current location. Also, the
destination, if a room, cannot be teleport-locked against <object>. Mortals
cannot teleport HEAVY objects. If the destination is a room with a drop-to,
<object> may go to the drop-to room instead.
Admin and those with the tport_anything power can teleport an object even
if they don't control it. Those with tport_anywhere can teleport objects
to any destination. You can also teleport an exit to any room if you have
the Open_Anywhere power.
Privileged players who teleport a player to another player send them to
the location of the target, unless the /inside switch is used, in which
case they are sent to the inventory of the target.
Continued in 'help @teleport2.
@TELEPORT2
Teleporting to an exit works the same as using "goto". If you don't control
the exit and don't have the tport_anywhere power, either you or <object>
must be nearby the exit.
Teleportation from a room can be stopped by setting the NO_TEL flag.
Royalty and Wizards can _always_ teleport to any location, regardless of
NO_TEL or teleport locks.
Teleportation triggers the @oxtport/@tport/@otport/@atport attributes,
unless <room> is an exit or the /silent switch is given. With @oxtport,
%0 is the dbref of the object causing the dbref. The others, in addition
to %0, get the former location of the object that was teleported passed
in %1.
As a special case, using "home" as the <room> has the same effect as the
home command, and does not act like a normal teleport.
See also: JUMP_OK, NO_TEL, Z_TEL, @tport, @lock
@TPORT
@tport <object>[=<message>]
@otport <object>[=<message>]
@oxtport <object> [=<message>]
@atport <object>[=<action list>]
These attributes contain the message shown to <object> when it is
teleported, the message shown to others in the room <object> is teleported
to, the message shown to others in the room <object> is teleported from,
and the actions to be taken by <object> when it disappears, respectively.
In all of these attributes, %0 is the object which teleported <object>,
and %1 is <object>'s old location.
Example:
> @tport me=name(%0) has teleported you from [name(%1)] to [name(here)].
> @otport me=appears in a puff of smoke.
> @oxtport me=disappears in a puff of smoke.
See also: @teleport, ACTION LISTS, VERBS
@TRIGGER
@trigger <object>/<attribute> [=<value 0>,<val. 1>,...,<val 9>]
@trigger can be used to set off commands stored in an attribute on
an object. It can also pass values to that attribute on the stack
as %0 - %9.
Examples:
> &GREET me=POSE waves hi.
> @trigger me/GREET
Cyclonus waves hi.
> &GREET me=POSE waves to %0! ; say Hi there, %1.
> @trigger me/GREET=Gears, Arcee
Cyclonus waves to Gears.
You say, "Hi there, Arcee."
Continued in 'help @trigger2'.
@TRIGGER2
@trigger is very useful for splitting up large commands and for making
them neater, but it does cause a time delay in execution, because the
commands are put into the queue a second later. For very commonly-used
globals that you want to execute quickly, you should probably avoid using
@trigger. However, in most cases, the time saved by cramming everything
into one attribute is outweighed by the time spent debugging.
See also: @include, ufun()
@TZ
The time(), timefmt() and convsecs() functions have an optional time
zone argument that's used for formatting the time. Without this time
zone specified, the one the game's server is running under is used..
If the time zone argument is a dbref, the contents of that object's
@TZ attribute is used as the zone. The attribute is not evaluated.
If the object doesn't have this attribute, the server's time zone
will be used.
If it's the string 'UTC', that time zone is used instead of the
local one.
If it's a number between -24 and +24, it adds that many hours from
UTC/GMT. Fractional times are supported, e.g., -1.5 hours.
If the mush supports it (See @config compile), symbolic time zone
names can also be used.
See HELP TIMEZONES2 for a list of known time zones and HELP TIME2
for some examples.
@UFAIL
@ufail <object>=[<message>]
@oufail <object>=[<message>]
@aufail <object>=[<action list>]
Sets the message shown to a player who fails to use an object via the 'use'
command (because they don't pass the @lock/use), the message shown to
others in the room when a player fails to use <object>, and the actions to
be taken by <object> when someone fails to use it, respectively.
Note that these attributes are @ufail, NOT @ufailure, for
TinyMUSH compatibility.
Although the Use @lock also restricts who can trigger $-commands or
^-listens on an object, these attributes will not be triggered for those
failures. Instead, the COMMAND_LOCK`* and LISTEN_LOCK`* attributes are
triggered. See 'help failure' for more information.
See also: use, @use, FAILURE, ACTION LISTS, VERBS
@ULOCK
@ulock <object>[=<key>]
@uunlock <object>
These commands set the Use lock for <object> to <key>, or clear the Use
lock. They are deprecated, and should be replaced with
@lock/use <object>[=<key>]
and
@lock/use <object>
The Use lock determines who is allowed to "use" the object or trigger any
$-commands or ^-listens on the object.
To only lock who can use $-commands, use @lock/command. To only lock who
can trigger ^-listens, use @lock/listen.
Example: if I want everyone but Bob to be able to use my toy, I would
"@lock/use toy=!*Bob". If I want only Bob to be able to use it, I would
"@lock/use toy==*Bob".
See also: @lock, use, locktypes
@UNDESTROY
@undestroy <object>
When an object has been marked for destruction using @destroy, this
command spares it from destruction. <object>'s @startup is triggered
when it is spared.
@unrecycle is an alias for @undestroy.
See also: @destroy, GOING, @startup
@UNFOLLOW
@unfollow <object>[=<message>]
@ounfollow <object>[=<message>]
@aunfollow <object>[=<action list>]
Sets the message shown to someone who stops following <object>,
the message shown to others in the room, and the actions to be taken
by <object> when someone stops following it, respectively. The name
of the person stopping following <object> is automatically prepended
to the @ounfollow message.
See also: follow, unfollow, @follow, followers(), ACTION LISTS, VERBS
@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.
See also: @link, DROP-TO
@UNLOCK
@unlock[/<switch>] <object>
Removes the lock on <object>. It can take as many switches as @lock can.
See also: @lock, locktypes
@UNRECYCLE
@undestroy <object>
When an object has been marked for destruction using @destroy, this
command spares it from destruction. <object>'s @startup is triggered
when it is spared.
@unrecycle is an alias for @undestroy.
See also: @destroy, GOING, @startup
@UPTIME
@uptime[/mortal]
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>]
@ouse <object>[=<message>]
@ause <object>[=<action list>]
These attributes contain the message shown to someone who successfully uses
<object>, the message shown to others when someone uses <object>, and the
actions to be taken by <object> when it is used, respectively.
Note that, if <object> has a CHARGES attribute set and it does not contain
a number greater than 0, the RUNOUT attribute is triggered instead of the
AUSE attribute. See 'help @charges' for more information.
Example:
> @use Jack-In-The-Box=You wind the handle.
> @ouse Jack-In-The-Box=winds the handle.
> @ause Jack-In-The-Box=@wait 3=POSE pops up with a bang!
> use Jack-In-The-Box
See also: use, @charges, @runout, ACTION LISTS, VERBS
@UUNLOCK
@ulock <object>[=<key>]
@uunlock <object>
These commands set the Use lock for <object> to <key>, or clear the Use
lock. They are deprecated, and should be replaced with
@lock/use <object>[=<key>]
and
@lock/use <object>
The Use lock determines who is allowed to "use" the object or trigger any
$-commands or ^-listens on the object.
To only lock who can use $-commands, use @lock/command. To only lock who
can trigger ^-listens, use @lock/listen.
Example: if I want everyone but Bob to be able to use my toy, I would
"@lock/use toy=!*Bob". If I want only Bob to be able to use it, I would
"@lock/use toy==*Bob".
See also: @lock, use, locktypes
@VERB
@verb <victim>=<actor>,<what>,<whatd>,<owhat>,<owhatd>,<awhat>,<args>
This command provides a way to do user-defined verbs with associated
@attr/@oattr/@aattr groups. Invoking it does the following:
<actor> sees the contents of <victim>'s <what> attribute, or
<whatd> if <victim> doesn't have a <what>.
Everyone in the same room as <actor> sees the contents of
<victim>'s <owhat> attribute, with <actor>'s name prepended,
or <owhatd>, also with <actor>'s name prepended, if <victim>
doesn't have an <owhat>.
<victim> executes the contents of his <awhat> attribute.
By supplying up to ten <args>, you may pass those values on
the stack (i.e. %0, %1, %2, etc. up through %9).
Continued in 'help @verb2'.
@VERB2
In order to use this command, at least one of the following criterion
must apply:
1. The object which did the @verb is a wizard.
2. The object which did the @verb controls both <actor> and <victim>
3. The thing which triggered the @verb (such as through a $command on
the object which did the @verb) must be <actor>, AND the object
which did the @verb must be either privileged or control <victim>
or <victim> must be VISUAL.
See 'help @verb3' for examples.
See also: USER-DEFINED COMMANDS, STACK, VERBS, @trigger
@VERB3
Examples:
> &VERB_EXAMPLE Test Object=$test:@verb me=%#,TEST,You just tested.,OTEST,
just tested the example.,ATEST,%N
> test
You just tested.
[others see] Cyclonus just tested the example.
> &TEST Test Object=You have just tested this object!
> &ATEST Test Object=@emit %0 has failed!
> &OTEST Test Object=tests test object.
> test
You have just tested this object!
[others see] Cyclonus tests test object.
Cyclonus has failed!
See 'help @verb4' for another example.
@VERB4
In order to make this into a global command that anyone can use, we
need to put it on a WIZARD object in the Master Room.
> &DO_TEST Global=$test *:@select locate(%#,%0)=#-1,
{@pemit %#=I don't see that here.},
{@verb locate(%#,%0,n)=%#,
TEST,You test [capstr(%0)].,
OTEST,tests [capstr(%0)].,
ATEST}
> &TEST Example=You test this fun example.
> &ATEST Example=POSE has been tested!
> test example
You test this fun example.
[others see] You test Example.
Example has been tested!
@VERSION
@version
Tells the player the name of the MUSH, which version of the code is
currently running on the system, when it was compiled, and when
the last restart was.
See also: version(), numversion()
@VRML_URL
@VRML_URL Object=<URL>
This provides an object (usually a room) with a VRML world. When a
Pueblo-user enters this object, the VRML World listed in @VRML_URL
will be loaded.
Example:
To learn about the VRML Format, have a look at the Pueblo Help, which
mentions several good sites for learning.
See also: 'HTML'.
@WAIT
@wait[/until] <time> = <command_list>
@wait <object> = <command_list>
@wait[/until] <object>/<time> = <command_list>
The basic form of this command puts the command list (a semicolon-separated
list of commands) into the wait queue to execute in <time> seconds. If the
/until switch is given, the time is taken to be an absolute value in
seconds, not an offset.
The second form sets up a semaphore wait on <object>. The enactor will
execute <command_list> when <object> is @notified.
The third form combines the first two: the enactor will execute
<command_list> when <object> is @notified or when <time> passes,
whichever happens first.
More forms that support semaphores on arbitrary attributes are described in
'help @wait2'.
See also: SEMAPHORES, @drain, @notify
@WAIT2
Normally, a semaphore wait depends on the SEMAPHORE attribute of the object
in question. However, it is useful to be able to use other attributes as
semaphores, so one object can be used as the blocker for multiple different
things at once. Possible attribute names aren't completely arbitrary. See
'HELP SEMAPHORES5' for details.
The syntax for these are:
@wait <object>/<attribute> = <command list>
@wait[/until] <object>/<attribute>/<time> = <command list>
You cannot do a non-timed semaphore on an attribute with a numeric name,
as that is taken as a timeout instead.
Continued in 'help @wait3'.
@WAIT3
@wait/pid <pid>=<seconds>
@wait/pid <pid>=[+-]<adjustment>
@wait/pid/until <pid>=<time>
The /pid switch can be used to alter the timeout of entries in the
wait and semaphore queues. You can set a new wait time, increase or
decrease the current time, or set a new absolute time in seconds.
You must control the object doing the wait, or have the halt @power.
@WALL
@wall[/<switch>] <message>
Only wizards can use this command, which allows the player to shout
or pose a message to every player connected. It must be typed in full.
It can also take the following switches
/emit : emit a prefixed message to all.
/noeval : Don't evaluate the message.
You can also use @wall :<pose> to @wallpose.
See also: @wizwall, @rwall
@WARNINGS
@warnings <object>=<warning list>
This command will set the types of warnings which should be reported on an
object or to a player. You must control the object to use this command.
When an object is checked for warnings (via @wcheck by the owner, or
automatically), only warnings which are set to be reported on the object
will be reported. If no warnings are set on the object, the owner's warning
settings will be used. When admin use @wcheck to check non-owned objects,
their personal warnings are always used.
For a list of warnings, see 'help warnings list'
See also 'help @wcheck' and 'help NO_WARN'
For examples, see 'help @warnings2'
@WARNINGS2
Example 1: Normal building situations
Most people will simply want to leave their @warnings set to "normal"
and their objects' @warnings set to "none". They will then receive
normal warnings for all their objects.
Example 2: Warning-lover
People who find warnings very helpful (like heavy builders) may want
to set their personal @warnings to "extra" or "all", and keep their
objects' warnings at "none". If a specific object should be treated
less strictly, set that object's @warnings differently. If an object
shouldn't be warned on at all, set the NO_WARN flag on the object.
Continued in 'help @warnings3'.
@WARNINGS3
Example 3: Warning-hater
People who prefer not to be warned except for specific object may
set their personal @warnings to "none" and set the @warnings on
those objects to appropriate levels.
Example 4: I need some peace!
Players who @set themselves NO_WARN will receive no warnings ever
until they unset the flag.
@WCHECK
@wcheck <object>
@wcheck/all
@wcheck/me
The first form of the command performs warning checks on a specific
object. The player must own the object or be see_all. When the owner runs
the command, the @warnings of the object are used to determine which
warnings to give. If the object has no @warning's set, the @warnings of
the owner are used. When a non-owner runs the command, the @warnings of
the non-owner are used.
The second form of the command runs @wcheck on every object in the
database and informs connected owners of warnings. It is usually
automatically run by the MUSH at intervals. Only Wizards may use
@wcheck/all.
The third runs it on all objects the player owns that aren't set NO_WARN.
See also: @warnings, WARNINGS, NO_WARN
@WHEREIS
@whereis <player>
If <player> is not set UNFINDABLE, this command will tell you where the
player is. It will also inform the player that you attempted to locate
their position, and whether you succeeded or not.
To avoid being found this way, just do: @set me=UNFINDABLE
Example:
> @whereis Moonchilde
See also: UNFINDABLE, loc()
@WIPE
@wipe <object>[/<attribute pattern>]
This command clears attributes from <object>, with the exception of
attributes changeable only by wizards, and attributes not controlled by
the object's owner (i.e. locked attributes owned by someone else).
Only God may use @wipe to clear wiz-changeable-only attributes.
The SAFE flag protects objects from @wipe.
If no <pattern> is given, this gets rid of all the attributes, with
exceptions as given above. If <pattern> is given, it gets rid of
all attributes which match that pattern. Note that the restrictions
above still apply.
When wiping an attribute that is the root of an attribute tree, all
attributes in that tree will also be removed.
@WIZMOTD
@wizmotd <message>
This is a wizard only command that will set a short temporary message
that will be shown to all wizards when they connect. It is listed in
@listmotd as the Wiz MOTD. A more permanent message can be set by
the siteadmin by editing the file "wiz.txt".
@WIZWALL
@wizwall[/emit] <message>
This wiz-only command works similarly to @rwall or @wall, sending
a message in either say, pose, or emit format to all wizards who
are currently logged in.
See also: @wall, @rwall
@ZEMIT
@zemit[/silent|/noisy] <zone>=<message>
Emits a message to all rooms in <zone>. You must have control <zone> in
order to use this command.
The /silent switch suppresses the confirmation message, and /noisy causes
it to be shown. With neither switch, the silent_pemit @config option
determines whether or not the message is shown. The confirmation message
is only shown if you are not in a room which would receive <message>.
See also: @nszemit, zemit(), zone(), zwho(), ZONES
@ZENTER
@zenter <object>[=<message>]
@ozenter <object>[=<message>]
@azenter <object>[=<action list>]
These attributes set the message shown to a player when he enters the zone
<object>, the message shown to others in the room the player enters when
he enters the zone, and the action to be taken by the zone <object> when
the player moves into an area zoned to it.
Entry into a new zone is said to occur when a player goes from a room not
in the zone to a room in the zone. "Room" in this context means the
player's absolute room (outermost container), so entering and leaving
unzoned objects within a zoned room doesn't trigger these.
Zone entry is assumed to occur before room entry, so these are
triggered before the room's @[oa]enter.
See also: @zleave, ZONES, @zemit, zwho(), VERBS
@ZLEAVE
@zleave <object>[=<message>]
@ozleave <object>[=<message>]
@azleave <object>[=<action list>]
These attributes set the message shown to a player when he leaves the zone
<object>, the message shown to others in the room he left when leaving
the zone, and the actions to be taken by <object> with a player leaves
an area zoned to it.
a zone (@zleave), the message shown to others in the room in the
old zone when the player leaves (@ozleave), and the action triggered
by the leave-taking (@azleave).
Leaving a zone is said to occur when a player goes from a room in the zone
to a room not in the zone. "Room" in this context means the player's
absolute room (outermost container), so entering and leaving unzoned
objects within a zoned room doesn't trigger these.
Zone leaving is assumed to occur after room leaving, so these are
triggered after the room's @[oa]leave.
See also: @zenter, ZONES, @zemit, zwho(), VERBS
ABODE
Flag: ABODE (rooms)
If a room has the ABODE flag set, any player or thing can set his home
there. It does not allow you to link exits to the room. It allows you to
make a room a public 'living area'.
To make a room your home, type '@link me=here' while standing in the
room.
See also: @link, LINK_OK
ABS()
abs(<number>)
Returns the absolute value of a number.
Examples:
> say abs(-4)
You say, "4"
> say abs(2)
You say, "2"
See also: sign()
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
assumed (ISO 8859-1), and some clients strip these 8-bit characters.
For each character in <string>, the corresponding character of <template>
is checked according to the table in 'help accents', and a replacement
done. If either the current <string> or <template> characters aren't in
the table, the <string> character is passed through unchanged.
See 'help accent2' for some examples.
See also: stripaccents(), NOACCENTS, @nameaccent, accname(), ACCENTS
ACCENT2
Some examples of accent() and their expected outputs:
> think accent(Aule, ---:)
Aul(e-with-diaeresis)
> think accent(The Nina was a ship, The Ni~a was a ship)
The Ni(n-with-~)a was a ship
> think accent(Khazad ai-menu!, Khaz^d ai-m^nu!)
Khaz(a-with-^)d ai-m(e-with-^)nu!
ACCENTS
Below is the table of possible accents which can be used with accent()
and @nameformat.
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
Continued in 'HELP ACCENTS2'
ACCENTS2
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 ACCENTS3' for examples
ACCENTS3
Some examples of accent() and their expected outputs:
> think accent(Aule, ---:)
Aul(e-with-diaeresis)
> think accent(The Nina was a ship, The Ni~a was a ship)
The Ni(n-with-~)a was a ship
> think accent(Khazad ai-menu!, Khaz^d ai-m^nu!)
Khaz(a-with-^)d ai-m(e-with-^)nu!
ACCNAME()
accname(<object>)
accname() returns the name of <object>, applying the object's
@nameaccent, if any.
See also: name(), fullname(), iname(), ACCENTS
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 ANGLES' for more on the <angle type>.
See also: asin(), atan(), cos(), ctu(), sin(), tan()
ACTION LISTS
An "action list" is simply a list of MUSH commands which are run together,
one after the other. Each command in the list is separated by a semicolon.
Action lists appear in many places: in user-defined commands, triggered in
@a-attributes by the MUSH, and even as arguments to other commands, like
@switch and @dolist.
If part of the command (such as the text in an @emit, for example) contains
a semi-colon, 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.
See 'help action2' for some examples.
See also: @-ATTRIBUTES, VERBS, $-COMMANDS
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.
See also: ATTRIBUTES, SUBSTITUTION, @asuccess, @dolist
ADD()
add(<number>, <number>[, ... , <numberN>])
Returns the sum of the given <number>s.
See also: MATH FUNCTIONS
AFTER()
after(<string1>, <string2>)
Returns the portion of <string1> that occurs after <string2>. If
<string2> isn't in <string1>, the function returns nothing.
This is case-sensitive.
Examples:
> say after(foo bar baz,bar)
You say, " baz"
> say after(foo bar baz,ba)
You say, "r baz"
See also: before(), rest()
AHELP
ahelp [<topic>]
Shows the current admin help for the MUSH. Only ROYALTY and WIZARDS
can use this command.
See also: anews
ALIAS()
alias(<object>[, <new alias>])
fullalias(<object>)
alias() returns the first of <object>'s aliases. fullalias() returns all
the aliases set for <object>. Note that, while any object can have an alias
set, they are only meaningful for players and exits.
With two arguments, alias() attempts to change the alias for <object> to
<new alias>, as per @alias.
Example:
> ex *Noltar/ALIAS
ALIAS [#7$v]: $;No;Nol;Noli;Nolt
> say alias(*Noltar)
You say, "$"
> say fullalias(*Noltar)
You say, "$;No;Nol;Noli;Nolt"
See also: fullname()
ALIGN()
align(<widths>, <col>[, ... , <colN>[, <filler>[, <colsep>[, <rowsep>]]]])
lalign(<widths>, <colList>[, <delim>[, <filler>[, <colsep>[, <rowsep>]]]])
Creates columns of text, each column designated by <col> arguments.
Each <col> is individually wrapped inside its own column, allowing
for easy creation of book pages, newsletters, or the like. In lalign(),
<colList> is a <delim>-separated list of the columns.
<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. You can alter the behavior of a column in multiple ways.
(Check 'help align2' for more details)
<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
You can modify column behavior within align(). The basic format is:
[justification]Width[runout][(ansi)]
Justification: Placing one of these characters before the width alters
the spacing for this column. (e.g: <30)
< Left-justify - Center-justify > Right-justify
_ Full-justify. = Paragraph-justify.
Other options: Adding these after the width will alter the column's
behaviour in some situtations
. Repeat for as long as there is non-repeating text in another column.
` Merge with the column on the left when it runs out of text.
' Merge with the column on the right when it runs out of text.
$ nofill: Don't use filler after the text. If this is combined with
merge-left, the column to its left inherits the 'nofill' when merged.
Ansi: Place ansi characters (as defined in 'help ansi()') within ()s to
define a column's ansi markup.
See 'help align3' for examples.
See also: center(), ljust(), rjust(), table()
ALIGN3
Examples:
> &line me=align(<5 10 20,([left(get(%0/sex),1)]),name(%0),name(loc(%0)))
> th iter(lwho(),u(line,##),%b,%r)
(M) Walker Tree
(F) Jane Doe Nowhere
> &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 +
+----------------------------------------+
See 'help align4' for more examples.
ALIGN4
> &dropcap me=%b_______%r|__%b%b%b__|%r%b%b%b|%b|%r%b%b%b|_|
> &story me=%r'was the night before Christmas, when all through the house%r
Not a creature was stirring, not even a mouse.%r
The stockings were hung by the chimney with care,%r
In hopes that St Nicholas soon would be there.
> th align(9'(ch) 68, u(dropcap), u(story)
_______
|__ __| 'was the night before Christmas, when all through the house
| | Not a creature was stirring, not even a mouse.
|_| The stockings were hung by the chimney with care,
In hopes that St Nicholas soon would be there.
The dropcap 'T' will be in ANSI cyan-highlight, and merges with the 'story'
column.
> th align(>15 60,Walker,Staff & Developer,x,x)
xxxxxxxxxWalkerxStaff & Developerxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> th align(>15 60$,Walker,Staff & Developer,x,x)
xxxxxxxxxWalkerxStaff & Developer
ALLOF()
allof(<expr>[, ... , <exprN>], <osep>)
Evaluates every <expr> 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 can be a string of any length
(including an empty string; use %b for a space).
The meaning of true or false depends on configuration options as
explained in the 'BOOLEAN VALUES' help topics.
> &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"
> say allof(#-1,#101,#2970,,#-3,0,#319,null(This Doesn't Count),|)
You say, "#101|#2970|#319"
> say allof(foo, 0, #-1, bar, baz,)
You say, "foobarbaz"
> say allof(foo, 0, #-1, bar, baz,%b)
You say, "foo bar baz"
See also: firstof(), BOOLEAN VALUES, strallof(), filter()
ALPHAMAX()
alphamax(<word>[, ... , <wordN>])
Takes any number of <word> arguments, and returns the one which is
lexicographically biggest. That is, the <word> would be last in
alphabetical order.
This is equivilent to last(sort(<word> ... <wordN>,a)).
See also: alphamin(), max()
ALPHAMIN()
alphamin(<word>[, ... , <wordN>])
Takes any number of <word> arguments, and returns the one which is
lexicographically smallest. That is, the word that would be first in
alphabetical order.
This is equivilent to first(sort(<word> ... <wordN>,a)).
See also: alphamax(), min()
ANCESTORS
ANCESTORS
Objects can inherit attributes and locks 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/lock 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.
See also: PARENTS, ORPHAN
AND()
and(<boolean1>, <boolean2>[, ... , <booleanN>])
cand(<boolean1>, <boolean2>[, ... , <booleanN>])
These functions take any number of boolean values, and return 1 if
all are true, and 0 otherwise. and() will always evaluate all its
arguments (including side effects), while cand() stops evaluation
after the first false argument.
See also: BOOLEAN VALUES, nand(), or(), xor(), not()
ANDFLAGS()
andflags(<object>, <string of flag letters>)
andlflags(<object>, <list of flag names>)
These functions return 1 if <object> has all of the given flags, and 0 if
it does not. andflags() takes a string of single flag letters, while
andlflags() takes a space-separated list of flag names. In both cases, a
! before the flag means "not flag".
If any of the flags given are invalid, both functions return
"#-1 INVALID FLAG".
Example: Check to see if %# is set Wizard and Dark, but not Ansi.
> say andflags(%#, WD!A)
> say andlflags(%#, wizard dark !ansi)
See also: orflags(), flags(), lflags()
ANDLFLAGS()
andflags(<object>, <string of flag letters>)
andlflags(<object>, <list of flag names>)
These functions return 1 if <object> has all of the given flags, and 0 if
it does not. andflags() takes a string of single flag letters, while
andlflags() takes a space-separated list of flag names. In both cases, a
! before the flag means "not flag".
If any of the flags given are invalid, both functions return
"#-1 INVALID FLAG".
Example: Check to see if %# is set Wizard and Dark, but not Ansi.
> say andflags(%#, WD!A)
> say andlflags(%#, wizard dark !ansi)
See also: orflags(), flags(), lflags()
ANDLPOWERS()
andlpowers(<object>, <list of powers>)
This function returns 1 if <object> has all the powers in a
specified list, and 0 if it does not. The list is a space-separated
list of power names. A '!' preceding a flag name means "not power".
Thus, ANDLPOWERS(me, no_quota no_pay) would return 1 if I was
powered no_quota and no_pay. ANDLPOWERS(me, poll !guest) would
return 1 if I had the poll power but not the guest power.
If a name does not correspond to any power, andlpowers() returns
"#-1 INVALID POWER".
See also: powers(), orlpowers(), POWERS LIST, @power
ANEWS
anews [<topic>]
Shows the current admin news for the MUSH. Only ROYALTY and WIZARDS
can use this command.
See also: ahelp
ANGLES
In any function which accepts an angle type, the argument can be one of
'd' for degrees, 'r' for radians, or 'g' for gradians. Gradians are not
used often, but it's included for completeness.
As a refresher, there are 180 degrees in pi radians in 200 gradians.
See also: acos(), asin(), atan(), cos(), ctu(), sin(), tan()
ANNOUNCE POWER
The Annouce @power lets objects set the Message of the Day via @motd,
and use the @wall command to send a message to all connected players.
Wizards have the power implicitly.
See also: @wall, @motd, CHAT_PRIVS POWER, loud, CAN_SPOOF POWER
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.
If the #lambda just calls another function, the form
#apply[<number of arguments>]/<function name>
can be used instead. If the argument count is left out, it defaults
to 1.
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"
The following version uses #apply instead:
> say map(#apply/name, #3 #12 #23)
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([decompose(before(%0, /))], \%0), lattr(%0))
The first time '#lambda/hasattrval([decompose(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 decompose() where neccessary.
See 'HELP ANONYMOUS3' for more examples.
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.
Finally, a multiple argument example of #apply, which requires less
escaping than #lambda for cases where you're just calling another
function:
> think mix(#apply2/ansi, r g b, foo bar baz)
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() namelist() sortby() sortkey() step()
ANSI
Flag: ANSI (players)
When set, this flag allows a player to see ANSI highlight, generated by the
ansi(h,...) function. Some ANSI is used by the MUSH, for example to
highlight the names of objects (if the ansi_names @config option is on),
and the names of attributes.
ANSI highlight can also be enabled on a per-connection basis with @sockset.
See also: ansi(), COLOR, XTERM256, @config, @sockset
ANSI()
ansi(<ansi-codes>, <string>)
ansi([<fg-color>][/<bg-color>], <string>)
This allows you to mark up a string using ANSI terminal effects, 16-color
codes, and color names and hex values.
The old-style <ansi-codes> are listed in "help ansi2".
<fg-color> and <bg-color> can be one of:
* +<colorname> (for a list of valid names, see "help colors()")
* a hexcode, optionally in angle brackets (#000000, <#ff0055>, etc)
* a list of red, green and blue values from 0-255, in angle brackets
(<0 0 0>, <255 0 85>, etc)
* a number from 0-255; this is the same as using "+xterm<number>",
for Rhost compatability.
For example, "ansi(+orange/#0000ff,Test)" would color "Test" in orange,
on a blue background. In the event that your client does not support
those colors, PennMUSH will downgrade the color to the closest fit
that your client can understand.
If you want to mix basic ANSI codes with extended colors, the basic ANSI
codes must come first.
See 'help ansi3' for more examples.
See also: ANSI, COLOR, @sockset, colorstyle, colors()
ANSI2
Old-style valid color 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.
ANSI3
Bright yellow text on a blue background:
> think ansi(yB, foo)
Orange text on an ANSI-green background:
> think ansi(G+orange, bar)
Underlined pink text on a purple background
> think ansi(u+lightsalmon/#a020f0, ugly)
APOSS()
aposs(<object>)
Returns the absolute possessive pronoun - his/hers/its/theirs - for
an object. The %a substitution returns the absolute possessive
pronoun of the enactor.
See also: obj(), poss(), subj()
ART()
art(<string>)
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 ANGLES' for more on the angle type.
See also: acos(), atan(), cos(), ctu(), sin(), tan()
ATAN()
atan(<tangent>[, <angle type>])
atan2(<number1>, <number2>[, <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(x, y) is like atan(fdiv(x, y)), except y 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 ANGLES' for more on the angle type.
See also: acos(), asin(), cos(), ctu(), sin(), tan()
ATAN2()
atan(<tangent>[, <angle type>])
atan2(<number1>, <number2>[, <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(x, y) is like atan(fdiv(x, y)), except y 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 ANGLES' for more on the angle type.
See also: acos(), asin(), cos(), ctu(), sin(), tan()
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
(or unlock) the specified attribute, as per @atrlock.
See also: @atrlock, @atrchown, hasflag()
ATTR 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.
ATTR 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.
ATTR 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.
ATTR 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.
ATTRCNT()
nattr(<object>[/<attribute pattern>])
nattrp(<object>[/<attribute pattern>])
regnattr(<object>[/<regexp>])
regnattrp(<object>[/<regexp>])
nattr() returns the number of attributes on <object> that you can see
which match the given <attribute pattern>. It is considerably faster than
words(lattr()) and doesn't suffer from buffer length constraints. It's
designed primarily for statistical purposes. <attribute pattern> defaults
to "*", which does not include branches in attribute trees; use "**" if
you need to count attribute trees.
regnattr() matches attribute names against the regular expression <regexp>.
nattrp() and regnattrp() also count matching attributes on the parent.
attrcnt() and attrpcnt() are aliases for nattr() and nattrp() respectively.
See also: lattr(), hasattr(), xattr(), wildcards
ATTRIB 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.
ATTRIB 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.
ATTRIB 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.
ATTRIB 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.
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.
See also: @atrlock, @atrchown, ATTRIBUTES
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). If the empty_attrs
configuration option is off, the attribute will be set to a single
space. This means that attrib_set(me/foo,%0) will _always_
create an attribute.
See also: set(), @set
ATTRIBUTE FLAGS
Attribute flags are set on an object's attributes using @set, or applied
to attributes globally using @attribute. Their names (and, when applicable,
the character used in examine as shorthand for the flag) are shown below.
These attribute flags restrict access, and are inherited down attribute
trees (if FOO is no_command, FOO`BAR is automatically no_command too):
no_command ($) Attribute won't be checked for $-commands or
^-listen patterns.
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.
mortal_dark (m) Attribute cannot be seen by mortals. This flag can only
be set by royalty and wizards. "hidden" is a synonym.
wizard (w) Attribute can only be set by wizards.
This flag can only be set by royalty and wizards.
veiled (V) Attribute value won't be shown on default examine, but
is still otherwise accessible (for spammy attribs).
nearby (n) Even if the attribute is visual, it can only be retrieved
if you're near the object (see 'help nearby()').
locked (+) Attribute is locked with @atrlock.
safe (S) Attribute can't be modified without unsetting this flag.
Continued in 'help attribute flags2'
ATTRIBUTE FLAGS2
These attribute flags grant access. They are not inherited down attribute
trees, and must be set on a branch attribute as well as a leaf to take
effect (to make FOO`BAR visual, FOO must be visual too):
visual (v) Attribute can be seen by anyone via get(), eval(),
ufun(), zfun(), and similar functions.
public (p) This attribute can be evaluated by any object, even
if safer_ufun is in use. DANGEROUS! AVOID!
These attribute flags alter the way attributes are used in commands and
^-listens. They always only affect the attribute they're set on, regardless
of attribute trees:
debug (b) Start showing debug output while this attr is evaluated.
no_debug (B) Stop showing debug output when this attr is evaluated
regexp (R) Match $-commands and ^-listens using regular expressions.
See 'help regexps'.
case (C) Match $-commands and ^-listens case sensitively.
nospace (s) Attribute won't add a space after the object name in
@o-* messages. See 'help verbs'.
noname (N) Attribute won't show name in @o-* messages.
Continued in 'help attribute flags3'
ATTRIBUTE FLAGS3
aahear (A) ^-listens on this attribute match like @aahear
amhear (M) ^-listens on this attribute match like @amhear
prefixmatch When set with @<attrib>, this attribute will be matched
down to its unique prefixes. This flag is primarily used
internally, but also useful in @attribute/access.
These attribute flags are only used internally. They cannot be set, but
seen on 'examine' and flags()/lflags(), tested for with hasflag(), etc:
branch (`) This attribute is a branch. See: help ATTRIBUTE TREES
See also: @set, @attribute, ATTRIBUTE TREES
ATTRIBUTE FUNCTIONS
The primary purpose of these functions is to access or alter information
stored in attributes on objects.
aposs() attrib_set() default() edefault() eval()
flags() get() grep() grepi() hasattr()
hasattrp() hasattrval() lattr() lflags() nattr()
obj() pfun() poss() reglattr() regrep()
regrepi() regxattr() set() subj() udefault()
ufun() ulambda() uldefault() ulocal() v()
wildgrep() wildgrepi() xattr() xget() zfun()
See also: ATTRIBUTES, NON-STANDARD ATTRIBUTES
ATTRIBUTE LIST
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'.
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'.
ATTRIBUTES LIST
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.
For 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
ATTRPCNT()
nattr(<object>[/<attribute pattern>])
nattrp(<object>[/<attribute pattern>])
regnattr(<object>[/<regexp>])
regnattrp(<object>[/<regexp>])
nattr() returns the number of attributes on <object> that you can see
which match the given <attribute pattern>. It is considerably faster than
words(lattr()) and doesn't suffer from buffer length constraints. It's
designed primarily for statistical purposes. <attribute pattern> defaults
to "*", which does not include branches in attribute trees; use "**" if
you need to count attribute trees.
regnattr() matches attribute names against the regular expression <regexp>.
nattrp() and regnattrp() also count matching attributes on the parent.
attrcnt() and attrpcnt() are aliases for nattr() and nattrp() respectively.
See also: lattr(), hasattr(), xattr(), wildcards
AUDIBLE
Flag: AUDIBLE (all types)
Objects which are set AUDIBLE forward sound in a number of ways. Only
sound passing the object's @filter, and its @lock/filter, is forwarded.
The lock receives the sound heard as %0. The forwarded sound is always
prefixed with the object's @prefix.
If an AUDIBLE object has an @forwardlist attribute set, sound heard by the
object is forwarded to the objects listed in the @forwardlist. See 'help
@forwardlist' for more information.
When a THING is set AUDIBLE, any sound made inside it is broadcast to other
objects in its location. This is useful for coding vehicles. Only sound
passing the @filter is broadcast, and is prefixed with the thing's @prefix,
or "From [name(<thing>)], " if no @prefix is set.
Setting the AUDIBLE flag on a ROOM activates audible exits in that room.
EXITs which are set AUDIBLE propagate sound from their source room to their
destination, prefixed with the exit's @prefix, or "From
[name(home(<exit>))], " if no @prefix is set.
See also: @forwardlist, @filter, @prefix
BAND()
band(<integer>, <integer>[, ... , <integerN>])
Does a bitwise AND of all its arguments, returning the result (a
number with only the bits set in every argument set in it).
See also: BITWISE FUNCTIONS
BASECONV()
baseconv(<number>, <from base>, <to base>)
Converts <number>, which is in base <from base> into base <to base>.
The bases can be between 2 (binary) and 64, inclusive.
Numbers 36 and under use the standard numbers:
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
All bases over 36 use base64 url string:
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"
In base 63 and base 64, - is always treated as a digit.
Using base64 as a 'from' will also treat + as 62 and / as 63.
BEEP()
beep([<number>])
Returns <number> "alert" bell characters. <number> must be in the
range 1 to 5, or, if unspecified, defaults to 1. This function may
only be used by royalty and wizards.
BEFORE()
before(<string1>, <string2>)
Returns the portion of <string1> that occurs before <string2>. If <string2>
isn't in <string1>, <string1> is returned. This is case-sensitive.
Examples:
> say before(foo bar baz,bar)
You say, "foo"
> say before(foo bar baz,r)
You say, "foo ba"
> say before(foo bar baz,a)
You say, "foo b"
See also: after(), first()
BEING KILLED
Getting killed is no big deal. If you are killed, you return to your
home, and all things you carry return to their homes. You also
collect 50 pennies in insurance money (unless you have >= 10000
pennies or you were killed via the Wizard slay command). See
'MONEY'. Generally, killing is not encouraged unless absolutely
necessary. It can be extremely rude and annoying.
Many MUSHes choose to disable the kill command.
See also: kill, slay, @death
BENCHMARK()
benchmark(<expression>, <number>[, <sendto>])
Evaluates <expression> <number> times, and returns the average, minimum,
and maximum time it took to evaluate <expression> in microseconds. If a
<sendto> argument is given, benchmark() instead pemits the times to the
object <sendto>, and returns the result of the last evaluation of
<expression>.
Example:
> think benchmark(iter(lnum(1,100), ##), 200)
Average: 520.47 Min: 340 Max: 1382
> think benchmark(iter(lnum(1,100), %i0), 200)
Average: 110.27 Min: 106 Max: 281
BITWISE FUNCTIONS
These functions treat integers as a sequence of binary bits (either 0
or 1) and manipulate them.
For example, 2 is represented as '0010' and 4 as '0100'. If these
two numbers are bitwise-or'ed together with BOR(), the result is 6,
or (in binary) '0110'. These functions are useful for storing small
lists of toggle (Yes/No) options efficiently.
baseconv() band() bnand() bnot() bor()
bxor() shl() shr()
BNAND()
bnand(<integer1>, <integer2>)
Returns <integer1> with every bit that was set in <integer2> cleared.
See also: BITWISE FUNCTIONS
BNOT()
bnot(<integer>)
Returns the bitwise complement of <integer>. Every bit set in it
is cleared, and every clear bit is set.
See also: BITWISE FUNCTIONS
BOOLEAN FUNCTIONS
Boolean functions all return 0 or 1 as an answer.
Your MUSH may be configured to use traditional PennMUSH booleans, in
which case non-zero numbers, non-negative db#'s, and strings are all
considered "true" when passed to these functions. Alternatively,
your MUSH may be using TinyMUSH 2.2 booleans, in which case only
non-zero numbers are "true". Check @config tiny_booleans.
and() cand() cor() eq() gt()
gte() lt() lte() nand() neq()
nor() not() or() t() xor()
See also: BOOLEAN VALUES, @config
BOOLEAN VALUES
A boolean variable, for those of you not familiar with programming,
is a variable that is either true or false. Normally, a value of 1
is considered "true" and a value of 0 is considered "false". Many
MUSH functions return either 1 if they are true or 0 if false. For
example, the hasflag() function tests to see if an object has a
certain flag set on it. If hasflag(<object>,<flag name>) is true
(the object has the flag), it will return 1. If it is false, it will
return 0.
Other functions expect to operate on boolean values. What they
consider "true" or "false", however, depends on the setting of the
"tiny_booleans" config option (@config tiny will show this).
Continued in 'help boolean2'.
BOOLEAN2
If tiny_booleans is...
no FALSE: null string, 0, any negative db
TRUE: everything else
yes TRUE: numbers other than 0
strings beginning with numbers other than 0
FALSE: everything else
Or, put another way:
Value tiny_booleans=no tiny_booleans=yes Gotcha
0 FALSE FALSE
non-zero number TRUE TRUE
#<non-negative> TRUE FALSE *
#<negative> FALSE FALSE
null string FALSE FALSE
0<non-numbers..> TRUE FALSE *
<non-numbers...> TRUE FALSE *
Continued in 'help boolean3'.
BOOLEAN3
Examples (assuming tiny_booleans is "no"):
not(foo) = 0
not(<null string>) = 1
not(-66) = 0
not(0) = 1
not(#-1) = 1
not(#12) = 0
And so on...
(note: These rules only apply when a function expects a Boolean
value, not for strings that expect other values.)
See also: BOOLEAN FUNCTIONS, not(), t()
BOOT POWER
Objects with the Boot power can @boot other players from the MUSH. Wizards
have the power implicitly.
See also: @boot
BOR()
bor(<integer>, <integer>[, ... , <integerN>])
Does a bitwise OR of all its arguments, returning the result.
(A number with a bit set if that bit appears in any of its arguments).
See also: BITWISE FUNCTIONS
BOUND()
bound(<number>, <lower bound>, <higher bound>)
bound() returns <number> if it is between <lower bound> and <higher
bound>. If it's lower than <lower bound>, <lower bound> is returned.
If it's higher than <higher bound>, <higher bound> is returned.
See also: ceil(), floor(), round(), trunc()
BRACKETS()
brackets(<string>)
Returns a count of the number of left and right square brackets,
parentheses, and curly braces in the string, in that order, as a
space-separated list of numbers. This is useful for finding missing
or extra brackets in MUSH code. <string> is evaluated.
Example:
> @desc me=This is [ansi(h,a test)] of the { brackets() function.
> think brackets(v(desc))
1 1 2 2 1 0
BRIEF
brief <object>
This command works like an abbreviated version of examine. It does not
print out all the attributes on the object.
See also: examine
BUILDER
BUILDER
On some MUSHes, building (@dig, @open, and sometimes @create) is restricted
to those with the BUILDER @power. You can check to see if building is
restricted on a MUSH with '@command @dig', etc.
See also: POWERS, @power, @dig, @open, @create
BUILDER POWER
The Builder power has no built-in meaning, but many MUSHes choose to
restrict building and/or object creation to objects with this power.
See also: @dig, @open, @create, @link, PLAYER_CREATE POWER
BUY
buy <item>[ from <vendor>][ for <cost>]
When you try buying an item, PRICELIST attributes on nearby objects
(or <vendor> if given) will be checked for matching item:costs. If <cost>
is given, the first item that matches that cost will be purchased.
Otherwise, the first matching item that you can afford will be purchased.
You must pass the vendor's @lock/pay in order to purchase items.
If the pricelist match contains a list of prices, ITEM:30,20,10, the first
one you can afford will be the resulting price.
Example:
> @PRICELIST vendor=coke:20 pepsi:20
> &drink`coke vendor=You enjoy a delicious coke.
> &drink`pepsi vendor=It tastes like a funny coke.
> @BUY vendor=u(drink`%0)
> buy coke
You enjoy a delicious coke.
See also: @BUY, @PRICELIST, give, @COST
BXOR()
bxor(<integer>, <integer>[, ... , <integerN>])
Does a bitwise XOR of all its arguments, returning the result.
(A number with a bit set if it's set in only one of its arguments).
See also: BITWISE FUNCTIONS
CALLER
The caller is the object which causes an attribute to be evaluated (for
instance, by using ufun() or a similar function). The substitution %@
evaluates to the caller's dbref. It's particularly useful for functions
with side-effects, to check that the object evaluating the function has
permission.
Example:
> &cmd_test Foo=$test: @emit ufun(Bar/fun_test)
> &fun_test Bar=%n(%#) typed 'test', and [name(%@)](%@) ufun()'d this!
> test
Mike(#5) typed 'test', and Foo(#6) ufun()'d this!
> &wizfun Foo=if(hasflag(%@, Wizard), ufun(wizfun2), #-1 Sorry)
See also: ENACTOR, EXECUTOR
CAN_DARK POWER
Objects with this power can set themselves DARK, and use the "cd" command
at the connection screen to connect set dark.
See also: DARK, @hide, HIDE POWER
CAN_SPOOF POWER
The Can_Spoof power lets you use the @ns*emit commands and ns*emit()
functions, which show messages without nospoof information. It also lets
you use the /spoof switch to various @*emit commands, which shows nospoof
information as the enactor rather than the executor. Wizards have this
power implicitly.
See also: @nspemit, @pemit
CAND()
and(<boolean1>, <boolean2>[, ... , <booleanN>])
cand(<boolean1>, <boolean2>[, ... , <booleanN>])
These functions take any number of boolean values, and return 1 if
all are true, and 0 otherwise. and() will always evaluate all its
arguments (including side effects), while cand() stops evaluation
after the first false argument.
See also: BOOLEAN VALUES, nand(), or(), xor(), not()
CAPSTR()
capstr(<string>)
Returns <string> with the first character capitalized.
Example:
> think capstr(foo bar baz)
Foo bar baz
See also: lcstr(), ucstr()
CASE()
switch(<str>, <expr1>, <list1>[, ... , <exprN>, <listN>][, <default>])
switchall(<str>, <expr1>, <list1>[, ... , <exprN>, <listN>][, <default>])
case(<str>, <expr1>, <list1>[, ... , <exprN>, <listN>][, <default>])
caseall(<str>, <expr1>, <list1>[, ... , <exprN>, <listN>][, <default>])
These functions match <string> against the <expr>essions, returning
the corresponding <list>. If nothing is matched, the <default> is returned.
switch() and case() return the <str> for the first matching <expr>, while
switchall() and caseall() return the corresponding <list> for all <expr>s
which match.
switch() and switchall() use wildcard and lt/gt <expr>s, as described in
'help switch wildcards'. case() and caseall() do a case-sensitive exact
match, like member() or comp(). In this case, $0-$9 will be set to the text
that the nth wildcard character met.
If the string "#$" appears in the <list> to be evaluated, it will be
replaced with the evaluated value of <str> /before/ evaluation of
<list>. This is not done in case() and caseall(), for TinyMUSH 3
compatibility. Note that this replacement happens before evaluation, which
makes it unsafe when <str> contains user input, and makes it unsuitable for
use in nested switch()es. It is strongly recommended you use the %$<n>
substitution or stext() function instead, which solves these problems.
See 'help switch2' for examples.
See also: reswitch(), stext(), slev(), if(), cond(), firstof()
CASEALL()
switch(<str>, <expr1>, <list1>[, ... , <exprN>, <listN>][, <default>])
switchall(<str>, <expr1>, <list1>[, ... , <exprN>, <listN>][, <default>])
case(<str>, <expr1>, <list1>[, ... , <exprN>, <listN>][, <default>])
caseall(<str>, <expr1>, <list1>[, ... , <exprN>, <listN>][, <default>])
These functions match <string> against the <expr>essions, returning
the corresponding <list>. If nothing is matched, the <default> is returned.
switch() and case() return the <str> for the first matching <expr>, while
switchall() and caseall() return the corresponding <list> for all <expr>s
which match.
switch() and switchall() use wildcard and lt/gt <expr>s, as described in
'help switch wildcards'. case() and caseall() do a case-sensitive exact
match, like member() or comp(). In this case, $0-$9 will be set to the text
that the nth wildcard character met.
If the string "#$" appears in the <list> to be evaluated, it will be
replaced with the evaluated value of <str> /before/ evaluation of
<list>. This is not done in case() and caseall(), for TinyMUSH 3
compatibility. Note that this replacement happens before evaluation, which
makes it unsafe when <str> contains user input, and makes it unsuitable for
use in nested switch()es. It is strongly recommended you use the %$<n>
substitution or stext() function instead, which solves these problems.
See 'help switch2' for examples.
See also: reswitch(), stext(), slev(), if(), cond(), firstof()
CAT()
cat(<string>[, ... , <stringN>])
strcat(<string1>[, ... , <stringN>])
These functions concatenate multiple strings together. cat() adds a space
between each string; strcat() does not.
Example:
> say cat(foo bar, baz blech)
You say, "foo bar baz blech"
> say strcat(foo bar, baz blech)
You say, "foo barbaz blech"
CBUFFER()
cdesc(<channel>)
cusers(<channel>)
cmsgs(<channel>)
cbuffer(<channel>)
Return the description (@channel/describe), number of users, number of
messages in the recall buffer, or buffer size of <channel>, respectively.
This information is also displayed in @channel/list and @channel/what.
See also: cbufferadd(), crecall()
CBUFFERADD()
cbufferadd(<channel>, <text>[, <spoof>])
Adds text to a channel buffer without broadcasting it to all people on
the channel. If <spoof> is true, it will spoof the enactor (%#).
This function is only usable by objects that pass the channel's @clock/mod,
and who can use the @cemit command (or @nscemit if <spoof> is true).
See also: crecall(), cbuffer(), @channel/recall, @channel/buffer
CD
cd <name> <password>
ch <name> <password>
cv <name> <password>
Not really MUSH commands, but commands available at the connect screen.
Wizards can use 'cd' instead of 'connect'; the new connection will be
hidden (as per @hide), and the player will be set DARK. Mortals set
HEAR_CONNECT will not hear dark wizards connect.
Wizards, Royalty, and those with the Hide @power can use 'ch' to connect
with the new connection hidden (as per @hide).
Connecting using 'cv' causes the Dark flag to be cleared prior to
connection messages being broadcast.
None of those commands affect the hidden status of other connections, if
you're reconnecting.
See also: DARK, @hide
CDESC()
cdesc(<channel>)
cusers(<channel>)
cmsgs(<channel>)
cbuffer(<channel>)
Return the description (@channel/describe), number of users, number of
messages in the recall buffer, or buffer size of <channel>, respectively.
This information is also displayed in @channel/list and @channel/what.
See also: cbufferadd(), crecall()
CEIL()
ceil(<number>)
Returns the least integral value greater than or equal to <number>.
See also: floor(), bound(), round(), trunc()
CEMIT()
@cemit[/nosiy|/silent][/noeval] <channel>=<message>
@nscemit[/nosiy|/silent][/noeval] <channel>=<message>
cemit(<channel>, <message>[, <noisy>])
nscemit(<channel>, <message>[, <noisy>])
@cemit emits <message> on <channel>. It does not include your name. The
channel prefix is included if the /noisy switch is given, and omitted if
/silent is given - if neither is given, the default behaviour is controlled
by the noisy_cemit @config option. The /noeval switch prevents <message>
from being evaluated.
You must be able to speak on the channel, or have the See_All and Pemit_All
@powers, to @cemit on the channel.
@nscemit is exactly the same, but does not produce nospoof information when
used by players with the Can_spoof @power.
cemit() and nscemit() work the same as @cemit/silent and @nscemit/silent,
respectively. If <noisy> is given as a true value, they work like
@cemit/noisy and @nscemit/noisy, respectively, instead.
@cemit is intended for use in writing extended chat systems.
See also: @chat
CENTER()
center(<string>, <width>[, <fill>[, <rightfill>]])
This function will center <string> within a field <width> characters
wide, using the <fill> string for padding on the left side of the
string, and <rightfill> for padding on the right side. <rightfill>
defaults to the mirror-image of <fill> if not specified. <fill>
defaults to a space if neither <fill> nor <rightfill> are specified.
If <string> divides <width> into uneven portions, the left side will
be one character shorter than the right side.
Examples:
> say center(X,5,-)
You say, "--X--"
> say center(X,5,-=)
You say, "-=X=-"
> say center(.NEAT.,15,-,=)
You say, "----.NEAT.====="
> say center(hello,16,12345)
You say, "12345hello543215"
See also: align(), ljust(), rjust()
CFLAGS()
cflags(<channel>)
cflags(<channel>, <object>)
clflags(<channel>)
clflags(<channel>, <object>)
With one argument, cflags() returns a list of priv flags set on the given
channel, represented as a string of characters. See 'help @channel privs'
for the list. You must be able to see the channel to use this function.
With two arguments, cflags() returns a list of flags for that object on
that channel, currently a string consisting of zero or more of "G" (Gag),
"Q" (Quiet), "H" (Hide) and "C" (Combine). You must be able to see that
channel and to examine the object to use this function. If the object is
not on the channel, an error is returned.
The clflags() versions return a space-separated list of flag names,
rather than a string of flag characters.
See also: cstatus()
CH
cd <name> <password>
ch <name> <password>
cv <name> <password>
Not really MUSH commands, but commands available at the connect screen.
Wizards can use 'cd' instead of 'connect'; the new connection will be
hidden (as per @hide), and the player will be set DARK. Mortals set
HEAR_CONNECT will not hear dark wizards connect.
Wizards, Royalty, and those with the Hide @power can use 'ch' to connect
with the new connection hidden (as per @hide).
Connecting using 'cv' causes the Dark flag to be cleared prior to
connection messages being broadcast.
None of those commands affect the hidden status of other connections, if
you're reconnecting.
See also: DARK, @hide
CHAN_USEFIRSTMATCH
Flag: CHAN_USEFIRSTMATCH (any type)
Normally, when an object attempts to speak on the channel system with
@chat, using an ambiguous channel name produces an error message. With
this flag set, it will instead speak on the first channel whose name is
a match. Other commands in the chat system are not affected by the flag.
See also: CHAT, @chat, @cemit
CHANGES
This is a list of changes in this patchlevel which are probably of
interest to players. More information about new commands and functions
can probably be gotten via 'help <name of whatever>'. 'help credits'
lists the [initials] of developers and porters that are used in the list
of changes.
Information about changes in prior releases can be found under
help topics named for each release (e.g. 'help 1.7.2p30').
A list of the patchlevels associated with each release can
be read in 'help patchlevels'.
Version 1.8.5 patchlevel 3 Aug 23, 2012
Fixes:
* Fix a crash bug in new color code. Discovered by ChaosMageX. Intrevis, [SW].
Functions:
* name() with no arguments is now an error. It should always have been, but
previously returned nothing for backwards compatability. If you still have
code that relies on that behaviour, you are extremely lazy and should be
ashamed of yourself. [MG]
CHANNEL FUNCTIONS
Channel functions work with the channel system.
cbuffer() cbufferadd() cdesc() cemit() cflags()
channels() clflags() clock() cmogrifier() cmsgs()
cowner() crecall() cstatus() ctitle() cusers()
cwho() nscemit()
See also: CHAT, @channel, @cemit, @clock
CHANNEL-LIST
Here's the legend for reading the @channel/list output:
Channel Name Num Users Num Msgs Access Locks Status Buf
Sample 1 0 [DPTWQHo jsmvh*] [On QHC] 4
||||||| |||||| | ||| |
Channel is DISABLED----------------------------/|||||| |||||| | ||| |
Channel allows PLAYERS--------------------------/||||| |||||| | ||| |
Channel allows THINGS----------------------------/|||| |||||| | ||| |
Channel is Wizard-only (W) or Admin-only (A)------/||| |||||| | ||| |
Channel is QUIET-----------------------------------/|| |||||| | ||| |
Channel is HIDE_OK----------------------------------/| |||||| | ||| |
Channel is OPEN (non-members can speak on it)--------/ |||||| | ||| |
Channel has @clock/join set----------------------------|||||| | ||| |
Channel has @clock/speak set----------------------------/|||| | ||| |
Channel has @clock/mod set-------------------------------/||| | ||| |
Channel has @clock/see set--------------------------------/|| | ||| |
Channel has @clock/hide set--------------------------------/| | ||| |
Player is the owner of the channel--------------------------/ | ||| |
Player is currently on/off/gagging the channel------------------/ ||| |
If on, player has the channel muted---------------------------------/|| |
If on, player is hiding on the channel-------------------------------/| |
If on, player has @channel/combined the channel-----------------------/ |
Size of the channel buffer in full-length lines----------------------------/
CHANNEL-PRIVS
The <privs> for @channel/add and @channel/privs should be a space-separated
list of priv names, or a string of priv chars, from the list below:
* "player" (P) - players may use the channel
* "object" (O) - non-players may use the channel
* "admin" (A) - only royalty/wizards/chat_privs may use the channel
* "wizard" (W) - only wizards may use the channel
* "quiet" (Q) - channel will not show connection messages
* "open" (o) - you may speak even if you aren't listening to the channel
* "hide_ok" (H) - you may hide from the channel who list
* "notitles" (T) - chantitles are not displayed in channel messages
* "nonames" (N) - player names are not displayed in channel messages
* "nocemit" (C) - @cemit is prohibited on the channel
* "interact" (I) - Interaction rules (defined in local.c) are applied to
the channel
* "disabled" (D) - noone can join or speak on the channel
The default privs are determined by the 'channel_flags' @config option.
Example:
> @channel/add Public=player quiet open nocemit
See also: cflags(), clflags()
CHANNELS
CHAT SYSTEM
PennMUSH has a built-in chat system which allows you to speak to other
players who are on the same channel without needing to be in the same room
as them. It supports a large number of channels which can be customized and
restricted in various ways.
Many of the chat system commands take a <channel> argument; you don't need
to enter the entire channel name, only as many letters as needed to make it
distinct from other channels.
You can list, join, and configure channels using the @channel command.
To speak on channels, use the @chat command.
See also: @channel, @chat, @cemit, channel functions, CHAN_USEFIRSTMATCH,
@chatformat, @clock
CHANNELS()
channels([<delimiter>])
channels(<object>)
channels(<object>[, <delimiter>])
With no arguments, channels() returns the list of all channel names which
are visible to the player. With two arguments, returns the list of channel
names to which the object is listening, delimited by <delimiter>.
With one argument, the behavior is ambiguous. If the argument matches an
object, it returns a space-separated list of channels to which the object
is listening. If not, it's treated as a no-argument case with a delimiter.
If you can examine the object, the function returns all the channels it's
on. Otherwise, it will only return those channels you can see that <object>
is a member of with @channel/who.
See also: @channel/list, @channel/who, cwho()
CHARGES2
Example:
> @create Revolver
> @use Revolver=You pull the trigger.
> @ouse Revolver=pulls the trigger.
> @charges Revolver=6
> @ause Revolver=POSE fires into the air.
> @runout Revolver=POSE clicks, but is out of bullets.
> use revolver
You pull the trigger.
Revolver fires into the air.
> ex revolver/charges
CHARGES [#6$]: 5
The next 5 "use revolver"s work the same way, decrementing CHARGES
each time.
> ex revolver/charges
CHARGES [#6$]: 0
> use revolver
You pull the trigger.
Revolver clicks, but is out of bullets.
> ex revolver/charges
CHARGES [#6$]: 0
CHAT
CHAT SYSTEM
PennMUSH has a built-in chat system which allows you to speak to other
players who are on the same channel without needing to be in the same room
as them. It supports a large number of channels which can be customized and
restricted in various ways.
Many of the chat system commands take a <channel> argument; you don't need
to enter the entire channel name, only as many letters as needed to make it
distinct from other channels.
You can list, join, and configure channels using the @channel command.
To speak on channels, use the @chat command.
See also: @channel, @chat, @cemit, channel functions, CHAN_USEFIRSTMATCH,
@chatformat, @clock
CHAT MOGRIFYING
@channel/mogrifier <channel>=<object>
@channel/mogrifier sets the mogrifier object for <channel>. <object> must
be an object that you control.
Mogrifiers let you tweak every aspect of a channel's output, before it
goes to individual players' @chatformats.
Before it begins mogrifying, three mogrifiers that alter the way chats are
handled are run, using the same arguments as @chatformat (except that %5 is
not set). First, <object>'s MOGRIFY`BLOCK attribute is called. If
MOGRIFY`BLOCK returns a non-empty string, then the resultant string is sent
back to the player, and no message is broadcast on the channel.
Next, MOGRIFY`OVERRIDE is called. If it returns a true value, player's
individual @chatformats will not be called for the message.
The MOGRIFY`NOBUFFER attribute is then called. If it returns a true value,
the message will not be included in the channel's recall buffer.
Continued in 'help mogrify2'.
CHAT SYSTEM
CHAT SYSTEM
PennMUSH has a built-in chat system which allows you to speak to other
players who are on the same channel without needing to be in the same room
as them. It supports a large number of channels which can be customized and
restricted in various ways.
Many of the chat system commands take a <channel> argument; you don't need
to enter the entire channel name, only as many letters as needed to make it
distinct from other channels.
You can list, join, and configure channels using the @channel command.
To speak on channels, use the @chat command.
See also: @channel, @chat, @cemit, channel functions, CHAN_USEFIRSTMATCH,
@chatformat, @clock
CHAT_PRIVS POWER
The Chat_Privs power allows non-wizard, non-royalty objects to use channels
which have been restricted to 'Admin' with @channel/priv.
See also: @channel
CHECKPASS()
checkpass(<player>, <string>)
Returns 1 if <string> matches <player>'s password, and 0 otherwise. If
<player> has no password, this function will always return 1.
This function can only be used by wizards.
See also: @password, @newpassword
CHECKSUM
digest(list)
digest(<algorithm>, <string>)
Returns a checksum (hash, digest, etc.) of <string> using the given
<algorithm>. The result is a unique large number represented in base
16.
Typically at least the following algorithms are supported:
md4 md5 ripemd160 sha sha1 sha224 sha256 sha384 sha512 whirlpool
Depending on the host's OpenSSL version and how it was configured,
there might be more (or less) available. digest(list) returns the
methods a particular server understands if the OpenSSL library
version being used is recent enough (1.0.0 and higher), or '#-1
LISTING NOT SUPPORTED' on older versions. For portable code, stick
with MD5 and the SHA family.
digest(sha, whatever) is equivalent to sha0(whatever).
Example:
> think iter(digest(list), %i0(foo) => [digest(%i0, foo)], %b, %r)
...
MD4(foo) => 0ac6700c491d70fb8650940b1ca1e4b2
MD5(foo) => acbd18db4cc2f85cedef654fccc4a4d8
MDC2(foo) => 5da2a8f36bf237c84fddf81b67bd0afc
RIPEMD160(foo) => 42cfa211018ea492fdee45ac637b7972a0ad6873
SHA(foo) => 752678a483e77799a3651face01d064f9ca86779
SHA1(foo) => 0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33
SHA224(foo) => 0808f64e60d58979fcb676c96ec938270dea42445aeefcd3a4e6f8db
...
CHILDREN()
lsearch(<player>[, ... , <classN>, <restrictionN>])
nlsearch(<player>[, ... , <classN>, <restrictionN>])
lsearchr(<player>[, ... , <classN>, <restrictionN>])
children(<object>)
nchildren(<object>)
This function is similar to the @search command, except it returns just a
list of dbref numbers. The function must have at least three arguments. You
can specify "all" or <player> for the <player> field; for mortals, only
objects they can examine are included. If you do not want to restrict
something, use "none" for <class> and <restriction>.
The possible <class>es and <restriction>s are the same as those accepted
by @search. lsearch() can accept multiple class/restriction pairs, and
applies them in a boolean "AND" fashion, returning only dbrefs that
fulfill all restrictions. See 'help @search' for information about them.
children() is exactly the same as lsearch([me|all], parent, <object>),
using "all" for See_All/Search players and "me" for others.
nlsearch(...) and nchildren(...) return the count of results that
would be returned by lsearch() or children() with the same args.
Continued in 'help lsearch2'.
CHOWN_OK
Flag: CHOWN_OK (things, rooms, exits)
You can set this flag on an object you own to allow other players to
transfer ownership of the object to themselves (using @chown).
See also: @chown
CHR()
chr(<number>)
ord(<character>)
ord() returns the numerical value of the given character. chr()
returns the character with the given numerical value.
Examples:
> say ord(A)
You say, "65"
> say chr(65)
You say, "A"
CLFLAGS()
cflags(<channel>)
cflags(<channel>, <object>)
clflags(<channel>)
clflags(<channel>, <object>)
With one argument, cflags() returns a list of priv flags set on the given
channel, represented as a string of characters. See 'help @channel privs'
for the list. You must be able to see the channel to use this function.
With two arguments, cflags() returns a list of flags for that object on
that channel, currently a string consisting of zero or more of "G" (Gag),
"Q" (Quiet), "H" (Hide) and "C" (Combine). You must be able to see that
channel and to examine the object to use this function. If the object is
not on the channel, an error is returned.
The clflags() versions return a space-separated list of flag names,
rather than a string of flag characters.
See also: cstatus()
CLIENTS
Clients are special software programs that you can use to connect to
MUSHes. They are usually much nicer to use than raw telnet and give
you many additional features, such as larger text buffers (so you
can type more), backscroll, history of previous commands, macros,
and so on.
Here is a list of common clients and the web sites where they can be
found. Please note that the below sites are subject to change. The
below are listed solely for your information and possible benefit.
The developers of PennMUSH have nothing to do with the clients.
OPERATING
SYSTEM CLIENT WEB SITE
-----------------------------------------------------------------------
Unix clients will also run on OS X.
CLOCK()
clock(<channel>[/<locktype>][, <new lock>])
With one argument, returns the value of a lock on a channel, if you own the
channel or are See_All. If no locktype is given, "JOIN" is assumed. With
two arguments, sets the lock if you would be able to do so via @clock.
See also: @clock, @lock
CLONE()
clone(<object>[, <new name>[, <dbref>]])
This function clones <object>, as per @clone, and returns the dbref
number of the clone, or #-1 if the object could not be cloned.
The clone will have the same name as the original object unless you
give a <new name> for it. Normally, the clone will be created with
the first available dbref, but wizards and objects with the
pick_dbref power may give the <dbref> of a garbage object to use
instead.
See also: @clone, create(), dig(), open()
CLOUDY
Flag: CLOUDY (exits)
If this flag is set on a (non-TRANSPARENT) exit, when a player looks at
the exit they will see the contents of the destination room following
the exit's description.
If the flag is set on a TRANSPARENT exit, when a player looks at the exit
they will see only the description of the destination room following the
exit's description, and will not see contents.
See also: TRANSPARENT, look
CMDS()
cmds(<player|descriptor>)
Returns the number of commands issued by a player during this
connection as indicated by WHO.
You must be a Wizard, Royalty or See_All to use this function on anyone
but yourself.
See also: CONNECTION FUNCTIONS
CMOGRIFIER()
cmogrifier(<channel>)
Returns the dbref of the mogrifier of a channel.
See also: @channel/mogrifier, @chatformat
CMSGS()
cdesc(<channel>)
cusers(<channel>)
cmsgs(<channel>)
cbuffer(<channel>)
Return the description (@channel/describe), number of users, number of
messages in the recall buffer, or buffer size of <channel>, respectively.
This information is also displayed in @channel/list and @channel/what.
See also: cbufferadd(), crecall()
CODE
PennMUSH is developed by a team of developers whose names are listed
in 'help changes'. Suggestions, comments, and bug reports are
welcome.
For information about downloading PennMUSH, see 'help download'.
For information about changes in versions of the code, see 'help changes'.
COLOR
Flag: COLOR (players)
This flag indicates to the MUSH that the player's client can see ANSI
colors, using the 8 standard ANSI colors plus highlight, flash, inverse,
underline.
ANSI colors can also be enabled on a per-connection basis with @sockset.
See also: ANSI, XTERM256, ansi(), @sockset
COLORS()
colors()
colors(<wildcard>)
colors(<color>, <format>)
With no arguments, colors() returns a space-separated list of colors
that PennMUSH knows the name of. You can use these colors in
ansi(+<colorname>,text). The colors "xterm0" to "xterm255" are not
included in the list, but can also be used in ansi().
With one argument, returns a space-separated list of colors that
match the wildcard pattern <wildcard>.
With two arguments, colors() returns information about a particular
color. <color> must be the name of a color or a hex code, in any of
the forms accepted by ansi(). <format> must be one of:
hex: return a hexcode in the format #rrggbb.
xterm256: return the number of the xterm color closest to the given
<color>.
16color: return the letter of the closest ANSI color code.
name: return the name of the colors exactly matching the given
<color>.
It can be used for working out how certain colors will downgrade to
people using clients which aren't fully color-capable.
See 'help colors2' for examples.
See also: ansi(), colorstyle
COLORS2
Examples:
> think colors(*yellow*)
greenyellow yellowgreen lightgoldenrodyellow lightyellow yellow
lightyellow1 lightyellow2 lightyellow3 lightyellow4 yellow1 yellow2
yellow3 yellow4
> think colors(+yellow, hex)
#ffff00
> think colors(+yellow, xterm256)
226
> think colors(+yellow, 16color)
y
> think colors(#ffff00, name)
yellow yellow1
COLORSTYLE
SOCKSET colorstyle=<value>
You can override the color format you receive from PennMUSH. Normally,
PennMUSH tries to guess what your client is capable of through telnet
negotiation and your player flags. @sockset lets you inform PennMUSH
that your client can support more colors than expected.
Colorstyle options are:
plain: Plain text. No markup whatsoever.
hilite: You only receive hilite text. No colors, just ansi-hilite.
16color: You receive hilite text and the ANSI 16 colors.
xterm256: You receive xterm-style 256 colors for text and background.
auto: go back to what PennMUSH determined was your client's capabilities.
In the event that your client receives a color that it is unable to
display, PennMUSH will attempt to find a close match that can fit your
client's capabilities.
See also: ANSI, COLOR, XTERM256
COMMANDS
Help is available for the following MUSH commands:
ahelp anews brief DOING drop
examine enter events follow get
give go index kill leave
LOGOUT look move news page
pose QUIT read rules say
score slay teach think unfollow
use whisper WHO with
" : ; + ]
In addition to these, there are several types of '@' commands. @-commands
are usually commands which have permanent effects on the MUSH (such as
creating a new object). Here are the help topics on @-commands:
@-ATTRIBUTES @-BUILDING @-GENERAL @-WIZARD
Commands that can only be used by connected players are listed in
HELP SOCKET COMMANDS.
COMMUNICATION FUNCTIONS
Communication functions are side-effect functions that send a message
to an object or objects.
cemit() emit() lemit() message() nsemit()
nslemit() nsoemit() nspemit() nsprompt() nsremit()
nszemit() oemit() pemit() prompt() remit()
zemit()
See also: Channel functions, Mail functions
COMP()
comp(<value1>, <value2>[, <type>])
comp() compares two values. It returns 0 if they are the same, -1 if
<value1> is less than/precedes alphabetically <value2>, and 1 otherwise.
By default the comparison is a case-sensitive lexicographic (string)
comparison. By giving the optional <type>, the comparison can be
specified:
<type> Comparison
A Maybe case-sensitive lexicographic (default)
I Always case-insensitive lexicographic
D Dbrefs of valid objects
N Integers
F Floating point numbers
Whether or not the a sort type is case-sensitive or not depends on
the particular MUSH and its environment.
See also: strmatch(), eq()
COMSYS
CHAT SYSTEM
PennMUSH has a built-in chat system which allows you to speak to other
players who are on the same channel without needing to be in the same room
as them. It supports a large number of channels which can be customized and
restricted in various ways.
Many of the chat system commands take a <channel> argument; you don't need
to enter the entire channel name, only as many letters as needed to make it
distinct from other channels.
You can list, join, and configure channels using the @channel command.
To speak on channels, use the @chat command.
See also: @channel, @chat, @cemit, channel functions, CHAN_USEFIRSTMATCH,
@chatformat, @clock
CON()
con(<object>)
Returns the dbref of the first object in the <object>'s inventory.
You can get the complete contents of any container you may examine,
regardless of whether or not objects are dark. You can get the
partial contents (obeying DARK/LIGHT/etc.) of your current location
or the enactor (%#). You CANNOT get the contents of anything else,
regardless of whether or not you have objects in it.
See also: lcon(), next()
COND()
cond(<cond>, <expr>[, ... , <condN>, <exprN>][, <default>])
condall(<cond>, <expr>[, ... , <condN>, <exprN>][, <default>])
ncond(<cond>, <expr>[, ... , <condN>, <exprN>][, <default>])
ncondall(<cond>, <expr>[, ... , <condN>, <exprN>][, <default>])
cond() evaluates <cond>s until one returns a true value. Should
none return true, <default> is returned.
condall() returns all <expr>s for those <cond>s that evaluate to
true, or <default> if none are true.
ncond() and ncondall() are identical to cond(), except it returns
<expr>s for which <cond>s evaluate to false.
Examples:
> say cond(0,This is false,#-1,This is also false,#123,This is true)
You say, "This is true"
> say ncond(0,This is false,#-1,This is also false,#123,This is true)
You say, "This is false"
> say ncondall(0,This is false,#-1,This is also false,#123,This is true)
You say, "This is falseThis is also false"
See also: firstof(), allof()
CONDALL()
cond(<cond>, <expr>[, ... , <condN>, <exprN>][, <default>])
condall(<cond>, <expr>[, ... , <condN>, <exprN>][, <default>])
ncond(<cond>, <expr>[, ... , <condN>, <exprN>][, <default>])
ncondall(<cond>, <expr>[, ... , <condN>, <exprN>][, <default>])
cond() evaluates <cond>s until one returns a true value. Should
none return true, <default> is returned.
condall() returns all <expr>s for those <cond>s that evaluate to
true, or <default> if none are true.
ncond() and ncondall() are identical to cond(), except it returns
<expr>s for which <cond>s evaluate to false.
Examples:
> say cond(0,This is false,#-1,This is also false,#123,This is true)
You say, "This is true"
> say ncond(0,This is false,#-1,This is also false,#123,This is true)
You say, "This is false"
> say ncondall(0,This is false,#-1,This is also false,#123,This is true)
You say, "This is falseThis is also false"
See also: firstof(), allof()
CONFIG()
config([<option>])
With no arguments, config() returns a list of config option names.
If <option> is given, config() returns the value of the given option
Boolean configuration options will return values of "Yes" or "No".
Example:
> think config(money_singular)
Penny
CONN()
conn(<player|descriptor>)
This function returns the number of seconds a player has been
connected. <player> should be the full name of a player or a dbref.
You can also use a <descriptor> to get connection information for
a specific connection when a player is connected more than once.
Wizards can also specify the descriptor of a connection which is still
at the login screen.
This function returns -1 for invalid <player|descriptor>s, offline
players and players who are dark, if the caller is not able to see them.
See also: CONNECTION FUNCTIONS
CONNECTED
Flag: CONNECTED (players)
This flag is used internally by the MUSH to track whether a player is
currently connected. It cannot be set or cleared manually.
Mortal code can't use hasflag(<x>,connected) to test if a player is
connected. Consider using conn(), lwho(), or mwho() instead.
See also: conn(), lwho(), mwho()
CONNECTION FUNCTIONS
Connection functions return information about the connections open
on a game, or about specific connections.
cmds() conn() doing() height() host()
hidden() idle() ipaddr() lports() lwho()
lwhoid() mwho() mwhoid() nmwho() nwho()
player() ports() pueblo() recv() sent()
ssl() terminfo() width() xmwho() xmwhoid()
xwho() xwhoid() zmwho() zwho()
CONTACT
PennMUSH is developed by a team of developers whose names are listed
in 'help changes'. Suggestions, comments, and bug reports are
welcome.
For information about downloading PennMUSH, see 'help download'.
For information about changes in versions of the code, see 'help changes'.
CONTROL
Controlling an object basically means that you have the power to
change the object's characteristics such as flags and attributes. It
may also mean that you have the ability to destroy it.
These checks are performed, from top to bottom, to see if object O
controls object V:
1. If O has the Guest power, O does not control V
2. If O and V are the same object, O controls V
3. If V is God, O does not control V
4. If O is a Wizard, O controls V
5. If V is a Wizard, O does not control V
6. If V is Royalty and O is not, O does not control V
7. If V is MISTRUST, O does not control V
8. If O and V are owned by the same player, and either:
a. V is not set TRUST, or
b. O is set TRUST
then O controls V
9. If V is a player, or set TRUST, O does not control V
10. If the zone_control_zmp_only @config option is set to 'No', V is on a
Zone, and O passes the Zone's @lock/zone, O controls V
11. If V is owned by a SHARED player, and O passes the owner's @lock/zone,
O controls V
12. If V has an @lock/control, and O passes the lock, O controls V
13. O does not control V
See also: controls(), TRUST, MISTRUST, ZONES, SHARED PLAYERS
CONTROLS()
controls(<object>, <victim>[/<attribute>])
With no <attribute>, this function returns 1 if <object> controls
<victim>, or 0, if it does not. With an <attribute>, it will return
1 if <object> could successfully set <attribute> on <victim> (or
alter <attribute>, if it already exists). 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). If <attribute> is not a valid
attribute name, it will return #-1 BAD ATTR NAME. You must control
<object> or <victim>, or have the See_All power, to use this
function.
See also: visible(), CONTROL
CONVSECS()
convsecs(<seconds>[, <zone>])
convutcsecs(<seconds>)
This function converts seconds to a time string, based on how many
seconds the number is after Jan 1, 1970 UTC. Because it's based on
UTC, but returns local time, convsecs(0) is not going to be "Thu Jan
1 00:00:00 1970" unless you're in the UTC (GMT) timezone.
convutcsecs(), and convsecs() with a second argument of 'utc' return
the time based on UTC time instead of the server's local time. See
HELP TIMEZONES for more information on the zone argument.
Examples:
> say secs()
You say, "709395750"
> say convsecs(709395750)
You say, "Wed Jun 24 10:22:54 1992"
> say convutcsecs(709395750)
You say, "Wed Jun 24 14:22:30 1992"
See also: convtime(), time()
CONVTIME()
convtime(<time string>,[utc])
convutctime(<time string>)
This functions converts a time string (in the server's time zone) to
the number of seconds since Jan 1, 1970 GMT. A time string is of the
format: Ddd MMM DD HH:MM:SS YYYY where Ddd is the day of the week,
MMM is the month, DD is the day of the month, HH is the hour in
24-hour time, MM is the minutes, SS is the seconds, and YYYY is the
year. If you supply an incorrectly formatted string, it will return
-1.
convutctime() and convtime() with a second argument of 'utc' assume
the timestring is based on UTC time.
If the extended convtime() is supported (See @config compile), more
formats for the date are enabled, including ones missing the day of
week and year, and a 'Month Day Year' format.
Example:
> say time()
You say, "Wed Jun 24 10:22:54 1992"
> say convtime(Wed Jun 24 10:22:54 1992)
You say, "709395774"
See also: convsecs(), time()
CONVUTCSECS()
convsecs(<seconds>[, <zone>])
convutcsecs(<seconds>)
This function converts seconds to a time string, based on how many
seconds the number is after Jan 1, 1970 UTC. Because it's based on
UTC, but returns local time, convsecs(0) is not going to be "Thu Jan
1 00:00:00 1970" unless you're in the UTC (GMT) timezone.
convutcsecs(), and convsecs() with a second argument of 'utc' return
the time based on UTC time instead of the server's local time. See
HELP TIMEZONES for more information on the zone argument.
Examples:
> say secs()
You say, "709395750"
> say convsecs(709395750)
You say, "Wed Jun 24 10:22:54 1992"
> say convutcsecs(709395750)
You say, "Wed Jun 24 14:22:30 1992"
See also: convtime(), time()
CONVUTCTIME()
convtime(<time string>,[utc])
convutctime(<time string>)
This functions converts a time string (in the server's time zone) to
the number of seconds since Jan 1, 1970 GMT. A time string is of the
format: Ddd MMM DD HH:MM:SS YYYY where Ddd is the day of the week,
MMM is the month, DD is the day of the month, HH is the hour in
24-hour time, MM is the minutes, SS is the seconds, and YYYY is the
year. If you supply an incorrectly formatted string, it will return
-1.
convutctime() and convtime() with a second argument of 'utc' assume
the timestring is based on UTC time.
If the extended convtime() is supported (See @config compile), more
formats for the date are enabled, including ones missing the day of
week and year, and a 'Month Day Year' format.
Example:
> say time()
You say, "Wed Jun 24 10:22:54 1992"
> say convtime(Wed Jun 24 10:22:54 1992)
You say, "709395774"
See also: convsecs(), time()
COPYRIGHT
Copyright, License, and Credits for PennMUSH 1.x. Revised March 2006.
I. Copyrights
PennMUSH 1.x
Copyright (c) 1995-2006, T. Alexander Popiel <talek@pennmush.org>
and Shawn Wagner <raevnos@pennmush.org>.
Some code used in this server may have been derived from the
TinyMUSH 2.2 source code, with permission. TinyMUSH 2.2 is
Copyright (c) 1994-2002, Jean Marie Diaz, Lydia Leong, and Devin Hooker.
Some code used in this server may have been derived from TinyMUSH 2.0.
Copyright (c) 1995, Joseph Traub, Glenn Crocker.
Some code used in this server may have been derived from TinyMUD.
Copyright (c) 1995, David Applegate, James Aspnes, Timothy Freeman
and Bennet Yee.
*------------------------------------------------------------------------*
II. License
Because PennMUSH includes parts of multiple works, you must comply
with all of the relevant licenses of those works. The portions derived
from TinyMUD/TinyMUSH 2.0 are licensed under the following terms:
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that: (1) source code distributions
retain the above copyright notice and this paragraph in its entirety, and
(2) distributions including binary code include the above copyright
notice and this paragraph in its entirety in the documentation or other
materials provided with the distribution. The names of the copyright
holders may not be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
The portions derived from TinyMUSH 2.2 are used under the Artistic
License. The Artistic License is also the license under which you
are granted permission to copy and modify PennMUSH:
The Artistic License
Preamble
The intent of this document is to state the conditions under which a
Package may be copied, such that the Copyright Holder maintains some
semblance of artistic control over the development of the package,
while giving the users of the package the right to use and distribute
the Package in a more-or-less customary fashion, plus the right to make
reasonable modifications.
Definitions:
"Package" refers to the collection of files distributed by the Copyright
Holder, and derivatives of that collection of files created through
textual modification.
"Standard Version" refers to such a Package if it has not been modified,
or has been modified in accordance with the wishes of the Copyright
Holder.
"Copyright Holder" is whoever is named in the copyright or copyrights
for the package.
"You" is you, if you're thinking about copying or distributing this Package.
"Reasonable copying fee" is whatever you can justify on the basis of media
cost, duplication charges, time of people involved, and so on. (You will
not be required to justify it to the Copyright Holder, but only to the
computing community at large as a market that must bear the fee.)
"Freely Available" means that no fee is charged for the item itself,
though there may be fees involved in handling the item. It also means
that recipients of the item may redistribute it under the same conditions
they received it.
1. You may make and give away verbatim copies of the source form of the
Standard Version of this Package without restriction, provided that
you duplicate all of the original copyright notices and associated
disclaimers.
2. You may apply bug fixes, portability fixes and other modifications
derived from the Public Domain or from the Copyright Holder. A Package
modified in such a way shall still be considered the Standard Version.
3. You may otherwise modify your copy of this Package in any way, provided
that you insert a prominent notice in each changed file stating how and
when you changed that file, and provided that you do at least ONE of
the following:
a) place your modifications in the Public Domain or otherwise make them
Freely Available, such as by posting said modifications to Usenet or an
equivalent medium, or placing the modifications on a major archive site
such as ftp.uu.net, or by allowing the Copyright Holder to include your
modifications in the Standard Version of the Package.
b) use the modified Package only within your corporation or organization.
c) rename any non-standard executables so the names do not conflict with
standard executables, which must also be provided, and provide a separate
manual page for each non-standard executable that clearly documents how
it differs from the Standard Version.
d) make other distribution arrangements with the Copyright Holder.
4. You may distribute the programs of this Package in object code or
executable form, provided that you do at least ONE of the following:
a) distribute a Standard Version of the executables and library files,
together with instructions (in the manual page or equivalent) on where
to get the Standard Version.
b) accompany the distribution with the machine-readable source of the
Package with your modifications.
c) accompany any non-standard executables with their corresponding
Standard Version executables, giving the non-standard executables
non-standard names, and clearly documenting the differences in manual
pages (or equivalent), together with instructions on where to get the
Standard Version.
d) make other distribution arrangements with the Copyright Holder.
5. You may charge a reasonable copying fee for any distribution of
this Package. You may charge any fee you choose for support of this
Package. You may not charge a fee for this Package itself. However, you
may distribute this Package in aggregate with other (possibly commercial)
programs as part of a larger (possibly commercial) software distribution
provided that you do not advertise this Package as a product of your own.
6. The scripts and library files supplied as input to or produced as
output from the programs of this Package do not automatically fall under
the copyright of this Package, but belong to whomever generated them,
and may be sold commercially, and may be aggregated with this Package.
7. C or perl subroutines supplied by you and linked into this Package
shall not be considered part of this Package.
8. The name of the Copyright Holder may not be used to endorse or
promote products derived from this software without specific prior
written permission.
9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
The End
COPYRITE
Copyright, License, and Credits for PennMUSH 1.x. Revised March 2006.
I. Copyrights
PennMUSH 1.x
Copyright (c) 1995-2006, T. Alexander Popiel <talek@pennmush.org>
and Shawn Wagner <raevnos@pennmush.org>.
Some code used in this server may have been derived from the
TinyMUSH 2.2 source code, with permission. TinyMUSH 2.2 is
Copyright (c) 1994-2002, Jean Marie Diaz, Lydia Leong, and Devin Hooker.
Some code used in this server may have been derived from TinyMUSH 2.0.
Copyright (c) 1995, Joseph Traub, Glenn Crocker.
Some code used in this server may have been derived from TinyMUD.
Copyright (c) 1995, David Applegate, James Aspnes, Timothy Freeman
and Bennet Yee.
*------------------------------------------------------------------------*
II. License
Because PennMUSH includes parts of multiple works, you must comply
with all of the relevant licenses of those works. The portions derived
from TinyMUD/TinyMUSH 2.0 are licensed under the following terms:
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that: (1) source code distributions
retain the above copyright notice and this paragraph in its entirety, and
(2) distributions including binary code include the above copyright
notice and this paragraph in its entirety in the documentation or other
materials provided with the distribution. The names of the copyright
holders may not be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
The portions derived from TinyMUSH 2.2 are used under the Artistic
License. The Artistic License is also the license under which you
are granted permission to copy and modify PennMUSH:
The Artistic License
Preamble
The intent of this document is to state the conditions under which a
Package may be copied, such that the Copyright Holder maintains some
semblance of artistic control over the development of the package,
while giving the users of the package the right to use and distribute
the Package in a more-or-less customary fashion, plus the right to make
reasonable modifications.
Definitions:
"Package" refers to the collection of files distributed by the Copyright
Holder, and derivatives of that collection of files created through
textual modification.
"Standard Version" refers to such a Package if it has not been modified,
or has been modified in accordance with the wishes of the Copyright
Holder.
"Copyright Holder" is whoever is named in the copyright or copyrights
for the package.
"You" is you, if you're thinking about copying or distributing this Package.
"Reasonable copying fee" is whatever you can justify on the basis of media
cost, duplication charges, time of people involved, and so on. (You will
not be required to justify it to the Copyright Holder, but only to the
computing community at large as a market that must bear the fee.)
"Freely Available" means that no fee is charged for the item itself,
though there may be fees involved in handling the item. It also means
that recipients of the item may redistribute it under the same conditions
they received it.
1. You may make and give away verbatim copies of the source form of the
Standard Version of this Package without restriction, provided that
you duplicate all of the original copyright notices and associated
disclaimers.
2. You may apply bug fixes, portability fixes and other modifications
derived from the Public Domain or from the Copyright Holder. A Package
modified in such a way shall still be considered the Standard Version.
3. You may otherwise modify your copy of this Package in any way, provided
that you insert a prominent notice in each changed file stating how and
when you changed that file, and provided that you do at least ONE of
the following:
a) place your modifications in the Public Domain or otherwise make them
Freely Available, such as by posting said modifications to Usenet or an
equivalent medium, or placing the modifications on a major archive site
such as ftp.uu.net, or by allowing the Copyright Holder to include your
modifications in the Standard Version of the Package.
b) use the modified Package only within your corporation or organization.
c) rename any non-standard executables so the names do not conflict with
standard executables, which must also be provided, and provide a separate
manual page for each non-standard executable that clearly documents how
it differs from the Standard Version.
d) make other distribution arrangements with the Copyright Holder.
4. You may distribute the programs of this Package in object code or
executable form, provided that you do at least ONE of the following:
a) distribute a Standard Version of the executables and library files,
together with instructions (in the manual page or equivalent) on where
to get the Standard Version.
b) accompany the distribution with the machine-readable source of the
Package with your modifications.
c) accompany any non-standard executables with their corresponding
Standard Version executables, giving the non-standard executables
non-standard names, and clearly documenting the differences in manual
pages (or equivalent), together with instructions on where to get the
Standard Version.
d) make other distribution arrangements with the Copyright Holder.
5. You may charge a reasonable copying fee for any distribution of
this Package. You may charge any fee you choose for support of this
Package. You may not charge a fee for this Package itself. However, you
may distribute this Package in aggregate with other (possibly commercial)
programs as part of a larger (possibly commercial) software distribution
provided that you do not advertise this Package as a product of your own.
6. The scripts and library files supplied as input to or produced as
output from the programs of this Package do not automatically fall under
the copyright of this Package, but belong to whomever generated them,
and may be sold commercially, and may be aggregated with this Package.
7. C or perl subroutines supplied by you and linked into this Package
shall not be considered part of this Package.
8. The name of the Copyright Holder may not be used to endorse or
promote products derived from this software without specific prior
written permission.
9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
The End
COR()
or(<boolean1>, <boolean2>[, ... , <booleanN>])
cor(<boolean1>, <boolean2>[, ... , <booleanN>])
These functions take a number of boolean values, and return 1 if any of
them are true, and 0 if all are false. or() always evaluates all of its
arguments, while cor() stops evaluating as soon as one is true.
See also: BOOLEAN VALUES, and(), nor(), firstof(), allof()
COS()
cos(<angle>[, <angle type>])
Returns the cosine of <angle>. Angle must be in the given angle
type, or radians by default.
Examples:
> say cos(90, d)
You say, "0"
> say cos(1.570796)
You say, "0"
See 'HELP ANGLES' for more on the angle type.
See also: acos(), asin(), atan(), ctu(), sin(), tan()
COSTS
Some things on the MUSH cost pennies. The default costs are shown below:
kill: 10 pennies (or more, up to 100 pennies)
@dig: 10 pennies
@create: 10 pennies (or more)
@search: 100 pennies *
@link: 1 penny (if you didn't already own it,
+1 to the previous owner).
@open: 1 penny (2 pennies if linked at the same time)
Type '@config/list costs' to get the costs for the MUSH you are on.
See also: MONEY, money(), score
COWNER()
cowner(<channel>)
Returns the dbref of the owner of a channel.
See also: @channel/chown
CREATE()
create(<object>[, <cost>[, <dbref>]])
This function creates an object with name <object> for <cost> pennies,
and returns the dbref number of the created object. It returns #-1 on
error.
Wizards may also specify a <dbref>; if this refers to a garbage object,
the new object is created with this dbref.
See also: @create, pcreate(), dig(), open()
CRECALL()
crecall(<channel>[, <lines> [, <start line> [, <osep> [, <timestamps?> ]]]])
This function is the functional form of @channel/recall, and returns a
string containing the recalled lines from the channel, separated by
<osep> (which defaults to a space). If <timestamps?> is a true value, the
recalled lines will be prefixed with the timestamp; otherwise, timestamps
are omitted.
<lines> can be either a number of lines (in which case that many lines will
be returned, starting from the <start line>th line), or a duration of time
(for example, '5h' or '10m30s'), in which case all lines from the previous
<lines> time are returned.
See also: @channel/recall, cbufferadd()
CREDITS
Maintainer: Raevnos [SW]
Developers: Ervin Hearn III [EEH], Greg Millam [GM], Mike Griffiths [MG],
Intrevis
Past Porters: Nick Gammon [NJG] (win32), Dan Williams [DW] (MacOS),
Sylvia (OS/2)
Former developers: Rhyanna [RLM], Trivian [TN], Halatir [LdW], Talek [TAP],
Javelin
The original TinyMUSH 1.0 code was written by Lawrence Foard, and
was based upon James Aspnes' TinyMUD server. Since then, the code
has been modified by the programmers of MicroMUSE (then MicroMUSH),
and Joseph Traub (Moonchilde of PernMUSH). From January 1992 to
January 1995, Lydia Leong (Amberyl of PernMUSH / Polgara of
Belgariad) maintained the code currently known as PennMUSH 1.50.
From January 1995 until July 2006, Alan Schwartz (Paul of DuneMUSH /
Javelin elsewhere) maintained this code, along with a development
team. From July 2006 on, Raevnos has been the maintainer.
Big thanks to the developers of TinyMUSH 2.0, 2.2 [2.2], 3.0 [3],
MUX2, and Rhost [Rhost] servers, as well as to the players of
Belgariad MUSH, DuneMUSH, and M*U*S*H, and everyone else using this
server!
See also: help code, help license
CSECS()
ctime(<object>[, <utc>])
csecs(<object>)
ctime() returns the date and time that <object> was created. The time
returned is in the server's local timezone, unless <utc> is true, in
which case the time is in the UTC timezone.
csecs() returns the time as the number of seconds since the epoch.
Anyone can get the creation time of any object in the game.
See also: mtime(), time(), secs(), objid()
CSTATUS()
cstatus(<channel>, <object>)
Returns <object>'s status with respect to <channel>, which may be
"Off", "On", or "Gag". You must either be able to examine the
object, or it must visible be on the channel; "Off" is returned for
objects that you cannot see on the channel.
See also: cwho(), cflags(), @channel/on, @channel/gag
CTIME()
ctime(<object>[, <utc>])
csecs(<object>)
ctime() returns the date and time that <object> was created. The time
returned is in the server's local timezone, unless <utc> is true, in
which case the time is in the UTC timezone.
csecs() returns the time as the number of seconds since the epoch.
Anyone can get the creation time of any object in the game.
See also: mtime(), time(), secs(), objid()
CTITLE()
ctitle(<channel>, <object>)
Returns <object>'s @channel/title on <channel>. You must either be able
to examine the object, or it must be visibly on <channel>, and you must
either be on <channel> on able to join it.
See also: @channel/title
CTU()
ctu(<angle>, <from>, <to>)
Converts between the different ways to measure angles. <from>
controls what the angle is treated as, and <to> what form it is
turned into. See HELP ANGLES for more information.
Example:
> say 90 degrees is [ctu(90, d, r)] radians
You say, "90 degrees is 1.570796 radians"
See also: acos(), asin(), atan(), cos(), sin(), tan()
CUSERS()
cdesc(<channel>)
cusers(<channel>)
cmsgs(<channel>)
cbuffer(<channel>)
Return the description (@channel/describe), number of users, number of
messages in the recall buffer, or buffer size of <channel>, respectively.
This information is also displayed in @channel/list and @channel/what.
See also: cbufferadd(), crecall()
CV
cd <name> <password>
ch <name> <password>
cv <name> <password>
Not really MUSH commands, but commands available at the connect screen.
Wizards can use 'cd' instead of 'connect'; the new connection will be
hidden (as per @hide), and the player will be set DARK. Mortals set
HEAR_CONNECT will not hear dark wizards connect.
Wizards, Royalty, and those with the Hide @power can use 'ch' to connect
with the new connection hidden (as per @hide).
Connecting using 'cv' causes the Dark flag to be cleared prior to
connection messages being broadcast.
None of those commands affect the hidden status of other connections, if
you're reconnecting.
See also: DARK, @hide
CWHO()
cwho(<channel>[, <status>[, <skip gagged?>]])
This function returns the dbrefs of objects which are on <channel>.
<status> can be one of "on", "off" or "all" to control whether
online players, offline players, or all players are returned; it
defaults to "on". (Things are always returned.) When used by mortals,
hidden/dark players are shown as being offline.
If <skip gagged?> is given, and is true, gagged objects will not be
included in the results.
See also: cstatus(), @channel/who
DARK
Flag: DARK (all types)
When a room is set DARK, only objects which are set LIGHT will show up
in the rooms contents list when someone "look"s in the room. Exits which
are set DARK do not show up in a room's Obvious Exits list.
DARK players and things do not show up in the contents list of rooms.
Only Wizard players can set themselves dark. Puppets and Audible things
with an @forwardlist will not be hidden by the flag.
Note that players and things still trigger enter/leave messages, etc, in
DARK rooms.
If the "full_invis" @config option is on, DARK players and things will show
up as "Someone" or "Something", respectively, when they speak.
In the past, players set DARK were automatically hidden from the WHO list
via @hide, but this no longer happens. If you wish to disappear completely,
you must use @hide after setting yourself DARK.
See also: LIGHT, @hide
DATABASE
You will find the term "dbref" or "dbref number" used frequently in
these help files and in MUSHcode. It is an abbreviation of "database
reference number".
The database is the part of MUSH that stores all the information
about this particular MUSH. Players, things, rooms, and exits are
all objects in the database. Each object in the database has a
unique dbref number that is set when the object is created. You can
use the dbref number to refer to an object that is not in your
current location, and it is especially important for global code.
Using DBREFs is also faster than using names, even if the object is
in your location. This is because whenever you try to do something
with an object (such as look at it, take it, etc.), the MUSH first
has to locate the object. Since the dbref is unique, it can
immediately find the object rather than checking through all the
contents of your area to see if one matches the name.
Continued in 'help dbref2'.
DBREF #
You will find the term "dbref" or "dbref number" used frequently in
these help files and in MUSHcode. It is an abbreviation of "database
reference number".
The database is the part of MUSH that stores all the information
about this particular MUSH. Players, things, rooms, and exits are
all objects in the database. Each object in the database has a
unique dbref number that is set when the object is created. You can
use the dbref number to refer to an object that is not in your
current location, and it is especially important for global code.
Using DBREFs is also faster than using names, even if the object is
in your location. This is because whenever you try to do something
with an object (such as look at it, take it, etc.), the MUSH first
has to locate the object. Since the dbref is unique, it can
immediately find the object rather than checking through all the
contents of your area to see if one matches the name.
Continued in 'help dbref2'.
DBREF FUNCTIONS
Dbref functions return a dbref or list of dbrefs related to some value
on an object.
children() con() entrances() exit() followers()
following() home() lcon() lexits() loc()
locate() lparent() lplayers() lsearch() lvcon()
lvexits() lvplayers() namelist() next() nextdbref()
num() owner() parent() pmatch() rloc()
rnum() room() where() zone()
See also: DBREF, Information functions
DBREF NUMBER
You will find the term "dbref" or "dbref number" used frequently in
these help files and in MUSHcode. It is an abbreviation of "database
reference number".
The database is the part of MUSH that stores all the information
about this particular MUSH. Players, things, rooms, and exits are
all objects in the database. Each object in the database has a
unique dbref number that is set when the object is created. You can
use the dbref number to refer to an object that is not in your
current location, and it is especially important for global code.
Using DBREFs is also faster than using names, even if the object is
in your location. This is because whenever you try to do something
with an object (such as look at it, take it, etc.), the MUSH first
has to locate the object. Since the dbref is unique, it can
immediately find the object rather than checking through all the
contents of your area to see if one matches the name.
Continued in 'help dbref2'.
DBREF2
If you own or control an object, you will see its dbref number listed
right after its name when you look at it (unless you are set MYOPIC).
Example:
> look me
Cyclonus(#3PWenAMc)
A very short desc.
The dbref number is indicated by the number/pound sign (#). Cyclonus's
dbref is #3. The letters following the dbref are the abbreviations of the
flags set on the object. NOTE: the abbreviation of the OPAQUE flag is 'O'
(o), which looks like '0' (zero) on some clients. Make sure you have the
right number before using it in your code!
See also: MYOPIC, OPAQUE, MUSHCODE, MATCHING, OBJIDS
DBREFS
You will find the term "dbref" or "dbref number" used frequently in
these help files and in MUSHcode. It is an abbreviation of "database
reference number".
The database is the part of MUSH that stores all the information
about this particular MUSH. Players, things, rooms, and exits are
all objects in the database. Each object in the database has a
unique dbref number that is set when the object is created. You can
use the dbref number to refer to an object that is not in your
current location, and it is especially important for global code.
Using DBREFs is also faster than using names, even if the object is
in your location. This is because whenever you try to do something
with an object (such as look at it, take it, etc.), the MUSH first
has to locate the object. Since the dbref is unique, it can
immediately find the object rather than checking through all the
contents of your area to see if one matches the name.
Continued in 'help dbref2'.
DEBIT POWER
The Debit power lets objects take pennies from players with the 'give'
command. Wizards have this power implicitly.
See also: give, money, NO_PAY POWER
DEBUG
Flag: DEBUG (all types)
The DEBUG flag is used for debugging MUSHcode. When an object is set DEBUG,
all parser evaluation results will be shown to the object's owner and to
any dbrefs in the object's DEBUGFORWARDLIST, in the format:
#dbref! <string to evaluate> :
#dbref! recursive evaluation of functions in string
#dbref! <string to evaluate> => <evaluated string>
Because the parser does recursive evaluations, you will see
successive messages evaluating specific parts of an expression. This
enables you to pinpoint exactly which evaluation is going wrong.
Objects run under this flag are computationally expensive, and can generate
large amounts of spam, so this flag should only be set when needed, and
cleared afterwards.
There's also a DEBUG attribute flag, which only affects a single attribute;
see 'help attribute flags' for more information. You can also use the "}"
command prefix to run a command with DEBUG output just once.
See 'help debug2' for an example.
See also: VERBOSE, PUPPET, }
DEBUG2
> @create Test
> @set Test=DEBUG
> &cmd test=$wc *: say String %0 has [strlen(%0)] letters and [words(%0)] words.
> wc This is my test string
#14! String %0 has [strlen(%0)] letters and [words(%0)] words. :
#14! strlen(%0) :
#14! %0 => This is my test string
#14! strlen(%0) => 22
#14! words(%0) :
#14! %0 => This is my test string
#14! words(%0) => 5
#14! String %0 has [strlen(%0)] letters and [words(%0)] words. =>
String This is my test string has 22 letters and 5 words.
Test says, "String This is my test string has 22 letters and 5 words."
DEBUGFORWARDLIST
@debugforwardlist <object>[=<list of dbrefs>]
When <object> has an @debugforwardlist attribute set, any debug output it
produces (either because it has the DEBUG flag set, or because an attribute
with the DEBUG attribute flag is evaluated) is forwarded to all the dbrefs
listed in the debugforwardlist.
The @debugforwardlist 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 pass its @lock/forward.
See also: DEBUG, @forwardlist, @lock
DEC()
dec(<integer>)
dec(<string-ending-in-integer>)
desc() returns the given <integer> minus 1. If given a string that ends in
an integer, it decrements only the final integer portion. That is:
> think dec(3)
2
> think dec(hi3)
hi2
> think dec(1.3.3)
1.3.2
> think dec(1.3)
1.2
Note especially the last example, which will trip you up if you use
floating point numbers with dec() and expect it to work like sub().
If the null_eq_zero @config option is on, using dec() on a string which
does not end in an integer will return <string>-1. When null_eq_zero is
turned off, it will return an error.
See also: inc(), sub()
DECODE64()
decode64(<string>)
Converts the base 64-encoded <string> back to its original form.
Requires SSL support; see @config compile.
See also: encode64(), encrypt(), decrypt()
DECOMPOSE()
decompose(<string>)
decompose() works like escape() with the additional caveat that it
inserts parse-able characters to recreate <string> exactly after one
parsing. It takes care of multiple spaces, '%r's, and '%t's.
Example:
> think decompose(This is \[a [ansi(y,test)]\][space(3)])
This is \[a%b[ansi(y,test)]\] %b%b
See also: @decompile2, escape(), secure(), ]
DECRYPT()
decrypt(<string>, <password>[, <encoded>])
Decrypts a string encrypted with the encrypt() function, if given
the string and the same password.
If the optional <encoded> argument is true, it indicates that the
input string is encoded in base 64.
See also: encrypt(), encode64(), decode64()
DEFAULT()
default([<obj>/]<attr>[, ... ,[<objN>]/<attrN>], <default>)
This function returns the value of the first possible <obj>/<attr>,
as if retrieved via the get() function, if the attribute exists and
is readable by you. Otherwise, it evaluates <default>, and returns
that. Note that <default> is only evaluated if none of the given
attributes exist or can be read. Note further than an empty attribute
counts as an existing attribute.
This is useful for code that needs to return the value of an
attribute, or an error message or default case, if that attribute
does not exist.
Examples:
> &TEST me=apple orange banana
> say default(me/Test, No fruits!)
You say "apple orange banana"
> &TEST ME
> say default(me/Test, No fruits!)
You say "No fruits!"
See also: get(), hasattr(), ufun(), edefault(), udefault(), uldefault(),
strfirstof()
DELETE()
delete(<string>, <first>, <len>)
Return a modified <string>, with <len> characters starting after the
character at position <first> deleted. In other words, it copies
<first> characters, skips <len> characters, and then copies the
remainder of the string. If <len> is negative, deletes characters
leftwards from <first>. Characters are numbered starting at 0.
Examples:
> say delete(abcdefgh, 3, 2)
You say, "abcfgh"
> say delete(abcdefgh, 3, -2)
You say, "abefgh"
See also: strreplace(), strinsert(), mid()
DESCRIPTOR
A descriptor (also called a port or socket descriptor) is a unique (though
reusable) number assigned to each connection to the MUSH. The descriptor
for each connection is shown on the Wizard WHO in the 'Des' column.
Several commands and functions take a descriptor as an argument, or return
the descriptor(s) associated with a player's connection.
See also: WHO, ports(), lports(), player(), @boot, CONNECTION FUNCTIONS
DESERT
desert <object>
desert
The desert command stops <object> from following you and stops you
from following <object>. That is, it's shorthand for 'unfollow <object>'
and 'dismiss <object>'. If no object is given, it stops everyone from
following or leading you.
See also: follow, unfollow, dismiss, followers(), following()
DESTROY_OK
Flag: DESTROY_OK (things)
The DESTROY_OK flag allows anyone to @destroy it. This is good for
"temporary" objects like "Can of Cola". If the object has an @lock/destroy
set, a player who doesn't control the object must pass this lock in order
to destroy it.
DESTROY_OK takes precedence over SAFE.
See also: @destroy
DIE()
die(<number of times to roll die>, <number of sides on die>[, <show>])
This function simulates rolling dice. It "rolls" a die with a given
number of sides, a certain number of times, and adds the results.
For example, DIE(2, 6) would roll "2d6" - two six-sided dice,
generating a result in the range 2-12. The maximum number of dice
this function will roll in a single call is 700. If <show> is true,
the result will be a space-seperated list of the individual rolls rather
than their sum.
Examples:
> think die(3, 6)
6
> think die(3, 6, 1)
5 2 1
DIG()
dig(<name>[, <exit to>[, <exit from>[, <room dbref>, <to dbref>, <from dbref>]]])
This function digs a room called <name>, and optionally opens and
links <exit to> and <exit from>, like the normal @dig command. It
returns the dbref number of the new room.
Wizards and objects with the pick_dbref power can supply optional
fourth through sixth arguments to specify garbage objects to use for
the new room and exits.
See also: @dig, open(), @open, create(), pcreate()
DIGEST()
digest(list)
digest(<algorithm>, <string>)
Returns a checksum (hash, digest, etc.) of <string> using the given
<algorithm>. The result is a unique large number represented in base
16.
Typically at least the following algorithms are supported:
md4 md5 ripemd160 sha sha1 sha224 sha256 sha384 sha512 whirlpool
Depending on the host's OpenSSL version and how it was configured,
there might be more (or less) available. digest(list) returns the
methods a particular server understands if the OpenSSL library
version being used is recent enough (1.0.0 and higher), or '#-1
LISTING NOT SUPPORTED' on older versions. For portable code, stick
with MD5 and the SHA family.
digest(sha, whatever) is equivalent to sha0(whatever).
Example:
> think iter(digest(list), %i0(foo) => [digest(%i0, foo)], %b, %r)
...
MD4(foo) => 0ac6700c491d70fb8650940b1ca1e4b2
MD5(foo) => acbd18db4cc2f85cedef654fccc4a4d8
MDC2(foo) => 5da2a8f36bf237c84fddf81b67bd0afc
RIPEMD160(foo) => 42cfa211018ea492fdee45ac637b7972a0ad6873
SHA(foo) => 752678a483e77799a3651face01d064f9ca86779
SHA1(foo) => 0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33
SHA224(foo) => 0808f64e60d58979fcb676c96ec938270dea42445aeefcd3a4e6f8db
...
DISMISS
dismiss <object>
dismiss
The dismiss command stops <object> from following you. If no object
is given, it stops everyone from following you.
See also: follow, unfollow, desert, followers()
DIST2D()
dist2d(<x1>, <y1>, <x2>, <y2>)
Returns the distance between two points in the Cartesian
plane that have coordinates (<x1>, <y1>) and (<x2>, <y2>).
See also: dist3d()
DIST3D()
dist3d(<x1>, <y1>, <z1>, <x2>, <y2>, <z2>)
Returns the distance between two points in space, with
coordinates (<x1>, <y1>, <z1>) and (<x2>, <y2>, <z2>).
See also: dist2d()
DIV()
div(<number>, <number>)
floordiv(<number>, <number>)
div() returns the integer part of the quotient of the first number
divided by the second number. floordiv() returns the largest integer
less than or equal to the quotient of the first number divided by
the second. For positive numbers, these are the same thing, but for
negative numbers they may be different:
div(13,4) ==> 3 and floordiv(13,4) ==> 3
div(-13,4) ==> -3 but floordiv(-13,4) ==> -4
div(13,-4) ==> -3 but floordiv(13,-4) ==> -4
div(-13,-4) ==> 3 and floordiv(-13,-4) ==> 3
Note that add(mul(div(%0,%1),%1),remainder(%0,%1)) always yields %0,
and add(mul(floordiv(%0,%1),%1),modulo(%0,%1)) also always yields %0.
See also: modulo(), fdiv()
DOING
WHO [<prefix>]
DOING [<prefix>]
For mortals, the WHO command displays a list of players currently
connected to the MUSH, the amount of time they've been connected,
their idle time, and their @doing. Hidden players are not shown.
For admin, WHO shows the names of online players, their location,
connection/idle times, the number of commands typed through the
connection, the descriptor/port number, and the host the player is
connected from. It also includes hidden players, and connections which
are at the login screen, but have not yet connected to a player.
Admin can use the DOING command to see the same output mortals see with
WHO, with the exception that dark/hidden players are included.
If a <prefix> is given for either command, only connected players whose
names start with <prefix> are shown.
Continued in 'help who2'.
DOING()
doing(<player|descriptor>)
When given the name of a player or descriptor, doing() returns the player's
@doing. If no matching player or descriptor is found, or the descriptor is
not yet connected to a player, an empty string is returned.
See also: @poll, @doing, poll()
DOWNLOAD
The latest version of this MUSH code is available from
something like pennmush-1.8.3p9.tar.bz2, depending on the version number.
Also on that site is the MUSH manual, in /Manuals. It should be called
mushman.2.008.tar.Z or something similar; you should attempt to get at
least version 2.007. Also on that site is Javelin's Guide for
PennMUSH Gods, in /pub/PennMUSH/Guide. A better way to read it is on
DROP
drop <object>
Drops <object>, if you are presently carrying it. If the room the
object is dropped in has a DROP-TO set, the object may automatically
be sent to another location.
In order to drop an object, you must pass it's Drop lock and your
location's DropIn lock.
See also: empty, get, STICKY, DROP-TO
DROP-TOS
When you use the @link command on a room, it sets another room or
object as the DROP-TO location. By default, any non-STICKY object
that someone drops in the room will automatically be transported to
the drop-to location, rather than staying in the room. Any STICKY
object dropped in the room will go to its home.
If the room is set STICKY, objects will stay in the room until the
last player leaves or disconnects, at which point they will be
transported as described above.
Drop-tos work on things and players alike.
If the room has a @lock/dropto set on it, only objects that pass the
lock will be transported (either immediately or when the last player
leaves if the room is STICKY). This can be used to prevent the
dropto from acting on, say, objects containing connected players.
See also: @link, STICKY, LINK_OK, @lock
DROPTOS
When you use the @link command on a room, it sets another room or
object as the DROP-TO location. By default, any non-STICKY object
that someone drops in the room will automatically be transported to
the drop-to location, rather than staying in the room. Any STICKY
object dropped in the room will go to its home.
If the room is set STICKY, objects will stay in the room until the
last player leaves or disconnects, at which point they will be
transported as described above.
Drop-tos work on things and players alike.
If the room has a @lock/dropto set on it, only objects that pass the
lock will be transported (either immediately or when the last player
leaves if the room is STICKY). This can be used to prevent the
dropto from acting on, say, objects containing connected players.
See also: @link, STICKY, LINK_OK, @lock
DYNHELP()
textfile(<type>, <entry>)
textentries(<type>, <pattern>[, <osep>])
textfile() returns the text of entries from cached text files (such
as "help", "news", "events", etc.) All whitespace and newlines are
included, so you may want to edit %r's and squish the result if you
plan to use the text as a list of words rather than a display.
textentries() returns any topic names which match the wildcard pattern
<pattern>, with topic names separated by <osep>, which defaults to a space.
Example:
> say textentries(help, ?who())
You say, "CWHO() LWHO() MWHO() NWHO() XWHO() ZWHO()"
> say textfile(help, ln\(\))
You say, " ln(<number>)
Returns the natural log of <number>.
See also: log()
"
E()
e([<number>])
With no argument, returns the value of "e" (2.71828182845904523536,
rounded to the game's float_precision setting).
If a <number> is given, it returns e to the power of <number>.
exp() is an alias for e().
See also: power(), log()
EDEFAULT()
edefault([<obj>/]<attr>, <default case>)
This function returns the evaluated value of <obj>/<attr>, as if
retrieved via the get_eval() function, if the attribute exists and
is readable by you. Otherwise, it evaluates <default case>, and
returns that. <default case> is only evaluated if the attribute
does not exist or cannot be read.
Example:
> &TEST me=You have lost [rand(10)] marbles.
> say edefault(me/Test,You have no marbles.)
You say "You have lost 6 marbles."
> &TEST me
> say edefault(me/Test,You have no marbles.)
You say "You have no marbles."
See also: get(), eval(), ufun(), default(), udefault(), hasattr()
EDIT()
edit(<string>, <search>, <replace>[, ... , <searchN>, <replaceN>])
For each given <search> and <replace> pair, edit() replaces all
occurances of <search> in <string> with the corresponding <replace>.
If <search> is a caret (^), <replace> is prepended.
If <search> is a dollar sign ($), <replace> is appended.
If <search> is an empty string, <replace> is inserted between
every character, and before the first and after the last.
If <replace> is an empty string, <search> is deleted from the string.
Example:
> say [edit(this is a test,^,I think%b,$,.,a test,an exam)]
You say "I think this is an exam."
edit() can not replace a literal single ^ or $. Use regedit() for that.
See also: @edit, regedit()
ELEMENT()
element(<list>, <item>, <separator>)
This returns the position of <item> in <list>, where <list>'s items
are separated by <separator>. A wildcard match is done, so this
function behaves much like MATCH(), except its separator argument is
required, not optional.
Example:
> say element(this|is|a|test|string,*st,|)
You say, "4"
See also: match(), grab(), member()
ELEMENTS()
elements(<list of words>, <list of numbers>[, <delim>[, <osep>]])
This function returns the words in <list of words> that are in the
positions specified by <list of numbers>. The <list of words> are
assumed to be space-separated, unless a <delim> is given. If <osep> is
given, the matching words are separated by <osep>, otherwise by <delim>.
If any of the <list of numbers> is negative, it counts backwards from the
end of the list of words, with -1 being the last word, -2 the word before
last, and so on.
Examples:
> say elements(Foo Ack Beep Moo Zot,2 4)
You say "Ack Moo"
> say elements(Foof|Ack|Beep|Moo,3 1,|)
You say "Beep|Foof"
> say elements(The last word is foo, -1)
You say "foo"
See also: extract(), index(), grab()
ELIST()
itemize(<list>[, <delim>[, <conjunction>[, <punctuation>]]])
elist(<list>[, <conjunction>[, <delim>[, <osep>[, <punctuation>]]]])
These functions take the elements of <list> (separated by <delim> or
a space by default), and:
If there's just one, return it.
If there's two, return <e1> <conjunction> <e2>
If there's more than two, return <e1><punc> <e2><punc> ... <conj> <en>
elist() uses <osep> after <punc>/<conj> instead of a space.
The default <conjunction> is "and", default punctuation is ",".
Examples:
> say itemize(eggs) * [itemize(eggs bacon)]
You say, "eggs * eggs and bacon"
> say itemize(eggs bacon spam)
You say, "eggs, bacon, and spam"
> say itemize(eggs bacon spam, ,&,;)
You say, "eggs; bacon; & spam"
ELOCK()
elock(<object>[/<locktype>], <victim>)
elock() returns 1 if the <victim> would pass the @lock/<locktype> on
<object>, and 0 if it would fail. Any locktype can be given, including
user-defined "user:" @locks. If no <locktype> is given, it defaults to
the Basic lock.
You must be able to examine the lock, which means either that you must
control <object>, it must be @set VISUAL, or the <locktype> lock must be
@lset VISUAL.
Example:
> @lock/drop Dancing Slippers=#0
> think elock(Dancing Slippers/drop, Princess)
0
> @lock/user:test map==*Fred|=*George
> think elock(map/test,*Snape)
0
See also: @lock, locktypes, testlock(), lockfilter(), @lset
EMIT()
emit(<message>)
nsemit(<message>)
Sends a message to the room, as per @emit.
nsemit() works like @nsemit.
See also: pemit(), remit(), lemit(), oemit(), zemit()
EMPTY
empty <object>
The empty command attempts to move all the contents of <object> to
<object>'s location. You must either be holding <object> (in which
case the command is like getting <object>'s <item> for each item) or
be in the same location as <object> (in which case the command is
like getting <object>'s <item> and dropping it).
The empty command assumes that all <object>'s items pass through the
hands of the player running the command. Therefore, the same kinds
of locks and messages that are applied in a possessive get (and,
possibly, a drop) are applied to each item in <object>. It is
therefore possible to fail to empty an object for many reasons, even
when you could do so using "extraphysical" methods (teleporting
items, forcing the object to drop them, or forcing the items to
leave the object.)
See also: get, drop
ENACTOR
The enactor is the object which causes something to happen. This is an
important concept in MUSH, because the way many commands work will depend
on who enters the command (ie, who the enactor is). Note that while the
enactor is the object which -caused- code/a command to run, it is not
necessarily the object which is running the code (that's the executor).
Any type of object can be an enactor.
There are eight %-substitutions that involve the enactor:
%# = the enactor's dbref
%n = the enactor's name
%~ = the enactor's accented name
%: = the enactor's unique identifier, like objid(%#)
%a, %o, %p, %s = pronoun substitutions, based on the enactor's @sex.
See 'help gender' for more information.
If, for example, you have an @osuccess on an object that includes the %n
subtitution, whenever someone picks up the object, that %n will evaluate to
the name of the enactor (the person who typed 'get <object>' in this case).
See also: EXECUTOR, CALLER, SUBSTITUTIONS, DBREF
ENCODE64()
encode64(<string>)
Returns <string> encoded using base-64 format.
Requires SSL support; see @config compile.
See also: decode64(), encrypt(), decrypt()
ENCRYPT()
encrypt(<string>, <password>[, <encode>])
Returns an encrypted string produced by a simple password-based
encrypted algorithm. Good passwords are long passwords. This is not
high-security encryption.
If the optional <encode> argument is true, the resulting string is
further encoded in base 64 so that it only contains alphanumeric
characters.
See also: decrypt(), encode64()
ENDTAG()
endtag(<name>)
Outputs a closing HTML/Pueblo tag for the named tag.
Example:
endtag(img)
Will output (in HTML):
</img>
See also: tag(), tagwrap(), html()
ENTER
enter <object>
Used to enter a thing or player. You can only enter an object if you
own it or if it is set ENTER_OK. You must also pass the enter-lock,
if it is set. Entering an object triggers is @enter/@oenter/@oxenter
messages and its @aenter actions. If you fail the enter-lock, the
object's @efail/@oefail/@aefail messages and actions are triggered.
Insides of objects are best used for vehicles, or storage spaces
when you don't have a home. You can describe the interior of an
object differently from its exterior by using @idescribe.
See: @enter, @efail, @ealias, leave, @lock, @idescribe, INTERIORS
ENTER_OK
Flag: ENTER_OK (all types)
If a player or thing is ENTER_OK, someone may "enter" it, if they pass its
@lock/enter, or "give" to it, if they pass its @lock/from.
This flag has no effect on rooms or exits.
See also: enter, leave, give, @lock, @ealias
ENTRANCES()
entrances([<object>[, <type>[, <begin>[, <end>]]]])
With no arguments, the entrances() function returns a list of all exits,
things, players, and rooms linked to your location, like @entrances. You
can specify an object other than your current location with <object>. You
can limit the type of objects found by specifying one or more of the
following for <type>:
a all (default)
e exits
t things
p players
r rooms
You can also limit the range of the dbrefs searched by giving <begin> and
<end>. If you 't control <object>, or have the Search or See_All powers,
all objects linked to <object> are returned. Otherwise, only objects you
can examine will be included.
See also: lsearch(), @entrances
ENTRIES
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
` ^ ;
: " ]
} @@ @@()
\ % %~
%= %: %!
%? %@ %$
%# %% %+
+ %$0 1.50p6
1.50p7 1.50p8 1.50p9
1.50p10 1.50p11 1.50p12
1.50p13 1.50p14 1.50pdune1
1.50pdune2 1.6.0p0 1.6.0p3
1.6.0p4 1.6.0p5 1.6.1p0
1.6.1p1 1.6.10p0 1.6.10p1
1.6.10p2 1.6.10p3 1.6.10p4
1.6.10p5 1.6.10p6 1.6.2p0
For more, see Entries-2
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
ENTRIES-10
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
before() being killed benchmark()
bitwise functions bnand() bnot()
boolean2 boolean3 boolean functions
boolean values @boot boot power
bor() bound() brackets()
@break @break2 brief
builder builder power @-building
@buy buy bxor()
%c caller cand()
can_dark power can_spoof power capstr()
case() caseall() cat()
cbuffer() cbufferadd() cd
cdesc() ceil() @cemit
cemit() center() cflags()
ch changes @channel
@channel/add @channel admin @channel admin2
For more, see Entries-11
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
ENTRIES-11
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
@channel admin3 @channel/buffer @channel/chown
@channel/combine @channel/decompile @channel/delete
@channel/describe channel functions @channel/gag
@channel/hide @channel/join @channel joining
@channel joining2 @channel/leave @channel list
@channel/list channel-list @channel/mogrifier
@channel/mute @channel/name @channel/off
@channel/on @channel other @channel privs
@channel/privs channel-privs @channel/recall
@channel/rename channels channels()
@channel/title @channel/uncombine @channel/ungag
@channel/unhide @channel/what @channel/who
@channel/wipe chan_usefirstmatch @charges
charges2 @chat chat
@chatformat @chatformat2 @chatformat3
@chat mogrifying chat mogrifying chat_privs power
For more, see Entries-12
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
ENTRIES-12
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
chat system checkpass() checksum
children() @chown @chownall
chown_ok chr() @chzone
@chzone2 @chzoneall clflags()
clients @clock clock()
@clock2 @clone clone()
cloudy cmds() cmogrifier()
cmsgs() code color
colors() colors2 colorstyle
@command @command2 @command3
$-commands commands $-commands2
@comment communication functions comp()
comsys con() cond()
condall() @config config()
@config attribs @config chat @config cmds
@config cosmetic @config cosmetic2 @config costs
For more, see Entries-13
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
ENTRIES-13
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
@config db @config dump @config flags
@config funcs @config limits @config limits2
@config limits3 @config limits4 @config log
@config net @config parameters @config tiny
@conformat conn() connected
connection functions contact control
controls() convsecs() convtime()
convutcsecs() convutctime() copyright
copyrite cor() cos()
@cost costs cowner()
@cpattr @create create()
crecall() credits csecs()
cstatus() ctime() ctitle()
ctu() cusers() cv
cwho() dark database
@dbck dbref # dbref2
For more, see Entries-14
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
ENTRIES-14
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
dbref functions dbref number dbrefs
@death debit power debug
debug2 @debugforwardlist debugforwardlist
dec() decode64() @decompile
@decompile2 @decompile3 decompose()
decrypt() default() delete()
@desc @descformat @describe
descriptor desert @destination
@destroy @destroy2 destroy_ok
die() @dig dig()
@dig2 digest() @disable
dismiss dist2d() dist3d()
div() @doing doing
doing() @dolist @dolist2
download @drain @drop
drop drop-tos droptos
For more, see Entries-15
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
ENTRIES-15
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
@dump dynhelp() e()
@ealias edefault() @edit
edit() @edit2 @efail
element() elements() elist()
@elock elock() @emit
emit() empty @enable
enactor encode64() encrypt()
endtag() @enter enter
enter_ok @entrances entrances()
eq() escape() etime()
etimefmt() etimefmt2 etimefmt3
@eunlock eval() evaluation2
evaluation order event event db
event dump event examples event examples2
event list event log event object
event player events event signal
For more, see Entries-16
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
ENTRIES-16
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
event socket event sql examine
executor exit() @exitformat
exits @exitto exp()
extract() @failure failure
failure2 fdiv() @filter
filter() @filter2 filterbool()
@find findable() first()
@firstexit firstof() fixed
@flag @flag2 flag list
flag permissions flags flags()
flags2 flags list flip()
floating floor() floordiv()
fmod() fn() fn2
fold() fold2 folderstats()
@follow follow followers()
following() @force @force2
For more, see Entries-17
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
ENTRIES-17
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
@force3 foreach() foreach2
@forwardlist forwardlist fraction()
fullalias() fullname() @function
@function2 @function3 @function4
function list functions functions()
functions2 functions power gagged
garbage @gedit gender
@-general get get()
get_eval() getpids() getting started
@give give global commands
globals go going
going_twice goto grab()
graball() @grep2 @grep
grep() grepi() gs channels
gs chat gs chat2 gs mail
gs mail2 gs moving gs moving2
For more, see Entries-18
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
ENTRIES-18
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
gs talking gs talking2 gt()
gte() guest power @halt
halt halt power hasattr()
hasattrp() hasattrpval() hasattrval()
hasflag() hash haspower()
hastype() @haven haven
hear_connect heavy height()
here hidden() @hide
hide power home home()
homes @hook @hook2
@hook3 @hook4 hook power
host() hostname() html
html() html functions huh_command
%i %i0 i18n
ibreak() @idescformat @idescribe
@idle idle idle()
For more, see Entries-19
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
ENTRIES-19
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
idle power idlesecs() if()
ifelse() ilev() iname()
inc() @include @include2
index index() @infilter
info information functions inherit
@inprefix insert() interiors
interiors2 internationalization inum()
inventory @invformat ipaddr()
isdaylight() isdbref() isint()
isnum() isobjid() isregexp()
isword() itemize() items()
iter() iter2 itext()
itext2 judge jump_ok
jury_ok keepalive @kick
kill %l @lalias
lalign() #lambda lambda
For more, see Entries-20
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
ENTRIES-2
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
1.6.2p1 1.6.3p0 1.6.3p1
1.6.3p2 1.6.3p3 1.6.3p4
1.6.3p5 1.6.3p6 1.6.3p7
1.6.4p0 1.6.4p1 1.6.4p2
1.6.5p0 1.6.5p1 1.6.5p2
1.6.5p3 1.6.5p4 1.6.6p0
1.6.7p0 1.6.7p1 1.6.7p2
1.6.7p3 1.6.7p4 1.6.7p5
1.6.7p6 1.6.8p0 1.6.8p1
1.6.9p0 1.6.9p1 1.6.9p2
1.6.9p3 1.6.9p4 1.6.9p5
1.6.9p6 1.6.9p7 1.6.9p8
1.6.9p9 1.7.0p0 1.7.0p1
1.7.0p2 1.7.0p3 1.7.0p4
1.7.0p5 1.7.0p6 1.7.0p7
1.7.0p8 1.7.0p9 1.7.0p10
For more, see Entries-3
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
ENTRIES-20
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
#lambda2 lambda2 #lambda3
lambda3 #lambda4 lambda4
last last() lastip
last & lastlogout lastlogout lastsite
lattr() lattrp() lcon()
lcstr() ldelete() @leave
leave left() @lemit
lemit() letq() lexits()
@lfail lflags() license
light @link link()
link_anywhere power linking link_ok
@list list() @listen
@listen2 listening listening2
listening3 listen_parent ^-listens
list functions @listmotd listq()
lists lit() ljust()
For more, see Entries-21
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
ENTRIES-21
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
llockflags() llocks() lmath()
ln() lnum() loc()
locale localize() locate()
locate2 locate3 @lock
lock() @lock-attribute @lock/basic
@lock-bit @lock-carry @lock-channel
@lock/chzone @lock/command @lock-complex
@lock/control @lock-dbreflist @lock/destroy
@lock/drop @lock/dropin @lock/dropto
@lock/enter @lock-eval2 @lock-evaluation
@lock-evaluation2 @lock/examine @lock/filter
lockfilter() @lock-flag lockflags()
@lock/follow @lock/forward @lock/from
@lock/give @lock-host @lock-indirect
@lock/infilter locking @lock/interact
lock keys lockkeys lock keys2
For more, see Entries-22
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
ENTRIES-22
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
lockkeys2 @lock/leave @lock/link
@lock-list lock list locklist
@lock/listen @lock/mail @lock/mailforward
@lock-name @lock-objid @lock/open
@lock-owner lockowner() @lock/page
@lock/parent @lock/pay @lock-power
@lock/receive locks locks()
@lock-simple @lock/speech @lock/take
@lock/teleport @lock-type lock types
locktypes lock types2 locktypes2
@lock/use @lock/user @lock/user:<name>
@lock/zone @log log()
login power logout @logwipe
long_fingers power look look2
looping loud lparent()
lpids() lplayers() lports()
For more, see Entries-23
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
ENTRIES-23
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
lpos() lsearch() lsearch2
lsearch3 lsearchr() @lset
lset() lstats() lt()
lte() lthings() lvcon()
lvexits() lvplayers() lvthings()
lwho() lwhoid() macros
macros2 @mail mail
mail() mail-admin maildstats()
@mailfilter mailfilter mail-folders
mail-forward @mailforwardlist mailfrom()
mailfstats() mail functions maillist()
mail-other mail-reading mail-reviewing
mailsend() mail-sending @mailsignature
mailsignature mailstats() mailstatus()
mailsubject() mailtime() @malias
malias() @malias2 @malias3
For more, see Entries-24
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
ENTRIES-24
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
@malias4 @malias5 many_attribs power
map() @mapsql mapsql()
master room match() matchall()
matching math functions max()
md5 me mean()
median() member() merge()
@message message() @message2
@message3 mid() min()
mistrust mix() mix2
mod() modulo() modulus()
mogrifier mogrify mogrify2
mogrify3 mogrify4 mogrify5
mogrify6 money money()
monitor @motd @move
move msecs() mssp-request
mtime() mudname() mudurl()
For more, see Entries-25
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
ENTRIES-25
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
mul() munge() munge2
munge3 mushcode mushcode2
@mvattr mwho() mwhoid()
myopic %n @name
name() @nameaccent @nameformat
namegrab() namegraball() namelist()
nand() nattr() nattrp()
ncand() nchildren() ncon()
ncond() ncondall() ncor()
nearby() neq() newbie
newbie2 newbie3 @newpassword
news nexits() next()
nextdbref() nlsearch() nmwho()
noaccents no_command no_leave
noleave no_log noname
non-standard attributes no_pay power no_quota power
For more, see Entries-26
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
ENTRIES-26
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
nor() nospace nospoof
not() no_tel @notify
@notify2 no_warn nowarn
nplayers() @nscemit nscemit()
nsearch() @nsemit nsemit()
@nslemit nslemit() @nsoemit
nsoemit() @nspemit nspemit()
@nsprompt nsprompt() @nsremit
nsremit() @nszemit nszemit()
nthings() @nuke null()
num() numversion() nvcon()
nvexits() nvplayers() nvthings()
nwho() %o obj()
object ids object parents objects
objeval() objid() objids
objmem() @obuy @odeath
For more, see Entries-27
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
ENTRIES-27
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
@odescribe @odrop @oefail
@oemit oemit() @oemit2
@oenter @ofailure @ofollow
@ogive @oidescribe @oleave
@olfail @omove @oname
on-vacation opaque @opayment
@open open() open_anywhere power
open_ok or() ord()
ordinal() @oreceive orflags()
orlflags() orlpowers() orphan
@osuccess @otport @oufail
@ounfollow @ouse @outpageformat
@outpageformat2 outputprefix outputsuffix
owner() @oxenter @oxleave
@oxmove @oxtport @ozenter
@ozleave %p page
For more, see Entries-28
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
ENTRIES-28
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
page2 @pageformat @pageformat2
paranoid @parent parent
parent() parents parents2
parents3 parents4 parents5
parse() @password patchlevels
@payment @pcreate pcreate()
@pemit pemit() @pemit2
pemit_all power pfun() pfun2
pfun3 pi() pick_dbref power
pickrand() pidinfo() player()
player_create power playermem() players
pmatch() @poll poll()
poll power @poor port
ports() pos() pose
pose2 poss() @power
power() @power2 @power3
For more, see Entries-29
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
ENTRIES-29
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
powers() powers2 powers list
powers list2 @prefix @pricelist
@prompt prompt() prompt_newlines
@ps @ps2 pueblo
pueblo() pueblo features pueblo_send power
puppet puppets puppets2
@purge %q queue
queue power quiet quit
@quota quota() quotas power
r() rand() randword()
read @readcache @receive
recv() @recycle regedit()
regeditall() regeditalli() regediti()
regexp regexp classes regexp classes2
regexp examples regexps regexps2
regexp syntax regexp syntax2 regexp syntax3
For more, see Entries-30
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
ENTRIES-3
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
1.7.0p11 1.7.1p0 1.7.1p1
1.7.1p2 1.7.1p3 1.7.2p0
1.7.2p1 1.7.2p2 1.7.2p3
1.7.2p4 1.7.2p5 1.7.2p6
1.7.2p7 1.7.2p8 1.7.2p9
1.7.2p10 1.7.2p11 1.7.2p12
1.7.2p13 1.7.2p14 1.7.2p15
1.7.2p16 1.7.2p17 1.7.2p18
1.7.2p19 1.7.2p20 1.7.2p21
1.7.2p22 1.7.2p23 1.7.2p24
1.7.2p25 1.7.2p26 1.7.2p27
1.7.2p28 1.7.2p29 1.7.2p30
1.7.2p31 1.7.2p32 1.7.2p33
1.7.2p34 1.7.2p35 1.7.3p0
1.7.3p1 1.7.3p2 1.7.3p3
1.7.3p4 1.7.3p5 1.7.3p6
For more, see Entries-4
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
ENTRIES-30
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
regexp syntax4 regexp syntax5 regexp syntax6
regexp syntax7 regexp syntax8 registers
registers() registers2 reglattr()
reglattrp() regmatch() regmatch2
regmatchi() regnattr() regnattrp()
regrab() regraball() regraballi()
regrabi() regrep() regrepi()
regular expression functions regxattr()
regxattrp() @rejectmotd remainder()
@remit remit() remove()
render() repeat() replace()
rest() @restart restarts()
restarttime() restrict restrict2
restrict3 reswitch() reswitchall()
reswitchalli() reswitchi() @retry
@retry2 reverse() revwords()
For more, see Entries-31
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
ENTRIES-31
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
r-function right() rjust()
rloc() rnum() room()
rooms root() round()
royalty rquota rules
@runout runout2 @rwall
%s s() safe
say @scan scan()
score scramble() screenheight
screenwidth @search search()
@search2 search2 @search3
search3 @search4 @search5
search power secs() secure()
see_all power see_queue power @select
semaphores semaphores2 semaphores3
semaphores4 semaphores5 semaphores6
semipose sent() session
For more, see Entries-32
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
ENTRIES-32
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
@set set() setdiff()
setinter() setq() setq2
setq3 setq4 setr()
setting-attributes setunion() @sex
sex s-function sha0()
sha1 shared shared players
shared players2 shl() shr()
shuffle() @shutdown sign()
sin() @sitelock @sitelock2
@sitelock3 @slave slay
slev() socket commands @sockset
sockset softcode sort()
sortby() sorting sortkey()
soundex() soundex2 soundlike()
soundslike() space() speak()
speak2 speak3 speak4
For more, see Entries-33
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
ENTRIES-33
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
speak5 speak6 speak7
speakpenn() @speechmod spellnum()
splice() spoofing @sql
sql() sqlescape() sql examples
sql functions sql_ok power sqrt()
squish() @squota ssl()
stack starttime() @startup
@stats stats() stddev()
step() stext() sticky
strallof() strcat() strfirstof()
string functions strings stringsecs()
strinsert() stripaccents() stripansi()
strlen() strmatch() strreplace()
sub() subj() substitutions
substitutions2 substitutions3 substitutions4
@success success suspect
For more, see Entries-34
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
ENTRIES-34
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
@sweep @switch switch()
@switch2 switch2 @switch3
@switch4 switchall() switches
switch wildcards %t t()
table() tag() tagwrap()
take tan() teach
tel() @teleport @teleport2
tel_ok terminfo() terse
testlock() textentries() textfile()
things think time()
time2 timefmt() timefmt2
time functions timestring() timezones
timezones10 timezones11 timezones12
timezones13 timezones2 timezones3
timezones4 timezones5 timezones6
timezones7 timezones8 timezones9
For more, see Entries-35
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
ENTRIES-35
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
topics topics2 @tport
tport_anything power tport_anywhere power tr()
track_money translation transparent
@trigger @trigger2 trim()
trimpenn() trimtiny() trunc()
trust type() types
types of objects @tz %u
u() u2 u3
ucstr() udefault() @ufail
ufun() ufun2 ufun3
ulambda() uldefault() ulocal()
ulocal2 @ulock @undestroy
unfindable @unfollow unfollow
unimplemented_command uninspected unique()
unkillable power @unlink @unlock
@unrecycle unregistered unsetq()
For more, see Entries-36
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
ENTRIES-36
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
@uptime uptime() @uptime2
@use use user-defined2
user-defined commands utctime() utility functions
@uunlock %v v()
vadd() val() valid()
variable exits vcross() vdim()
vdot() vector functions @verb
@verb2 @verb3 @verb4
verbose verbs verbs2
@version version() v-function
visible() visual vmag()
vmax() vmin() vmul()
vrml @vrml_url vsub()
vunit() %w @wait
@wait2 @wait3 walkthrough
@wall @warnings warnings
For more, see Entries-37
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
ENTRIES-37
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
@warnings2 @warnings3 warnings list
warnings list2 warn_on_missing @wcheck
where() @whereis whisper
who who2 width()
wildcards wildgrep() wildgrepi()
@wipe wipe() with
@-wizard wizard @wizmotd
@wizwall wordpos() words()
wrap() %x xattr()
xattrp() xcon() xexits()
xget() xmwho() xmwhoid()
xor() xplayers() xterm256
xthings() xvcon() xvexits()
xvplayers() xvthings() xwho()
xwhoid() @zemit zemit()
@zenter zfun() @zleave
For more, see Entries-38
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
ENTRIES-38
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
zmo zmp zmr
zmt zmwho() zone
zone() zone master objects zone master rooms
zone masters zone objects zones
zones2 z_tel zwho()
ENTRIES-4
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
1.7.3p7 1.7.3p8 1.7.3p9
1.7.3p10 1.7.3p11 1.7.3p12
1.7.3p13 1.7.3p14 1.7.4p0
1.7.4p1 1.7.4p2 1.7.4p3
1.7.4p4 1.7.4p5 1.7.4p6
1.7.4p7 1.7.4p8 1.7.4p9
1.7.4p10 1.7.4p11 1.7.4p12
1.7.4p13 1.7.4p14 1.7.4p15
1.7.4p16 1.7.4p17 1.7.4p18
1.7.4p19 1.7.4p20 1.7.5p0
1.7.5p1 1.7.5p2 1.7.5p3
1.7.5p4 1.7.5p5 1.7.5p6
1.7.5p7 1.7.5p8 1.7.5p9
1.7.5p10 1.7.5p11 1.7.5p12
1.7.6p0 1.7.6p1 1.7.6p2
1.7.6p3 1.7.6p4 1.7.6p5
For more, see Entries-5
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
ENTRIES-5
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
1.7.6p6 1.7.6p7 1.7.6p8
1.7.6p9 1.7.6p10 1.7.6p11
1.7.6p12 1.7.6p13 1.7.6p14
1.7.6p15 1.7.6p16 1.7.7p0
1.7.7p1 1.7.7p2 1.7.7p3
1.7.7p4 1.7.7p5 1.7.7p6
1.7.7p7 1.7.7p8 1.7.7p9
1.7.7p10 1.7.7p11 1.7.7p12
1.7.7p13 1.7.7p14 1.7.7p15
1.7.7p16 1.7.7p17 1.7.7p18
1.7.7p19 1.7.7p20 1.7.7p21
1.7.7p22 1.7.7p23 1.7.7p24
1.7.7p25 1.7.7p26 1.7.7p27
1.7.7p28 1.7.7p29 1.7.7p30
1.7.7p31 1.7.7p32 1.7.7p33
1.7.7p34 1.7.7p35 1.7.7p36
For more, see Entries-6
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
ENTRIES-6
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
1.7.7p37 1.7.7p38 1.7.7p39
1.7.7p40 1.8.0p0 1.8.0p1
1.8.0p2 1.8.0p3 1.8.0p4
1.8.0p5 1.8.0p6 1.8.0p7
1.8.0p8 1.8.0p9 1.8.0p10
1.8.0p11 1.8.0p12 1.8.0p13
1.8.1p0 1.8.1p1 1.8.1p2
1.8.1p3 1.8.1p4 1.8.1p5
1.8.1p6 1.8.1p7 1.8.1p8
1.8.1p9 1.8.1p10 1.8.2p0
1.8.2p1 1.8.2p2 1.8.2p3
1.8.2p4 1.8.2p5 1.8.2p6
1.8.2p7 1.8.2p8 1.8.3p0
1.8.3p1 1.8.3p2 1.8.3p3
1.8.3p4 1.8.3p5 1.8.3p6
1.8.3p7 1.8.3p8 1.8.3p9
For more, see Entries-7
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
ENTRIES-7
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
1.8.3p10 1.8.3p11 1.8.3p12
1.8.3p13 1.8.4p0 1.8.4p1
1.8.4p2 1.8.4p3 1.8.4p4
1.8.4p5 1.8.4p6 1.8.4p7
1.8.4p8 1.8.5p0 1.8.5p1
1.8.5p2 1.8.5p3 `2
]2 %2 `3
%3 `4 %4
%a @aahear abode
abs() @abuy accent()
accent2 accents accents2
accents3 accname() @aclone
@aconnect acos() action2
action lists add() @adeath
@adescribe @adestroy @adisconnect
@adrop @aefail @aenter
For more, see Entries-8
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
ENTRIES-8
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
@afailure @afollow after()
@agive @ahear ahelp
@aidescribe @aleave @alfail
@alias alias() align()
align2 align3 align4
@allhalt allof() @allquota
alphamax() alphamin() @amail
@amhear @amove @aname
ancestors and() andflags()
andlflags() andlpowers() anews
angles announce power anonymous2
anonymous3 anonymous4 anonymous attributes
ansi ansi() ansi2
ansi3 @apayment aposs()
#apply @areceive art()
asin() @assert @assert2
For more, see Entries-9
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
ENTRIES-9
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
@asuccess atan() atan2()
@atport @atrchown @atrlock
atrlock() attrcnt() attrib-ownership
attrib_set() attrib trees attrib trees2
attrib trees3 attrib trees4 @attribute
@attribute2 @attribute3 attribute flags
attribute flags2 attribute flags3 attribute functions
attribute list @-attributes attributes
attributes2 attributes3 attributes4
attributes list attribute trees attribute trees2
attribute trees3 attribute trees4 attrpcnt()
attr trees attr trees2 attr trees3
attr trees4 audible @aufail
@aunfollow @ause @away
@azenter @azleave %b
band() baseconv() beep()
For more, see Entries-10
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
EQ()
eq(<number>, <number>[, ... , <numberN>])
Takes two or more <number>s, and returns 1 if they are all equal,
and 0 otherwise.
See also: neq()
ESCAPE()
escape(<string>)
The escape() function "escapes out" potentially "dangerous"
characters, preventing function evaluation in the next pass of the
parser. It returns <string> after adding the escape character ('\')
at the beginning of the string, and before the following characters:
% ; [ ] { } \ ( ) , ^ $
This function prevents code injection in strings entered by players. It
is only needed when <string> will be passed through a command or function
which will evaluate it again, which can usually be avoided. Since the
function preserves the original string, it is, in most cases, a better
choice than secure(), but decompose() is often better still.
See also: decompose(), secure(), ]
ETIME()
etime(<seconds>[, <width>])
This function formats a number of seconds using the same rules as
the 'On for' and 'Idle' columens in WHO's output. The optional
<width> argument controls the maximum size of the returned string.
The elapsed time is split into years, weeks, days, hours, minutes
and seconds fields. As many non-zero fields as can fit into <width>
characters are used, in that order. If all fields are 0, seconds are
displayed.
Examples:
> think etime(59)
59s
> think etime(60)
1m
> think etime(61)
1m 1s
>
See also: etimefmt(), timestring()
ETIMEFMT()
etimefmt(<format>, <secs>)
This function is similar to timestring() - it formats a number of seconds
into days, hours, minutes and seconds. However, its formatting is much
more versatile than timestring(), as well as being more complex.
Escape codes in <format> are replaced by the proper values, and other
characters are left unchanged.
A list of all codes is in 'help etimefmt2'.
Examples:
> say etimefmt(I have been connected for $2H:$2M., conn(%#))
You say, "I have been connected for 01:32."
> think etimefmt($2mm $2ss, 500) - [timestring(500)]
8m 20s - 8m 20s
See also: timestring(), timefmt(), etime()
ETIMEFMT2
etimefmt()'s escape codes are similar to timefmt()'s.
The time is broken up into days, hours, minutes, and seconds, and
each value replaces the matching code.
$s - The number of seconds. $h - The number of hours.
$m - The number of minutes. $d - The number of days.
$$ - A literal $.
You can also put a number between the $ and letter to specify a minimum
width for the expanded code. The string is padded with spaces by default -
use uppercase to pad with 0s instead ($3S, rather than $3s). An 'x' before
the code (but after any number) will automatically add a d, h, m, or s
suffix to the time, and a 'z' will not display anything if the field's
value is 0. x and z can be combined.
See 'help etimefmt3' for more examples.
ETIMEFMT3
Examples:
> think etimefmt($2h:$2M, 3700)
1:01
> think etimefmt(You have $m minutes and $s seconds to go, 78)
You have 1 minutes and 18 seconds to go
> think squish(etimefmt(Connected for $zxd $xzh $zxm $xzs, conn(me)))
Connected for 5h 24m 45s
EVAL()
eval(<object>, <attribute>)
get_eval(<object>/<attribute>)
eval() and get_eval() are similar to ufun(), in that they evaluate the
given <attribute> on <object>. However, they change the enactor (%#) to
the object executing the eval (%!). It does not modify the stack (%0-%9),
so the attribute being evaled sees the same values for them that the
calling code does. Unless you need this behavior, it is better to
use u() instead, which hides the caller's stack.
Example:
> &TEST Foo=%b%b%b-[name(me)] (%n)
> &CMD Foo=$test: @emit ufun(me/test) ; @emit eval(me, test)
> test
-Foo (Mike)
-Foo (Foo)
See also: get(), u(), xget(), edefault()
EVALUATION ORDER
Whenever some text is entered by an object, the MUSH attempts to match it
against a valid game command in the following order of possible commands:
Socket commands (*): QUIT, SCREENWIDTH, etc
Single-token commands: ", :, ;, +, \, #
Exits in the room
&attribute setting
Regular game commands: get, inventory, @emit, etc
@attribute setting
Enter aliases
Leave aliases
User-defined commands on nearby objects. All such $-commands are matched
and executed.
If there are no user-defined commands nearby:
If the zone of the player's location is a zone master room,
Zone master room exits
Zone master room user-defined commands
Else
User-defined commands on the zone of the player's location
(*) Socket commands are only matched when the command is entered by a
player directly from their client.
Continued in 'help evaluation2'.
EVALUATION2
If still nothing is matched:
User-defined commands on the player's personal zone
If nothing, including zone commands, has been matched:
Global exits
Global user-defined commands: all $-commands in the Master Room are
matched. Local commands are always checked first and ALWAYS negate
global commands.
If still nothing has matched, run huh_command to show a Huh? message
Because local $-commands overrule global $-commands, you can easily
prevent a global $-command from working in a specific room by setting
a copy of the global $-command in that room. Alternatively, if a global
$-command is oddly not working in a room, you should check for copies of
the command word in the room (using @scan). Wizards who want to ensure a
global $-command always takes precedence over a local one should use
@command/add and @hook/override, to make the command run as a regular
game command instead of a softcoded global.
See also: @command, @hook, $-commands, huh_command
EVENT
PennMUSH Events are hardcoded events that may or may not be caused by
players. The Event system lets administrators designate an object as
an event handler (using the "event_handler" config option). The
event_handler object will then have attributes triggered, with arguments,
on specified events.
To use the PennMUSH Event System:
> @create Event Handler
> @config/set event_handler=[num(Event Handler)]
> &<event name> Event Handler=<action list>
You will very likely want to set the event_handler option in your mush.cnf
file to ensure it survives over dumps and is actively receiving events
even during startup.
The enactor of an event is either:
1) The executor that caused it, or
2) #-1 for system events without an executor.
For a list of events and their arguments, see 'help event list'.
For some examples of using events, see 'help event examples'.
EVENT DB
db`dbck: Run after the regular database consistency check.
db`purge: Run after the regular purging of destroyed objects.
db`wcheck: Run after the regular @warnings check.
EVENT DUMP
dump`5min (Original message, isforking)
Database save will occur in 5 minutes.
dump`1min (Original message, isforking)
Database save will occur in 1 minute.
dump`complete (Original message, wasforking)
Database save has completed.
dump`error (Error message, wasforking, exit_status)
Database save failed! You might want this to alert any admin on.
exit_status has different meanings in forking and non-forking
dumps.
In forking: exit_status is a string, either "SIGNAL <int>" or
"EXIT <int>". SIGNAL <int> refers to the mush process receiving error
message via signal while EXIT <int> refers to mush process exiting
abnormally.
In nonforking: exit_status is "PERROR <string>" - string being the
error message returned by strerror(errno).
If you are seeing errors on dbsave, we recommend setting forking_dump
to 0, as nonforking dumps have more verbose error messages.
These run in addition to any messages that may be sent. If you want to
replace the messages, config (via @config or the .cnf file) the dump
messages to be empty.
EVENT EXAMPLES
Suppose you want random dbsave messages:
> &DUMP`COMPLETE Event Handler=
@config/set dump_complete=SAVE: [v(randword(lattr(me/dumpmsg`*)))]
> &DUMPMSG`NOTHING Event=The Database has been saved, nothing to see here.
> &DUMPMSG`GRETZKY Event=The Database saves, but Gretzky scores!
> &DUMPMSG`GEICO Event=The Database saved 15% by switching to Geico!
> @dump
SAVE: The Database has been saved, nothing to see here.
> @dump
SAVE: The Database saved 15% by switching to Geico!
Or admin want to be notified when a player connect attempt fails.
> @set Event=wizard
> &SOCKET`LOGINFAIL Event=@wizwall/emit On descriptor '%0' from IP '%1'
a failed connect attempt to '%4': '%3'
(Later, a player attempts to log in as #1)
Broadcast: [Event Handler]: On descriptor 3, from IP '127.0.0.1',
a failed connect attempt to '#1': 'invalid password'
For more examples, see 'help event examples2'.
EVENT EXAMPLES2
Suppose you want @pcreated players to be powered builder, set shared and
zonelocked to roys, but players created at the connect screen to not be.
> @set Event=wizard
> &PLAYER`CREATE Event=@assert %# ;
@pemit %#=Auto-Setting [name(%0)] Builder and shared ;
@power %0=builder ; @lock/zone %0=FLAG^ROYALTY ; @set %0=shared
> @pcreate Grid-BC
Auto-Setting Grid-BC Builder and Shared
And for our last example: Suppose anytime somebody uses 'kill' or 'slay',
you want to teleport them to a jail.
> @dig Kill-jail
> @desc Kill-Jail=You came here because you killed someone!
> @set Event=Wizard
> &object`kill event=@pemit %#=MURDERER! ; @tel %#=<dbref of Kill-Jail>
> kill Mercutio
You killed Mercutio!
MURDERER!
Jail (#123R)
You came here because you killed someone!
The Event Handler object, since it's handling so many events, may become
cluttered with attributes. We recommend using @trigger and @include to
separate events to multiple objects.
EVENT LIST
Event names are of the format <type>`<event>. The 'type' is used simply to
group similar events together for help.
Event syntax in the help is of the form:
<eventgroup>`<eventname> (What is passed as %0, %1, ... %9)
The following event types and events have been added to PennMUSH. To see
the help for them, type 'help event <type>'.
dump: dump`5min, dump`1min, dump`complete, dump`error
db: db`dbck, db`purge, db`warnings
log: log`err, log`cmd, log`conn, log`trace, log`check, log`huh
object: object`create, object`destroy, object`move, object`rename,
object`kill, object`flag
sql: sql`connect, sql`connectfail, sql`disconnect
signal: signal`usr1, signal`usr2
player: player`create, player`connect, player`disconnect
player`inactivity
socket: socket`connect, socket`disconnect, socket`loginfail,
socket`createfail
EVENT LOG
Events in the log tree get triggered whenever the game logs any information
to a log file (Either because of @log, or something else happening.) They
all get passed a single argument, the message being logged.
log`err
Errors and the general catch-all.
log`cmd
Logged commands.
log`wiz
Logged wizard activity.
log`conn
Connection notifications.
log`trace
Memory tracking notifications.
log`check
Save-releated log messages.
log`huh
Commands that generate huh messages.
EVENT OBJECT
object`create (new objid, cloned-from)
Triggered on the creation of any object except player.
If it was created using @clone, then cloned-from will be a objid.
Otherwise cloned-from will be null.
object`destroy (objid, origname, type, owner, parent, zone)
Triggered _after_ the object is destroyed. Passed arguments are former
objid, name, type, owner, etc. Enactor is always #-1, so use former
owner.
object`move (objid, newloc, origloc, issilent, cause)
Triggered after the object is moved, @tel'd, or otherwise sent to a
new location. If issilent is 1, then the object was moved using
@tel/silent.
object`kill (objid of object killed, cost, wasslay)
Triggered when an object has been killed with 'kill' or 'slay' command.
Note that if this is set, it overrides the default behavior of
@halting the object, @teling it home and giving it an amount of
money that was paid to kill them. So if you want to mimic
old behavior, you need:
&OBJECT`KILL event handler=@halt %0 ; @tel %0=home ;
give %0=mul(%1,fdiv(kill_bonus,100));
object`rename (objid, new name, old name)
Triggered when any object is renamed.
object`flag (objid of object with flag, flag name, type, setbool, setstr)
Triggered when a flag or power which has the "event" restriction is
set or cleared. "type" is one of FLAG or POWER. setbool is 1 if the
flag/power is being set, and 0 if it's being cleared. setstr is either
"SET" or "CLEARED".
Example:
&OBJECT`FLAG event handler=@cemit Admin=capstr(lcstr(%2)) %1
[lcstr(%4)] on [name(%0)] by %n.
EVENT PLAYER
player`create (objid, name, how, descriptor)
Triggered when a player is created. If the player was @pcreated, then
%# will be the person who did the @pcreate. If player was created
by using 'create' at the connect screen, then %# will be #-1 and
descriptor will be non-null.
<how> is one of: "pcreate", "create" or "register".
player`connect (objid, number of connections, descriptor)
Similar to @aconnect, but for events, and so you can use descriptor.
player`disconnect (objid, number of remaining connections, hidden?,
cause of disconnection, ip, descriptor, conn() secs,
idle() secs, recv bytes/sent bytes/command count)
Similar to @adisconnect, but for event system, and with more
information available.
player`inactivity: Triggered when idle players are disconnected. Only run
if at least one player gets idlebooted (Or auto-hidden), not at every
inactivity check.
EVENT SIGNAL
No arguments are passed to these events.
signal`usr1: Triggered when the PennMUSH process receives a "kill -USR1"
signal`usr2: Triggered when the PennMUSH process receives a "kill -USR2"
If these attributes exist, then penn will NOT perform what it usually does
when it receives a signal. In effect, these override Penn's default actions.
To mimic old behaviour:
&SIGNAL`USR1 Event Handler=@pemit/list lwho()=GAME: Reboot w/o disconnect
from game account, please wait. ; @shutdown/reboot
&SIGNAL`USR2 Event Handler=@dump
EVENT SOCKET
socket`connect (descriptor, ip)
Triggered when a socket first connects to the port. Using this and
player`connect could be spammy. This happens when a connecting socket
sees the connect screen.
socket`disconnect (former descriptor, former ip, cause of disconnection,
recv bytes/sent bytes/command count)
Triggered when a socket disconnects. Using this and player`disconnect
could be spammy.
socket`loginfail (descriptor, IP, count, reason, playerobjid, name)
Triggered when a connection attempt fails. 'count' is the number of
fails in the past 10 minutes. If used in conjuction with the config
option connect_fail_limit, then any failures after the limit is reached
will NOT trigger socket`loginfail. If the connect is a failed attempt
to log into a valid player, playerobjid will be set to that objid.
Otherwise it will be set to #-1 'name' is the name the connection
attempted to connect with, and is only set with 'playerobjid' is #-1.
socket`createfail (descriptor, ip, count, reason, name)
Triggered when a player create attempt fails. <count> is the # of
fails caused by this ip.
A sitelock rule with deny_silent will not trigger socket`createfail or
socket`createfail.
EVENT SQL
sql`connect (platform)
Triggered on successful connect to the SQL database.
platform is 'mysql', 'psql' or similar.
sql`connectfail (platform, Error message)
Triggered on unsuccessful connect to the SQL database.
sql`disconnect (platform, Error message)
Triggered if SQL disconnects for any reason. Usually not a worry since
Penn will auto-reconnect if it can.
EVENTS
PennMUSH Events are hardcoded events that may or may not be caused by
players. The Event system lets administrators designate an object as
an event handler (using the "event_handler" config option). The
event_handler object will then have attributes triggered, with arguments,
on specified events.
To use the PennMUSH Event System:
> @create Event Handler
> @config/set event_handler=[num(Event Handler)]
> &<event name> Event Handler=<action list>
You will very likely want to set the event_handler option in your mush.cnf
file to ensure it survives over dumps and is actively receiving events
even during startup.
The enactor of an event is either:
1) The executor that caused it, or
2) #-1 for system events without an executor.
For a list of events and their arguments, see 'help event list'.
For some examples of using events, see 'help event examples'.
EXAMINE
examine[/<switches>] <object>[/<attribute>]
Displays all available information about <object>. <object> may be an
object, 'me' or 'here'. You must control the object to examine it. If
you do not own the object, or it is not visible, you will just see the
name of the object's owner. May be abbreviated 'ex <object>'. If the
attribute parameter is given, you will only see that attribute (good
for looking at code). You can also wild-card match on attributes.
The * wildcard matches any number of characters except a backtick (`).
The ? wildcard matches a single character except a backtick (`).
The ** wildcard matches any number of characters, including backticks.
For example. to see all the attributes that began with a 'v' you could do
ex <object>/v**
The /brief switch is equivalent to the 'brief' command.
The /debug switch is wizard-only and shows raw values for certain fields
in an object.
The /mortal switch shows an object as if you were a mortal other than
the object's owner and is primarily useful to admins. This switch
ignores the object's VISUAL flag (but not its attribute flags)
The /parent switch show attributes that would be inherited from the
object's parents, if you have permission to examine the attributes
on the parent.
The /all switch shows the values of VEILED attributes.
The /opaque switch omits contents listings.
See also: ATTRIBUTE TREES, brief, lattr()
EXECUTOR
The executor of a command is the object actually carrying out the command
or running the code. This differs from the enactor, because the enactor is
the object that sets off the command. In some cases, the enactor and the
executor will be the same. The substitution %! evaluates to the dbref of
the executor of the code.
For example:
> @emit %n (%#) is the enactor and %! is the executor!
Cyclonus (#6) is the enactor and #6 is the executor!
> @create Box
Created: Object #10
> &EMIT box=$emit: @emit %n (%#) is the enactor and %! is the executor!
> emit
Cyclonus (#6) is the enactor and #10 is the executor!
In the first case, Cyclonus directly entered the command and was
therefore both the enactor and the executor. In the second, Cyclonus
set off the command on the box, so Cyclonus was still the enactor,
but the box was the object that was actually doing the @emit, and
was thus the executor.
See also: ENACTOR, CALLER, SUBSTITUTIONS
EXIT()
exit(<object>)
Returns the dbref of the first exit in room <object>.
You can get the complete exit list of any room you may examine,
regardless of whether or not exits are dark. You can get the
partial exit list (obeying DARK/LIGHT/etc.) of your current location
or the enactor (%#). You CANNOT get the exit list of anything else,
regardless of whether or not you have objects in it.
See also: lexits(), next()
EXITS
Exits are created with @open. They link rooms together, and can be used by
players and things to move from one room to another with the GOTO command.
Exits cannot move (though they can be @teleported to another room). They
can have multiple aliases in their @alias. They are NOT checked for
$-commands or ^-listens. Exits can have variable destinations; see 'help
@destination' for more information.
You can change the destination of an exit with the @link command. home()
returns the source room of an exit, and loc() returns its destination.
Setting an exit CLOUDY and/or TRANSPARENT causes its destination's
description and/or contents to be shown after the exit's description when
looked at.
Sound is propagated through exits which are set AUDIBLE, as long as their
source room (home) is also set AUDIBLE.
See also: TYPES OF OBJECTS, type(), hastype(), @open, @link, @destination,
AUDIBLE
EXP()
e([<number>])
With no argument, returns the value of "e" (2.71828182845904523536,
rounded to the game's float_precision setting).
If a <number> is given, it returns e to the power of <number>.
exp() is an alias for e().
See also: power(), log()
EXTRACT()
extract(<list>[, <first>[, <length>[, <delimiter>]]])
This function returns <length> elements of <list>, counting from the
<first>th element. If <length> is not specified, the default is 1, so
extract(<list>,3) acts like elements(<list>,3). If <first> is not
specified, the default is the 1, so extract(<list>) acts like
first(<list>).
If <first> is negative, extract() will begin counting backwards from the
end of <list>, so -1 starts at the last element, -2 the element before
last, and so on.
If <length> is negative, extract() will return up to and including the
<length>th element from the right, so -1 will extract up to the last
element, -2 up to the element before last, and so on.
Example:
> think extract(This is a test string,3,2)
a test
> think extract(Skip the first and last elements, 2, -2)
the first and last
> think extract(Get just the last three elements,-3, 3)
last three elements
See also: index(), elements(), grab()
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, or pass through an exit, and you don't pass its Basic @lock, you
will set off their @failure/@ofailure/@afailure attributes. A few failures
have special attributes, while others use <locktype>_LOCK`FAILURE,
<locktype>_LOCK`OFAILURE and <locktype>_LOCK`AFAILURE attributes.
See 'help failure2' for a list of failure verbs and when they're triggered.
See 'help @lock' and 'help locktypes' for more information on lock types.
See also: verbs, @lock, @failure, @efail, @lfail
FAILURE2
The following failures are defined in PennMUSH:
Failure to... Lock Attribute
--------------------------------------------- -------- --------------------
"get" a player/thing, pass through an exit, Basic @failure
or "look" in a room
run an $-command on an object Command* COMMAND_LOCK`FAILURE
use zwho() Zone ZONE_LOCK`FAILURE
leave your current location Leave @lfail
"take" from an object Take TAKE_LOCK`FAILURE
"drop" a thing, or drop something in a room Drop DROP_LOCK`FAILURE
enter an object Enter @efail
"follow" an object Follow FOLLOW_LOCK`FAILURE
"give" an object away Give GIVE_LOCK`FAILURE
"give" money to or "buy" from an object Pay PAY_LOCK`FAILURE
"@chzone" something to a zone Chzone CHZONE_LOCK`FAILURE
"use" an object Use @ufail
speak via say/pose/@*emit/teach in a room Speech SPEECH_LOCK`FAILURE
"page" or "@pemit" to an object Page PAGE_LOCK`FAILURE**
"@mail" a player Mail MAIL_LOCK`FAILURE
* The Use lock can also prevent you from running an $-command, but it will
still trigger COMMAND_LOCK`FAILURE.
** @haven or @away will also be shown on failure to "page", if set
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.
See also: div(), mod()
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.
<delimiter> defaults to a space, and <osep> defaults to <delimiter>.
Thus, "filter(<obj>/<attr>, <list>)" is nearly equivalent to
"iter(<list>, switch(ufun(<obj>/<attr>, %i0),1,%i0,))" though the iter
version may have extra <osep>s.
Example:
> &IS_ODD test=mod(%0,2)
> say filter(test/is_odd, 1 2 3 4 5 6)
You say, "1 3 5"
See also: anonymous attributes, firstof(), allof(), lockfilter()
FILTERBOOL()
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.
<delimiter> defaults to a space, and <osep> defaults to <delimiter>.
Thus, "filter(<obj>/<attr>, <list>)" is nearly equivalent to
"iter(<list>, switch(ufun(<obj>/<attr>, %i0),1,%i0,))" though the iter
version may have extra <osep>s.
Example:
> &IS_ODD test=mod(%0,2)
> say filter(test/is_odd, 1 2 3 4 5 6)
You say, "1 3 5"
See also: anonymous attributes, firstof(), allof(), lockfilter()
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).
See also: locate(), loc()
FIRST()
first(<list>[, <delimiter>])
Returns the first element of a list.
See also: before(), rest(), last(), firstof(), strfirstof()
FIRSTOF()
firstof(<expr>[, ... , <exprN>], <default>)
Returns the first evaluated <expr> that is true. If no <expr> arguments
are true, <default> is returned.
The meaning of true or false is dependent on configuration options
as explained in the 'BOOLEAN VALUES' help topics.
This function evaluates arguments one at a time, stopping as soon as
one is true.
Examples:
> 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, ""
See also: allof(), BOOLEAN VALUES, strfirstof(), filter()
FIXED
Flag: FIXED (players)
When this flag is set on a player, it prevents them or any of their objects
from using the @teleport or home command. The only exception is that a
player's objects are permitted to @teleport themselves to the player's
inventory.
See also: @teleport, home, goto
FLAG LIST
Flag Title Flag Title Flag Title
-----------------------------------------------------------------------
A - Abode/Ansi C - Chown_ok/Color D - Dark
F - Fixed/Floating H - Haven I - Trust
J - Judge/Jump_ok L - Link_ok M - Monitor
N - No_leave/No_tel O - Opaque Q - Quiet
S - Sticky U - Unfindable V - Visual
W - Wizard X - Safe Z - Shared/Z_tel
^ - Listen_parent ~ - Noaccents ? - Unregistered
" - Nospoof a - Audible b - Debug
d - Destroy_ok e - Enter_ok g - Gagged
h - Halt i - Orphan j - Jury_ok
k - Keepalive l - Light m - Mistrust/Myopic
n - No_command o - On-vacation p - Puppet
r - Royalty s - Suspect t - Transparent
u - Uninspected v - Verbose w - No_warn
x - Cloudy/Terse
Chan_usefirstmatch Hear_connect Heavy
Loud No_log Paranoid
Track_money XTERM256
-----------------------------------------------------------------------
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>.
event Trigger the OBJECT`FLAG event when this flag is set or
cleared. Only meaningful in <setperms>. See 'help events'
for more information.
FLAGS
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).
Flags can be set on an object with the @set command or set() function.
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 default flags is available in 'help flag list'.
A complete list of all flags is available through '@flag/list'.
Continued in 'help flags2'.
FLAGS LIST
Flag Title Flag Title Flag Title
-----------------------------------------------------------------------
A - Abode/Ansi C - Chown_ok/Color D - Dark
F - Fixed/Floating H - Haven I - Trust
J - Judge/Jump_ok L - Link_ok M - Monitor
N - No_leave/No_tel O - Opaque Q - Quiet
S - Sticky U - Unfindable V - Visual
W - Wizard X - Safe Z - Shared/Z_tel
^ - Listen_parent ~ - Noaccents ? - Unregistered
" - Nospoof a - Audible b - Debug
d - Destroy_ok e - Enter_ok g - Gagged
h - Halt i - Orphan j - Jury_ok
k - Keepalive l - Light m - Mistrust/Myopic
n - No_command o - On-vacation p - Puppet
r - Royalty s - Suspect t - Transparent
u - Uninspected v - Verbose w - No_warn
x - Cloudy/Terse
Chan_usefirstmatch Hear_connect Heavy
Loud No_log Paranoid
Track_money XTERM256
-----------------------------------------------------------------------
Some flags may not be enabled on some MUSHes. @flag/list will show
which are available.
FLAGS()
flags()
flags(<object>[/<attribute>])
With no arguments, flags() returns a string consisting of the flag letters
for each flag on the MUSH. Note that some flags have no letter, and
mutlple flags may have the same letter (and so will appear multiple times).
If an <object> is given, flags() returns 'P', 'T', 'R' or 'E', depending on
whether <object> is a player, thing, room, or exit, followed by the flag
letter for each flag set on <object>.
With an <object>/<attribute>, the flag letters for each flag set on the
given <attribute> are returned.
Example:
> @create Test
> @set Test=no_command puppet
> think flags(Test)
Tnp
> think flags(me/describe)
$v
See also: lflags(), list()
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 lflags() and flags()s function will return a list of flag names and
abbreviations for an object, respectively.
Note: The object type (player, thing, room, exit or garbage) is not
actually a flag. See 'help types of objects' for more information.
See also: examine, flags(), hasflag(), orflags(), andflags(), orlflags(),
andlflags(), types of objects, type(), hastype(), @flag, FLAG LIST,
@set, set()
FLIP()
flip(<string>)
flip() reverses a string. reverse() is an alias for flip().
Example:
> say flip(foo bar baz)
You say, "zab rab oof"
See also: revwords()
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 is one that can't be
reached from room #0, or (if the exits_connect_rooms @config option is on)
one which has no exits.
If you don't plan to have your main grid accessible from Room #0, it's
better to enable exits_connect_rooms than to set all your rooms FLOATING.
FLOOR()
floor(<number>)
Returns the greatest integral value less than or equal to <number>.
See also: ceil(), bound(), round(), trunc(), floordiv()
FLOORDIV()
div(<number>, <number>)
floordiv(<number>, <number>)
div() returns the integer part of the quotient of the first number
divided by the second number. floordiv() returns the largest integer
less than or equal to the quotient of the first number divided by
the second. For positive numbers, these are the same thing, but for
negative numbers they may be different:
div(13,4) ==> 3 and floordiv(13,4) ==> 3
div(-13,4) ==> -3 but floordiv(-13,4) ==> -4
div(13,-4) ==> -3 but floordiv(13,-4) ==> -4
div(-13,-4) ==> 3 and floordiv(-13,-4) ==> 3
Note that add(mul(div(%0,%1),%1),remainder(%0,%1)) always yields %0,
and add(mul(floordiv(%0,%1),%1),modulo(%0,%1)) also always yields %0.
See also: modulo(), fdiv()
FMOD()
fmod(<number>, <divisor>)
Similar to remainder() but may take floating point arguments. The return
value is <number> - n * <divisor>, where n is the quotient of
<number> / <divisor>, rounded towards zero. The result has the same
sign as <number> and a magnitude less than the magnitude of <divisor>.
Example:
> think fmod(6.1,2.5)
1.1
See also: fdiv(), div(), mod()
FN()
fn(<function name>[, <arg0>[, ... , <argN>]])
fn() executes the built-in/hardcoded function <function name>, even if the
function has been deleted or overridden with @function. It is primarily
useful within @functions that override built-ins in order to be able to
call the built-in.
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.
To prevent deleted functions from being used with fn(), @function/disable
them prior to deleting.
Continued in 'help fn2'.
FN2
The built-in function is run as the object calling fn(), which means that
permissions may be checked for the wrong object. objeval() can be useful
in getting around this problem.
Example:
> &BRIGHT_PEMIT #10=objeval(%@,pemit(%0,-->[ansi(h,%1)]))
@@ Make sure the caller doesn't see debug information for the objeval()'d
@@ code, even if he's set DEBUG.
> @set #10/BRIGHT_PEMIT=no_debug
> @function/delete PEMIT
> @function PEMIT=#10, BRIGHT_PEMIT
> @lock/pemit *Mike=!=*Padraic
(As Padraic)
> think pemit(me,test)
-->test (in highlighted letters)
> think pemit(*Mike,test)
(nothing happens)
See also: @function, RESTRICT, attribute flags
FOLD()
fold([<obj>/]<attr>, <list>[, <base case>[, <delimiter>]])
This function "folds" a list through the user-defined function,
set in the specified <obj>/<attribute>.
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. The result of the last
call of <obj>/<attr> is returned.
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.
Note that it's not possible to pass a <delimiter> to fold without also
giving a <base case>; see the examples for a way around this.
See 'help fold2' for examples.
FOLD2
Examples:
> &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"
> &ADD_NUMS test=add(%0,%1)
> say fold(test/add_nums,1 2 3 4 5)
You say, "15"
If your list uses a delimiter, you need to give a <base case>. This can
be a problem for dynamically generated lists. One solution is to use
a register and pop the first element off the list. For example:
> &GEN_LIST test=lnum(1,rand(5,10),|)
> &ADD_NUMS test=add(%0,%1)
> say letq(fl, u(gen_list),
fold(test/add_nums, rest(%q<fl>,|), first(%q<fl>,|), |))
You say, "36"
See also: anonymous attributes
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
follow <object>
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()
followers(<object>)
Returns the list of things and players following object. You must
control <object>.
See also: following(), follow, unfollow
FOLLOWING()
following(<object>)
Returns the list of things and players that the object is following.
You must control <object>.
See also: followers(), follow, unfollow
FOREACH()
foreach([<object>/]<attribute>, <string>[, <start>[, <end>]])
This function is similar to map(), but instead of calling the given
<object>/<attribute> for each word in a list, it is called for each
character in <string>.
For each character in <string>, <object>/<attribute> is called, with the
character passed as %0, and its position in the string as %1 (the first
character has position 0). The results are concatenated.
If <start> is given, everything before the first occurance of <start> is
copied as-is, without being passed to the <object>/<attribute>. If <end>
is given, everything after the first occurance of <end> is copied as-is.
The <start> and <end> characters themselves are not copied.
See 'help foreach2' for examples.
FOREACH2
Examples:
> &add_one me=add(%0,1)
> say foreach(add_one, 54321)
You say, "65432"
> say [foreach(add_one, This is #0# number, #, #)]
You say, "This is 1 number"
> &upper me=ucstr(%0)
> say foreach(upper, quiet quiet >shout< quiet, >, <)
You say, "quiet quiet SHOUT quiet"
> &is_alphanum me=regmatch(%0, \[\[:alnum:\]\])%b
> say foreach(is_alphanum,jt1o+)
You say, "1 1 1 1 0 "
See also: map(), anonymous attributes
FORWARDLIST
@forwardlist <object>[=<list of dbrefs>]
If <object> is set AUDIBLE, any sound it hears which passes its @filter
and @lock/filter will be forwarded (prefixed with its @prefix) to each
of the dbrefs given in its @forwardlist attribute, in much the same way
as puppets forward sound to their owners.
In order to forward to an object, you must either control it, have the
pemit_all power, or 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)
See also: @filter, @prefix, AUDIBLE, PUPPET, @debugforwardlist, @lock
FRACTION()
fraction(<number>)
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.
Examples:
> think fraction(.75)
3/4
> think fraction(pi())
348987/111086
> think fraction(2)
2
FULLALIAS()
alias(<object>[, <new alias>])
fullalias(<object>)
alias() returns the first of <object>'s aliases. fullalias() returns all
the aliases set for <object>. Note that, while any object can have an alias
set, they are only meaningful for players and exits.
With two arguments, alias() attempts to change the alias for <object> to
<new alias>, as per @alias.
Example:
> ex *Noltar/ALIAS
ALIAS [#7$v]: $;No;Nol;Noli;Nolt
> say alias(*Noltar)
You say, "$"
> say fullalias(*Noltar)
You say, "$;No;Nol;Noli;Nolt"
See also: fullname()
FULLNAME()
fullname(<object>)
fullname() returns the full name of object <object>. It is identical to
name() except that for exits, fullname() returns the complete exit
name, including all aliases.
Example:
> say fullname(south)
You say, "South;sout;sou;so;s"
See also: name(), accname(), iname(), alias(), fullalias()
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 "@list/functions" lists all functions on the game.
The command "@function" lists only the game's custom global functions
defined via the @function command.
FUNCTIONS
Functions are specialized commands used to manipulate strings and
other input. Functions 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.
Examples:
> say first(rest(This is a nice day))
You say, "is"
> @va me=This is a
> @vb me=nice day
> say first(rest(v(va) [v(vb)]))
You say, "is"
See 'help functions2' for more.
FUNCTIONS POWER
The Functions power allows an object to use the @function command to add
or delete functions. Wizards and royalty have this power implicitly.
See also: @function
FUNCTIONS()
functions([<type>])
Returns a space-separated list of the names of functions. If <type>
is "local", only @functions are listed. If "builtin", only builtin
functions. If "all" or omitted, both are returned.
See also: list(), config()
FUNCTIONS2
There are two types of functions, "built-in functions" and "global
user functions", also known as "@functions". You can get a complete
list of functions on this game with "@list/functions".
Built-in functions are written in the game hardcode, while @functions
are written in softcode, and then made global with the "@function"
command. Both are used in exactly the same manner. For more information
on @functions, see 'help @function'.
See also: MUSHCODE
GAGGED
Flag: GAGGED (players)
The Gagged flag prevents a player from speaking, building, moving objects,
and many other things, leaving him able to do little more than move himself
and look. It's normally used as a penalty for those who break MUSH rules.
Only wizards can set this flag.
See also: FIXED
GARBAGE
Garbage objects previously existed as one of the four main types (player,
thing, exit or room) but were destroyed with @destroy/@nuke. They exist
only as placeholders in the database; you can do nothing with them. The
dbrefs of garbage objects will be reused when new objects are created
(but with a different creation time/object id).
The total number of garbage objects, and the next garbage object to be
recycled, is shown in @stats. You can use lsearch(all,type,garbage) to get
a list of all garbage dbrefs.
See also: @destroy, @stats
GENDER
Gender on a MUSH is entirely up to you. You can set yourself (or any
of your objects) to be male, female, neuter, or plural. If whatever
is in the SEX attribute is not recognizable, the MUSH will assume
the object is neuter. Setting a gender attribute will enable pronoun
substitution by the MUSH. The SEX attribute is visual to anyone who
wants to see it.
The obj(), subj(), poss() and aposs() functions return different pronouns
for an object based on its @sex, and the %o, %s, %p and %a substitutions
return the same pronouns for the enactor.
See also: @sex, SUBSTITUTION
GET
get <object>
get <box>'s <object>
The first form of this command lets you pick up <object> from your
current location. The second form allows you to take <object> from
inside <box>'s inventory.
In both cases, you must pass <object>'s Basic @lock, and the
@lock/take of it's location.
To get an object from someone else's inventory, the possessive_get
@config option must be true (and, if <box> is a disconnected player,
so must possessive_get_d). <box> must also be set ENTER_OK.
'take' is usually an alias for the 'get' command.
See also: @lock, ENTER_OK, give, drop, @success, inventory
GET()
get(<object>/<attribute>)
xget(<object>, <attribute>)
These functions return the string stored in an <object>'s <attribute>
attribute, without evaluating it. You must be able to examine the
attribute. get() and xget() are identical, apart from the argument
separator.
Example:
> &test me=This is [a test].
> think get(me/test)
This is [a test].
See also: hasattr(), visible(), ufun(), default(), udefault()
GET_EVAL()
eval(<object>, <attribute>)
get_eval(<object>/<attribute>)
eval() and get_eval() are similar to ufun(), in that they evaluate the
given <attribute> on <object>. However, they change the enactor (%#) to
the object executing the eval (%!). It does not modify the stack (%0-%9),
so the attribute being evaled sees the same values for them that the
calling code does. Unless you need this behavior, it is better to
use u() instead, which hides the caller's stack.
Example:
> &TEST Foo=%b%b%b-[name(me)] (%n)
> &CMD Foo=$test: @emit ufun(me/test) ; @emit eval(me, test)
> test
-Foo (Mike)
-Foo (Foo)
See also: get(), u(), xget(), edefault()
GETPIDS()
getpids(<object>[/<attribute>])
Returns a space-separated list of semaphore queue process ids waiting
on the given <object> and semaphore <attribute>. If <attribute> is
not given, pids for all semaphores on the object are returned.
See also: @ps, @wait, lpids(), pidinfo(), SEMAPHORES
GETTING STARTED
This helpfile is a quick walkthrough of some of PennMUSH's standard
systems. It uses the same syntax as the other helpfiles; if you're
not familiar with the syntax of the PennMUSH helpfiles, please read
'help newbie' first, as it's explained there.
For help with getting around, please see 'help gs moving'.
To talk to people in the room with you, see 'help gs talking'.
For a brief guide to the PennMUSH chat system, see 'help gs chat'.
For information on how to send and read mail using PennMUSH's built-in
mail system, @mail, please type 'help gs mail'.
GIVE
give[/silent] <recipient>=<number>
give[/silent] <number> to <recipient>
give <recipient>=<object>
give <object> to <recipient>
The first two forms of this command give <number> pennies to <recipient>.
If <recipient> is a non-player, it must have an @COST, and any pennies
given to it will go to its owner. The amount given must match <recipient>'s
@cost (if set). If /silent is given, the message informing the recipient
how many pennies were given is suppressed. Wizards may "give" a negative
number of pennies to take from players. When you give <recipient> pennies,
his PAYMENT/OPAYMENT/APAYMENT attributes are triggered. You must pass
<recipient>'s @lock/pay, unless you are a Wizard and are either giving a
negative number of pennies, or giving to a player with no @cost.
The last two forms of this command give an <object> from your inventory to
<recipient>. The recipient must be set ENTER_OK, and you must pass his
@lock/from. You must also pass <object>'s @lock/give, and <object> must
pass <recipient>'s @lock/receive. When you give an object successfully,
your GIVE/OGIVE/AGIVE attributes, <recipient>'s RECEIVE/ORECEIVE/ARECEIVE
attributes, and <object>'s SUCCESS/ASUCCESS/OSUCCESS attributes are all
triggered.
See also: @pay, @cost, @lock, inventory, @receive, @give, buy, @success
GLOBAL COMMANDS
A command is "global" if it can be used anywhere in the world of the
MUSH. The standard/built-in MUSH commands are all global, so this term is
usually used to refer to user-defined commands on objects in the Master
Room of the MUSH. Global commands very greatly from MUSH to MUSH, but you
can usually find MUSH-specific help on them by typing "+help".
See also: MASTER ROOM, USER-DEFINED COMMANDS, EVALUATION ORDER
GLOBALS
A command is "global" if it can be used anywhere in the world of the
MUSH. The standard/built-in MUSH commands are all global, so this term is
usually used to refer to user-defined commands on objects in the Master
Room of the MUSH. Global commands very greatly from MUSH to MUSH, but you
can usually find MUSH-specific help on them by typing "+help".
See also: MASTER ROOM, USER-DEFINED COMMANDS, EVALUATION ORDER
GO
go[to] <direction>
go[to] home
move <direction>
move home
Goes in the specified direction. <Direction> can be the name or
alias of an exit in your area, the enter alias of an object in your
area, or the leave alias of the object you are in. You do not need
to use the word 'go' or 'move', in fact -- simply typing the
direction will have the same effect.
'go home' is a special command that returns you to your home
room/object. Some MUSHes may disable this command.
See also: HOME, @link, @ealias, @lalias, EXITS
GOING
Flag: GOING (all types)
Flag: GOING_TWICE (all types)
These are internal flags set on objects when they are scheduled to be
destroyed with @destroy. It cannot be set or cleared manually; use @destroy
and @undestroy.
See also: @destroy, @undestroy
GOING_TWICE
Flag: GOING (all types)
Flag: GOING_TWICE (all types)
These are internal flags set on objects when they are scheduled to be
destroyed with @destroy. It cannot be set or cleared manually; use @destroy
and @undestroy.
See also: @destroy, @undestroy
GOTO
go[to] <direction>
go[to] home
move <direction>
move home
Goes in the specified direction. <Direction> can be the name or
alias of an exit in your area, the enter alias of an object in your
area, or the leave alias of the object you are in. You do not need
to use the word 'go' or 'move', in fact -- simply typing the
direction will have the same effect.
'go home' is a special command that returns you to your home
room/object. Some MUSHes may disable this command.
See also: HOME, @link, @ealias, @lalias, EXITS
GRAB()
grab(<list>, <pattern>[, <delimiter>])
regrab(<list>, <regexp>[, <delimiter>])
regrabi(<list>, <regexp>[, <delimiter>])
These functions return the first word in <list> which matches the pattern.
For grab(), <pattern> is a wildcard pattern ('help wildcards'). For
regrab() and regrabi(), the pattern is a regular expression. regrabi() is
case-insensitive. <delimiter> defaults to a space.
Basically, this is a much more efficient way to do:
elements(<list>, match(<list>, <pattern>[, <delimiter>])[, <delimiter>])
or the regular expression variation thereof.
See also: graball(), match(), extract(), element(), elements(), regmatch()
GRABALL()
graball(<list>, <pattern>[, <delim>[, <osep>]])
regraball(<list>, <regexp>[, <delim>[, <osep>]])
regraballi(<list>, <regexp>[, <delim>[, <osep>]])
These functions work identically to the grab() and regrab()/regrabi()
functions, except they return all matches, not just the first: They return
all words in the <list> which match <pattern>. If none match, an empty
string is returned. <delim> defaults to a space, and <osep> defaults to
<delim>.
Examples:
> say graball(This is a test of a test,test)
You say "test test"
> say graball(This|is|testing|a|test,tes*,|)
You say "testing|test"
> say regraball(This is testing a test,s$)
You say "This is"
See also: match(), matchall(), grab(), regmatch()
GREP()
grep(<object>, <attrs>, <substring>)
wildgrep(<object>, <attrs>, <pattern>)
regrep(<object>, <attrs>, <regexp>)
grepi(<object>, <attrs>, <substring>)
regrepi(<object>, <attrs>, <regexp>)
wildgrepi(<object>, <attrs>, <pattern>)
These functions return a list of attributes on <object> containing
<substring>, matching the wildcard <pattern>, or matching the
regular expression <regexp>. <attrs> is a wildcard pattern for
attribute names to search.
Parsing _does_ occur before this function is invoked. Therefore,
"special" characters will need to be escaped out.
grep()/wildgrep()/regrep() are case-sensitive.
grepi()/wildgrepi()/regrepi() are case-insensitive.
See also: @grep, lattr(), WILDCARDS
GREPI()
grep(<object>, <attrs>, <substring>)
wildgrep(<object>, <attrs>, <pattern>)
regrep(<object>, <attrs>, <regexp>)
grepi(<object>, <attrs>, <substring>)
regrepi(<object>, <attrs>, <regexp>)
wildgrepi(<object>, <attrs>, <pattern>)
These functions return a list of attributes on <object> containing
<substring>, matching the wildcard <pattern>, or matching the
regular expression <regexp>. <attrs> is a wildcard pattern for
attribute names to search.
Parsing _does_ occur before this function is invoked. Therefore,
"special" characters will need to be escaped out.
grep()/wildgrep()/regrep() are case-sensitive.
grepi()/wildgrepi()/regrepi() are case-insensitive.
See also: @grep, lattr(), WILDCARDS
GS CHANNELS
PennMUSH has a built-in channel system, which allows you to talk with
players who are on the same channels as you, even if you're in different
rooms.
Most games have a number of different channels, either for discussing
different subjects, or for different groups/factions of players to chat on.
To see a list of channels, type '@channel/list'. This shows the names of
all the channels, whether or not you're on the channel, and some other
information (the rest is explained in 'help channel-list').
To join a channel, type '@channel/on <channel>'. To leave it again, use
'@channel/leave <channel>'. If you want to stop hearing a channel for a
while without leaving it totally, use '@channel/gag <channel>'.
Continued in 'help gs chat2'.
GS CHAT
PennMUSH has a built-in channel system, which allows you to talk with
players who are on the same channels as you, even if you're in different
rooms.
Most games have a number of different channels, either for discussing
different subjects, or for different groups/factions of players to chat on.
To see a list of channels, type '@channel/list'. This shows the names of
all the channels, whether or not you're on the channel, and some other
information (the rest is explained in 'help channel-list').
To join a channel, type '@channel/on <channel>'. To leave it again, use
'@channel/leave <channel>'. If you want to stop hearing a channel for a
while without leaving it totally, use '@channel/gag <channel>'.
Continued in 'help gs chat2'.
GS CHAT2
When you've joined a channel, you can chat on it in two ways:
+<channel> <message>
@chat <channel>=<message>
You don't need to type the entire channel name, just enough letters to
make it distinct from other channels. For instance, '+pub Hello'.
When you talk on a channel, everyone who is on the channel will see
the channel name in '<>' angle brackets, then your name and the message.
For example, '+pub Hello' will show everyone
<Public> Skye says, "Hello"
If the <message> starts with a ':' or ';' it will be posed or semiposed,
respectively. For example, '+pub :waves' shows
<Public> Skye waves.
Some games customize the appearance of channels a little (for instance,
adding color or using '[]' square brackets instead of angle brackets),
so it may look a little different.
There's much more you can do with the channel system - see 'help @channel'
for the other commands.
See also: GS TALKING, @channel, @chat
GS MAIL
PennMUSH has a built-in mail system that lets you send messages to players,
even if they aren't online. You can keep mail you receive for as long as
you like, and re-read it any time.
To list all the messages you've received, type '@mail'. You'll see
something like:
------------------------- MAIL (folder 0) ----------------------------
[-----] 0:1 One Welcome! Wed Dec 08 09:57
[-----] 0:2 *Mike Example Mail Sat Dec 11 07:55
-------------------------------------------------------------------------
The number after the ':' is the message number; to read that message, type
'@mail <number>'.
Continued in 'help gs mail2'.
GS MAIL2
To send mail to someone, type:
@mail <recipients>=[<subject>/]<message>
You can send a message to more than one person at a time, just include the
names of all the people you want to send to in <recipients>. The <subject>
is optional. For example:
@mail qa'toq anne=Test/Hi! This is a test message!
You can do other, slightly more complex things with the mail system, too,
like filing your messages into different folders. See 'help @mail' for
more information.
See also: @mail
GS MOVING
To see the room you're in, type 'look'. You'll probably see something
similar to this (though some MUSHes customize the appearance of rooms):
Example Room
This is an example room. It has a rather boring description.
Contents:
Bob
Sports car
Obvious exits:
Next Room and Out
The first line is the name of the room you're in, followed by the room's
description, a list of other people (and objects) in the room, and finally
a list of exits to other rooms.
To move through one of the exits, you can simply type its name (Out), or
you can use the "goto" command (goto Out).
Continued in 'help gs moving2'.
GS MOVING2
All players on a MUSH have a "home", which is usually the room you started
in. You can go back to your home by just typing 'home', or 'goto home'.
Some MUSHes may also allow you to change your home to somewhere else; you
can do that by typing '@link me=here' when you're in the room.
There may be some objects on the game that you can go inside (wagons or
cars, for instance). You can do that by typing 'enter <object>', and can
leave again by typing 'leave'. For instance, 'enter sports car'.
It's also sometimes possible to teleport from one room to another, using
the '@teleport' command. However, most new players on a game probably won't
be able to do that - it's mentioned here only for completeness.
See also: goto, home, enter, leave, @teleport, @link
GS TALKING
You can talk to others in the room with you (those listed in the 'Contents'
of the room) in a number of ways. The easiest is to use the 'say' command.
For example, when you type:
say Hello!
you'll see:
You say, "Hello!"
and everyone else in the room will see:
Lisa says, "Hello!"
You can abbreviate the command to just:
"Hello!
if you wish; it works exactly the same.
Continued in 'help gs talking2'.
GS TALKING2
You can also perform actions, using the 'pose' command, or ':' for short.
For example:
pose waves! or
:waves!
will both show:
Lisa waves!
to everyone in the room (including yourself). If you don't want a space
after your name, use 'semipose' (or ';') instead:
;'s waving!
will show:
Lisa's waving!
If you don't want your name to be added at all, you can use the '@emit'
command, or '\' for short:
@emit Smiling, Lisa waves, "Hello!"
will show everyone in the room:
Smiling, Lisa waves, "Hello!"
However, make sure you include your name somewhere, so people know who's
talking.
See also: GS CHAT, say, pose, semipose, @emit
GT()
gt(<number>, <number>[, ... , <numberN>])
Takes two or more numbers, and returns 1 if and only if each number
is greater than the number after it, and 0 otherwise.
See also: gte(), lt(), lte(), eq(), neq()
GTE()
gte(<number>, <number>[, ... , <numberN>])
Takes two or more numbers, and returns 1 if and only if each number
is greater than or equal to the number after it, and 0 otherwise.
See also: gt(), lt(), lte(), eq(), neq()
GUEST POWER
Objects set Guest are very limited: they cannot control anything in the
database (including themselves), which prevents them from setting flags or
attributes, etc (though, for backwards compatability, they can still
examine themselves). They cannot join channels, or create objects. MUSHes
often restrict other commands so that guests cannot use them.
It's also possible to connect to a Guest player without using a password,
allowing them to be used by newcomers to visit a game without making a
character.
Guests also have (and receive) a different amount of pennies to normal
players (determined by the max_guest_pennies and guest_paycheck @config
options). They receive a different message when they connect (set via
the guest_file config option). The way Guest connections work can be
controlled via the max_guests @config option, and Guest logins can be
disabled entirely with the guests @config option.
HALT
Flag: HALT (all types)
Objects set HALT cannot perform any MUSH actions, queue commands, evaluate
softcode, etc. Players set HALT can still enter commands directly from
their clients.
See also: @halt, @restart
HALT POWER
The Halt power allows an object to @restart any object, @halt any object
or pid, and to use @halt/all and @restart/all. Wizards have the power
implicitly.
See also: @halt, @restart, @wait, QUEUE POWER, SEE_QUEUE POWER
HASATTR()
hasattr(<object>, <attribute>)
hasattrp(<object>, <attribute>)
hasattrval(<object>, <attribute>)
hasattrpval(<object>, <attribute>)
The hasattr*() functions check to see if <object> has a given attribute.
They return #-1 if the object does not exist or the attribute can't
be examined by the player. Otherwise, they return 1 if the attribute
is present and 0 if it is not.
hasattr() checks to see if <attribute> exists on <object> only.
hasattrp() also checks for <attribute> on <object>'s parent/ancestor.
hasattrval() only returns 1 if <attribute> exists and is non-empty.
hasattrpval() is like hasattrval() but also checks parents.
All four functions will also work with one argument in the form of
<object>/<attribute>.
See also: visible()
HASATTRP()
hasattr(<object>, <attribute>)
hasattrp(<object>, <attribute>)
hasattrval(<object>, <attribute>)
hasattrpval(<object>, <attribute>)
The hasattr*() functions check to see if <object> has a given attribute.
They return #-1 if the object does not exist or the attribute can't
be examined by the player. Otherwise, they return 1 if the attribute
is present and 0 if it is not.
hasattr() checks to see if <attribute> exists on <object> only.
hasattrp() also checks for <attribute> on <object>'s parent/ancestor.
hasattrval() only returns 1 if <attribute> exists and is non-empty.
hasattrpval() is like hasattrval() but also checks parents.
All four functions will also work with one argument in the form of
<object>/<attribute>.
See also: visible()
HASATTRPVAL()
hasattr(<object>, <attribute>)
hasattrp(<object>, <attribute>)
hasattrval(<object>, <attribute>)
hasattrpval(<object>, <attribute>)
The hasattr*() functions check to see if <object> has a given attribute.
They return #-1 if the object does not exist or the attribute can't
be examined by the player. Otherwise, they return 1 if the attribute
is present and 0 if it is not.
hasattr() checks to see if <attribute> exists on <object> only.
hasattrp() also checks for <attribute> on <object>'s parent/ancestor.
hasattrval() only returns 1 if <attribute> exists and is non-empty.
hasattrpval() is like hasattrval() but also checks parents.
All four functions will also work with one argument in the form of
<object>/<attribute>.
See also: visible()
HASATTRVAL()
hasattr(<object>, <attribute>)
hasattrp(<object>, <attribute>)
hasattrval(<object>, <attribute>)
hasattrpval(<object>, <attribute>)
The hasattr*() functions check to see if <object> has a given attribute.
They return #-1 if the object does not exist or the attribute can't
be examined by the player. Otherwise, they return 1 if the attribute
is present and 0 if it is not.
hasattr() checks to see if <attribute> exists on <object> only.
hasattrp() also checks for <attribute> on <object>'s parent/ancestor.
hasattrval() only returns 1 if <attribute> exists and is non-empty.
hasattrpval() is like hasattrval() but also checks parents.
All four functions will also work with one argument in the form of
<object>/<attribute>.
See also: visible()
HASFLAG()
hasflag(<object>[/<attrib>], <flag>)
With no <attrib>, hasflag() returns 1 if <object> has the <flag> flag
set. If <attrib> is specified, the attribute is checked for the <flag>
attribute flag instead. If the flag is not present, 0 is returned.
hasflag() will accept a full flag name ("Wizard") or a flag letter ("W").
You can check the flags of any object, whether you control them or not.
Example:
> think hasflag(me, wizard)
1
See also: orlflags(), andlflags(), orflags(), andflags(), flags(), lflags(),
attribute flags, @flag, haspower(), hastype()
HASH
digest(list)
digest(<algorithm>, <string>)
Returns a checksum (hash, digest, etc.) of <string> using the given
<algorithm>. The result is a unique large number represented in base
16.
Typically at least the following algorithms are supported:
md4 md5 ripemd160 sha sha1 sha224 sha256 sha384 sha512 whirlpool
Depending on the host's OpenSSL version and how it was configured,
there might be more (or less) available. digest(list) returns the
methods a particular server understands if the OpenSSL library
version being used is recent enough (1.0.0 and higher), or '#-1
LISTING NOT SUPPORTED' on older versions. For portable code, stick
with MD5 and the SHA family.
digest(sha, whatever) is equivalent to sha0(whatever).
Example:
> think iter(digest(list), %i0(foo) => [digest(%i0, foo)], %b, %r)
...
MD4(foo) => 0ac6700c491d70fb8650940b1ca1e4b2
MD5(foo) => acbd18db4cc2f85cedef654fccc4a4d8
MDC2(foo) => 5da2a8f36bf237c84fddf81b67bd0afc
RIPEMD160(foo) => 42cfa211018ea492fdee45ac637b7972a0ad6873
SHA(foo) => 752678a483e77799a3651face01d064f9ca86779
SHA1(foo) => 0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33
SHA224(foo) => 0808f64e60d58979fcb676c96ec938270dea42445aeefcd3a4e6f8db
...
HASPOWER()
haspower(<object>, <power>)
Returns 1 if <object> has the named power, and 0 if it does not.
You can check the powers of any object, whether you control it or not.
See also: @power, powers list, hasflag()
HASTYPE()
hastype(<object>, <type list>)
Returns 1 if <object> belongs to one of the types given in <type list>,
and 0 otherwise. Valid types are PLAYER, THING, ROOM, EXIT and GARBAGE.
Example:
> @create Test Object
> think hastype(test object, PLAYER EXIT)
0
> think hastype(test object, PLAYER THING)
1
See also: TYPES, type()
HAVEN
Flag: HAVEN (players, rooms)
If a player is set HAVEN, she cannot be paged and anyone paging them
will be sent a brief notification. You can also set a longer @HAVEN
message if you wish. You may prefer to use @lock/page to block out
only specific individuals.
If a room is set HAVEN, the 'kill' command cannot be used in that room.
See also: @haven, kill
HEAR_CONNECT
Flag: HEAR_CONNECT (players)
Players with this flag will receive a message whenever a player connects,
disconnects, or is created. Mortals will not hear messages for players
connecting/disconnecting dark. Only royalty and wizards can set this flag.
See also: @aconnect, @adisconnect
HEAVY
Flag: HEAVY (all types)
The HEAVY flag, which can only be set by wizards or royalty, prevents a
mortal from @teleporting an object.
See also: @teleport
HEIGHT()
width(<player|descriptor>[, <default>])
height(<player|descriptor>[, <default>])
These two functions return the screen width and height for a
connected player. If the player's client is capable of doing so, it
will let the mush know what the correct sizes are on connection and
when the client is resized.
The defaults are 78 for width, and 24 for height, the normal minimal
values. These can be overridden when calling the function by
providing the default to the function. Players can change the value
that will be returned when the functions are called on them with the
special SCREENWIDTH and SCREENHEIGHT commands, both of which take a
number as their sole argument, and set the appropriate field.
When used on something that's not a visible player, the functions
return the default values.
The intent of these functions is allow softcode that does formatting
to be able to produce a display that can make full use of any given
screen size.
HELP
This is the index to the MUSH online help files.
For an explanation of the help system, type: help newbie
For a walkthrough of PennMUSH systems, type: help getting started
For the list of MUSH commands, type: help commands
For the list of MUSH topics, type: help topics
For an alphabetical list of all help entries: help entries
For a list of entries that match a pattern: help <wildcard>
For information about PennMUSH: help code
For a list of flags: help flag list
For a list of functions: help function list
For a list of attributes: help attribute list
To see the configuration of this MUSH: @config
On many MUSHes, list local commands with: +help
If there are any errors in the help text, please notify a wizard in
the game, or file a report at
bug-tracking site for PennMUSH (and its distributed help files) but
probably has no relation to this MUSH in particular.
HERE
The word 'here' refers to the room you are in. For example, to rename the
room you're in (if you control it), you could use:
> @name here=<new name>
See also: MATCHING
HIDDEN()
hidden(<player|descriptor>)
If you can see hidden players, this function returns 1 if <player> (or the
player connected to <descriptor>) is hidden, and 0 otherwise. If you cannot
see hidden players, hidden() returns #-1.
See also: @hide
HIDE POWER
The Hide power allows players to use the @hide command, as well as the
'ch' command at the login screen. Players who have both this power and
the Idle power will be set Hidden automatically when their connection
reaches the idle time limit.
Wizards have this power implicitly.
See also: @hide, hidden(), ch, IDLE POWER
HOME
Every thing or player has a home, which is usually the room where it was
created. You can reset your home or the home of any object you own with
the @link command: @link [me | <object>]=<location>. You must
also control <location>, unless that location (room or thing) is set
ABODE or LINK_OK.
When a player types 'home', she is sent back to the home room. When a
thing with the STICKY flag set on it is dropped, it also goes to its
home location. Note that if the FIXED flag is set on a player, she cannot
use the 'home' command.
You can create an exit that sends players home by doing:
@link <exit name>=home
You can set the drop-to in a room to home by doing:
@link <room dbref or "here">=home
The home of an exit is its source (the room it's located in). You can
change the home/source of an exit by @teleporting it to another room.
The home of a room is its drop-to.
See also: DROP-TOS, @link, STICKY, LINK_OK, FIXED, EXITS, home(), loc()
HOME()
home(<object>)
Returns the object's 'home', where it is @link'd to. This is the home for a
player or thing, the drop-to of a room, or source of an exit.
See also: @link
HOMES
Every thing or player has a home, which is usually the room where it was
created. You can reset your home or the home of any object you own with
the @link command: @link [me | <object>]=<location>. You must
also control <location>, unless that location (room or thing) is set
ABODE or LINK_OK.
When a player types 'home', she is sent back to the home room. When a
thing with the STICKY flag set on it is dropped, it also goes to its
home location. Note that if the FIXED flag is set on a player, she cannot
use the 'home' command.
You can create an exit that sends players home by doing:
@link <exit name>=home
You can set the drop-to in a room to home by doing:
@link <room dbref or "here">=home
The home of an exit is its source (the room it's located in). You can
change the home/source of an exit by @teleporting it to another room.
The home of a room is its drop-to.
See also: DROP-TOS, @link, STICKY, LINK_OK, FIXED, EXITS, home(), loc()
HOOK POWER
Objects with the Hook @power can use the @hook command to hook built-in
commands. Intended for startup objects which don't need to be wizard.
Wizards have this power implicitly.
See also: @hook, @command
HOST()
host(<player|descriptor>)
Returns the hostname a player is connected from, as shown on the wizard
WHO. This may be more reliable that get(<player>/lastsite) if the player
has multple connections from different locations, and the function is
called with a descriptor argument.
The caller can use the function on himself, but using on any other
player requires privileged power such as Wizard, Royalty or SEE_ALL.
hostname() is an alias for host().
See also: Connection Functions, ipaddr(), ports(), lports()
HOSTNAME()
host(<player|descriptor>)
Returns the hostname a player is connected from, as shown on the wizard
WHO. This may be more reliable that get(<player>/lastsite) if the player
has multple connections from different locations, and the function is
called with a descriptor argument.
The caller can use the function on himself, but using on any other
player requires privileged power such as Wizard, Royalty or SEE_ALL.
hostname() is an alias for host().
See also: Connection Functions, ipaddr(), ports(), lports()
HTML
The only HTML implementation supported by the MUSH is the one
supported by Pueblo (See 'Pueblo'). To utilize HTML, use
one of the MUSH HTML Functions. (See 'HTML Functions').
HTML tags are stripped when sent to non-HTML capable players.
See also: 'HTML Functions'.
HTML FUNCTIONS
HTML Functions are used to output HTML tags to HTML capable
users. These tags will be stripped by the system for anything
non-HTML related. These functions will not be available if
the server is compiled without Pueblo support (check @config).
html()
tag()
endtag()
tagwrap()
Examples:
Each of these produces the HTML output:
Mortals are restricted in the tags they may use. Most standard HTML
tags are ok; protocol-specific tags like SEND and XCH_CMD can only be
sent by Wizards. In addition, the html() function is Wizard-only.
HTML()
Function: html(<string>)
This wizard-only function will output string as a HTML Tag.
Example:
html(b)
Will output (in HTML):
<b>
Non-wizards should see the tag(), endtag(), and tagwrap() functions.
HUH_COMMAND
This internal command is run whenever someone attempts to run a command
which doesn't match any built-in or softcoded commands. The huh_command
command cannot be run directly, but it can be @hook'd to perform custom
actions when an invalid command is entered.
Examples:
> &cmd.huh #0=$huh_command: @pemit/sil %#=Whu?
> @hook/override huh_command=#0, cmd.huh
> dsfsdf
Whu?
> &cmd.huh #0=$huh_command *: @pemit/sil %#=Whu? What is '%0'?
> sdfsdf ert
Whu? What is 'sdfsdf ert'?
> &cmd.huh #0=$huh_command *: &typos %#=add(default(%#/typos,0),1) ;
@pemit/sil %#=Huh? %b(Type "help" for help.) ;
@break mod(get(%#/typos),10) ;
@wall %n wins %p [ordinal(div(get(%#/typos),10))] typo trophy!
> asfdsf (10 times)
Huh? (Type "help" for help.) (10 times)
Announcement: Room Zero shouts, "Dunce wins his first typo trophy!"
See also: @hook, EVALUATION ORDER, warn_on_missing, unimplemented_command
I18N
Internationalization support in PennMUSH includes:
* Support for (8-bit) locale-based character sets, including
translation of iso-8859-1 accented characters to html entities for
Pueblo, the accent() and stripaccents() functions, and the NOACCENTS
flag.
* Support for locale-based date/time formats
* Support for locale-based message sets for translations of server
messages. There are active translation teams (and you can join!)
and several languages have practically complete translation files
available from the PennMUSH ftp site.
* Some support for locale-based string collation
* The ability to alias command and function names, so you can generate
a set of translated commands/functions.
Most of these features get enabled by setting an appropriate environment
variable in the PennMUSH restart script.
Unicode is not currently supported.
IBREAK()
ibreak([<level>])
The ibreak() function stops an iter() from running at the end of the
current loop. When used in nested iter()s, you can give a <level> to
specify how many iter()s to break from. iter() will stop evaluating at the
end of the current loop, and NOT immediately after ibreak() is called.
Examples:
> say iter(1 2 3 4 5,switch(%i0,3,ibreak())Test %i0!)
You say, "Test 1! Test 2! Test 3!"
> say iter(1 2 3 4 5,switch(%i0,3,ibreak(),Test %i0!))
You say, "Test 1! Test 2! "
> say iter(a b c, iter(1 2 3, switch(%i0%i1, 2c, ibreak(2), #$)))
You say, "1a 2a 3a 1b 2b 3b 1c "
See also: iter(), itext(), inum(), ilev()
IDLE
IDLE [<string>]
This command does nothing. It does not reset a connection's
idle time. It is useful for people who are connecting from behind
a NAT gateway with a short fixed timeout; if you're in this situation,
have your client send the IDLE command every minute or so, and the
NAT connection won't time out (but you won't appear, to other players,
to be active).
Some routers will only consider a connection alive if text is received,
as well as sent. If you give a <string> with the IDLE command, that same
<string> will be sent back to you for this purpose.
See also: KEEPALIVE, @idle
IDLE POWER
The Idle power stops a player from being disconnected when he has been idle
for the idle_timeout. Instead, you will be hidden (if you also have the
Hide power), or will simply remain connected. Wizards and Royalty have the
power implicitly.
See also: HIDE POWER
IDLE()
idle(<player|descriptor>)
This function returns the number of seconds a player has been idle,
much as WHO does. <player name> must be the full name of a player,
or a player's dbref. You can also specify a <descriptor>, useful if a
player is connected multiple times, or for connections which are still at
the login screen. Players who are not connected have an idle time of "-1",
as do dark wizards, when idle() is used on them by a non-priv'ed player.
idlesecs() is an alias for idle().
See also: Connection Functions, conn()
IDLESECS()
idle(<player|descriptor>)
This function returns the number of seconds a player has been idle,
much as WHO does. <player name> must be the full name of a player,
or a player's dbref. You can also specify a <descriptor>, useful if a
player is connected multiple times, or for connections which are still at
the login screen. Players who are not connected have an idle time of "-1",
as do dark wizards, when idle() is used on them by a non-priv'ed player.
idlesecs() is an alias for idle().
See also: Connection Functions, conn()
IF()
if(<condition>, <true expression>[, <false expression>])
ifelse(<condition>, <true expression>, <false expression>)
These functions evaluate the <condition> and return <true expression> if
the <condition> is true, or <false expression> (if provided) if the
<condition> is false. Only the returned <expression> is evaluated.
See also: BOOLEAN VALUES, switch(), @break
IFELSE()
if(<condition>, <true expression>[, <false expression>])
ifelse(<condition>, <true expression>, <false expression>)
These functions evaluate the <condition> and return <true expression> if
the <condition> is true, or <false expression> (if provided) if the
<condition> is false. Only the returned <expression> is evaluated.
See also: BOOLEAN VALUES, switch(), @break
ILEV()
ilev()
itext(<n>)
%i<n>
inum(<n>)
These functions return the equivilent of ## (itext) or #@ (inum) for iter()
and @dolist, where an <n>=0 returns to the current iter or @dolist, <n>=1
refers to the iter()/@dolist which the current iter() or @dolist is nested
in, etc. An <n> of "L" can be used to refer to the outermost iter()/@dolist.
%i<n> is an alias for itext(<n>), where <n> can be from 0 to 9 (or "L").
ilev() returns the current nesting depth, or -1 when used outside an iter()
or @dolist. Thus, itext(ilev()) will return the outermost ##, equivilent to
%iL.
See 'help itext2' for examples.
See also: iter(), ibreak(), @dolist
INAME()
iname(<object>)
iname() returns the name of <object>, as it would appear if you were inside
it. It is identical to name() except that if the object has a NAMEFORMAT or
NAMEACCENT attribute, it is used.
You must be see_all, control <object>, or be inside it to use this
function.
See also: @nameformat, @nameaccent, name(), fullname(), accname()
INC()
inc(<integer>)
inc(<string-ending-in-integer>)
Inc returns the integer plus 1. If given a string that ends in an
integer, it increments only the final integer portion. That is:
Examples:
> think inc(3)
4
> think inc(hi3)
hi4
> think inc(1.3.3)
1.3.4
Note especially the last example, which will trip you up if you use
floating point numbers with inc() and expect it to work like add().
If the null_eq_zero @config option is on, using inc() on a string which
does not end in an integer will return <string>1. When null_eq_zero is
turned off, it will return an error.
See also: dec(), add(), sub()
INDEX
index
A file similar to news, often indexing the news and events files.
May not be available on some MUSHes.
INDEX()
index(<list>, <character>, <first>, <length>)
This function is similar to extract(), except that it requires four
arguments, while extract() uses defaults for its arguments if they
aren't given. The function returns <length> items starting from the
<first> position. Trailing spaces are trimmed.
Examples:
> say index(Cup of Tea | Mug of Beer | Glass of Wine, |, 2, 1)
You say, "Mug of Beer"
> say index(%rtoy boat^%rblue tribble^%rcute doll^%rred ball,^,2,2)
You say, "
blue tribble^
cute doll"
See also: extract(), elements(), grab()
INFO
INFO
This command returns some information about the MUSH you are on,
such as its version number, time of last restart, number of players
currently connected, and size of database. It can be issued from the
connect screen.
See also: MSSP-REQUEST
INFORMATION FUNCTIONS
Information functions return values related to objects or the game.
accname() alias() andflags() andlflags() andlpowers()
config() controls() csecs() ctime() elock()
findable() flags() fullalias() fullname() getpids()
hasattr() hasattrp() hasflag() haspower() hastype()
iname() lflags() lock() lockflags() lockowner()
locks() lpids() lstats() money() msecs()
mtime() mudname() mudurl() name() nattr()
nearby() objid() objmem() orflags() orlflags()
orlpowers() pidinfo() playermem() poll() powers()
quota() restarts() type() version() visible()
See also: Dbref functions
INHERIT
Flag: TRUST (all types)
Setting an object TRUST prevents anything else from controlling it, aside
from WIZARDs, the object's owner, or another object owned by the same
player which is also set TRUST. It also allows the object to control its
owner.
See also: MISTRUST, CONTROL
INSERT()
insert(<list>, <position>, <new item>[, <delim>])
If <position> is a positive integer, this inserts <new item> BEFORE
the item at <position> from the left in <list>. That means that
<new item> then becomes the <position>th element of <list>.
If <position> is a negative integer, this inserts <new item> AFTER
the item at the absolute value of <position> from the RIGHT in
<list>. This is the same as reversing the list before inserting <new item>,
and then reversing it again into correct order. For example, when
<position> is -1, <new item> will be the last in the list; when
<position> is -2, <new item> will be the second item from the right,
and so on.
If a <delim> is not given, a space is assumed. Null items are counted
when determining position, as in 'items()'.
Examples:
> say insert(This is a string,4,test)
You say, "This is a test string"
> say insert(one|three|four,2,two,|)
You say, "one|two|three|four"
> say insert(meep bleep gleep,-3,GOOP)
You say, "meep GOOP bleep gleep"
See also: replace(), ldelete(), strinsert()
INTERIORS
Here's a quick description of how to make things that can be
entered:
@create Car
@desc Car=A shiny red car.
@idesc car=You are sitting inside a luxurious sportscar.
@set Car=enter_ok
@oxleave car=climbs out of the car. { The 'ox' messages are shown to
@oxenter car=climbs into the car. { those OUTSIDE the object.
@oenter car=joins you inside the car. { The 'o' messages are shown to
@oleave car=gets out of the car. { those INSIDE the object
@enter car=You get into the car. { The plain messages are shown to
@leave car=You get out of the car. { the one entering or leaving
Continued in 'help interiors2'.
INTERIORS2
Now, if you want people inside to be able to hear and communicate
with the outside, you also need to do the following.
@set car=audible (lets people outside hear what's being said in the car.
@listen car=* (lets people inside hear what's being said outside.
@prefix car=From inside the car,
@inprefix car=From outside,
@filter car=* has arrived.,* has left.,joins you inside the car.,
gets out of the car.
@infilter car=* has arrived.,* has left.,* climbs out of the car.,
* climbs into the car.
(The filters will keep people on the outside from seeing the 'o'
messages and people on the inside from seeing the 'ox' messages
which is a good thing.)
See also: enter, leave, @prefix, @filter, AUDIBLE, @listen
INTERNATIONALIZATION
Internationalization support in PennMUSH includes:
* Support for (8-bit) locale-based character sets, including
translation of iso-8859-1 accented characters to html entities for
Pueblo, the accent() and stripaccents() functions, and the NOACCENTS
flag.
* Support for locale-based date/time formats
* Support for locale-based message sets for translations of server
messages. There are active translation teams (and you can join!)
and several languages have practically complete translation files
available from the PennMUSH ftp site.
* Some support for locale-based string collation
* The ability to alias command and function names, so you can generate
a set of translated commands/functions.
Most of these features get enabled by setting an appropriate environment
variable in the PennMUSH restart script.
Unicode is not currently supported.
INUM()
ilev()
itext(<n>)
%i<n>
inum(<n>)
These functions return the equivilent of ## (itext) or #@ (inum) for iter()
and @dolist, where an <n>=0 returns to the current iter or @dolist, <n>=1
refers to the iter()/@dolist which the current iter() or @dolist is nested
in, etc. An <n> of "L" can be used to refer to the outermost iter()/@dolist.
%i<n> is an alias for itext(<n>), where <n> can be from 0 to 9 (or "L").
ilev() returns the current nesting depth, or -1 when used outside an iter()
or @dolist. Thus, itext(ilev()) will return the outermost ##, equivilent to
%iL.
See 'help itext2' for examples.
See also: iter(), ibreak(), @dolist
INVENTORY
inventory
Lists what you are carrying. Can be abbreviated by just 'i', or
'inv'. It also tells you how much MUSH money you have. If you are
not set OPAQUE, others will also be able to see what is in your
inventory by looking at you.
Note that on some MUSHes it is possible to take things that are in
someone else's inventory. To be safe, @lock any objects that you do
not want to lose.
See also: score, take, drop, OPAQUE, @lock, @invformat
IPADDR()
ipaddr(<player|descriptor>)
Returns the IP address of the connected player or descriptor. This
may be more reliable that get(<player>/lastip) if the player has
multple connections from different locations, and the function is
called with a descriptor argument.
The caller can use the function on himself, but using on any other
player requires privileged power such as Wizard, Royalty or SEE_ALL.
See also: Connection Functions, hostname(), ports(), lports()
ISDAYLIGHT()
isdaylight()
Returns 1 if it's daylight savings time in the MUSH time zone,
otherwise 0.
ISDBREF()
isdbref(<string>)
isobjid(<string>)
isobjid() returns 1 if <string> is the object id of an existing object.
If <string> is not a full objid, or is the objid of a garbage object,
it returns 0.
isdbref() functions the same, but will also return 1 if <string> is the
dbref of an existing (or garbage) object.
Examples:
> @stats
100 objects = 20 rooms, 20 exits, 20 things, 20 players, 20 garbage.
The next object to be created will be #33.
> think isdbref(#33)
1
> think isobjid(#33:1234567890)
0
> think csecs(#1)
1324654503
> think isdbref(#1)
1
> think isobjid(#)
0
> think isdbref(#1:1324654503)
1
> think isobjid(#1:1324654503)
1
> think isobjid(#1:9876543210)
0
See also: DBREFS, OBJECT IDS, num(), objid()
ISINT()
isint(<string>)
Returns 1 if its argument is an integer, and 0 otherwise. Integers
can begin with a '+' or '-' sign, but the rest of the string must be
digits.
See also: isnum()
ISNUM()
isnum(<string>)
This function returns 1 if <string> is a number, and 0 if it is not.
Numbers can begin with a '-' sign (for negatives), but the rest of
the characters in the string must be digits, and an optional decimal
point.
See also: isint()
ISOBJID()
isdbref(<string>)
isobjid(<string>)
isobjid() returns 1 if <string> is the object id of an existing object.
If <string> is not a full objid, or is the objid of a garbage object,
it returns 0.
isdbref() functions the same, but will also return 1 if <string> is the
dbref of an existing (or garbage) object.
Examples:
> @stats
100 objects = 20 rooms, 20 exits, 20 things, 20 players, 20 garbage.
The next object to be created will be #33.
> think isdbref(#33)
1
> think isobjid(#33:1234567890)
0
> think csecs(#1)
1324654503
> think isdbref(#1)
1
> think isobjid(#)
0
> think isdbref(#1:1324654503)
1
> think isobjid(#1:1324654503)
1
> think isobjid(#1:9876543210)
0
See also: DBREFS, OBJECT IDS, num(), objid()
ISREGEXP()
isregexp(<string>)
This function returns 1 if <string> is a valid regular expression,
and 0 if it is not.
See also: REGEXP
ISWORD()
isword(<string>)
This function returns 1 if every character in <string> is a letter,
or 0, if any character isn't a letter. Case does not matter.
ITEMIZE()
itemize(<list>[, <delim>[, <conjunction>[, <punctuation>]]])
elist(<list>[, <conjunction>[, <delim>[, <osep>[, <punctuation>]]]])
These functions take the elements of <list> (separated by <delim> or
a space by default), and:
If there's just one, return it.
If there's two, return <e1> <conjunction> <e2>
If there's more than two, return <e1><punc> <e2><punc> ... <conj> <en>
elist() uses <osep> after <punc>/<conj> instead of a space.
The default <conjunction> is "and", default punctuation is ",".
Examples:
> say itemize(eggs) * [itemize(eggs bacon)]
You say, "eggs * eggs and bacon"
> say itemize(eggs bacon spam)
You say, "eggs, bacon, and spam"
> say itemize(eggs bacon spam, ,&,;)
You say, "eggs; bacon; & spam"
ITEMS()
items(<list>, <delim>)
items() counts the number of items in a list using an arbitrary <delim>.
Null items are counted, so:
items(X|X,|) => 2 (2 X items)
items(X||X,|) => 3 (2 X items and 1 null item)
items(X X,%b) => 2 (2 X items)
items(X%b%bX,%b) => 3 (2 X items and 1 null item)
items(,|) => 1 (a single null item)
Another way to think about this is that items() counts the number
of times <delim> appears in <list>, and adds 1.
See also: words()
ITER()
iter(<list>, <pattern>[, <delimiter>[, <output separator>]])
For each word in <list>, iter() evaluates <pattern> once, and returns a
list of the results of those evaluations. Words in <list> are separated
by <delimiter>, if given, and spaces if not. Words in the resulting list
are separated by the given <ouput separator>, or a space if no output
separator is given.
Prior to each evaluation, every occurrence of the string "##" in <pattern>
is replaced with the current word from <list>. However, because this
replacement occurs before evaluation, it cannot be used well in nested
iter()s, and should not be used on user input or untrusted <list>s, as the
word will be evaluated. Instead, you can use the %iX substitution, or the
itext() function. The substitution '%iL' refers to the outermost iter
of the current expression, and is intended to replace ##.
The string "#@" will be replaced with the position of the current word
in <list>. Like "##", the replacement occurs before substitution. Use
the inum() function for nested iter()s.
If you nest iter()s, ## and #@ refer to the first/outermost iter(). The
ilev() function can be used to get the current iter() nesting level.
See 'help iter2' for examples.
See also: itext(), inum(), ilev(), ibreak(), map(), @dolist
ITER2
Examples:
> say iter(This is a test string., strlen(%i0))
You say, "4 2 1 4 7"
> say iter(lnum(5), mul(add(%i0,#@),2))
You say, "2 6 10 14 18"
> say iter(lexits(here), name(%i0) (owned by [name(owner(%i0))]))
You say, "South (owned by Claudia) North (owned by Roy)"
> &STRLEN_FN me=strlen(%0)
> say iter(This is a test string., u(STRLEN_FN, %i0))
You say, "4 2 1 4 7"
This example could be replaced by the use of map() like so:
> say map(strlen_fun, This is a test string.)
> say iter(lnum(3), %i0, ,%r)
You say, "0
1
2"
parse() is an alias for iter().
ITEXT()
ilev()
itext(<n>)
%i<n>
inum(<n>)
These functions return the equivilent of ## (itext) or #@ (inum) for iter()
and @dolist, where an <n>=0 returns to the current iter or @dolist, <n>=1
refers to the iter()/@dolist which the current iter() or @dolist is nested
in, etc. An <n> of "L" can be used to refer to the outermost iter()/@dolist.
%i<n> is an alias for itext(<n>), where <n> can be from 0 to 9 (or "L").
ilev() returns the current nesting depth, or -1 when used outside an iter()
or @dolist. Thus, itext(ilev()) will return the outermost ##, equivilent to
%iL.
See 'help itext2' for examples.
See also: iter(), ibreak(), @dolist
ITEXT2
Examples:
> say iter(red blue green, iter(fish shoe, #@:##))
You say, "1:red 1:red 2:blue 2:blue 3:green 3:green"
> say iter(red blue green, iter(fish shoe, inum(ilev()):[itext(1)]))
You say, "1:red 1:red 2:blue 2:blue 3:green 3:green"
> say iter(red blue green,iter(fish shoe, inum(0):[itext(0)]))
You say, "1:fish 2:shoe 1:fish 2:shoe 1:fish 2:shoe"
> say iter(red blue green,iter(fish shoe, %i1:%i0))
You say, "red:fish red:shoe blue:fish blue:shoe green:fish green:shoe"
> @dolist red blue green=say iter(fish shoe, %i1:%i0)
You say, "red:fish red:shoe"
You say, "blue:fish blue:shoe"
You say, "green:fish green:shoe"
See also: iter(), @dolist
JUDGE
Flags: JUDGE and JURY_OK (players)
These flags do nothing by default, but are present in new dbs for
historical reasons. They can be used in softcode as desired, or removed
with @flag if unneeded.
See also: @flag
JUMP_OK
Flag: JUMP_OK (rooms)
When a room is set JUMP_OK, anyone who passes the room's @lock/teleport
can @teleport into it.
See also: @teleport, @lock, NO_TEL, Z_TEL
JURY_OK
Flags: JUDGE and JURY_OK (players)
These flags do nothing by default, but are present in new dbs for
historical reasons. They can be used in softcode as desired, or removed
with @flag if unneeded.
See also: @flag
KEEPALIVE
Flag: KEEPALIVE (players)
When this flag is set on a player with a telnet-capable connection, a
telnet NOP (no-operation) is sent after there's been no activity on the
connection for a minute, to generate socket activity without generating
any output. In a way, it's the opposite of the IDLE command. IDLE is
sent by clients to keep a connection open, while KEEPALIVE tells the
server to send a message. Both are intended for use by people going
through home router/NAT appliances with short inactivity timeouts.
See also: IDLE, terminfo()
KILL
kill <player/thing> [=<cost>]
Attempts to kill the specified object. Killing costs <cost> pennies,
which gives you a <cost>% chance of killing the player. Thus,
spending 100 pennies always works (except against wizards, who can
never be killed). If you don't specify a cost, the default is 10
(i.e. 10%). The player, if killed, receives <cost>/2 pennies in
insurance.
You can not kill a player in a room that they control unless you
also control the room.
Only wizards can kill players in rooms which have been set HAVEN.
This command may be disabled in this MUSH.
See also: BEING KILLED, HAVEN, FLAGS, powers list
LALIGN()
align(<widths>, <col>[, ... , <colN>[, <filler>[, <colsep>[, <rowsep>]]]])
lalign(<widths>, <colList>[, <delim>[, <filler>[, <colsep>[, <rowsep>]]]])
Creates columns of text, each column designated by <col> arguments.
Each <col> is individually wrapped inside its own column, allowing
for easy creation of book pages, newsletters, or the like. In lalign(),
<colList> is a <delim>-separated list of the columns.
<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. You can alter the behavior of a column in multiple ways.
(Check 'help align2' for more details)
<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'
LAMBDA
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.
If the #lambda just calls another function, the form
#apply[<number of arguments>]/<function name>
can be used instead. If the argument count is left out, it defaults
to 1.
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.
LAMBDA2
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"
The following version uses #apply instead:
> say map(#apply/name, #3 #12 #23)
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([decompose(before(%0, /))], \%0), lattr(%0))
The first time '#lambda/hasattrval([decompose(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 decompose() where neccessary.
See 'HELP ANONYMOUS3' for more examples.
LAMBDA3
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.
Finally, a multiple argument example of #apply, which requires less
escaping than #lambda for cases where you're just calling another
function:
> think mix(#apply2/ansi, r g b, foo bar baz)
See 'HELP ANONYMOUS4' for a list of functions that support anonymous
attributes.
LAMBDA4
The following functions support anonymous attributes:
filter() filterbool() fold() foreach() map() mapsql()
mix() munge() namelist() sortby() sortkey() step()
LAST
LAST and LASTLOGOUT
These attributes show the last times you connected and disconnected
from the MUSH.
LAST & LASTLOGOUT
LAST and LASTLOGOUT
These attributes show the last times you connected and disconnected
from the MUSH.
LAST()
last(<list>[, <delimiter>])
Returns the last element of a list. Elements in <list> are separated by
<delimiter>, if given, or by a space if not.
See also: first(), rest(), before(), after()
LASTIP
LASTSITE and LASTIP
The LASTSITE attribute gives the name of the site you last connected
from. The LASTIP attribute gives the IP address you last connected
from. Mortals cannot set them.
LASTLOGOUT
LAST and LASTLOGOUT
These attributes show the last times you connected and disconnected
from the MUSH.
LASTSITE
LASTSITE and LASTIP
The LASTSITE attribute gives the name of the site you last connected
from. The LASTIP attribute gives the IP address you last connected
from. Mortals cannot set them.
LATTR()
lattr(<object>[/<attribute pattern>][, <output separator>])
lattrp(<object>[/<attribute pattern>][, <output separator>])
reglattr(<object>[/<regexp>][, <output separator>])
reglattrp(<object>[/<regexp>][, <output separator>])
lattr() returns a list of all the attributes on <object> which you can see,
and which match the wildcard <attribute pattern>. If no <attribute pattern>
is given, it defaults to "*". Note that this does not include branches in
attribute trees; you must use the "**" wildcard to include those.
The resulting list will be separated by <output separator>, or a space if
no separator is given.
reglattr() returns attributes whose names match the regexp <regexp>. The
match is not case-sensitive (as attribute names are always upper-case),
and the "`" branch separator has no special meaning in the pattern.
lattrp() and reglattrp() also include attributes inherited from parents.
When returning large numbers of attributes, the results may be truncated
due to buffer limits. In these cases, you can use nattr() and xattr() to
retrieve the results in smaller pieces.
See also: nattr(), xattr(), hasattr(), examine, grep(), wildcards
LATTRP()
lattr(<object>[/<attribute pattern>][, <output separator>])
lattrp(<object>[/<attribute pattern>][, <output separator>])
reglattr(<object>[/<regexp>][, <output separator>])
reglattrp(<object>[/<regexp>][, <output separator>])
lattr() returns a list of all the attributes on <object> which you can see,
and which match the wildcard <attribute pattern>. If no <attribute pattern>
is given, it defaults to "*". Note that this does not include branches in
attribute trees; you must use the "**" wildcard to include those.
The resulting list will be separated by <output separator>, or a space if
no separator is given.
reglattr() returns attributes whose names match the regexp <regexp>. The
match is not case-sensitive (as attribute names are always upper-case),
and the "`" branch separator has no special meaning in the pattern.
lattrp() and reglattrp() also include attributes inherited from parents.
When returning large numbers of attributes, the results may be truncated
due to buffer limits. In these cases, you can use nattr() and xattr() to
retrieve the results in smaller pieces.
See also: nattr(), xattr(), hasattr(), examine, grep(), wildcards
LCON()
lcon(<object>[, <type>])
Returns a list of the dbrefs of objects which are located in <object>.
You can get the complete contents of any object you may examine,
regardless of whether or not objects are dark. You can get the
partial contents (obeying DARK/LIGHT/etc.) of your current location
or the enactor (%#). You CANNOT get the contents of anything else,
regardless of whether or not you have objects in it.
When used on exits, this function returns #-1.
For compatability with other codebases, a <type> can be given to limit
the results. Valid <type>s are:
player - equivilent to lplayers(<object>)
connect - equivilent to lvplayers(<object>)
thing (or object) - equivilent to lthings(<object>)
listen - return only listening objects
puppet - return only THINGs set PUPPET
See also: lexits(), lplayers(), lthings(), con(), next(), lvcon()
LCSTR()
lcstr(<string>)
Returns <string> with all letters converted to lowercase.
Example:
> say lcstr(Foo BAR bAz)
You say, "foo bar baz"
See also: capstr(), ucstr()
LDELETE()
ldelete(<list>, <position(s)>[, <delimiter>[, <osep>]])
This function deletes the element(s) of <list> at the given <position(s)>.
Elements of <list> are separated by <delimiter>, which defaults to a space.
Null items are counted, as in 'items()'. Elements of <position(s)> must be
numeric, and are always separated by a space, not by <delimiter>. Elements
of the returned list are separated by <osep>, which defaults to the
<delimiter>.
If a <position> is negative, ldelete() counts backwards from the end of the
list; a position of -1 deletes the last element, -2 the element before last,
and so on.
All position calculations are performed on the original list. That is,
ldelete(a b c, -1 -1) will return "a b", not "a", and ldelete(a b c, -1 -2)
returns "a", not "b".
Examples:
> say ldelete(This is a long test string,4)
You say, "This is a test string"
> say ldelete(lemon|orange|pear|apple,2 3,|)
You say, "lemon|apple"
> say ldelete(foo bar baz boing,3,,%b~%b)
You say, "foo ~ bar ~ boing"
See also: delete(), remove(), insert()
LEAVE
leave
The command leave allows you to exit an object you have enter'ed
into. When you leave an object, its @leave/@oleave/@oxleave messages
are triggered, and its @aleave actions are triggered.
The NO_LEAVE flag may be enabled on some MUSHes. Objects set with
this flag cannot be left. @lock/leave may also be enabled on some
MUSHes, which allows you to set who can leave the object. If you
fail to leave, the object's @lfail/@olfail/@alfail messages/actions
will be triggered.
See also: enter, @leave, @lfail, @lalias, @lock, INTERIORS
LEFT()
left(<string>, <length>)
Returns the first <length> characters from <string>.
See also: right(), mid(), ljust()
LEMIT()
lemit(<message>)
nslemit(<message>)
lemit() emits a message in the caller's outermost room, as per @lemit.
nslemit() like @nslemit.
See also: @lemit, remit()
LETQ()
letq([<reg1>, <value1>[, ... , <regN>, <valueN>], <expr>)
letq() saves the current values of the given q-<reg>isters, sets them to
new <value>s, evaluates <expr> and then restores the saved registers. It
does not restore registers that are not listed. None of the values can see
the updated contents of the registers -- they are only visible to <expr>.
It returns the result of <expr>.
Example:
> think setr(A, 1):[letq(A, 2, %qA)]:%qA
1:2:1
See also: setq(), setr(), unsetq(), listq(), localize(), ulocal(), r()
LEXITS()
lexits(<room>)
Returns a list of the dbrefs of exits in a room.
You can get the complete exit list of any room you may examine,
regardless of whether or not exits are dark. You can get the
partial exit list (obeying DARK/LIGHT/etc.) of your current location
or the enactor (%#). You CANNOT get the exit list of anything else,
regardless of whether or not you have objects in it.
See also: lcon(), exit(), next(), lvexits()
LFLAGS()
lflags()
lflags(<object>[/<attribute>])
With an argument, lflags() returns a space-separated list consisting of the
names of all the flags attached to <object>, or <object>'s <attribute>.
Given no arguments, this function returns a space-separated list of
all flag names known to the server, as per @list/flags.
Example:
> @create Test
> @set Test=no_command puppet
> think flags(Test)
NO_COMMAND PUPPET
> think flags(me/describe)
NO_COMMAND VISUAL
See also: flags(), list()
LICENSE
Copyright, License, and Credits for PennMUSH 1.x. Revised March 2006.
I. Copyrights
PennMUSH 1.x
Copyright (c) 1995-2006, T. Alexander Popiel <talek@pennmush.org>
and Shawn Wagner <raevnos@pennmush.org>.
Some code used in this server may have been derived from the
TinyMUSH 2.2 source code, with permission. TinyMUSH 2.2 is
Copyright (c) 1994-2002, Jean Marie Diaz, Lydia Leong, and Devin Hooker.
Some code used in this server may have been derived from TinyMUSH 2.0.
Copyright (c) 1995, Joseph Traub, Glenn Crocker.
Some code used in this server may have been derived from TinyMUD.
Copyright (c) 1995, David Applegate, James Aspnes, Timothy Freeman
and Bennet Yee.
*------------------------------------------------------------------------*
II. License
Because PennMUSH includes parts of multiple works, you must comply
with all of the relevant licenses of those works. The portions derived
from TinyMUD/TinyMUSH 2.0 are licensed under the following terms:
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that: (1) source code distributions
retain the above copyright notice and this paragraph in its entirety, and
(2) distributions including binary code include the above copyright
notice and this paragraph in its entirety in the documentation or other
materials provided with the distribution. The names of the copyright
holders may not be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
The portions derived from TinyMUSH 2.2 are used under the Artistic
License. The Artistic License is also the license under which you
are granted permission to copy and modify PennMUSH:
The Artistic License
Preamble
The intent of this document is to state the conditions under which a
Package may be copied, such that the Copyright Holder maintains some
semblance of artistic control over the development of the package,
while giving the users of the package the right to use and distribute
the Package in a more-or-less customary fashion, plus the right to make
reasonable modifications.
Definitions:
"Package" refers to the collection of files distributed by the Copyright
Holder, and derivatives of that collection of files created through
textual modification.
"Standard Version" refers to such a Package if it has not been modified,
or has been modified in accordance with the wishes of the Copyright
Holder.
"Copyright Holder" is whoever is named in the copyright or copyrights
for the package.
"You" is you, if you're thinking about copying or distributing this Package.
"Reasonable copying fee" is whatever you can justify on the basis of media
cost, duplication charges, time of people involved, and so on. (You will
not be required to justify it to the Copyright Holder, but only to the
computing community at large as a market that must bear the fee.)
"Freely Available" means that no fee is charged for the item itself,
though there may be fees involved in handling the item. It also means
that recipients of the item may redistribute it under the same conditions
they received it.
1. You may make and give away verbatim copies of the source form of the
Standard Version of this Package without restriction, provided that
you duplicate all of the original copyright notices and associated
disclaimers.
2. You may apply bug fixes, portability fixes and other modifications
derived from the Public Domain or from the Copyright Holder. A Package
modified in such a way shall still be considered the Standard Version.
3. You may otherwise modify your copy of this Package in any way, provided
that you insert a prominent notice in each changed file stating how and
when you changed that file, and provided that you do at least ONE of
the following:
a) place your modifications in the Public Domain or otherwise make them
Freely Available, such as by posting said modifications to Usenet or an
equivalent medium, or placing the modifications on a major archive site
such as ftp.uu.net, or by allowing the Copyright Holder to include your
modifications in the Standard Version of the Package.
b) use the modified Package only within your corporation or organization.
c) rename any non-standard executables so the names do not conflict with
standard executables, which must also be provided, and provide a separate
manual page for each non-standard executable that clearly documents how
it differs from the Standard Version.
d) make other distribution arrangements with the Copyright Holder.
4. You may distribute the programs of this Package in object code or
executable form, provided that you do at least ONE of the following:
a) distribute a Standard Version of the executables and library files,
together with instructions (in the manual page or equivalent) on where
to get the Standard Version.
b) accompany the distribution with the machine-readable source of the
Package with your modifications.
c) accompany any non-standard executables with their corresponding
Standard Version executables, giving the non-standard executables
non-standard names, and clearly documenting the differences in manual
pages (or equivalent), together with instructions on where to get the
Standard Version.
d) make other distribution arrangements with the Copyright Holder.
5. You may charge a reasonable copying fee for any distribution of
this Package. You may charge any fee you choose for support of this
Package. You may not charge a fee for this Package itself. However, you
may distribute this Package in aggregate with other (possibly commercial)
programs as part of a larger (possibly commercial) software distribution
provided that you do not advertise this Package as a product of your own.
6. The scripts and library files supplied as input to or produced as
output from the programs of this Package do not automatically fall under
the copyright of this Package, but belong to whomever generated them,
and may be sold commercially, and may be aggregated with this Package.
7. C or perl subroutines supplied by you and linked into this Package
shall not be considered part of this Package.
8. The name of the Copyright Holder may not be used to endorse or
promote products derived from this software without specific prior
written permission.
9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
The End
LIGHT
Flag: LIGHT (all types)
Things, players, and exits which have the LIGHT flag set on them (and are
not also set DARK) appear in the contents of DARK rooms.
Setting a room LIGHT causes everything - even DARK objects - to show up
in the room's contents list.
See also: DARK
LINK()
link(<object>, <destination>[, <preserve>])
This function links <object> to <destination>. While normally used on
exits, it has all of the other capabilities of @link as well. It returns
nothing. If the optional third argument is true, acts like @link/preserve.
See also: @link, open()
LINK_ANYWHERE POWER
The Link_Anywhere power allows an object to link exits to any location.
Can be useful for variable exits. Wizards and Royalty have the power
implicitly.
See also: LINK_OK, OPEN_ANYWHERE POWER, @link
LINK_OK
Flag: LINK_OK (rooms, things)
If a room or object is LINK_OK, anyone who passes the room's @lock/link
can link exits to it (but still not from it). Also, LINK_OK overrides the
TRUST protection against @trigger (although not @force or @set).
Anyone who passes a LINK_OK object's @lock/parent can @parent an object
to it.
See also: @link, TRUST, @parent, PARENTS, OPEN_OK
LINKING
You can link to a room if you control it, or if it is set LINK_OK or
ABODE. Being able to link means you can set the homes of objects or
yourself to that room if it is set ABODE, and can set the
destination of exits to that room if it is LINK_OK.
See also: LINK_OK, ABODE, @link
LIST FUNCTIONS
List functions take at least one list of elements and return
transformed lists or one or more members of those lists. Most of
these functions can take an arbitrary <delimiter> argument to
specify what delimits list elements; if none is provided, a space is
used by default.
element() elements() extract() filter() filterbool()
first() fold() grab() graball() index()
insert() itemize() items() iter() last()
ldelete() lockfilter() map() match() matchall()
member() mix() munge() namegrab() namegraball()
randword() remove() replace() rest() revwords()
setdiff() setinter() setunion() shuffle() sort()
sortby() sortkey() splice() step() table()
unique() wordpos() words()
See also: LISTS
LIST()
list(<option>[, <type>])
This is the function-equivilent of the @list command, and lists some useful
information about the MUSH. <option> can be one of:
motd : Returns the current @motd
wizmotd : Returns the current @motd/wizard. Wiz/Roy only.
downmotd : Returns the current @motd/down. Wiz/Roy only.
fullmotd : Returns the current @motd/full. Wiz/Roy only.
functions : Returns a list of all built-in functions and @functions.
commands : Returns a list of all built-in commands and @commands.
attribs : Returns all standard attributes.
locks : Returns the built-in lock types. Similar to llocks().
flags : Returns all flags. Similar to lflags().
powers : Returns all @powers.
"commands"/"functions" return both built-in and local commands/functions by
default. You can specify a <type> of either "builtin", "local" or "all" to
limit this if you wish.
See also: @list, flags(), lflags(), config(), functions(), @listmotd, @motd,
llocks()
LISTEN_PARENT
Flag: LISTEN_PARENT (players, things, rooms)
When set on an object which also has the MONITOR flag set, this flag
causes ^-listen patterns to be checked on the object's parents as well
as on the object.
See also: MONITOR, LISTENING
LISTENING
There are two basic ways to trigger action on the MUSH. The basic
way is to type in commands such as 'look' or '@emit'. These commands
are not seen or heard by other players, although the results of the
commands may be.
The other way is to "listen" for something said/emitted in your
hearing. There are two ways to listen for something in a room. The
easiest way is to use a combination of @listen and
@ahear/@aahear/@amhear.
For example:
> @listen Welcome Mat=* has arrived.
> @ahear Welcome Mat="Welcome, %N!
Breaker has arrived.
Welcome Mat says, "Welcome, Breaker!"
Continued in 'help listening2'.
LISTENING2
If you need an object to "listen" for more than one pattern, you can
also use ^-patterns. These work similar to user-defined commands,
using ^ instead of $. An object must be set MONITOR to have
^-patterns activated.
Syntax: &<attribute> <object> = ^<pattern>:<action list>
For example:
> @set Welcome Mat = MONITOR
> &greet Welcome Mat = ^* has arrived.:"Welcome, %N!
> &goodbye Welcome Mat = ^* has left.:POSE says as %N leaves, "Bye!"
Grimlock has arrived.
Welcome Mat says, "Welcome, Grimlock!"
Grimlock has left.
Welcome Mat says as Grimlock leaves, "Bye!"
Such attributes can also be @triggered as if the ^<pattern>: did not
exist.
Continued in 'help listening3'.
LISTENING3
By default, ^-patterns work like @ahear. To have them work like
@amhear, set the AMHEAR attribute flag on the attribute; to have
them work like @aahear, set the AAHEAR attribute flag on the
attribute (Note that the triggering object is whatever happens to be
%#, so, for example, when you @set an object MONITOR, you are %#
with regard to the "Object is now listening" message, and this
message can be picked up with an ^-pattern.)
Additionally, unlike $-commands, ^-patterns are NOT inherited via
@parent, unless the LISTEN_PARENT flag is set on the listener.
@listen is never inherited.
Listen patterns are checked after the object's normal @listen
attribute.
See also: @listen, @ahear, @amhear, @aahear, MONITOR, LISTEN_PARENT,
USER-DEFINED COMMANDS
LISTQ()
listq([<pattern>])
unsetq([<pattern1> [<pattern2> [...]]])
listq() returns a space-separated list of set q-registers with values
available in the current q-register scope. If <pattern> is provided, then
only those that match the wildcard pattern <pattern> will be returned.
unsetq() without arguments clears all registers. Otherwise, unsetq()
treats its argument as a list of register name patterns, and will
unset all those registers within the local scope.
If unsetq() is inside of a letq(), and does not have an argument,
it will clear the registers that letq() has protected. unsetq()
with arguments clears the specified registers.
unsetq(<arg>) will clear all registers returned by listq(<arg>).
Example:
> think setq(name,Walker,num,#6061,loc,Bahamas)[listq()]
LOC NAME NUM
> think setq(name,Walker,num,#6061,loc,Bahamas)[listq(n*)]
NAME NUM
> think setq(name,Walker,num,#6061,loc,Bahamas)[unsetq(name)][listq()]
LOC NUM
> think setq(name,Walker,num,#6061,loc,Bahamas)[unsetq(n*)][listq()]
LOC
See also: setq(), letq(), r(), localize(), registers()
LISTS
The word "list" is used in the help files to refer to a string that
is a series of smaller strings separated by one or more spaces. A
list can also have its elements separated by some other kind of
character -- the separating character is called the "delimiter".
For example, the following are all lists:
#6 #10 #14 #12
Rumble|Krystal|Bobatron|Rodimus Prime ('|' is the delimiter here)
foo bar whee blarg
-eek- .boing. yawp #5 7
Lots of MUSHCode depends on lists and manipulating them. Normally, a
list is made up of similar items (so the fourth list in the example
is NOT a typical one).
See also: STRINGS, List Functions
LIT()
lit(<string>)
This function returns <string> literally - without even squishing spaces,
and without evaluating *anything*. This can be useful for writing ASCII
maps with spaces or whatever.
It can be a bit tricky to get a literal string with spaces into an
attrib, however, since spaces are usually squished in setting an
attribute. This example illustrates how to make it work:
> @va me=$test: think {[lit(near far)]}
Set.
> ex me/va
VA [#1]: $test: think {[lit(near far)]}
> test
near far
Leaving out the {}'s will not work in the above.
See also: decompose()
LJUST()
ljust(<string>, <length>[, <fill>])
This function pads a string with trailing characters ("left-justifies")
so it is <length> long. If <string> is longer than <length>, the <string>
is returned; it is not truncated. If <fill> is not specified, a space is
used. <fill> can be more than one character in length.
Examples:
> say ljust(foo,6)
You say, "foo "
> say %r0[ljust(foo,6,-)]7%r01234567
You say, "
0foo---7
01234567"
> say ljust(foo,12,=+)
You say, "foo=+=+=+=+="
See also: align(), center(), rjust(), left()
LLOCKFLAGS()
llockflags(<object>[/<locktype>])
llockflags()
If an <object> is given, llockflags() returns a space-separated list of
the lock flags on <object>'s <locktype> lock, or Basic lock if no
locktype is given. You must be able to examine the lock.
Given no arguments, this function returns a space-separated list of
all the names of all lock flags known to the server.
See also: lockflags(), lset(), lock(), llocks(), lockowner()
LLOCKS()
llocks([<object>])
locks(<object>)
llocks() and locks() both list @locks set on <object>, including
user-defined locks (prefixed with USER:)
If no object is given, llocks() returns all the predefined lock
types available.
Example:
> @lock me==me
> @lock/use me==me
> @lock/user:itsme me==me
> th llocks(me)
Basic USER:ITSME Use
See also: lock(), lset(), lockflags(), llockflags(), lockowner()
LMATH()
lmath(<op>, <list>[, <delim>])
This function performs generic math operations on <list>, returning
the result. Each element of the list is treated as one argument to
an operation, so that lmath(<op>, 1 2 3) is equivalent to <op>(1, 2,
3). Using @function, one can easily write ladd, lsub, etc as per
TinyMUSH.
Supported <op>'s are:
add and band bor bxor dist2d dist3d div eq fdiv gt gte lt lte max mean
median min modulo mul nand neq nor or remainder stddev sub xor
Examples:
> think lmath(add, 1|2|3, |)
6
> think lmath(max, 1 2 3)
3
> &FUN_FACTORIAL me=lmath(mul,lnum(1,%0))
> think u(fun_factorial,5)
120
LN()
ln(<number>)
Returns the natural log of <number>. This is equivilent to
log(<number>, e).
See also: log()
LNUM()
lnum(<number>)
lnum(<start number>, <end number>[, <output separator>[, <step>]])
With one argument, lnum returns a list of numbers, from 0 to <number
- 1>. For example, lnum(4) returns the list "0 1 2 3". This is
useful for creating loops.
With two arguments, the numbers range from the first to the second
argument. For example, lnum(1,4) => 1 2 3 4
With three arguments, the output is separated by the separator given
in the third argument. lnum(1,4,|) => 1|2|3|4
A fourth argument dictates the step. By default, the step is 1.
lnum(1,10,%b,2) -> 1 3 5 7 9
lnum(0,10,%b,2) -> 0 2 4 6 8 10
LOC()
loc(<object>)
For things and players, loc() returns the dbref of the object which
contains <object>. For rooms, it returns the drop-to, if one is set, or
#-1 otherwise. For exits, it returns the destination (the source is
an exits home()). This will be #-1 for unlinked exits, #-2 for variable
exits, and #-3 for exits @linked to "home".
You must be able to examine <object>, or be near it, for this function
to work. A special case exists when <object> is a player: As long as
<object> is not set UNFINDABLE, and you are allowed to use the @whereis
command, you can get <object>'s location.
You can also get the location of the enactor using the %L substitution,
whether you are near to/can examine it or not.
See also: locate(), rloc(), home(), where(), rnum(), room(), @link,
UNFINDABLE, @whereis
LOCALE
Internationalization support in PennMUSH includes:
* Support for (8-bit) locale-based character sets, including
translation of iso-8859-1 accented characters to html entities for
Pueblo, the accent() and stripaccents() functions, and the NOACCENTS
flag.
* Support for locale-based date/time formats
* Support for locale-based message sets for translations of server
messages. There are active translation teams (and you can join!)
and several languages have practically complete translation files
available from the PennMUSH ftp site.
* Some support for locale-based string collation
* The ability to alias command and function names, so you can generate
a set of translated commands/functions.
Most of these features get enabled by setting an appropriate environment
variable in the PennMUSH restart script.
Unicode is not currently supported.
LOCALIZE()
localize(<code>)
localize() saves the q-registers, evaluates its argument, and restores
the registers afterwards. It has the same effect as ulocal(), but doesn't
require setting the code into an attribute.
Example:
> say setr(0, Outside)-[setr(0, Inside)]-%q0
You say, "Outside-Inside-Inside"
> &INSIDE me=setr(0,Inside)
> say setr(0, Outside)-[ulocal(INSIDE)]-%q0
You say, "Outside-Inside-Outside"
> say setr(0, Outside)-[localize(setr(0, Inside))]-%q0
You say, "Outside-Inside-Outside"
See also: letq(), setq(), setr(), r(), ulocal(), uldefault()
LOCATE()
locate(<looker>, <name>, <parameters>)
This function attemps to find an object called <name>, relative to the
object <looker>. It's similar to the num() function, but you can be more
specific about which type of object to find, and where to look for it.
When attempting to match objects near to <looker> (anything but absolute,
player name or "me" matches), you must control <looker>, have the See_All
power or be nearby.
<parameters> is a string of characters which control the type of the object
to find, and where (relative to <looker>) to look for it.
You can control the preferred types of the match with:
N - No type (this is the default)
E - Exits
L - Prefer an object whose Basic @lock <looker> passes
P - Players
R - Rooms
T - Things
F - Return #-1 if what's found is of a different type than the
preferred one.
X - Never return #-2. Use the last dbref found if the match is
ambiguous.
If type(s) are given, locate() will attempt to find an object with one of
the given types first. If none are found, it will attempt to find any type
of object, unless 'F' is specified, in which case it will return #-1.
Continued in 'help locate2'.
LOCATE2
You can control where to look with:
a - Absolute match (match <name> against any dbref)
c - Exits in the room <looker>
e - Exits in <looker>'s location
h - If <name> is "here", return <looker>'s location
i - Match <name> against the names of objects in <looker>'s inventory
l - Match <name> against the name of <looker>'s location
m - If <name> is "me", return <looker>'s dbref
n - Match <name> against the names of objects in <looker>'s location
p - If <name> begins with a *, match the rest against player names
y - Match <name> against player names whether it begins with a * or not
z - English-style matching (my 2nd book) of <name> (see 'help matching')
* - All of the above (try a complete match). Default when no match
parameters are given.
x - Only match objects with the exact name <name>, no partial matches
Just string all the parameters together. Spaces are ignored, so you can
use spaces between paramaters for clarity if you wish.
See 'help locate3' for examples.
LOCATE3
Examples:
Find the dbref of the player whose name matches %0, or %#'s dbref if %0 is
"me".
> think locate(%#, %0, PFym)
'PF' matches objects of type 'player' and nothing else, 'm' checks for the
string "me", and 'y' matches the names of players.
Find the dbref of an object near %# called %0, including %# himself and his
location. Prefer players or things, but accept rooms or exits if no players
or things are found.
> think locate(%#, %0, PThmlni)
This prefers 'P'layers or 'T'hings, and compares %0 against the strings
"here" and "me", and the names of %#'s location, his neighbours, and his
inventory.
See also: num(), rnum(), pmatch(), room(), where(), rloc()
LOCK KEYS
There are many key types, and it is also possible to form more complex
locks by using boolean symbols and grouping. See HELP @LOCK-COMPLEX
for examples.
The types of keys are outlined below. Detailed help for each is available
by typing 'help @lock-<key>', replacing <key> with the word on the left.
Simple - Always true, always false, or locking to a specific object.
Name - Check the name of the object attempting to pass the lock.
Owner - Lock to objects owned by the owner of an object.
Carry - Lock to someone carrying an object, such as a key.
Indirect - Use the result of another @lock.
Attribute - Check an attribute on the object trying to pass the lock.
Evaluation - Evaluate an attribute on the object the lock is on.
Bit - Check for a flag, type, power, or channel membership.
Dbreflist - Check if the dbref of the object trying to pass the lock
is in a list set in an attribute.
Host - Check for players connecting from a particular host/ip.
You can negate lock keys, and combine multiple keys, as explained in
'help lockkeys2'.
LOCK KEYS2
A lock key can be negated by prefixing the key with an "!". For example:
> @lock North=flag^wizard
> @lock South=!flag^wizard
only lets those with the Wizard flag pass through the North exit, while
only allowin those who do NOT have the Wizard flag to go South.
You can combine keys, either allowing someone to pass a lock if they pass
any of the keys given, or requiring that they pass all of the keys, using
the "|" (or) and "&" (and) symbols. For example:
> @lock OOC Room= status:OOC | power^guest
locks the exit "OOC Room" so that only those with their STATUS attribute
set to "OOC", or those with the Guest @power, can pass, while
> @lock Men's Room= Sex:Male & +Bathroom Key
only allows those with their @sex set to Male who are carrying a "Bathroom
Key" object to pass.
You can group together different sets of keys by enclosing each group in
parenthesis "()". For instance,
> @lock Entrance=!type^player | (type^player & !flag^unregistered)
allows non-players to pass, or players who do not have the "unregistered"
flag set.
See also: @lock, locktypes, @clock, objid()
LOCK LIST
These are the standard lock types supported by PennMUSH. For more detailed
information about any lock type, see "help @lock/<lock>".
@lock/basic Who can pick up the player/thing, or go through
the exit.
@lock/enter Who can enter the player/object (aka @elock)
@lock/teleport Who can teleport to the room
@lock/use Who can use the object (aka @ulock)
@lock/page Who can page/@pemit the player
@lock/zone Who can control objects on this zone
@lock/parent Who can @parent something to this object/room
@lock/link Who can @link something to this object/room
or who can @link this unlinked exit.
@link/open Who can @open an exit from this room
@lock/mail Who can @mail the player
@lock/user:<name> User-defined. No built-in function of this lock,
but users can test it with elock()
Continued in 'help locktypes2'.
LOCK TYPES
These are the standard lock types supported by PennMUSH. For more detailed
information about any lock type, see "help @lock/<lock>".
@lock/basic Who can pick up the player/thing, or go through
the exit.
@lock/enter Who can enter the player/object (aka @elock)
@lock/teleport Who can teleport to the room
@lock/use Who can use the object (aka @ulock)
@lock/page Who can page/@pemit the player
@lock/zone Who can control objects on this zone
@lock/parent Who can @parent something to this object/room
@lock/link Who can @link something to this object/room
or who can @link this unlinked exit.
@link/open Who can @open an exit from this room
@lock/mail Who can @mail the player
@lock/user:<name> User-defined. No built-in function of this lock,
but users can test it with elock()
Continued in 'help locktypes2'.
LOCK TYPES2
More standard lock types:
@lock/speech Who can speak/pose/emit in this room
@lock/listen Who can trigger my @ahear/^-pattern actions
@lock/command Who can trigger my $-pattern commands
@lock/leave Who can leave this object (or room, via exits/@tel)
@lock/drop Who can drop this object
@lock/dropin Who can drop objects into this location.
@lock/give Who can give this object
@lock/from Who can give things to this object
@lock/pay Who can give pennies to/buy from this object
@lock/receive What things can be given to this object
@lock/follow Who can follow this object
@lock/examine Who can examine this object if it's VISUAL
@lock/chzone Who can @chzone to this object if it's a ZMO
@lock/forward Who can @forwardlist a message to this object
@lock/filter Controls if the message %0 should be filtered
@lock/infilter Controls if the message %0 should be infiltered
@lock/control Who can control this object (only if set; non-player)
@lock/dropto Who can trigger this container's drop-to.
@lock/destroy Who can destroy this object if it's DESTROY_OK
@lock/interact Who can send sound (say/pose/emit/etc) to this object
@lock/take Who can get things contained in this object
@lock/mailforward Who can forward mail to this object via @mailforward
See also: @lock, @lset, @clock, FAILURE
LOCK()
lock(<object>[/<locktype>][, <new value>])
lock() returns the text string equivalent of the @lock on <object>.
<locktype> can be any valid switch for @lock ("Enter", "user:foo", etc)
and defaults to "Basic". You must be able to examine the lock.
If a <new value> is given, lock() attempts to change the lock as @lock
would. You must control the object..
See also: @lock, locktypes, elock(), lockflags(), llockflags(), lset(),
llocks(), lockowner(), lockfilter()
LOCKFILTER()
lockfilter(<key>, <dbrefs>[, <delim>])
lockfilter() goes through <dbrefs> and tests them all against the lock
<key>, returning a list of all dbrefs that pass the <key>.
<key> is evaluated from the caller's perspective.
This is equivilent to filter(#lambda/testlock(<key>, %%0), <dbrefs>) but
much more efficient, as the lock <key> is only parsed/compiled once.
<delim> defaults to a space, and is the delimiter of <dbrefs> and the list
returned by lockfilter().
Example:
Get all male players with a name starting with 'W'.
> think iter(lockfilter(NAME^W*&SEX:M*,lwho()),name(##))
Walker WalkerBot Wilco
List all wizroys online:
> think iter(lockfilter(FLAG^WIZARD|FLAG^ROYALTY,lwho()),name(##))
Sketch Viila Tanaku Raevnos Zebranky Cheetah Walker
List all players with an IC age > 20.
> think lockfilter(age:>20,lwho())
#123 #456 #789
See also: @lock, lock(), elock(), locktypes, filter(), testlock()
LOCKFLAGS()
lockflags(<object>[/<locktype>])
lockflags()
If an <object> is given, lockflags() returns a string consisting of the
one-character abbreviations for all the lock flags on <object>'s <locktype>
lock, or Basic lock if no locktype is given. You must be able to examine
the lock.
Given no arguments, this function returns a string consisting of all
the flag letters the server knows.
See also: llockflags(), lset(), lock(), llocks(), lockowner()
LOCKING
@lock[/<switch>] <object>=<key>
This command "locks" the object, specifying a key which determines who or
what can do certain things with the object. There are many different types
of locks, all of which are described in 'help locktypes' and which are
designated by the switch. The "basic" lock determines, for players and
things, who can pick them up. For exits, it determines who can go through
the exit. All other locks can be set the same way as the basic lock.
Whenever you "pass" the basic lock, you succeed in doing something with
the object. This triggers the @success/@osuccess/@asuccess messages and
actions. If you fail to pass the basic lock, you trigger the
@failure/@ofailure/@afailure messages and actions. Other locktypes may
also have such success/failure messages: see 'help failure' for info.
Just like attributes, locks can be inherited from parents. By default,
locks are set no_inherit, but this flag can be cleared using @lset. More
details and a list of flags can be found in 'help @lset'.
A listing of lock types, such as pagelocks, look at 'help locktypes'.
For the available key types, such as how to check an attribute on an
object trying to pass a lock, see 'help lockkeys'.
See also: @lock-simple, locktypes, lockkeys, @clock, failure, success.
elock(), lock(), @lset, @clock, testlock(), locks(), lockflags(),
lockowner(), clock(), llocks()
LOCKKEYS
There are many key types, and it is also possible to form more complex
locks by using boolean symbols and grouping. See HELP @LOCK-COMPLEX
for examples.
The types of keys are outlined below. Detailed help for each is available
by typing 'help @lock-<key>', replacing <key> with the word on the left.
Simple - Always true, always false, or locking to a specific object.
Name - Check the name of the object attempting to pass the lock.
Owner - Lock to objects owned by the owner of an object.
Carry - Lock to someone carrying an object, such as a key.
Indirect - Use the result of another @lock.
Attribute - Check an attribute on the object trying to pass the lock.
Evaluation - Evaluate an attribute on the object the lock is on.
Bit - Check for a flag, type, power, or channel membership.
Dbreflist - Check if the dbref of the object trying to pass the lock
is in a list set in an attribute.
Host - Check for players connecting from a particular host/ip.
You can negate lock keys, and combine multiple keys, as explained in
'help lockkeys2'.
LOCKKEYS2
A lock key can be negated by prefixing the key with an "!". For example:
> @lock North=flag^wizard
> @lock South=!flag^wizard
only lets those with the Wizard flag pass through the North exit, while
only allowin those who do NOT have the Wizard flag to go South.
You can combine keys, either allowing someone to pass a lock if they pass
any of the keys given, or requiring that they pass all of the keys, using
the "|" (or) and "&" (and) symbols. For example:
> @lock OOC Room= status:OOC | power^guest
locks the exit "OOC Room" so that only those with their STATUS attribute
set to "OOC", or those with the Guest @power, can pass, while
> @lock Men's Room= Sex:Male & +Bathroom Key
only allows those with their @sex set to Male who are carrying a "Bathroom
Key" object to pass.
You can group together different sets of keys by enclosing each group in
parenthesis "()". For instance,
> @lock Entrance=!type^player | (type^player & !flag^unregistered)
allows non-players to pass, or players who do not have the "unregistered"
flag set.
See also: @lock, locktypes, @clock, objid()
LOCKLIST
These are the standard lock types supported by PennMUSH. For more detailed
information about any lock type, see "help @lock/<lock>".
@lock/basic Who can pick up the player/thing, or go through
the exit.
@lock/enter Who can enter the player/object (aka @elock)
@lock/teleport Who can teleport to the room
@lock/use Who can use the object (aka @ulock)
@lock/page Who can page/@pemit the player
@lock/zone Who can control objects on this zone
@lock/parent Who can @parent something to this object/room
@lock/link Who can @link something to this object/room
or who can @link this unlinked exit.
@link/open Who can @open an exit from this room
@lock/mail Who can @mail the player
@lock/user:<name> User-defined. No built-in function of this lock,
but users can test it with elock()
Continued in 'help locktypes2'.
LOCKOWNER()
lockowner(<object>[/<locktype>])
This function returns the dbref of the player who owns the <locktype>
lock on <object>, or the Basic lock if no <locktype> is given. You
must be able to examine the lock to use this function.
See also: lockflags(), llockflags(), lset(), lock(), llocks()
LOCKS
@lock[/<switch>] <object>=<key>
This command "locks" the object, specifying a key which determines who or
what can do certain things with the object. There are many different types
of locks, all of which are described in 'help locktypes' and which are
designated by the switch. The "basic" lock determines, for players and
things, who can pick them up. For exits, it determines who can go through
the exit. All other locks can be set the same way as the basic lock.
Whenever you "pass" the basic lock, you succeed in doing something with
the object. This triggers the @success/@osuccess/@asuccess messages and
actions. If you fail to pass the basic lock, you trigger the
@failure/@ofailure/@afailure messages and actions. Other locktypes may
also have such success/failure messages: see 'help failure' for info.
Just like attributes, locks can be inherited from parents. By default,
locks are set no_inherit, but this flag can be cleared using @lset. More
details and a list of flags can be found in 'help @lset'.
A listing of lock types, such as pagelocks, look at 'help locktypes'.
For the available key types, such as how to check an attribute on an
object trying to pass a lock, see 'help lockkeys'.
See also: @lock-simple, locktypes, lockkeys, @clock, failure, success.
elock(), lock(), @lset, @clock, testlock(), locks(), lockflags(),
lockowner(), clock(), llocks()
LOCKS()
llocks([<object>])
locks(<object>)
llocks() and locks() both list @locks set on <object>, including
user-defined locks (prefixed with USER:)
If no object is given, llocks() returns all the predefined lock
types available.
Example:
> @lock me==me
> @lock/use me==me
> @lock/user:itsme me==me
> th llocks(me)
Basic USER:ITSME Use
See also: lock(), lset(), lockflags(), llockflags(), lockowner()
LOCKTYPES
These are the standard lock types supported by PennMUSH. For more detailed
information about any lock type, see "help @lock/<lock>".
@lock/basic Who can pick up the player/thing, or go through
the exit.
@lock/enter Who can enter the player/object (aka @elock)
@lock/teleport Who can teleport to the room
@lock/use Who can use the object (aka @ulock)
@lock/page Who can page/@pemit the player
@lock/zone Who can control objects on this zone
@lock/parent Who can @parent something to this object/room
@lock/link Who can @link something to this object/room
or who can @link this unlinked exit.
@link/open Who can @open an exit from this room
@lock/mail Who can @mail the player
@lock/user:<name> User-defined. No built-in function of this lock,
but users can test it with elock()
Continued in 'help locktypes2'.
LOCKTYPES2
More standard lock types:
@lock/speech Who can speak/pose/emit in this room
@lock/listen Who can trigger my @ahear/^-pattern actions
@lock/command Who can trigger my $-pattern commands
@lock/leave Who can leave this object (or room, via exits/@tel)
@lock/drop Who can drop this object
@lock/dropin Who can drop objects into this location.
@lock/give Who can give this object
@lock/from Who can give things to this object
@lock/pay Who can give pennies to/buy from this object
@lock/receive What things can be given to this object
@lock/follow Who can follow this object
@lock/examine Who can examine this object if it's VISUAL
@lock/chzone Who can @chzone to this object if it's a ZMO
@lock/forward Who can @forwardlist a message to this object
@lock/filter Controls if the message %0 should be filtered
@lock/infilter Controls if the message %0 should be infiltered
@lock/control Who can control this object (only if set; non-player)
@lock/dropto Who can trigger this container's drop-to.
@lock/destroy Who can destroy this object if it's DESTROY_OK
@lock/interact Who can send sound (say/pose/emit/etc) to this object
@lock/take Who can get things contained in this object
@lock/mailforward Who can forward mail to this object via @mailforward
See also: @lock, @lset, @clock, FAILURE
LOG()
log(<number>[, <base>])
Returns the logarithm (base 10, or the given base) of <number>.
<base> can be a floating-point number, or 'e' for the natural
logarithm.
See also: ln()
LOGIN POWER
The Login power allows a player to connect to the MUSH, even when logins
have been disabled (via the "logins" @config option). Wizards and royalty
have the power implicitly.
See also: @sitelock
LOGOUT
LOGOUT
LOGOUT is similar to QUIT, but instead of disconnecting you from the
game completely, it merely disconnects you from your current
character and returns you to the opening welcome screen. This is
useful if you want to disconnect and then reconnect to another
character. Unlike most commands, it is case-sensitive and must be
typed in all caps.
LONG_FINGERS POWER
The Long_Fingers power allows objects to run a number of commands
(including "look", "with", "get" and others) on objects which they are not
nearby. Wizards and Royalty have the power implicitly.
LOOK
look [<object>]
look <container>'s <object>
look <exit>'s <object>
look/outside [<object>]
Displays the description of <object>, or the room you're in if you don't
name a specific object. You can also look at objects inside others, as
long as the <container> is not set OPAQUE, or at objects on the other side
of an exit, if the exit is set TRANSPARENT or CLOUDY.
If you're inside a container, look/outside allows you to look at the room
the container is in, or at other objects in your container's location, as
long as your container is not set OPAQUE.
Continued in 'help look2'.
LOOK2
If you look at an object that is not set OPAQUE, you will see any
non-DARK items in its inventory. You can look at DARK items in your
location if you know what their name is by typing 'look <object>',
but they will not show up in the list of contents.
When you type 'look' alone, you look at your current location. For a
room, this normally shows you the room's description, the list of
contents, and any obvious exits from the room. For an object, it
shows you the interior description (@idescribe) instead, if one is set.
If a room is set DARK, when you look you will not see any of the
exits or contents of the room, unless they are set LIGHT.
'look' may be abbreviated 'l', and is sometimes aliased as 'read'.
See also: OPAQUE, FLAGS, @describe, @adescribe, @odescribe, DARK, LIGHT,
TRANSPARENT, CLOUDY
LOOPING
Looping in an object can have its good parts and its bad parts. The
good part is when you activate part of a program multiple times to
exhaustively perform an operation. This can be done like this:
&PART1 object=<action list> ; @trigger me/PART2
&PART2 object= @select <test for being done>=<false>,@trigger me/PART1
Looping can be a problem when it goes on without stopping. The @ps
command can be used to see if you are looping. Beware! A looping
machine that isn't @halt'd will drain your pennies while you are
away from the mush!
The @retry and @include commands, and %= substitution, can also be useful
for building code which needs to loop.
See also: @ps, HALT, COSTS, @trigger, @retry, SUBSTITUTIONS3
LOUD
Flag: LOUD (all types)
LOUD objects bypass all speech, channel speech, and interaction @locks.
This flag can only be set by royalty or wizards.
See also: can_spoof and pemit_all (help powers2)
LPARENT()
lparent(<object>)
This function returns a list consisting of <object>'s dbref (as per
num()), the dbref of its parent, grandparent, greatgrandparent, etc.
The list will not, however, show parents of objects which the player
is not privileged to examine. Ancestor objects are not included.
See also: parent(), children(), PARENTS, ANCESTORS
LPIDS()
lpids(<object>[, <queue type>])
Returns a space-separated list of queue process ids enqueued by <object>,
typically a player. If <queue type> is "w", only wait queue
entries are returned; if <queue type> is "s", only semaphore queue
entries are returned; if <queue type> is absent, both are returned.
See also: @ps, getpids(), pidinfo()
LPLAYERS()
lplayers(<object>)
This function returns the dbrefs of all players, connected or not,
in <object>. DARK wizards aren't listed to mortals or those without
the see_all power. You must be in <object> or control it to use this
function.
See also: lvplayers(), lcon(), lthings()
LPORTS()
lports([<viewer>[, <status>]])
ports(<player name>)
These functions return the list of descriptors ("ports") that are used by
connected players. lports() returns all ports, in the same order as
lwho() returns dbrefs, and ports() returns those a specific player is
connected to, from most recent to least recent. Mortals can use ports()
on themselves, but only See_All players can use ports() on others, or use
lports().
If lports() is given a <viewer>, only the ports of connections which
<viewer> can see are returned, in the same way as lwho(<viewer>) works.
The <status> argument for lports() controls whether or not ports which
are not connected to (ie, at the login screen) are included, and must be
one of "all", "online" or "offline".
These port numbers also appear in the wizard WHO, and can be used
with @boot/port, page/port, and the functions that return information
about a connection to make them use a specific connection rather than
the least-idle one when a player has multiple connections open. Players
can get information about their own connections. See_all is needed to
use them to get information about other people's ports.
See also: player(), Connection Functions
LPOS()
lpos(<string>, <character>)
This function returns a list of the positions where <character>
appears in <string>, with the first character of the string being
0. Note that this differs from the pos() function, but is consistent
with other string functions like mid() and delete().
If <character> is a null argument, space is used. If <character> is
not found anywhere in <string>, an empty list is returned.
Example:
> say lpos(a-bc-def-g, -)
You say, "1 4 8"
See also: pos(), member(), match()
LSEARCH()
lsearch(<player>[, ... , <classN>, <restrictionN>])
nlsearch(<player>[, ... , <classN>, <restrictionN>])
lsearchr(<player>[, ... , <classN>, <restrictionN>])
children(<object>)
nchildren(<object>)
This function is similar to the @search command, except it returns just a
list of dbref numbers. The function must have at least three arguments. You
can specify "all" or <player> for the <player> field; for mortals, only
objects they can examine are included. If you do not want to restrict
something, use "none" for <class> and <restriction>.
The possible <class>es and <restriction>s are the same as those accepted
by @search. lsearch() can accept multiple class/restriction pairs, and
applies them in a boolean "AND" fashion, returning only dbrefs that
fulfill all restrictions. See 'help @search' for information about them.
children() is exactly the same as lsearch([me|all], parent, <object>),
using "all" for See_All/Search players and "me" for others.
nlsearch(...) and nchildren(...) return the count of results that
would be returned by lsearch() or children() with the same args.
Continued in 'help lsearch2'.
LSEARCH2
If <class> is one of the eval classes (EVAL, EEXITS, EROOMS, ETHINGS
or EPLAYERS), note that any brackets, percent signs, or other
special characters should be escaped, as the code in <restriction>
will be evaluated twice - once as an argument to lsearch(), and then
again for each object looked at in the search. Before the per-object
evaluation, the string "##" is replaced with the object dbref.
lsearch() is free unless it includes either an eval-class search or
an elock search that contains an eval or indirect lock. Otherwise,
it costs find_cost pennies to perform the lsearch.
lsearchr() is like an lsearch() run through revwords(). Results are
returned from highest dbref to lowest. search() is an alias for
lsearch().
Examples in 'help lsearch3'.
See also: @search, @find, lparent(), stats()
LSEARCH3
lsearch() Examples:
lsearch(all, flags, Wc) <-- lists all connected wizards.
lsearch(me, type, room) <-- lists all rooms owned by me.
lsearch(me, type, room, flag, W) <-- lists Wizard rooms owned by me.
lsearch(me, type, room, 100, 200) <-- same, but only w/db# 100-200
lsearch(all, eplayer, \[eq(money(##),100)\]) <-- lists all players with 100
coins.
lsearch(all, type, player, elock, (FLAG^WIZARD|FLAG^ROYALTY)&!FLAG^IC)
^-- list all wiz and roy players
that are not IC.
lsearch(all, type, player, elock, sex:m*) <- lists all players with an
@sex beginning with 'm'
lsearch(me, elock, !desc:*) <-- lists all objects you own that
don't have an @desc set
LSEARCHR()
lsearch(<player>[, ... , <classN>, <restrictionN>])
nlsearch(<player>[, ... , <classN>, <restrictionN>])
lsearchr(<player>[, ... , <classN>, <restrictionN>])
children(<object>)
nchildren(<object>)
This function is similar to the @search command, except it returns just a
list of dbref numbers. The function must have at least three arguments. You
can specify "all" or <player> for the <player> field; for mortals, only
objects they can examine are included. If you do not want to restrict
something, use "none" for <class> and <restriction>.
The possible <class>es and <restriction>s are the same as those accepted
by @search. lsearch() can accept multiple class/restriction pairs, and
applies them in a boolean "AND" fashion, returning only dbrefs that
fulfill all restrictions. See 'help @search' for information about them.
children() is exactly the same as lsearch([me|all], parent, <object>),
using "all" for See_All/Search players and "me" for others.
nlsearch(...) and nchildren(...) return the count of results that
would be returned by lsearch() or children() with the same args.
Continued in 'help lsearch2'.
LSET()
lset(<object>/<locktype>,[!]<flag>)
This functions sets or clears flags on locks.
See 'help @lset' for more information on what flags are available.
See also: lockflags(), llockflags(), lock(), lockowner()
LSTATS()
lstats([<player>])
This function returns the breakdown of objects in the database, in a format
similar to "@stats". If <player> is "all" (the default), a breakdown is
done for the entire database. Otherwise, the breakdown is returned for
that particular player.
Only wizards and those with the Search power can LSTATS() other players.
The list returned is in the format:
<Total objects> <Rooms> <Exits> <Things> <Players> <Garbage>
stats() is an alias for lstats().
See also: nsearch()
LT()
lt(<number1>, <number2>[, ... , <numberN>])
Takes two or more numbers, and returns 1 if and only if each number
is less than the number after it, and 0 otherwise.
Examples:
> th lt(1,2)
1
> th lt(1,2,3)
1
> th lt(1,3,2)
0
See also: lte(), gt(), gte(), lnum()
LTE()
lte(<number1>, <number2>[, ... , <numberN>])
Takes two or more numbers, and returns 1 if and only if each number
is less than or equal to the number after it, and 0 otherwise.
See also: lt(), gt(), gte(), lnum()
LTHINGS()
lthings(<object>)
This function returns the dbrefs of all things, dark or not, in
<object>. You must be in <object> or control it to use this function.
See also: lvthings(), lcon()
LVCON()
lvcon(<object>)
This function returns the dbrefs of all objects that are inside
<object> and visible (non-dark). You must be in <object> or control
it to use this function.
See also: lcon(), lvplayers(), lvthings(), lvexits()
LVEXITS()
lvexits(<room>)
This function returns the dbrefs of all visible (non-dark) exits
from <room>. You must be in the room or control it to use this
function.
See also: lexits(), lvcon(), lvplayers(), lvthings()
LVPLAYERS()
lvplayers(<object>)
This function returns the dbrefs of all connected and non-dark players
in an object. You must be in the object or control it to use this
function.
See also: lplayers(), lvcon(), lvthings(), lvexits()
LVTHINGS()
lvthings(<object>)
This function returns the dbrefs of all non-dark things inside an
object. You must be in the object or control it to use this
function.
See also: lthings(), lvplayers(), lvcon(), lvexits()
LWHO()
lwho([<viewer>[, <status>]])
lwhoid([<viewer>[, <status>]])
lwho() returns a list of the dbref numbers for all currently-connected
players. When mortals use this function, the dbref numbers of hidden
wizards or royalty do NOT appear on the dbref list.
If a <viewer> is given, and used by a See_All object, lwho() returns the
output of lwho() from <viewer>'s point of view.
<status> can be used to include "#-1" dbrefs for unconnected ports, and
must be one of "all", "online" or "offline". It is primarily useful when
using a <status> with lports(), to make the dbrefs and ports match up.
Only See_All players can see offline dbrefs.
lwhoid() returns a list of objid's instead.
See also: mwho(), nwho(), xwho()
LWHOID()
lwho([<viewer>[, <status>]])
lwhoid([<viewer>[, <status>]])
lwho() returns a list of the dbref numbers for all currently-connected
players. When mortals use this function, the dbref numbers of hidden
wizards or royalty do NOT appear on the dbref list.
If a <viewer> is given, and used by a See_All object, lwho() returns the
output of lwho() from <viewer>'s point of view.
<status> can be used to include "#-1" dbrefs for unconnected ports, and
must be one of "all", "online" or "offline". It is primarily useful when
using a <status> with lports(), to make the dbrefs and ports match up.
Only See_All players can see offline dbrefs.
lwhoid() returns a list of objid's instead.
See also: mwho(), nwho(), xwho()
MACROS
User-defined commands can be created by setting $-commands on players,
things, and rooms. Exits cannot have $-commands. To set a $-command:
&<attribute> <object>=$<command name>:<action list>
Whenever someone in the same room as the object types the command name,
the action list is carried out by the object, as long as:
- the person typing the command passes the object's @lock/use
and @lock/command
- the object is not set NO_COMMAND or HALT
Such attributes can also be @triggered as if the $<command name>: did not
exist.
It is recommended that <command name> not begin with "@", as many built-in
commands start with "@". Conventionally, global commands are often named
with the "+" prefix, and local $-commands often have a "+" or "." prefix.
Continued in 'help user-defined2'.
MACROS2
Any number of *'s and ?'s may be in the command name. A * matches any
number of characters, and a ? matches any single character. When the
actions are executed, the values on the stack in %0-%9 are the portions
of what the user types that match the first ten *'s or ?'s. You can also
match a regular expression rather than wildcards. See 'help regexps'
for details.
For example, to make a 'wave' command, you could do the following:
&DO_WAVE me=$wave *: pose waves to %0.
You could then type:
> wave Guest
Rhyanna waves to Guest.
If a command would match, but the enactor can't pass the lock, the object
may define generic failure behavior by setting the COMMAND_LOCK`FAILURE,
COMMAND_LOCK`OFAILURE, and/or COMMAND_LOCK`AFAILURE attributes. These are
triggered on all objects with matching commands and failing locks, but only
if no command successfully matched, and take the place of the usual
"Huh?" message.
*BE SURE TO @LOCK/USE ME==ME IF YOU SET MACROS ON YOURSELF!*
See also: GLOBAL COMMANDS, EVALUATION ORDER, STACK, SUBSTITUTIONS, @lock
MAIL
@mail[/<switches>] [<msg-list>[=<target>]]
@mail[/<switches>] <player-list>=[<subject>/]<message>
@mail invokes the built-in MUSH mailer, which allows players to send
and receive mail. Pronoun/function substitution is performed on any
messages you may try to send.
A <msg-list> is one of the following:
A single msg # (ex: 3)
A message range (ex: 2-5, -7, 3-)
A folder number and message number/range (ex: 0:3, 1:2-5, 2:-7)
A sender (ex: *paul)
An age of mail in days (ex: ~3 (exactly 3), <2, >1)
"days" here means 24-hour periods from the current time.
One of the following: "read", "unread", "cleared", "tagged",
"urgent", "all" (all messages in all folders), "folder" (all
messages in current folder)
A <player-list> is a space-separated list of recipients, which may be:
Player names
Player dbref #'s
Message #'s, in which case you send to the sender of that message.
An alias name (see help @malias)
See also the following topics: mail-sending mail-reading
mail-folders mail-forward mail-other mail-admin
@malias mail-reviewing
MAIL FUNCTIONS
Mail functions work with @mail.
folderstats() mail() maildstats() mailfrom() mailfstats()
maillist() mailsend() mailstats() mailstatus() mailsubject()
mailtime() malias()
MAIL()
mail()
mail(<player name>)
mail([<folder #>:]<mail message #>)
mail(<player>, [<folder #>:]<mail message #>)
Without arguments, mail() returns the number of messages in all the
player's mail folders. With a player name argument, mail() returns
the number of read, unread, and cleared messages <player> has in all
folders. Only Wizards can use this on other players.
When given numeric arguments, mail() returns the text of the
corresponding message in the current folder. The message number may
also be prefaced by the folder number and a colon, to indicate a
message in a different folder.
Example:
> think mail(3:2)
(text of the second message in the player's third folder)
See also: maillist(), mailfrom()
MAIL-ADMIN
The @mail command can also take the following switches:
@mail/stats [<player>] -- Basic mail statistics.
@mail/dstats [<player>] -- Also provides read/unread count.
@mail/fstats [<player>] -- Does all that, plus gives space usage.
@mail/debug <action>[=<player>]
@mail/nuke
Only wizards may stats players other than themselves.
The /debug switch does sanity checking on the mail database, and may
only be used by a wizard. "@mail/debug sanity" just does the check;
the command "@mail/debug clear=<player name or dbref number>" wipes
mail for an object. "@mail/debug fix" attempts to repair problems
noted in the sanity check.
The /nuke switch destroys the post office, erasing all @mail
everywhere. It may only be used by God.
MAIL-FOLDERS
The MUSH mail system allows each player 16 folders, numbered from 0
to 15. Mail can only be in 1 folder at a time. Folder 0 is the
"inbox" where new mail is received. Most @mail commands operate on
only the current folder.
@mail/folder
This commands lists all folders which contain mail, telling
how many messages are in each, and what the current folder is.
@mail/folder <folder#|foldername>
This command sets your current folder to <folder#>.
@mail/folder <folder#> = <foldername>
This command gives <folder#> a name.
@mail/unfolder <folder#|foldername>
This command removes a folder's name
@mail/file <msg-list>=<folder#>
This command moves all messages in msg-list from the current
folder to a new folder, <folder#>.
See also: @mailfilter
MAIL-FORWARD
@mailforwardlist me = <space-separated list of dbrefs or objids>
@lock/mailforward me = <lock>
By setting a @mailforwardlist attribute, a player can direct that
@mail they receive should be delivered to the specified list of
dbrefs of other players. The list may include the player's own
dbref, in which case the player will receive a copy of the message,
or omit it, in which case the message will be delivered to those
listed but the player will not receive a copy.
To deliver messages to other players this way, you must control them
(i.e. you're delivering to yourself or you're a wizard) or pass
their @lock/mailforward. An empty @lock/mailforward disallows
forwarding to you, and is the default.
MAIL-OTHER
@mail/clear [<msg-list> | all]
@mail/unclear [<msg-list> | all]
These commands mark mail in the current folder as cleared or
uncleared. Mail marked for clearing is deleted when you
disconnect, or if you use @mail/purge. If no msg-list is
specified, all mail in your current folder is cleared. If
"all" is given instead of a msg-list, all mail in *all*
folders is cleared/uncleared.
@mail/purge
Actually deletes all messages marked for clearing with @mail/clear.
This is done automatically when you log out.
@mail/tag [<msg-list> | all]
@mail/untag [<msg-list> | all]
These commands tag or untag mail in the current folder.
Tagged mail can be later acted on en masse by using "tagged" as
the msg-list for other commands (which does *not* untag them
afterward). If no msg-list is specified, all messages in the
current folder are tagged/untagged. If "all" is given as the
msg-list, all mail in *all* folders is tagged/untagged.
(Ex: To clear all mail from Paul and Chani, @mail/tag *paul,
@mail/tag *chani, @mail/clear tagged, @mail/untag all).
@mail/unread [<msg-list> | all]
Mark messages which have already been read as new/unread.
@mail/status [<msg-list> | all]=<status>
Set the status of the given messages. <status> can be one of tagged,
untagged, cleared, uncleared, read or unread. read marks a new
message as read without reading it, the others are equivilent to
@mail/tag, @mail/untag, @mail/clear, @mail/unclear and @mail/unread
respectively.
MAIL-READING
@mail <msg #>
@mail/read <msg-list>
This displays messages which match the msg# or msg-list from
your current folder.
@mail
@mail <msg-list, but not a single msg #>
@mail/list <msg-list>
This gives a brief list of all mail in the current folder,
with sender name, time sent, and message status.
The status field is a set of characters (ex: NC-UF+) which mean:
N = New (unread) message
C = Cleared message
U = Urgent message
F = Forwarded message
+ = Tagged message
The opposites of these (read messages, etc.) are indicated with a
'-' in the status field in that position.
MAIL-REVIEWING
@mail/review <player>
Reviews the messages you have sent to <player>.
@mail/review <player>=<msglist>
Reads the messages you have sent to <player>.
@mail/retract <player>=<msglist>
Retracts (deletes) unread messages you have sent to <player>.
MAIL-SENDING
@mail[/switch] <player-list> = [<subject>]/<msg>
This sends the message <msg> to all players in <player-list>.
If no subject is given, the message subject is the beginning
of the message itself. To include a literal / in the subject,
double it up (//).
All function substitutions are valid in <msg> including mail(#) which
will allow you to forward mail you have received to other users.
The following switches are available:
/send - same as no switch
/urgent - mail is marked as "Urgent"
/silent - no notification to sender that mail was sent
/nosig - no mail signature
If you have an @mailsignature attribute set on yourself, its
contents will be evaluated and appended to the message unless
the /nosig switch is given.
@mail/fwd <msg-list> = <player-list>
This sends a copy of all the messages in <msg-list> to
all the players in <player-list>. The copy will appear to have
been sent by you (not the original sender), and its status will
be "Forwarded".
MAILDSTATS()
mailstats([<player>])
maildstats([<player>])
mailfstats([<player>])
mail*stats() functions return data like @mail/*stats does. You
either must use this on yourself, or you must be a wizard. The
information will be joined together as a space separated list of
numbers.
Example:
> think mailstats(One)
<# sent> <# received>
> think mailfstats(One)
<# sent> <# sent unread> <# sent cleared> <# sent bytes> <# received>
<# received unread> <# received cleared> <# received bytes>
MAILFILTER
The @mailfilter attribute specifies automatic filing of incoming
@mail messages into folders. When an @mail message is received,
the contents of @mailfilter are evaluated, with the following
arguments passed:
%0 dbref of message sender
%1 message subject
%2 message body
%3 message status flags (a string containing U, F, and/or R,
for urgent, forwarded, and/or reply, respectively)
If @mailfilter evaluates to a folder name or number, the message
will be filed into that folder. If @mailfilter evaluates to a null
string, the message remains in the incoming folder.
Example: Filter urgent messages into folder 1
> @mailfilter me=if(strmatch(%3,*U*),1)
See also: mail-folders
MAILFROM()
mailfrom([<player>,] [<folder #>:]<mail message #>)
mailtime([<player>,] [<folder #>:]<mail message #>)
mailstatus([<player>,] [<folder #>:]<mail message #>)
mailsubject([<player>,] [<folder #>:]<mail message #>)
mailfrom() returns the dbref number of the sender of a mail message.
mailtime() is similar, but returns the time the mail was sent.
mailsubject() is similar, but returns the subject of the message.
mailstatus() returns the mail's status characters (as per
@mail/list)
See also: mail(), maillist()
MAILFSTATS()
mailstats([<player>])
maildstats([<player>])
mailfstats([<player>])
mail*stats() functions return data like @mail/*stats does. You
either must use this on yourself, or you must be a wizard. The
information will be joined together as a space separated list of
numbers.
Example:
> think mailstats(One)
<# sent> <# received>
> think mailfstats(One)
<# sent> <# sent unread> <# sent cleared> <# sent bytes> <# received>
<# received unread> <# received cleared> <# received bytes>
MAILLIST()
maillist([<player>, ]<message-list>)
maillist() returns a list of all <player>'s @mail messages which match the
given <message-list> (the same as @mail/list <message-list>). If no
<player> is given, the executor's mail is matched. The <message-list>
argument is described in 'help mail'.
Examples:
> think maillist()
0:1 0:2 0:3
> think maillist(all)
0:1 0:2 0:3 1:1 1:2
> think maillist(1:)
1:1 1:2
See also: mail(), mailfrom()
MAILSEND()
mailsend(<player>,[<subject>/]<message>)
This function sends a message to a player, just like @mail/send. It
returns nothing if successful, or an error message.
MAILSIGNATURE
@mailsignature <object>[=<signature>]
When set, this attribute is evaluated and appended to any @mail messages
sent by <object>, unless the @mail/nosig command is used.
Example:
> @mailsignature me=%r%r-- %n%r%r[u(funny_quote)]
See also: @mail, mail-sending
MAILSTATS()
mailstats([<player>])
maildstats([<player>])
mailfstats([<player>])
mail*stats() functions return data like @mail/*stats does. You
either must use this on yourself, or you must be a wizard. The
information will be joined together as a space separated list of
numbers.
Example:
> think mailstats(One)
<# sent> <# received>
> think mailfstats(One)
<# sent> <# sent unread> <# sent cleared> <# sent bytes> <# received>
<# received unread> <# received cleared> <# received bytes>
MAILSTATUS()
mailfrom([<player>,] [<folder #>:]<mail message #>)
mailtime([<player>,] [<folder #>:]<mail message #>)
mailstatus([<player>,] [<folder #>:]<mail message #>)
mailsubject([<player>,] [<folder #>:]<mail message #>)
mailfrom() returns the dbref number of the sender of a mail message.
mailtime() is similar, but returns the time the mail was sent.
mailsubject() is similar, but returns the subject of the message.
mailstatus() returns the mail's status characters (as per
@mail/list)
See also: mail(), maillist()
MAILSUBJECT()
mailfrom([<player>,] [<folder #>:]<mail message #>)
mailtime([<player>,] [<folder #>:]<mail message #>)
mailstatus([<player>,] [<folder #>:]<mail message #>)
mailsubject([<player>,] [<folder #>:]<mail message #>)
mailfrom() returns the dbref number of the sender of a mail message.
mailtime() is similar, but returns the time the mail was sent.
mailsubject() is similar, but returns the subject of the message.
mailstatus() returns the mail's status characters (as per
@mail/list)
See also: mail(), maillist()
MAILTIME()
mailfrom([<player>,] [<folder #>:]<mail message #>)
mailtime([<player>,] [<folder #>:]<mail message #>)
mailstatus([<player>,] [<folder #>:]<mail message #>)
mailsubject([<player>,] [<folder #>:]<mail message #>)
mailfrom() returns the dbref number of the sender of a mail message.
mailtime() is similar, but returns the time the mail was sent.
mailsubject() is similar, but returns the subject of the message.
mailstatus() returns the mail's status characters (as per
@mail/list)
See also: mail(), maillist()
MALIAS()
malias([<delimiter>])
malias(<malias name>)
malias(<malias name>[,<delimiter>])
With no arguments, malias() returns the list of all malias names
which are visible to the player. With two arguments, returns the
list of dbrefs that are members of the given malias, delimited by
<delimiter>.
With one argument, the behavior is ambiguous. If the argument
matches a malias, returns the list of dbrefs that are memebrs of the
malias, space-delimited. If not, it's treated as a no-argument case
with a delimiter.
MANY_ATTRIBS POWER
The Many_Attribs power allows a player to have up to a million attributes,
rather than the usual limit set in the max_attrs_per_object @config option.
Useful for database objects.
MAP()
map([<object>/]<attribute>, <list>[, <delim>[, <osep>]])
This function works much like ITER(). The given <attribute> is evaluated
once for each element of <list>, and the results of the evaluations are
returned. For each evaluation, the current list element is passed to the
attribute as %0, and it's position in the list as %1. Elements of <list>
are separated by <delim>, or a space if none is given, and the results are
returned separated by <osep>, if given, or the delimiter otherwise.
This is roughly equivilent to:
iter(<list>, ufun(<object>/<attribute>, %i0, inum(0)), <delim>, <osep>)
Examples:
> ×_two me=mul(%0,2)
> say map(times_two, 5 4 3 2 1)
You say, "10 8 6 4 2"
> say [map(times_two,1;2;3;4;5,;)]
You say, "2;4;6;8;10"
See also: anonymous attributes, iter(), @dolist
MAPSQL()
mapsql([<object>/]<attribute>, <query>[, <osep>[, <dofieldnames>]])
Performs an SQL query if the MUSH is configured to connect to an SQL
database server. This function requires a WIZARD flag or the Sql_Ok power.
<query> is evaluated, so it's useful to either read it from another
attribute with u() or use lit() to protect commas. If you will be
interpolating user-provided values into the query, be careful to escape
them with sqlescape().
Each row of the result is passed to <attribute>, with columns as %1-%9.
%0 is set to the row number, which will start with 1.
If <dofieldnames> evaluates to a true boolean, then the first call will be
with row number 0 and %1-%9 will be set to the field names.
See 'help sql examples' for examples.
See also: anonymous attributes, sqlescape(), sql(), @sql, @mapsql
MASTER ROOM
The Master Room enables global commands and exits. Exits in the
Master Room may be used from any location on the MUSH. All objects
left in the Master Room are checked for user-defined
$commands. Those $commands are considered global, meaning that they
can be used anywhere on the MUSH. Normally, only wizards will have
access to the Master Room; if you have a global command that you
would like to see enabled for the MUSH, speak to a wizard.
See also: EVALUATION, GLOBAL COMMANDS
MATCH()
match(<list>, <pattern>[, <delimiter>])
matchall(<list>, <pattern>[, <delimiter>[, <output separator>]])
match() returns the index of the first element of <list> which matches
the wildcard pattern <pattern>. The first word has an index of 1. If no
matches are found, 0 is returned.
matchall() is similar, but returns the indexes of all matching elements.
If no elements match, an empty string is returned.
In both cases, elements of <list> are separated by <delimiter>, if it's
given, or a space otherwise. The results of matchall() are separated by
<ouput separator>, if given, and <delimiter> if not.
To get the matching elements, instead of the indexes of where they appear
in the list, use grab()/graball(). To see if a single string matches a
wildcard pattern, use strmatch().
Examples:
> say match(I am testing a test, test*)
You say, "3"
> say matchall(I am testing a test, test*)
You say, "3 5"
> say match(foo bar baz boing, sprocket)
You say, "0"
>say matchall(foo bar baz boing, sprocket)
You say, ""
See also: grab(), strmatch(), member(), WILDCARDS
MATCHALL()
match(<list>, <pattern>[, <delimiter>])
matchall(<list>, <pattern>[, <delimiter>[, <output separator>]])
match() returns the index of the first element of <list> which matches
the wildcard pattern <pattern>. The first word has an index of 1. If no
matches are found, 0 is returned.
matchall() is similar, but returns the indexes of all matching elements.
If no elements match, an empty string is returned.
In both cases, elements of <list> are separated by <delimiter>, if it's
given, or a space otherwise. The results of matchall() are separated by
<ouput separator>, if given, and <delimiter> if not.
To get the matching elements, instead of the indexes of where they appear
in the list, use grab()/graball(). To see if a single string matches a
wildcard pattern, use strmatch().
Examples:
> say match(I am testing a test, test*)
You say, "3"
> say matchall(I am testing a test, test*)
You say, "3 5"
> say match(foo bar baz boing, sprocket)
You say, "0"
>say matchall(foo bar baz boing, sprocket)
You say, ""
See also: grab(), strmatch(), member(), WILDCARDS
MATCHING
Matching is the process the MUSH uses to determine which object you
mean when you try to do something with an object. Different commands
do matching in different ways, but most will allow you to specify an
object as:
* its dbref (#7) or objid (#7:123456789)
* the string "me" (yourself)
* the string "here" (the room you're in)
* a '*' followed by a playername (*javelin)
* its full name (Box of chocolates)
* part of any word in its name, if nothing else shares that part (Box)
You can usually qualify an object with an adjective (English matching)
to help the MUSH determine which object you mean Adjectives include:
* my <obj> - an object you're carrying
* this <obj> - an object in your location (also: this here <obj>)
* toward <exit> - an exit in your location
* 1st, 2nd, etc. <obj> - one of a set of objects with the same names.
Objects are ordered in the order in which they're listed in your
inventory, room contents, and exit list (in that order). If there
aren't enough objects, this will fail.
You can use an adjective with an ordinal (my 1st <obj>, this 2nd <obj>, etc)
MATH FUNCTIONS
Math functions take one or more floating point numbers and return
a numeric value.
abs() acos() add() asin() atan()
atan2() bound() ceil() cos() ctu()
dist2d() dist3d() e() exp() fdiv()
floor() fmod() fraction() ln() lmath()
log() max() mean() median() min()
mul() pi() power() root() round()
sign() sin() sqrt() stddev() sub()
tan() trunc() val()
These functions operate only on integers (if passed floating point
numbers, they will return an error or misbehave):
dec() div() floordiv() inc() mod()
remainder()
Math functions are affected by a number of @config options, including the
TinyMUSH compatability options null_eq_zero and tiny_math.
See also: Vector Functions
MAX()
max(<number>[, ... , <numberN>])
This function returns the largest number in its list of arguments.
It can take any number of arguments.
See also: min(), lmath(), bound(), alphamax()
MD5
digest(list)
digest(<algorithm>, <string>)
Returns a checksum (hash, digest, etc.) of <string> using the given
<algorithm>. The result is a unique large number represented in base
16.
Typically at least the following algorithms are supported:
md4 md5 ripemd160 sha sha1 sha224 sha256 sha384 sha512 whirlpool
Depending on the host's OpenSSL version and how it was configured,
there might be more (or less) available. digest(list) returns the
methods a particular server understands if the OpenSSL library
version being used is recent enough (1.0.0 and higher), or '#-1
LISTING NOT SUPPORTED' on older versions. For portable code, stick
with MD5 and the SHA family.
digest(sha, whatever) is equivalent to sha0(whatever).
Example:
> think iter(digest(list), %i0(foo) => [digest(%i0, foo)], %b, %r)
...
MD4(foo) => 0ac6700c491d70fb8650940b1ca1e4b2
MD5(foo) => acbd18db4cc2f85cedef654fccc4a4d8
MDC2(foo) => 5da2a8f36bf237c84fddf81b67bd0afc
RIPEMD160(foo) => 42cfa211018ea492fdee45ac637b7972a0ad6873
SHA(foo) => 752678a483e77799a3651face01d064f9ca86779
SHA1(foo) => 0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33
SHA224(foo) => 0808f64e60d58979fcb676c96ec938270dea42445aeefcd3a4e6f8db
...
ME
The word 'me' refers to yourself. Some things to do when
starting out:
1) give yourself a description: @desc me=<description>
2) check your desc.: look me
3) lock yourself: @lock me==me
4) set your gender: @sex me=<male|female|neuter|plural>
See also: NEWBIE, @lock, @describe, @sex, MATCHING
MEAN()
mean(<number>[, ... , <numberN>])
Returns the mean (arithmetic average) of its arguments.
See also: median(), stddev(), lmath()
MEDIAN()
median(<number>[, ... , <numberN>)
Returns the median (the middlemost numerically) of its arguments.
See also: mean(), stddev(), lmath()
MEMBER()
member(<list>, <word>[, <delimiter>])
member() returns the position where <word> first occurs in <list>. If
<word> is not present in <list>, it returns 0. Elements of <list> are
<delimiter>-separated, or space-separated if no <delimiter> is given.
member() is case-sensitive, and does not perform wildcard matching.
If you need to do a wildcard match, use match(). To compare two strings
(instead of a word and list elements), consider comp().
See also: match(), grab(), comp(), strmatch()
MERGE()
merge(<string1>, <string2>, <characters>)
This function merges <string1> and <string2>, depending on <characters>.
If a character in <string1> is the same as one in <characters>, it is
replaced by the character in the corresponding position in <string2>.
The two strings must be of the same length.
Example:
> say merge(AB--EF,abcdef,-)
You say, "ABcdEF"
Spaces need to be treated specially. An empty argument is considered
to equal a space, for <characters>.
Example:
> say merge(AB[space(2)]EF,abcdef,)
You say, "ABcdEF"
See also: splice(), tr()
MESSAGE()
message(<recipients>, <message>, [<object>/]<attribute>
[, <arg0>[, ... , <arg9>][, <switches>]])
message() is the function form of @message, and sends a message, formatted
through an attribute, to a list of objects. See 'help @message' for more
information. <switches> is a space-separated list of one or more of
"nospoof", "spoof", "oemit" and "remit".
See also: @message, oemit(), remit(), speak()
MID()
mid(<string>, <first>, <length>)
mid() returns <length> characters from <string>, starting from the <first>
character. If <length> is positive, it counts forwards from the <first>
character; for negative <length>s, it counts backwards. Note that the
first character in <string> is numbered 0, not 1.
Examples:
> say mid(testing, 2, 2)
You say, "st"
> say mid(testing, 2, -2)
You say, "es"
See also: left(), right(), delete()
MIN()
min(<number>[, ... , <numberN>])
This function returns the smallest number in its list of arguments.
It can take any number of arguments.
See also: max(), lmath(), bound(), alphamin()
MISTRUST
Flag: MISTRUST (things, rooms, exits)
The MISTRUST flag prevents an object from controlling another object via
Control @locks, Zone @locks on ZMOs or SHARED players, or from controlling
other objects with the same owner. It also prevents the object from
inheriting the no_pay, unkillable and no_quota powers from its owner.
This flag can be used when you with a single player to retain ownership
of objects that other players will control or run arbitrary code on, and
don't want those objects to be able ot affect your other objects.
Note that if a MISTRUST object is set WIZARD is will still control all
objects in the database, and that MISTRUST does not prevent no_pay or
other powers from being applies to the object directly.
See also: control, TRUST
MIX()
mix([<object>/]<attribute>, <list1>, <list2>[, ... , <list10>, <delim>])
This function is similar to MAP(), except that it takes the elements
of up to ten lists, one by one, and passes them to the user-defined
function as %0, %1, up to %9, respectively, for elements of <list1> to
<list10>. If the lists are of different sizes, the shorter ones are padded
with empty elements. <delim> is used to separate elements; if it is not
specified, it defaults to a space. If using more than 2 lists, the last
argument must be a delimiter.
See 'help mix2' for examples.
MIX2
Examples of mix():
> &add_nums me=add(%0, %1)
> say mix(add_nums,1 2 3 4 5, 2 4 6 8 10)
You say, "3 6 9 12 15"
> &lengths me=strlen(%0) and [strlen(%1)].
> say mix(lengths, some random, words)
You say, "4 and 5. 6 and 0."
> &add_nums me=lmath(add, %0 %1 %2)
> say mix(add_nums, 1:2:3, 4:5:6, 7:8:9, :)
You say, "12:15:18"
See also: anonymous attributes, map(), step()
MOD()
mod(<number1>, <number2>)
modulo(<number1>, <number2>)
modulus(<number1>, <number2>)
remainder(<number1>, <number2>)
remainder() returns the remainder of the integer division of the first
number by the second. modulo() returns the modulo of the two numbers.
For positive numbers, these are the same, but they may be different
for negative numbers:
modulo(13,4) ==> 1 and remainder(13,4) ==> 1
modulo(-13,4) ==> 3 but remainder(-13,4) ==> -1
modulo(13,-4) ==> -3 but remainder(13,-4) ==> 1
modulo(-13,-4) ==> -1 and remainder(-13,-4) ==> -1
remainder()s result always has the same sign as the first argument.
modulo()s result always has the same sign as the second argument.
mod() and modulus() are aliases for modulo().
See also: div(), fdiv(), lmath()
MODULO()
mod(<number1>, <number2>)
modulo(<number1>, <number2>)
modulus(<number1>, <number2>)
remainder(<number1>, <number2>)
remainder() returns the remainder of the integer division of the first
number by the second. modulo() returns the modulo of the two numbers.
For positive numbers, these are the same, but they may be different
for negative numbers:
modulo(13,4) ==> 1 and remainder(13,4) ==> 1
modulo(-13,4) ==> 3 but remainder(-13,4) ==> -1
modulo(13,-4) ==> -3 but remainder(13,-4) ==> 1
modulo(-13,-4) ==> -1 and remainder(-13,-4) ==> -1
remainder()s result always has the same sign as the first argument.
modulo()s result always has the same sign as the second argument.
mod() and modulus() are aliases for modulo().
See also: div(), fdiv(), lmath()
MODULUS()
mod(<number1>, <number2>)
modulo(<number1>, <number2>)
modulus(<number1>, <number2>)
remainder(<number1>, <number2>)
remainder() returns the remainder of the integer division of the first
number by the second. modulo() returns the modulo of the two numbers.
For positive numbers, these are the same, but they may be different
for negative numbers:
modulo(13,4) ==> 1 and remainder(13,4) ==> 1
modulo(-13,4) ==> 3 but remainder(-13,4) ==> -1
modulo(13,-4) ==> -3 but remainder(13,-4) ==> 1
modulo(-13,-4) ==> -1 and remainder(-13,-4) ==> -1
remainder()s result always has the same sign as the first argument.
modulo()s result always has the same sign as the second argument.
mod() and modulus() are aliases for modulo().
See also: div(), fdiv(), lmath()
MOGRIFIER
@channel/mogrifier <channel>=<object>
@channel/mogrifier sets the mogrifier object for <channel>. <object> must
be an object that you control.
Mogrifiers let you tweak every aspect of a channel's output, before it
goes to individual players' @chatformats.
Before it begins mogrifying, three mogrifiers that alter the way chats are
handled are run, using the same arguments as @chatformat (except that %5 is
not set). First, <object>'s MOGRIFY`BLOCK attribute is called. If
MOGRIFY`BLOCK returns a non-empty string, then the resultant string is sent
back to the player, and no message is broadcast on the channel.
Next, MOGRIFY`OVERRIDE is called. If it returns a true value, player's
individual @chatformats will not be called for the message.
The MOGRIFY`NOBUFFER attribute is then called. If it returns a true value,
the message will not be included in the channel's recall buffer.
Continued in 'help mogrify2'.
MOGRIFY
@channel/mogrifier <channel>=<object>
@channel/mogrifier sets the mogrifier object for <channel>. <object> must
be an object that you control.
Mogrifiers let you tweak every aspect of a channel's output, before it
goes to individual players' @chatformats.
Before it begins mogrifying, three mogrifiers that alter the way chats are
handled are run, using the same arguments as @chatformat (except that %5 is
not set). First, <object>'s MOGRIFY`BLOCK attribute is called. If
MOGRIFY`BLOCK returns a non-empty string, then the resultant string is sent
back to the player, and no message is broadcast on the channel.
Next, MOGRIFY`OVERRIDE is called. If it returns a true value, player's
individual @chatformats will not be called for the message.
The MOGRIFY`NOBUFFER attribute is then called. If it returns a true value,
the message will not be included in the channel's recall buffer.
Continued in 'help mogrify2'.
MOGRIFY2
After that, mogrifiers which alter individual portions of the message are
called. See 'help mogrify3' for details.
After all these mogrifiers are called, MOGRIFY`FORMAT is evaluated. It has
the same use as @chatformat, but on a channel-wide level. It receives all
mogrified text (if any), so is generally intended only for reformatting the
whole channel text. It is also overriden by individual @chatformats (unless
MOGRIFY`OVERRIDE returned true).
See 'help mogrify3' for info on specific mogrifiers, and 'help mogrify4'
for some examples.
See also: cmogrifier()
MOGRIFY3
There are mogrify attributes for each individual piece of the channel
message. If any evaluate to a non-empty string, they replace that portion
of the chat message. Each mogrify attribtute is passed six arguments:
%0 - (Depends on the mogrifier.)
%1 - Channel name (unmogrified).
%2 - Chat type (", :, ;, |, @). See 'help @chatformat' for descriptions.
%3 - Message.
%4 - Player chan title*
%5 - Player name*
The mogrify attributes available are:
MOGRIFY`CHANNAME: %0 = default channel display. (e.g: "<Public>").
MOGRIFY`TITLE: %0 = The player's title, if any.
MOGRIFY`PLAYERNAME: %0 = The player's name.
MOGRIFY`SPEECHTEXT: %0 = "says"
MOGRIFY`MESSAGE: %0 = <the content of the say, pose, semipose or emit>
* These fields respect the "notitles" and "nonames" channel privs. If both
title and name would be empty, the name will default to "Someone".
See 'help mogrify4' for examples.
MOGRIFY4
For Talk Like a Pirate Day (Sep 19):
> @create Pirate Filter
> @chan/mogrifier public=Pirate Filter
> &MOGRIFY`BLOCK Pirate Filter=switch(%5,*ninja*,We don't need no ninjas!)
> &MOGRIFY`TITLE Pirate Filter=switch(poss(%#),her,Wench,Buccaneer)
> &MOGRIFY`SPEECHTEXT Pirate Filter=yo-hos
> &MOGRIFY`MESSAGE Pirate Filter=edit(%0,r,rrr)
> &MOGRIFY`CHANNAME Pirate Filter=(%1-Yarr!)
Output:
> +public Hello
(Public-Yarr!) Buccaneer Walker yo-hos, "Hello"
> +public :thinks it's talk like a pirate day?
(Public-Yarr!) Buccaneer Walker thinks it's talk like a pirrrate day?
> +public Pirates suck, Ninjas are better!
We don't need no ninjas!
(And the message is blocked, won't be sent out).
See 'help mogrify5' for more examples.
MOGRIFY5
For keeping a channel PG and safe, and altering the channel name from
<Public> to [Public], with a green "Public".
> @create PG Channel Mogrifier
> @chan/mogrifier public=PG Channel Mogrifier
> &BADWORDS PG=list of bad words
> &MOGRIFY`MESSAGE PG=regeditall(%0,\\b([edit(v(badwords),%b,|)])\\b,***)
> &MOGRIFY`CHANNAME PG=\[[ansi(g,%1)]\]
> &MOGRIFY`title PG=if(strlen(%0),\(%0\))
Output: (With a channel title of "Fast") ("Public" is green)
> +p Hello
[Public] (Fast) Walker says, "hello"
> +p what the list is going on bad bad?
[Public] (Fast) Walker says, "what the *** is going on *** ***?"
Combine MOGRIFY`FORMAT with speak() and you can have plenty of fun:
On-channel language systems and more!
See 'help mogrify6' for more examples.
MOGRIFY6
This example tweaks individual elements of the channel output, and then uses
MOGRIFY`FORMAT to recolour the entire string.
> @chan/mogrifier Public=Mog
> &MOGRIFY`CHANNAME Mog=\[%1\]
> &MOGRIFY`PLATERNAME Mog=ucstr(%0)
> &MOGRIFY`FORMAT Mog=ansi(h,%5)
Stop anything by an admin from being altered by chatformats, and prevent
anything said by Wiggles from being recorded in the channel's recall buffer.
> &MOGRIFY`OVERRIDE Mog=orlflags(%#, Wizard Royalty)
> &MOGRIFY`NOBUFFER Mog=switch(%#, pmatch(Wiggles), 1, 0)
MONEY
The MUSH has a built-in money system, which gives a starting amount
of money to new players and hands out a daily allowance thereafter.
MUSH money (the default name is "pennies", but this may be different
depending on the particular MUSH) is spent on some MUSH commands
that are computationally expensive or alter the database. In
addition, every time you "queue" a command, it costs you a certain
amount of money -- this prevents looping from getting out of
control, since when all your money is spent, you can't queue any
more commands.
The money system can also be used on player-created objects by setting
@cost/@payment/@opayment/@apayment attributes and using the "give" command
to give pennies, or by setting @pricelist/@buy/@obuy/@abuy attributes and
buying items with the "buy" command. The Pay @lock on an object controls
who can give it pennies.
The "score" command tells you how many pennies you have.
See also: COSTS, give, @cost, @payment, @lock, buy, @buy, score, money()
MONEY()
money(<integer>)
money(<object>)
If given an integer, money() returns the appropriate name (either singular
or plural) for that amount of money, as set in the money_singular and
money_plural @config options.
Otherwise, it returns the amount of money <object> has. If <object> has
the no_pay power, the value of the 'max_pennies' @config option is
returned. <object> must have the power itself, rather than inheriting it
from its owner, in this case.
Examples:
> say money(Javelin)
You say, "150"
> say money(1)
You say, "Penny"
> say money(2)
You say, "Pennies"
> &counter me=$count *: @emit %0 [money(%0)]
> count 2
2 Pennies
See also: score
MONITOR
Flag: MONITOR (players, things, rooms)
The MONITOR flag activates the ^-listen patterns on an object. Objects
which have ^-listen patterns but are not set MONITOR do not check those
patterns. Unlike $-commands, ^-listens are not inherited from parents by
default; LISTEN_PARENT must be set as well as MONITOR to enable this.
The NO_COMMAND attribute flag disables ^-listen matching for a single
attribute; see 'help attribute flags' for details.
If using the LISTEN Attribute Tree, you must set the Root Attribute
!NO_COMMAND. By default this Attribute/Attribute Root has been set
NO_COMMAND by the system. Attributes which are set NO_COMMAND will not
be checked for ^-listen patterns.
This flag used to allow players to hear when someone connected to
the game, but that is now controlled by the HEAR_CONNECT flag.
See also: LISTENING, @listen, LISTEN_PARENT, HEAR_CONNECT
MOVE
go[to] <direction>
go[to] home
move <direction>
move home
Goes in the specified direction. <Direction> can be the name or
alias of an exit in your area, the enter alias of an object in your
area, or the leave alias of the object you are in. You do not need
to use the word 'go' or 'move', in fact -- simply typing the
direction will have the same effect.
'go home' is a special command that returns you to your home
room/object. Some MUSHes may disable this command.
See also: HOME, @link, @ealias, @lalias, EXITS
MSECS()
mtime(<object>[, <utc?>])
msecs(<object>)
mtime() returns the date and time that one of <object>'s attributes or
locks was last added, deleted, or modified. The time returned is in the
server's local timezone, unless <utc?> is true, in which case the time is
in the UTC timezone.
msecs() returns the time as the number of seconds since the epoch.
Only things, rooms, and exits have modification times. You must be able to
examine an object to see its modification time.
See also: ctime(), time(), secs(), convtime(), convsecs()
MSSP-REQUEST
MSSP-REQUEST
This socket command shows some basic information about the MUSH, along with
any admin-defined information specified in mush.cnf with the 'mssp' option.
The info is also shown via the MSSP telnet option. Useful for MUD crawlers
and bots. For more information about the MUD Server Status Protocol (MSSP),
See also: INFO
MTIME()
mtime(<object>[, <utc?>])
msecs(<object>)
mtime() returns the date and time that one of <object>'s attributes or
locks was last added, deleted, or modified. The time returned is in the
server's local timezone, unless <utc?> is true, in which case the time is
in the UTC timezone.
msecs() returns the time as the number of seconds since the epoch.
Only things, rooms, and exits have modification times. You must be able to
examine an object to see its modification time.
See also: ctime(), time(), secs(), convtime(), convsecs()
MUDNAME()
mudname()
mudurl()
These functions return the name of the MUSH and the MUSH's website address,
as set in the 'mud_name' and 'mud_url' @config options.
Example:
> say mudname()
You say, "TestMUSH"
> say mudurl()
see also: config()
MUDURL()
mudname()
mudurl()
These functions return the name of the MUSH and the MUSH's website address,
as set in the 'mud_name' and 'mud_url' @config options.
Example:
> say mudname()
You say, "TestMUSH"
> say mudurl()
see also: config()
MUL()
mul(<number1>, <number2>[, ... , <numberN>])
Returns the product of some numbers.
See also: lmath(), div(), fdiv()
MUNGE()
munge([<object>/]<attribute>, <list1>, <list2>[, <delimiter>[, <osep>]])
This function takes two lists of equal length. It passes the
entirety of <list1> to the user-defined function as %0, and the
delimiter as %1. Then, this resulting list is matched with elements
in <list 2>, and the rearranged <list2> is returned.
This is useful for doing things like sorting a list, and then returning
the corresponding elements in the other list. If a resulting element
from the user-defined function doesn't match an element in the
original <list1>, a corresponding element from <list2> does not
appear in the final result.
<delimiter> defaults to a space, and <osep> defaults to <delimiter>.
See 'help munge2' for examples.
MUNGE2
For example: Consider attribute PLACES, which contains "Fort Benden
Ista", and another attribute DBREFS contains the dbrefs of the main
JUMP_OK location of these areas, "#20 #9000 #5000". We want to
return a list of dbrefs, corresponding to the names of the places
sorted alphabetically. The places sorted this way would be "Benden
Fort Ista", so we want the final list to be "#9000 #20 #5000". The
functions, using munge(), are simple:
> &sort me=sort(%0)
> say munge(sort, v(places), v(dbrefs))
You say, "#9000 #20 #5000"
See 'help munge3' for another example.
MUNGE3
Another common task that munge() is well suited for is sorting a
list of dbrefs of players by order of connection. This example
reuses the &sort attribute from the previous one, but unlike the
other example, it builds the list to sort on out of the list to
return.
> &faction_members me=#3 #12 #234
> say munge(sort, iter(v(faction_members),conn(##)), v(faction_members))
You say, "#12 #234 #3"
See also: anonymous attributes
MUSHCODE
MUSHcode is the programming language available within the MUSH
itself with which you can create user-defined commands and macros.
It is sometimes called "softcode" to distinguish it from "hardcode",
which is the language that the source code for the MUSH server is
written in. (Incidentally, hardcode is written in the C programming
language.)
At its most basic, writing MUSHcode is just stringing together a
series of commands that you would otherwise just type in one at a
time. You can store MUSHcode in attributes on any type of object
you own or control (including yourself!). The series of commands
can be triggered by using a user-defined command or by using
@trigger.
Continued in 'help mushcode2'.
MUSHCODE2
If you would like to learn more about mushcoding and how to create
macros for yourself, the following help files may be useful.
However, the best way to learn is by obtaining a copy of Amberyl's
MUSH manual and following the examples described there. The manual
is available by anonymous FTP from: ftp.pennmush.org in the
directory /pub/PennMUSH/Manuals
Related Help Topics (in no particular order)
-------------------
ATTRIBUTES SUBSTITUTION NON-STANDARD ATTRIBUTES
ENACTOR EXECUTOR USER-DEFINED COMMANDS
DBREFS EVALUATION TYPES OF OBJECTS
WILDCARDS STRINGS LISTS
ACTION LISTS
MWHO()
mwho()
mwhoid()
mwho() returns a list of the dbref numbers for all current-connected,
non-hidden players. It's exactly the same as lwho() used by a mortal,
and is suitable for use on privileged global objects who need an
unprivileged who-list. In some cases, lwho(<viewer>) may be preferable
to mwho(), as it includes hidden players for <viewer>s who can see them.
mwhoid() returns a list of objids instead.
See also: lwho(), nwho()
MWHOID()
mwho()
mwhoid()
mwho() returns a list of the dbref numbers for all current-connected,
non-hidden players. It's exactly the same as lwho() used by a mortal,
and is suitable for use on privileged global objects who need an
unprivileged who-list. In some cases, lwho(<viewer>) may be preferable
to mwho(), as it includes hidden players for <viewer>s who can see them.
mwhoid() returns a list of objids instead.
See also: lwho(), nwho()
MYOPIC
Flag: MYOPIC (players)
Players set MYOPIC will not see the dbref number or flag list of objects
they control after their names. It's useful if you don't like to see object
numbers.
Anything owned by a MYOPIC player is also treated as MYOPIC.
See also: DBREF, TERSE
NAME()
name(<object>[, <new name>])
name() returns the name of object <object>. For exits, name() returns only
the displayed name of the exit.
With two arguments, name() attempts to rename <object> to <new name>, as
per @name.
See also: fullname(), accname(), iname(), alias()
NAMEGRAB()
namegrab(<dbref list>, <name>)
namegraball(<dbref list>, <name>)
The namegrab() function returns the first dbref in the list that would
match <name> as if you were checking num() or locate(). An exact match
has priority over partial matches.
namegraball() returns all dbrefs whose names would be matched by <name>.
Example: #0 = Room Zero, #1 = One, #2 = Master Room
> say namegrab(#0 #1 #2,room)
You say, "#0"
> say namegrab(#0 #1 #2,master room)
You say, "#2"
> say namegraball(#0 #1 #2,room)
You say, "#0 #2"
See also: namelist(), locate()
NAMEGRABALL()
namegrab(<dbref list>, <name>)
namegraball(<dbref list>, <name>)
The namegrab() function returns the first dbref in the list that would
match <name> as if you were checking num() or locate(). An exact match
has priority over partial matches.
namegraball() returns all dbrefs whose names would be matched by <name>.
Example: #0 = Room Zero, #1 = One, #2 = Master Room
> say namegrab(#0 #1 #2,room)
You say, "#0"
> say namegrab(#0 #1 #2,master room)
You say, "#2"
> say namegraball(#0 #1 #2,room)
You say, "#0 #2"
See also: namelist(), locate()
NAMELIST()
namelist(<player-list>[, [<object>/]<attribute>])
namelist() takes a list of players of the form used by the page command
and returns a corresponding list of dbrefs. Invalid and ambiguous names
return the dbrefs #-1 and #-2, respectively.
If an <object>/<attribute> is given, the specified attribute will be
called once for each invalid name, with the name as %0 and the dbref
returned (#-1 for an unmatched name, #-2 for an ambiguous one) as %1.
Example:
> &test me=pemit(%#,Bad name "%0")
> say namelist(#1 Javelin "ringo spar" bogus, test)
Bad name "bogus"
You say, "#1 #7 #56 #-1"
See also: namegrab(), name(), locate()
NAND()
nand(<boolean1>[, ... , <booleanN>])
ncand(<boolean1>[, ... , <booleanN>])
These functions return 1 if at least one of their arguments are false, and
0 if all are true. nand() always evaluates all of its arguments, while
ncand() stops evaluating after the first false value.
Equivalent to not(and()) and not(cand()), but more efficient.
See also: lmath(), and(), cand(), or(), nor()
NATTR()
nattr(<object>[/<attribute pattern>])
nattrp(<object>[/<attribute pattern>])
regnattr(<object>[/<regexp>])
regnattrp(<object>[/<regexp>])
nattr() returns the number of attributes on <object> that you can see
which match the given <attribute pattern>. It is considerably faster than
words(lattr()) and doesn't suffer from buffer length constraints. It's
designed primarily for statistical purposes. <attribute pattern> defaults
to "*", which does not include branches in attribute trees; use "**" if
you need to count attribute trees.
regnattr() matches attribute names against the regular expression <regexp>.
nattrp() and regnattrp() also count matching attributes on the parent.
attrcnt() and attrpcnt() are aliases for nattr() and nattrp() respectively.
See also: lattr(), hasattr(), xattr(), wildcards
NATTRP()
nattr(<object>[/<attribute pattern>])
nattrp(<object>[/<attribute pattern>])
regnattr(<object>[/<regexp>])
regnattrp(<object>[/<regexp>])
nattr() returns the number of attributes on <object> that you can see
which match the given <attribute pattern>. It is considerably faster than
words(lattr()) and doesn't suffer from buffer length constraints. It's
designed primarily for statistical purposes. <attribute pattern> defaults
to "*", which does not include branches in attribute trees; use "**" if
you need to count attribute trees.
regnattr() matches attribute names against the regular expression <regexp>.
nattrp() and regnattrp() also count matching attributes on the parent.
attrcnt() and attrpcnt() are aliases for nattr() and nattrp() respectively.
See also: lattr(), hasattr(), xattr(), wildcards
NCAND()
nand(<boolean1>[, ... , <booleanN>])
ncand(<boolean1>[, ... , <booleanN>])
These functions return 1 if at least one of their arguments are false, and
0 if all are true. nand() always evaluates all of its arguments, while
ncand() stops evaluating after the first false value.
Equivalent to not(and()) and not(cand()), but more efficient.
See also: lmath(), and(), cand(), or(), nor()
NCHILDREN()
lsearch(<player>[, ... , <classN>, <restrictionN>])
nlsearch(<player>[, ... , <classN>, <restrictionN>])
lsearchr(<player>[, ... , <classN>, <restrictionN>])
children(<object>)
nchildren(<object>)
This function is similar to the @search command, except it returns just a
list of dbref numbers. The function must have at least three arguments. You
can specify "all" or <player> for the <player> field; for mortals, only
objects they can examine are included. If you do not want to restrict
something, use "none" for <class> and <restriction>.
The possible <class>es and <restriction>s are the same as those accepted
by @search. lsearch() can accept multiple class/restriction pairs, and
applies them in a boolean "AND" fashion, returning only dbrefs that
fulfill all restrictions. See 'help @search' for information about them.
children() is exactly the same as lsearch([me|all], parent, <object>),
using "all" for See_All/Search players and "me" for others.
nlsearch(...) and nchildren(...) return the count of results that
would be returned by lsearch() or children() with the same args.
Continued in 'help lsearch2'.
NCON()
ncon(<object>)
nvcon(<object>)
These functions return a the number of objects inside <object>. They are
identical to words(lcon(<object>)) and words(lvcon(<object>)),
respectively, but are more efficient and do not suffer from buffer
constraints.
See also: nexits(), nplayers(), xcon(), lcon(), lvcon()
NCOND()
cond(<cond>, <expr>[, ... , <condN>, <exprN>][, <default>])
condall(<cond>, <expr>[, ... , <condN>, <exprN>][, <default>])
ncond(<cond>, <expr>[, ... , <condN>, <exprN>][, <default>])
ncondall(<cond>, <expr>[, ... , <condN>, <exprN>][, <default>])
cond() evaluates <cond>s until one returns a true value. Should
none return true, <default> is returned.
condall() returns all <expr>s for those <cond>s that evaluate to
true, or <default> if none are true.
ncond() and ncondall() are identical to cond(), except it returns
<expr>s for which <cond>s evaluate to false.
Examples:
> say cond(0,This is false,#-1,This is also false,#123,This is true)
You say, "This is true"
> say ncond(0,This is false,#-1,This is also false,#123,This is true)
You say, "This is false"
> say ncondall(0,This is false,#-1,This is also false,#123,This is true)
You say, "This is falseThis is also false"
See also: firstof(), allof()
NCONDALL()
cond(<cond>, <expr>[, ... , <condN>, <exprN>][, <default>])
condall(<cond>, <expr>[, ... , <condN>, <exprN>][, <default>])
ncond(<cond>, <expr>[, ... , <condN>, <exprN>][, <default>])
ncondall(<cond>, <expr>[, ... , <condN>, <exprN>][, <default>])
cond() evaluates <cond>s until one returns a true value. Should
none return true, <default> is returned.
condall() returns all <expr>s for those <cond>s that evaluate to
true, or <default> if none are true.
ncond() and ncondall() are identical to cond(), except it returns
<expr>s for which <cond>s evaluate to false.
Examples:
> say cond(0,This is false,#-1,This is also false,#123,This is true)
You say, "This is true"
> say ncond(0,This is false,#-1,This is also false,#123,This is true)
You say, "This is false"
> say ncondall(0,This is false,#-1,This is also false,#123,This is true)
You say, "This is falseThis is also false"
See also: firstof(), allof()
NCOR()
nor(<boolean1>[, ... , <booleanN>])
ncor(<boolean1>[, ... , <booleanN>])
These functions return 1 if all their arguments are false, and 0 if any
are true. nor() always evaluates all arguments, while ncor() stops
evaluating after the first true value.
Equivalent to not(or()) and not(cor()), but more efficient.
See also: and(), or(), xor(), not(), nand()
NEARBY()
nearby(<object 1>, <object 2>)
Returns 1 if <object 1> is "nearby" <object 2>, and 0 otherwise. "Nearby"
means the objects are in the same location, or that one is located inside
the other. You must control at least one of the objects; if you don't, or
if one of the objects can't be found, nearby() returns #-1.
NEQ()
neq(<number1>, <number2>[, ... , <numberN>])
Returns 0 if all the given <number>s are the same, and 1 otherwise.
Basically the same as [not(eq(<number1>, <number2>[, ... , <numberN>]))]
but more efficient.
See also: eq(), not(), lmath()
NEWBIE
If you are new to MUSHing, the help files may seem confusing. Most
of them are written in a specific style, however, and once you
understand it the files are extremely helpful.
The first line of a help file on a command or function will normally
be the syntax of the command. "Syntax" means the way the command
needs to be typed in. In the help files, when the syntax of a
command is described, square brackets [] mean that that part of the
command is optional and doesn't have to be typed in. Also, pointy
brackets <> mean that that part of the command needs to be replaced
with a specific piece of information.
You should not type the [] or <> brackets when entering a command.
Continued in 'help newbie2' -- type 'help newbie2' without the quotes.
NEWBIE2
For example, the syntax of the help command is:
help [<topic>]
What this means is that to get help, you would type first the word
"help" and then you could optionally type the name of a more
specific topic in order to get help on that topic. Just typing
"help" will work too (that's why the <topic> part is optional).
Some common commands that you should look at help for are:
look say go page pose get give home
Just type help <command> for help. Example: help page
Continued in 'help newbie3'.
NEWBIE3
There is help available on every standard MUSH command. If you see a
command or someone mentions one to you that you want to know more
about, try just typing: help <command name> -- that will most likely
bring up the help file on it.
Please note that just because there is help available on a command
does not necessarily mean that the command can be used on this
MUSH. The siteadmin of the MUSH can choose to turn off some
commands. If there's something that you would like available, and it
isn't, please ask a wizard why not.
It is also highly recommended that any new player read the MUSH manual,
written by Amberyl. It is available by anonymous FTP from:
ftp.pennmush.org
in the directory:
/pub/PennMUSH/Manuals
or by HTTP from:
NEWS
news [<topic>]
The news system works just like the help system. Many MUSHes use it
to provide standard information on the rules, theme, and customized
commands of the particular MUSH. It is highly recommended that you
read it regularly.
NEXITS()
nexits(<room>)
nvexits(<room>)
These functions return a count of the exits in a room. They are equivilent
to words(lexits(<room>)) and words(lvexits(<room>)) respectively, though
are more efficient, and don't suffer from buffer constraints.
See also: ncon(), nplayers(), xexits(), lexits(), lvexits()
NEXT()
next(<object>)
If <object> is an exit, then next() will return the next exit in <object>'s
source room. If <object> is a thing or a player, then next() will return
the next object in the contents list of <object>'s location. Otherwise,
it returns a #-1. #-1 is also used to denote that there are no more exits
or objects after <object>.
You can get the complete contents of any container you may examine,
regardless of whether or not objects are dark. You can get the
partial contents (obeying DARK/LIGHT/etc.) of your current location
or the enactor (%#). You CANNOT get the contents of anything else,
regardless of whether or not you have objects in it. These rules
apply to exits, as well.
See also: lcon(), lexits(), con(), exit()
NEXTDBREF()
nextdbref()
This function returns the next dbref on the free list; when the next
object is @created (or @dug, or @opened, or @pcreated, etc.), it
will have this dbref.
See also: @stats, stats()
NLSEARCH()
lsearch(<player>[, ... , <classN>, <restrictionN>])
nlsearch(<player>[, ... , <classN>, <restrictionN>])
lsearchr(<player>[, ... , <classN>, <restrictionN>])
children(<object>)
nchildren(<object>)
This function is similar to the @search command, except it returns just a
list of dbref numbers. The function must have at least three arguments. You
can specify "all" or <player> for the <player> field; for mortals, only
objects they can examine are included. If you do not want to restrict
something, use "none" for <class> and <restriction>.
The possible <class>es and <restriction>s are the same as those accepted
by @search. lsearch() can accept multiple class/restriction pairs, and
applies them in a boolean "AND" fashion, returning only dbrefs that
fulfill all restrictions. See 'help @search' for information about them.
children() is exactly the same as lsearch([me|all], parent, <object>),
using "all" for See_All/Search players and "me" for others.
nlsearch(...) and nchildren(...) return the count of results that
would be returned by lsearch() or children() with the same args.
Continued in 'help lsearch2'.
NMWHO()
nwho([<viewer>])
nmwho()
nwho() returns a count of all currently-connected players. When mortals
use this function, hidden players are NOT counted. See_All players can
specify a <viewer> to get a count of the number of players that <viewer>
can see is online.
nmwho() returns a count of all currently connected, non-hidden players.
It's exactly the same as nwho() used by a mortal, and is suitable for use
on privileged global objects that always need an unprivileged count of
who is online.
These functions are equivilent to words(lwho([<viewer>])) and
words(mwho()), but are more efficient, and don't suffer from buffer
constraints.
See also: lwho(), mwho(), xwho(), xmwho()
NO_COMMAND
Flag: NO_COMMAND (all types)
The NO_COMMAND flag disables the checking of $-commands on an object. The
server runs faster when fewer objects are checked for $-commands; thus,
any object which does not have $-commands on it should be set NO_COMMAND.
Many MUSHes choose to have all objects initially set NO_COMMAND at
creation. The flag has no effect on exits, which are never checked for
$-commands.
There is also a NO_COMMAND attribute flag, which disables $-command AND
^-listen checking for a single attribute. See 'help attribute flags'.
See also: USER-DEFINED COMMANDS
NO_LEAVE
Flag: NO_LEAVE (objects)
When this flag is set on an object, players cannot "leave" it. Attempts to
leave the object will trigger its @LFAIL, @OLFAIL, and @ALFAIL, if set.
For more specific control, you can set an @lock/leave.
See also: leave, @lock
NO_LOG
Flag: NO_LOG (all types)
When set on an object, prevents the logging of commands that object runs.
Useful on globals objects when the log_commands config option is turned on.
Only settable by Wizards.
NO_PAY POWER
The No_Pay power gives an object infinite pennies; it will never run out.
Use carefully! Pennies are intended to prevent runaway code (infinite
loops) which can lag the game. It's recommended that, instead of setting
objects no_pay, you regularly give them large amounts of money instead, as
this will allow them to function correctly without letting them loop
indefinitely.
Wizards used to have this power implicitly, but no longer do, for the
reasons given above. (Wizards can still give infinite numbers of pennies
to others, however.)
God is implicitly no_pay and, if you have the power and are not set
MISTRUST, your objects are implicitly no_pay.
See also: give, DEBIT POWER
NO_QUOTA POWER
The No_Quota power lets you create an unlimited number of objects,
regardless of @quota settings. Wizards, Royalty, and their objects have
this power implicitly.
If you have this power, and are not set MISTRUST, your objects have the
power implicitly.
See also: QUOTA POWER, @quota
NO_TEL
Flag: NO_TEL (rooms)
The NO_TEL flag prevents objects in a room from being @teleported; mortals
in the room cannot use @teleport, nor can other objects @teleport them
out. This flag is checked on the "absolute room" of an object; thus, if
you are in a container in a room which is NO_TEL, you cannot use
@teleport from that container. There is no way to get out of a NO_TEL room
except by exiting in some "normal" manner, or by going "home". Puzzle
rooms, prisons, etc, would probably benefit from this flag.
See also: JUMP_OK, Z_TEL
NO_WARN
Flag: NO_WARN (all types)
When this flag is set on an object, its owner will not receive any building
warnings from that object. When it is set on a player, that player will not
receive any building warnings at all.
See also: warnings, @warnings, @wcheck
NOACCENTS
Flag: NOACCENTS (players)
This flag causes all accented characters to be converted to non-accented
alternatives before being sent to a connection. See HELP STRIPACCENTS()
for caveats.
See also: i18n, accent(), stripaccents()
NOLEAVE
Flag: NO_LEAVE (objects)
When this flag is set on an object, players cannot "leave" it. Attempts to
leave the object will trigger its @LFAIL, @OLFAIL, and @ALFAIL, if set.
For more specific control, you can set an @lock/leave.
See also: leave, @lock
NON-STANDARD ATTRIBUTES
While there are many standard attributes in MUSH, objects can also
have an unlimited number of attributes, with any name you wish to
use. In the past, you were limited to attributes named VA-VZ, WA-WZ,
XA-XZ; these are still available as standard attributes. However, it
is strongly recommended that you use non-standard attributes and
meaningful names in order to make maintaining your MUSHCode easier.
To set a non-standard attribute, you can use these formats:
&<attribute name> <obj> = <value> OR
@_<attribute_name> <obj> = <value> OR
@set <obj> = <attribute_name>:<value>
You can get the value of attributes using the functions v(), get(),
and xget(). You can evaluate attributes using u(), eval(), and
get_eval(). All attributes can be used in attribute locks and can
be 'owned' independent of object ownership.
See also: ATTRIBUTES, ATTRIB-OWNERSHIP, Attribute Functions, ATTRIBUTE TREES,
ATTRIBUTE FLAGS
NONAME
Normally, the enactor's name and a space are prepended to the 'overb' and
'oxverb' attributes automatically. The NOSPACE attribute flag prevents a
space being placed between the name and attribute value, and the NONAME
attribute flag stops the name being added at all.
Example:
> @ouse Foo=has used Foo!
> use Foo
Sketch has used Foo!
> @ouse Foo='s used Foo!
> @set Foo/ouse=nospace
> use Foo
Sketch's used Foo!
> @ouse Foo=Foo has been used by %n!
> @set Foo/ouse=noname
> use Foo
Foo has been used by Sketch!
See also: @verb, attribute flags
NOR()
nor(<boolean1>[, ... , <booleanN>])
ncor(<boolean1>[, ... , <booleanN>])
These functions return 1 if all their arguments are false, and 0 if any
are true. nor() always evaluates all arguments, while ncor() stops
evaluating after the first true value.
Equivalent to not(or()) and not(cor()), but more efficient.
See also: and(), or(), xor(), not(), nand()
NOSPACE
Normally, the enactor's name and a space are prepended to the 'overb' and
'oxverb' attributes automatically. The NOSPACE attribute flag prevents a
space being placed between the name and attribute value, and the NONAME
attribute flag stops the name being added at all.
Example:
> @ouse Foo=has used Foo!
> use Foo
Sketch has used Foo!
> @ouse Foo='s used Foo!
> @set Foo/ouse=nospace
> use Foo
Sketch's used Foo!
> @ouse Foo=Foo has been used by %n!
> @set Foo/ouse=noname
> use Foo
Foo has been used by Sketch!
See also: @verb, attribute flags
NOSPOOF
Flag: NOSPOOF (all types)
Flag: PARANOID (all types)
If an object is set NOSPOOF, messages of all kinds will be tagged with the
name of the person/object causing them. This prevents spoofing and lets you
see where such messages originated. When a NOSPOOF object is also set
PARANOID, the dbref of the emitting object is also shown. You will not see
nospoof information for your own messages unless you are also set PARANOID.
When a player is set NOSPOOF or PARANOID, everything it owns is also
treated as having the flag.
Note that NOSPOOF output can be spammy. Nospoof information is not matched
against @listen or ^-listen patterns.
The nospoof tag is [Source:], and the paranoid tag is [Source(#dbref)].
See also: SPOOFING, @emit, @pemit, @remit, @oemit, @nspemit
NOT()
not(<boolean>)
not() returns 1 if <boolean> is false, and 0 if it's true.
The definition of truth and falsehood depends on configuration settings;
see 'help boolean values' for details.
See also: Boolean Functions, t(), and(), or(), nor(), xor()
NOWARN
Flag: NO_WARN (all types)
When this flag is set on an object, its owner will not receive any building
warnings from that object. When it is set on a player, that player will not
receive any building warnings at all.
See also: warnings, @warnings, @wcheck
NPLAYERS()
nplayers(<object>)
nvplayers(<object>)
These functions return a count of the players in <object>. They are
equivilent to words(lplayers(<object>)) and words(lvplayers(<object>))
respectively, though are more efficient and do not suffer from buffer
constraints.
See also: ncon(), nexits(), xplayers(), lplayers(), lvplayers()
NSCEMIT()
@cemit[/nosiy|/silent][/noeval] <channel>=<message>
@nscemit[/nosiy|/silent][/noeval] <channel>=<message>
cemit(<channel>, <message>[, <noisy>])
nscemit(<channel>, <message>[, <noisy>])
@cemit emits <message> on <channel>. It does not include your name. The
channel prefix is included if the /noisy switch is given, and omitted if
/silent is given - if neither is given, the default behaviour is controlled
by the noisy_cemit @config option. The /noeval switch prevents <message>
from being evaluated.
You must be able to speak on the channel, or have the See_All and Pemit_All
@powers, to @cemit on the channel.
@nscemit is exactly the same, but does not produce nospoof information when
used by players with the Can_spoof @power.
cemit() and nscemit() work the same as @cemit/silent and @nscemit/silent,
respectively. If <noisy> is given as a true value, they work like
@cemit/noisy and @nscemit/noisy, respectively, instead.
@cemit is intended for use in writing extended chat systems.
See also: @chat
NSEARCH()
lsearch(<player>[, ... , <classN>, <restrictionN>])
nlsearch(<player>[, ... , <classN>, <restrictionN>])
lsearchr(<player>[, ... , <classN>, <restrictionN>])
children(<object>)
nchildren(<object>)
This function is similar to the @search command, except it returns just a
list of dbref numbers. The function must have at least three arguments. You
can specify "all" or <player> for the <player> field; for mortals, only
objects they can examine are included. If you do not want to restrict
something, use "none" for <class> and <restriction>.
The possible <class>es and <restriction>s are the same as those accepted
by @search. lsearch() can accept multiple class/restriction pairs, and
applies them in a boolean "AND" fashion, returning only dbrefs that
fulfill all restrictions. See 'help @search' for information about them.
children() is exactly the same as lsearch([me|all], parent, <object>),
using "all" for See_All/Search players and "me" for others.
nlsearch(...) and nchildren(...) return the count of results that
would be returned by lsearch() or children() with the same args.
Continued in 'help lsearch2'.
NSEMIT()
emit(<message>)
nsemit(<message>)
Sends a message to the room, as per @emit.
nsemit() works like @nsemit.
See also: pemit(), remit(), lemit(), oemit(), zemit()
NSLEMIT()
lemit(<message>)
nslemit(<message>)
lemit() emits a message in the caller's outermost room, as per @lemit.
nslemit() like @nslemit.
See also: @lemit, remit()
NSOEMIT()
oemit([<room>/]<object> [... <object>], <message>)
nsoemit([<room>/]<object> [... <object>], <message>)
Sends <message> to all objects in <room> (default is the location
of <object>(s)) except <object>(s), as per @oemit.
nsoemit() works like @nsoemit.
NSPEMIT()
pemit(<object list|port numbers>, <message>)
nspemit(<object list|port numbers>, <message>)
prompt(<object list>, <message>)
nsprompt(<object list>, <message>)
With an <object list>, pemit() will send each object on the list a message,
as per the @pemit/list command. It returns nothing. It respects page-locks
and HAVEN flags on players. With <port numbers>, pemit() sends the
message to the specified ports only, like @pemit/port/list.
nspemit() works like @nspemit/list.
prompt() adds a telnet GOAHEAD to the end of the message, as per the
@prompt command. nsprompt() that works like @nsprompt.
See also: @prompt, @nsprompt, PROMPT_NEWLINES
NSPROMPT()
pemit(<object list|port numbers>, <message>)
nspemit(<object list|port numbers>, <message>)
prompt(<object list>, <message>)
nsprompt(<object list>, <message>)
With an <object list>, pemit() will send each object on the list a message,
as per the @pemit/list command. It returns nothing. It respects page-locks
and HAVEN flags on players. With <port numbers>, pemit() sends the
message to the specified ports only, like @pemit/port/list.
nspemit() works like @nspemit/list.
prompt() adds a telnet GOAHEAD to the end of the message, as per the
@prompt command. nsprompt() that works like @nsprompt.
See also: @prompt, @nsprompt, PROMPT_NEWLINES
NSREMIT()
remit(<object list>, <message>)
nsremit(<object list>, <message>)
Sends a message to the contents of all the objects specified in
<object list>, as per @remit/list.
nsremit() works like @nsremit/list.
See also: @remit, pemit(), lemit()
NSZEMIT()
zemit(<zone>, <message>)
nszemit(<zone>, <message>)
zemit() emits <message> in every room @chzone'd to <zone>, as per @zemit.
nszemit() works like @nszemit.
See also: @zemit, zone(), zfun(), zwho(), ZONES
NTHINGS()
nthings(<object>)
nvthings(<object>)
These functions return a count of the things in a container. They are
equivilent to words(lthings(<object>)) and words(lvthings(<object>))
respectively, though are more efficient and do not suffer from buffer
constraints.
See also: ncon(), nexits(), xthings(), lthings(), lvthings()
NULL()
@@(<expression>)
null(<expression>[, ... , <expression>])
The @@() function does nothing and returns nothing. It does not evaluate
its argument. It could be used for commenting, perhaps.
The null() function is similar, but does evaluate its argument(s),
so side-effects can occur within a null(). Useful for eating the
output of functions when you don't use that output.
See also: @@
NUM()
num(<object>)
Returns the dbref number of <object>. <object> must be the name of an
object which is near to the caller, or the name of a player prefixed with
a '*'.
See also: locate(), rnum()
NUMVERSION()
version()
numversion()
version() returns a string which contains various version
information for the MUSH you're on. numversion() returns an integer
representation of the version/patchlevel which can be used for
softcode comparison.
Example:
> say version()
You say "PennMUSH version 1.8.1 patchlevel 4 [12/06/2005]"
> say numversion()
You say "1008001004"
> say version()
You say, "PennMUSH version 1.8.5 patchlevel 0 [02/12/2012]
(r1374 2012-02-23)"
> say numversion()
You say, "1008005000"
See also: @version
NVCON()
ncon(<object>)
nvcon(<object>)
These functions return a the number of objects inside <object>. They are
identical to words(lcon(<object>)) and words(lvcon(<object>)),
respectively, but are more efficient and do not suffer from buffer
constraints.
See also: nexits(), nplayers(), xcon(), lcon(), lvcon()
NVEXITS()
nexits(<room>)
nvexits(<room>)
These functions return a count of the exits in a room. They are equivilent
to words(lexits(<room>)) and words(lvexits(<room>)) respectively, though
are more efficient, and don't suffer from buffer constraints.
See also: ncon(), nplayers(), xexits(), lexits(), lvexits()
NVPLAYERS()
nplayers(<object>)
nvplayers(<object>)
These functions return a count of the players in <object>. They are
equivilent to words(lplayers(<object>)) and words(lvplayers(<object>))
respectively, though are more efficient and do not suffer from buffer
constraints.
See also: ncon(), nexits(), xplayers(), lplayers(), lvplayers()
NVTHINGS()
nthings(<object>)
nvthings(<object>)
These functions return a count of the things in a container. They are
equivilent to words(lthings(<object>)) and words(lvthings(<object>))
respectively, though are more efficient and do not suffer from buffer
constraints.
See also: ncon(), nexits(), xthings(), lthings(), lvthings()
NWHO()
nwho([<viewer>])
nmwho()
nwho() returns a count of all currently-connected players. When mortals
use this function, hidden players are NOT counted. See_All players can
specify a <viewer> to get a count of the number of players that <viewer>
can see is online.
nmwho() returns a count of all currently connected, non-hidden players.
It's exactly the same as nwho() used by a mortal, and is suitable for use
on privileged global objects that always need an unprivileged count of
who is online.
These functions are equivilent to words(lwho([<viewer>])) and
words(mwho()), but are more efficient, and don't suffer from buffer
constraints.
See also: lwho(), mwho(), xwho(), xmwho()
OBJ()
obj(<object>)
Returns the objective pronoun - him/her/it - for an object. The %o
substitution will return the objective pronoun of the enactor.
See also: subj(), poss(), aposs()
OBJECT IDS
When an object is destroyed, its dbref number will eventually be recycled
and given to a newly created object. This can cause problems in code,
particularly in database code which stores members of a group, as code
which was meant to refer to the old object ends up referring to the new one
by mistake.
To avoid this problem, you can use the "object id", or objid, instead of
the dbref. An object id consists of the object's dbref, a colon, and then
the object's creation time. Objids can be used anywhere dbrefs can and,
because the creation time is different each time the dbref is recycled, the
objid is totally unique to each object.
The objid() function returns the object id of an object, and the %:
substitution evaluates to the objid of the enactor.
See also: objid(), @lock-objid, DBREFS
OBJECT PARENTS
Objects may have "parent" objects, from which they can inherit
attributes. Once an object is given a parent, it may use the
attributes on the parent just as if the attributes were on the
object itself, including checking for $commands. Use the @parent
command to change the parent of an object.
Objects may have multiple levels of parents - thus, if #100 is the
parent of #101, which is the parent of #102, object #102 checks
itself, #101, and #100 for attributes. Attributes are checked on the
object itself first, followed by its parent, followed by that
parent's parent, and so forth. There is a (configurable) maximum
length of the parent chain for an object; the default is 10.
After the parent chain is exhausted, the type-specific ancestor is
also checked in similar fashion. See 'help ANCESTORS' for more
about ancestors.
Continued in 'help parents2'.
OBJECTS
Everything on a MUSH is an object in the MUSH database. There are four main
types of objects: players, things (once called 'objects'), rooms and exits.
You can see the type of an object when you 'examine' it, or with the
type() function.
There is also a 'garbage' type, used for objects which have been created
and then @destroyed. Garbage objects cannot be used in any way, and their
dbrefs will be recycled (with a new objid) when something new is created.
For more information on any of the types, see 'help <type>'.
The @stats command lists how many objects of each type currently exits in
the database.
See also: type(), hastype()
OBJEVAL()
objeval(<object>, <expression>)
Allows you to evaluate <expression> from the viewpoint of <object>.
If side-effect functions are enabled, you must control <object>; if
not, you must either control <object> or have the see_all power. If
<object> does not exist or you don't meet one of the criterion, the
expression evaluates with your privileges.
OBJID()
objid(<object>)
This function returns the object id of <object>, a value which uniquely
identifies it for the life of the MUSH. The object id is the object's
dbref, a colon character, and the object's creation time,
in seconds since the epoch, equivilent to
[num(<object>)]:[csecs(<object>)]
The object id can be used nearly anywhere the dbref can, and ensures
that if an object's dbref is recycled, the new object won't be
mistaken for the old object.
The substitution %: returns the object id of the enactor.
See also: num(), csecs(), ctime(), ENACTOR
OBJIDS
When an object is destroyed, its dbref number will eventually be recycled
and given to a newly created object. This can cause problems in code,
particularly in database code which stores members of a group, as code
which was meant to refer to the old object ends up referring to the new one
by mistake.
To avoid this problem, you can use the "object id", or objid, instead of
the dbref. An object id consists of the object's dbref, a colon, and then
the object's creation time. Objids can be used anywhere dbrefs can and,
because the creation time is different each time the dbref is recycled, the
objid is totally unique to each object.
The objid() function returns the object id of an object, and the %:
substitution evaluates to the objid of the enactor.
See also: objid(), @lock-objid, DBREFS
OBJMEM()
objmem(<object>)
This function returns the amount of memory, in bytes, being used by
the object. It can only be used by players with Search powers.
See also: playermem()
OEMIT()
oemit([<room>/]<object> [... <object>], <message>)
nsoemit([<room>/]<object> [... <object>], <message>)
Sends <message> to all objects in <room> (default is the location
of <object>(s)) except <object>(s), as per @oemit.
nsoemit() works like @nsoemit.
ON-VACATION
Flag: ON-VACATION (players)
This flag may be used by the MUSH to allow players to indicate when they
have left for vacation, to prevent themselves from being purged for
inactivity. Its usefulness depends on game policy.
You will be notified (periodically and on connect) if you leave this flag
set, to remind you to unset it when you return from vacation.
OPAQUE
Flag: OPAQUE (all types)
When set on players and things, OPAQUE prevents others who look at the
object from seeing its inventory. It also stops anyone inside the object
from using look/outside to see the object's location.
When set on an exit in a TRANSPARENT room, the exit is displayed
as if the room weren't TRANSPARENT.
Meaningless for rooms.
See also: TRANSPARENT, look
OPEN()
open(<exit name>[, <destination>[, <source>[, <dbref>]]])
This function attempts to open an exit named <exit name>. The exit will be
opened in the room <source>, if given, or the caller's current location if
no <source> is specified.
If a <destination> is given, it will attempt to link the exit to
<destination> after opening it.
Wizards and objects with the pick_dbref power can specify a garbage dbref
to use for the new exit.
It returns the dbref of the newly created exit, or #-1 on error.
See also: @open, @link, dig(), link(), create(), pcreate()
OPEN_ANYWHERE POWER
The Open_Anywhere power lets you @open exits from any location. Wizards
and Royalty have the power implicitly.
See also: @open, OPEN_OK, @lock/open
OPEN_OK
Flag: OPEN_OK (rooms)
When set on a room, anyone who passes the rooms @lock/open can open
exits in the room with @open (or move exits to the room with @teleport).
See also: @open, LINK_OK
OR()
or(<boolean1>, <boolean2>[, ... , <booleanN>])
cor(<boolean1>, <boolean2>[, ... , <booleanN>])
These functions take a number of boolean values, and return 1 if any of
them are true, and 0 if all are false. or() always evaluates all of its
arguments, while cor() stops evaluating as soon as one is true.
See also: BOOLEAN VALUES, and(), nor(), firstof(), allof()
ORD()
chr(<number>)
ord(<character>)
ord() returns the numerical value of the given character. chr()
returns the character with the given numerical value.
Examples:
> say ord(A)
You say, "65"
> say chr(65)
You say, "A"
ORDINAL()
ordinal(<integer>)
Given an integer, return its written-out ordinal representation in words.
Example:
> think ordinal(1)
first
See also: spellnum()
ORFLAGS()
orflags(<object>, <string of flag characters>)
orlflags(<object>, <list of flag names>)
These functions return 1 if <object> has any of the given flags, and 0 if
it does not. orflags() takes a string of single flag letters, while
orlflags() takes a space-separated list of flag names. In both cases, a
! before the flag means "not flag".
If any of the flags given are invalid, both functions return
"#-1 INVALID FLAG".
Example: Check to see if %# is set Wizard, Dark, or not set Ansi.
> say orflags(%#, WD!A)
> say orlflags(%#, wizard dark !ansi)
See also: andflags(), flags(), lflags(), orlpowers()
ORLFLAGS()
orflags(<object>, <string of flag characters>)
orlflags(<object>, <list of flag names>)
These functions return 1 if <object> has any of the given flags, and 0 if
it does not. orflags() takes a string of single flag letters, while
orlflags() takes a space-separated list of flag names. In both cases, a
! before the flag means "not flag".
If any of the flags given are invalid, both functions return
"#-1 INVALID FLAG".
Example: Check to see if %# is set Wizard, Dark, or not set Ansi.
> say orflags(%#, WD!A)
> say orlflags(%#, wizard dark !ansi)
See also: andflags(), flags(), lflags(), orlpowers()
ORLPOWERS()
orlpowers(<object>, <list of powers>)
This function returns 1 if <object> has at least one of the powers
in a specified list, and 0 if it does not. The list is a
space-separated list of power names. A '!' preceding a flag name
means "not power".
Thus, ORLPOWERS(me, poll login) would return 1 if I have the poll
and login powers. ORLFLAGS(me, functions !guest) would return 1 if
I have the functions power or are not a guest.
If a name does not correspond to any power, orlpowers() returns
"#-1 INVALID POWER".
See also: powers(), andlpowers(), POWERS LIST, @power, orlflags()
ORPHAN
Flag: ORPHAN (all types)
Normally, all objects have an ancestor at the top of their @parent chain,
and attributes, locks, etc, are inherited from the ancestor after all
real @parents have been checked. When an object is set ORPHAN, its ancestor
is ignored.
See also: @parent, ancestors
OUTPUTPREFIX
OUTPUTPREFIX <string>
OUTPUTSUFFIX <string>
Sets your output prefix or suffix. These strings will be shown
before and after the output of any command that you initiate,
respectively. They are primarily useful for bots and the like.
OUTPUTSUFFIX
OUTPUTPREFIX <string>
OUTPUTSUFFIX <string>
Sets your output prefix or suffix. These strings will be shown
before and after the output of any command that you initiate,
respectively. They are primarily useful for bots and the like.
OWNER()
owner(<object>[/<attribute>])
Given just an object, it returns the owner of the object. Given an
object/attribute pair, it returns the owner of that attribute.
See also: lockowner()
PAGE
page[/<switch>] [<player-list>=]<message>
This command sends a message to a player or list of players. If the
player's name contains spaces, surround it with double-quotes. If
you have already paged someone since connecting, just typing:
'page <message>' or 'page =<message>'
will send the message to the last person paged. You cannot page a
player if they are set HAVEN or if you do not pass their @lock/page.
In the latter case, the player's PAGE_LOCK`FAILURE,
PAGE_LOCK`OFAILURE, and PAGE_LOCK`AFAILURE attributes will be
activated if set.
Examples:
> page airwolf=hi there!
You paged Airwolf with 'hi there!'.
> page see, I don't have to retype the name.
You paged Airwolf with 'see, I don't have to retype the name.'.
> page "John Lennon" Ringo=Paul's fine!
Continued in 'help page2'.
PAGE2
Page will attempt a partial match on the name, checking both for an
@alias and to see if the name matches someone connected. If the
first character of <message> is a : or a ;, it will send the page in
pose format.
Objects may page players, but not vice versa. If an object pages a
NOSPOOF player, that player will see the object's number in square
brackets, in front of the message, in a fashion similar to the way
NOSPOOF flags emits.
When a player is paged, their PAGEFORMAT attribute is checked, and
if exists, the page as viewed by the player is set to the results of
calling PAGEFORMAT. See help @pageformat
Page takes three switches: /noeval, /override, and /port.
The /noeval switch prevents the MUSH from evaluating the message.
The /override switch is admin-only, and overrides pagelocks and HAVEN.
The /port switch is admin-only, and will page a single port descriptor
directly, including connections that have not yet logged into a player.
See also: @lock, @alias, @pageformat, pose, :, ;, HAVEN, NOSPOOF, FLAGS
PARANOID
Flag: NOSPOOF (all types)
Flag: PARANOID (all types)
If an object is set NOSPOOF, messages of all kinds will be tagged with the
name of the person/object causing them. This prevents spoofing and lets you
see where such messages originated. When a NOSPOOF object is also set
PARANOID, the dbref of the emitting object is also shown. You will not see
nospoof information for your own messages unless you are also set PARANOID.
When a player is set NOSPOOF or PARANOID, everything it owns is also
treated as having the flag.
Note that NOSPOOF output can be spammy. Nospoof information is not matched
against @listen or ^-listen patterns.
The nospoof tag is [Source:], and the paranoid tag is [Source(#dbref)].
See also: SPOOFING, @emit, @pemit, @remit, @oemit, @nspemit
PARENT
Objects may have "parent" objects, from which they can inherit
attributes. Once an object is given a parent, it may use the
attributes on the parent just as if the attributes were on the
object itself, including checking for $commands. Use the @parent
command to change the parent of an object.
Objects may have multiple levels of parents - thus, if #100 is the
parent of #101, which is the parent of #102, object #102 checks
itself, #101, and #100 for attributes. Attributes are checked on the
object itself first, followed by its parent, followed by that
parent's parent, and so forth. There is a (configurable) maximum
length of the parent chain for an object; the default is 10.
After the parent chain is exhausted, the type-specific ancestor is
also checked in similar fashion. See 'help ANCESTORS' for more
about ancestors.
Continued in 'help parents2'.
PARENT()
parent(<object>[, <new parent>])
This function returns the dbref number of an object's parent. You
must be able to examine the object to do this. If you specify a
second argument, parent() attempts to change the parent first.
You must control <object>, and be allowed to @parent to <new parent>.
See also: @parent, ancestors, pfun()
PARENTS
Objects may have "parent" objects, from which they can inherit
attributes. Once an object is given a parent, it may use the
attributes on the parent just as if the attributes were on the
object itself, including checking for $commands. Use the @parent
command to change the parent of an object.
Objects may have multiple levels of parents - thus, if #100 is the
parent of #101, which is the parent of #102, object #102 checks
itself, #101, and #100 for attributes. Attributes are checked on the
object itself first, followed by its parent, followed by that
parent's parent, and so forth. There is a (configurable) maximum
length of the parent chain for an object; the default is 10.
After the parent chain is exhausted, the type-specific ancestor is
also checked in similar fashion. See 'help ANCESTORS' for more
about ancestors.
Continued in 'help parents2'.
PARENTS2
Note that the only properties inherited are attributes and locks. In
particular, flags and exits are NOT inherited from the parent
object. Also, commands which walk the attribute list (such as
"examine", the LATTR() function, the HASATTR() function, @set, and
@edit) only affect attributes that are on the object itself.
There are some limitations to the use of @parent. The most important
is that ^-pattern checking is not done on the parent of an object,
unless the object is set LISTEN_PARENT. For the purposes of
automated game checks, the following attributes are not inherited:
CHARGES, EALIAS, LALIAS, LAST, LASTSITE, LISTEN, QUEUE, RQUOTA,
SEMAPHORE, and STARTUP.
The attributes inherited from the parent are treated just like its
own attributes by the child. Thus, when a $-command or @trigger is
executed, "me", for example, refers to the child, not the parent,
and the $-command's associated actions are performed by the child.
Continued in 'help parents3'.
PARENTS3
Attributes with $-commands _are_ inherited from the parent and
previous generations. Conflicts are resolved not by the $-command
name, but by the attribute name. If two attributes are in
"conflict", the child's attribute is used.
For example:
> &TEST #10=$test:@emit I'm the parent
> &TEST #11=$check:@emit I'm the child
> @parent #11=#10
> test
(nothing happens)
> check
I'm the child
Continued in 'help parents4'.
PARENTS4
If a parent has the same $-command name in a different attribute,
however, BOTH the parent and child commands will execute:
(continued from previous example)
> &CHECK #10=$check:@emit No, I'm the parent!
> check
I'm the child
No, I'm the parent!
@parent is most useful when several objects use common attributes.
It is slightly faster to have $commands on the child object which in
turn @trigger or otherwise retrieve attributes inherited from the
parent object, rather than having the $commands checked on the
parent object.
Continued in 'help parents5'.
PARENTS5
Parent-object $-command checking is at its most efficient when there
are few or no attributes on the child. Also, each additional level
of parents further reduces efficiency. Finally, note that ancestors
are *not* checked for $-commands.
If you are "mass-marketing" your objects, you can create blank
copies, and @parent those copies to a template object. You can then
customize necessary attributes on the copy. When a buyer @chowns his
copy, the parent does not change, so unless you're putting data into
the parent that you want to make impossible to read, it's safe to
allow the purchasers of your object to @chown their copy.
Locks can also be inherited, but are flagged no-inherit by default.
Use @lset to change that on a per-lock basis.
See also: @parent, $-COMMANDS, ATTRIBUTES, ANCESTORS, ORPHAN, pfun()
PARSE()
iter(<list>, <pattern>[, <delimiter>[, <output separator>]])
For each word in <list>, iter() evaluates <pattern> once, and returns a
list of the results of those evaluations. Words in <list> are separated
by <delimiter>, if given, and spaces if not. Words in the resulting list
are separated by the given <ouput separator>, or a space if no output
separator is given.
Prior to each evaluation, every occurrence of the string "##" in <pattern>
is replaced with the current word from <list>. However, because this
replacement occurs before evaluation, it cannot be used well in nested
iter()s, and should not be used on user input or untrusted <list>s, as the
word will be evaluated. Instead, you can use the %iX substitution, or the
itext() function. The substitution '%iL' refers to the outermost iter
of the current expression, and is intended to replace ##.
The string "#@" will be replaced with the position of the current word
in <list>. Like "##", the replacement occurs before substitution. Use
the inum() function for nested iter()s.
If you nest iter()s, ## and #@ refer to the first/outermost iter(). The
ilev() function can be used to get the current iter() nesting level.
See 'help iter2' for examples.
See also: itext(), inum(), ilev(), ibreak(), map(), @dolist
PATCHLEVELS
For information on a specific patchlevel of one of the versions listed,
type 'help <version>p<patchlevel>'. For example, 'help 1.7.2p3'
1.8.5: 0, 1, 2, 3
1.8.4: 0, 1, 2, 3, 4, 5, 6, 7, 8
1.8.3: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13
1.8.2: 0, 1, 2, 3, 4, 5, 6, 7, 8
1.8.1: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
1.8.0: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13
1.7.7: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
36, 37, 38, 39, 40
1.7.6: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
1.7.5: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
1.7.4: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
19, 20
1.7.3: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14
1.7.2: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35
1.7.1: 0, 1, 2, 3
1.7.0: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11
1.6.10: 0, 1, 2, 3, 4, 5, 6
1.6.9: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
1.6.8: 0, 1
1.6.7: 0, 1, 2, 3, 4, 5, 6
1.6.6: 0
1.6.5: 0, 1, 2, 3, 4
1.6.4: 0, 1, 2
1.6.3: 0, 1, 2, 3, 4, 5, 6, 7
1.6.2: 0, 1
1.6.1: 0, 1
1.6.0: 0, 3, 4, 5
1.50: dune2, dune1, 6, 7, 8, 9, 10, 11, 12, 13, 14
PCREATE()
pcreate(<name>, <password>[, <dbref>])
Creates a player with a given <name> and <password>. This function
can only be used by wizards.
The optional third argument can be used to specify a garbage object
to use for the new player.
See also: @pcreate, create(), dig(), open()
PEMIT()
pemit(<object list|port numbers>, <message>)
nspemit(<object list|port numbers>, <message>)
prompt(<object list>, <message>)
nsprompt(<object list>, <message>)
With an <object list>, pemit() will send each object on the list a message,
as per the @pemit/list command. It returns nothing. It respects page-locks
and HAVEN flags on players. With <port numbers>, pemit() sends the
message to the specified ports only, like @pemit/port/list.
nspemit() works like @nspemit/list.
prompt() adds a telnet GOAHEAD to the end of the message, as per the
@prompt command. nsprompt() that works like @nsprompt.
See also: @prompt, @nsprompt, PROMPT_NEWLINES
PEMIT_ALL POWER
The Pemit_All power lets you page or @pemit any object, regardless of their
@lock/page. Wizards have this power implicitly.
See also: LOUD, page, @pemit, @lock/page, CAN_SPOOF POWE
PFUN()
pfun(<attribute>[, <arg0>[, ... , <arg9>]])
This function evaluates <attribute> from the caller's @parent, passing up
to ten <arg>s as %0-%9. When the caller doesn't have an <attribute>
attribute set, this is the same as
ufun(me/<attribute>[, <args>])
It differs from ufun() when the caller does have the attribute set - pfun()
will ignore the attribute on the child, and evaluate the attribute as it
would be inherited from the parent.
Example:
> @create ParentObject
> @parent me=ParentObject
> &foo me=ChildFoo
> &foo ParentObject=ParentFoo
> think ufun(me/foo)
ChildFoo
> think pfun(foo)
ParentFoo
Continued in 'help pfun2'.
PFUN2
This function does not have the security problems of using
ufun(parent(me)/<attribute>)
as the attribute is inherited (and evaluated by you, not the parent) -
you don't need to be able to examine the parent object, and safer_ufun
does not stop the evaluation. Note that no_inherit attribute flags are
still checked, as with normal attribute inheritence.
This function is particularly useful when you want to inherit an attribute
tree from a parent, but add further branches.
See 'help pfun3' for an example.
See also: ufun(), get(), parent(), zfun(), PARENTS
PFUN3
Example:
> &root Parent=ParentRoot
> &root`foo parent=ParentRoot`foo
> think ufun(me/root) / [ufun(me/root`foo)]
ParentRoot / ParentRoot`foo
> &root`bar me=ChildRoot`bar
> think ufun(me/root) / [ufun(me/root`foo)]
/ ParentRoot`foo
Setting a ROOT`FOO attribute on the child automatically creates an empty
ROOT attribute, which blocks the inherited ROOT attribute. The pfun()
function allows you to get around this:
> &root me=pfun(root)
> think ufun(me/root) / [ufun(me/root`foo)] / [ufun(me/root`bar)]
ParentRoot / ParentRoot`foo / ChildRoot`bar
Good for inherited @chatformats which use CHATFORMAT`<channel> leaf attrs
to store channel-specific formats and the like. Note that no_inherit flags
are still checked, as with normal attribute inheritance.
PI()
pi()
Returns the value of "pi" (3.14159265358979323846264338327, rounded
to the game's float_precision setting).
PICK_DBREF POWER
Objects with this power can use the optional dbref arguments to object creation
commands to specify garbage objects to reuse, instead of the one at the head of
the stack of garbage.
PICKRAND()
randword(<list>[, <delimiter>])
Returns a randomly selected element from <list>. Elements of the list are
separated by <delimiter>, which defaults to a space.
pickrand() is an alias for randword().
See also: rand()
PIDINFO()
pidinfo(<pid>[, <list of fields>[, <output separator>]])
This function returns information about a process id if the player has
permission to see the process. The <list of fields> is a space-separated
list that may contain the following elements:
queue the queue ("wait" or "semaphore") for the process
player the queueing player
time remaining time for timed queued entries (or -1)
object the semaphore object for semaphores (or #-1)
attribute the semaphore attribute for semaphores (or #-1)
command the queued command
If <list of fields> is not provided, all fields are returned. The fields
are separated by <output separator>, which defaults to a space.
See also: @ps, lpids(), getpids()
PLAYER()
player(<port>)
Returns the dbref of the player connected to a given port. Mortals can
only use this function on their own ports, while See_All players can use
it on any port.
See also: lports(), ports()
PLAYER_CREATE POWER
This power allows objects to use @pcreate. Wizards have the power
implicitly.
See also: @pcreate
PLAYERMEM()
playermem(<player>)
This function returns the amount of memory, in bytes, being used by
everything owned by the player. It can only be used by players with
Search powers.
See also: objmem()
PLAYERS
Players can be created at the login screen (or with @pcreate) and connected
to. They can also receive @mail, and have a number of attributes set on
them by the MUSH automatically, including LAST, LASTSITE, etc. They can
have multiple @aliases, and are checked for $-commands and ^-listens.
@linking a player sets their home.
See also: TYPES OF OBJECTS, type(), hastype(), @pcreate
PMATCH()
pmatch(<name>)
pmatch() attempts to find a player called <name>, which should be the full
or partial name of a player (possibly prefixed with a "*") or a dbref.
First, it checks to see if <name> is the dbref, full name, or alias of a
player; if so, their dbref is returned. Otherwise, it checks for partial
matches against the names of online players. If there are no matches, #-1
is returned. If there are multiple matches, pmatch() returns #-2.
Otherwise, the matching player's dbref is returned.
pmatch() does not check for the string "me". If you wish to do that, you
should use locate (for example, locate(<player>, <name>, PFym)).
See also: num(), namelist(), locate()
POLL POWER
Allows objects to change the @poll. Wizards have the power implicitly.
See also: @poll
POLL()
poll()
This function returns the current @poll.
See also: @poll, doing(), @doing
PORT
A descriptor (also called a port or socket descriptor) is a unique (though
reusable) number assigned to each connection to the MUSH. The descriptor
for each connection is shown on the Wizard WHO in the 'Des' column.
Several commands and functions take a descriptor as an argument, or return
the descriptor(s) associated with a player's connection.
See also: WHO, ports(), lports(), player(), @boot, CONNECTION FUNCTIONS
PORTS()
lports([<viewer>[, <status>]])
ports(<player name>)
These functions return the list of descriptors ("ports") that are used by
connected players. lports() returns all ports, in the same order as
lwho() returns dbrefs, and ports() returns those a specific player is
connected to, from most recent to least recent. Mortals can use ports()
on themselves, but only See_All players can use ports() on others, or use
lports().
If lports() is given a <viewer>, only the ports of connections which
<viewer> can see are returned, in the same way as lwho(<viewer>) works.
The <status> argument for lports() controls whether or not ports which
are not connected to (ie, at the login screen) are included, and must be
one of "all", "online" or "offline".
These port numbers also appear in the wizard WHO, and can be used
with @boot/port, page/port, and the functions that return information
about a connection to make them use a specific connection rather than
the least-idle one when a player has multiple connections open. Players
can get information about their own connections. See_all is needed to
use them to get information about other people's ports.
See also: player(), Connection Functions
POS()
pos(<needle>, <haystack>)
This function returns the position that <needle> begins in <haystack>.
Unlike most other string functions, the first character of <haystack> is
numbered 1, not 0. If <needle> is not present in <haystack>, pos() returns
#-1.
See also: member(), match(), lpos()
POSE
pose[/noeval] <action>
:<action>
pose/nospace[/noeval] <action>
semipose[/noeval] <action>
;<action>
The pose and semipose commands allow you to perform actions. Pose shows
your name, a space, and then <action>; semipose omits the space. They can
be abbreviated to ':' and ';' respectively. The /noeval switch stops
<action> from being evaluated.
If you have a SPEECHMOD attribute set, it will be evaluated with <action>
as %0 and either : (for pose) or ; (for semipose) as %1. The result is
used instead of <action>, as long as it returns a non-empty string.
See 'help pose2' for examples.
See also: say, @emit, @speechmod
POSE2
Examples:
> pose waves.
Bob waves.
> :laughs out loud.
Bob laughs out loud.
> ;'s laughing on the inside.
Bob's laughing on the inside.
POSS()
poss(<object>)
Returns the possessive pronoun - his/her/its - for an object. The %p
substitution also returns the possessive pronoun of the enactor.
See also: subj(), obj(), aposs()
POWER()
power(<number>, <exponent>)
Returns <number> to the power of <exponent>.
(For the functional version of @power, see 'help powers()'.)
See also: root()
POWERS LIST
Powers can be granted only by wizards, using the @power command. Powers
cannot be granted to players who are set UNREGISTERED. Powers normally
give the player the ability to use a limited set of wizard/admin powers.
See 'help <power> power' for more info on any power.
announce Can use @wall command.
boot Can use @boot command.
builder Can use Builder commands.
chat_privs Can use Admin channels.
debit Can use give with a negative amount.
functions Can use @function command.
guest Guest. Restricted command set.
halt Can @halt others' objects and do @allhalt.
hide Can hide on the WHO list.
hook Can use the @hook command.
idle No inactivity timeout.
link_anywhere Can @link an exit to anyplace.
login Not subject to login restrictions.
long_fingers Can do things remotely, like "get".
many_attribs Can exceed max_attrs_per_obj.
Continued in 'help powers2'.
POWERS LIST2
no_pay * Doesn't need money for anything
no_quota * Has an unlimited quota
open_anywhere Can @open an exit from any room.
pemit_all Can @pemit to HAVEN/ulocked players.
pick_dbref Can recycle specific garage dbrefs when creating objects.
player_create Can use @pcreate command.
poll Can use @poll command.
pueblo_send Can use xch_cmd and send pueblo tags
queue Has queue limit equal to the size of the database.
quotas Can use @quota commands on other players.
search Can do @search, @stats, and @entrances on anything.
see_all Sees everything as if it were Visual.
see_queue Can do @ps on anyone, and @ps/all.
sql_ok Can perform SQL queries
tport_anything Can @teleport anything.
tport_anywhere Can @teleport to anywhere.
unkillable * Cannot be killed
can_spoof Can use @ns*emit, ns*emit() and @*emit/spoof
can_dark Can @set themselves dark
* When these powers are set on a player, all the objects they own which
are not set MISTRUST are also considered to have the power.
See also: help @power, and especially @power/list
POWERS()
powers()
powers(<object>)
powers(<object>, <power>)
With no arguments, powers() returns a space-separated list of all defined
@powers on the MUSH. With one argument, it returns a list of the powers
possessed by <object>.
With two arguments, it attempts to set <power> on <object>, as per
@power <object>=<power>.
See also: andlpowers(), orlpowers(), @power, POWERS LIST
POWERS2
no_pay * Doesn't need money for anything
no_quota * Has an unlimited quota
open_anywhere Can @open an exit from any room.
pemit_all Can @pemit to HAVEN/ulocked players.
pick_dbref Can recycle specific garage dbrefs when creating objects.
player_create Can use @pcreate command.
poll Can use @poll command.
pueblo_send Can use xch_cmd and send pueblo tags
queue Has queue limit equal to the size of the database.
quotas Can use @quota commands on other players.
search Can do @search, @stats, and @entrances on anything.
see_all Sees everything as if it were Visual.
see_queue Can do @ps on anyone, and @ps/all.
sql_ok Can perform SQL queries
tport_anything Can @teleport anything.
tport_anywhere Can @teleport to anywhere.
unkillable * Cannot be killed
can_spoof Can use @ns*emit, ns*emit() and @*emit/spoof
can_dark Can @set themselves dark
* When these powers are set on a player, all the objects they own which
are not set MISTRUST are also considered to have the power.
See also: help @power, and especially @power/list
PROMPT()
pemit(<object list|port numbers>, <message>)
nspemit(<object list|port numbers>, <message>)
prompt(<object list>, <message>)
nsprompt(<object list>, <message>)
With an <object list>, pemit() will send each object on the list a message,
as per the @pemit/list command. It returns nothing. It respects page-locks
and HAVEN flags on players. With <port numbers>, pemit() sends the
message to the specified ports only, like @pemit/port/list.
nspemit() works like @nspemit/list.
prompt() adds a telnet GOAHEAD to the end of the message, as per the
@prompt command. nsprompt() that works like @nsprompt.
See also: @prompt, @nsprompt, PROMPT_NEWLINES
PROMPT_NEWLINES
PROMPT_NEWLINES [1|0]
This socket-level command is used to indicate whether a newline should
be sent after the telnet GOAHEAD code issued by @prompt/prompt() to
telnet-capable clients. By default, in order to maximize portability,
newlines are sent.
Some clients, like TinyFugue, are smart enough to interpret GOAHEAD and
treat prompts specially by putting them into their input window. These
clients do not require the newline, and sending the newline results in
a blank line in their output window. The 'PROMPT_NEWLINES 0' command
can be used to disable the newline and is recommended for users with
these clients.
See also: @prompt, prompt(), terminfo()
PUEBLO
Pueblo is a client made by Chaco (a now defunct company).
It attempts to mix HTML with MUSH, and does a decent job at it.
There are other clients (notably MUSHclient) that also offer Pueblo
features. If compiled into the MUSH, PennMUSH offers support for
the enhanced features of Pueblo.
PennMUSH will automatically detect a Pueblo client (rather, the
client will announce itself and PennMUSH will detect that), and
set up that connection for Pueblo use.
The PUEBLO() function returns 1 for players connected with Pueblo,
0 for players with other clients, and #-1 NOT CONNECTED for
players who aren't connected. It uses the most recently active
connection if a player is multiply logged in.
For more information, see 'Pueblo features', 'HTML' and
'HTML Functions'.
PUEBLO FEATURES
PennMUSH makes the following enhancements visible to Pueblo users, if
Pueblo support has been enabled in the server (check @config):
- Object/Room names are highlighted
- Support for VRML graphics
- Unordered list for contents and transparent exits
- Contents and links have links (Click an exit to walk through it)
- Object lists (like the ones found in 'examine') have links
- Conversion of ANSI sequences to <FONT> tags.
See also: 'HTML', 'HTML Functions' and '@VRML_URL' for more help.
PUEBLO()
Pueblo is a client made by Chaco (a now defunct company).
It attempts to mix HTML with MUSH, and does a decent job at it.
There are other clients (notably MUSHclient) that also offer Pueblo
features. If compiled into the MUSH, PennMUSH offers support for
the enhanced features of Pueblo.
PennMUSH will automatically detect a Pueblo client (rather, the
client will announce itself and PennMUSH will detect that), and
set up that connection for Pueblo use.
The PUEBLO() function returns 1 for players connected with Pueblo,
0 for players with other clients, and #-1 NOT CONNECTED for
players who aren't connected. It uses the most recently active
connection if a player is multiply logged in.
For more information, see 'Pueblo features', 'HTML' and
'HTML Functions'.
PUEBLO_SEND POWER
Allows objects to send potentially unsafe Pueblo/HTML strings via tag()
and similar functions. Wizards have the power implicitly.
See also: Pueblo, tag(), tagwrap(), html()
PUPPET
Flag: PUPPET (things)
Things which are set PUPPET relay all sound they hear to their owner.
Puppets won't normally relay sound if they are in the same room as their
owner, but will if the VERBOSE flag is also set.
If you want to relay sound to someone other than the object's owner,
consider @forwardlist instead.
See: @force, PUPPETS, @forwardlist
PUPPETS
A thing is turned into a puppet by setting the PUPPET flag on it. A
puppet object is an extension of its owner and relays everything it
sees and hears to its owner, except if it is in the same room as the
owner (a puppet with the VERBOSE flag will relay even if it's in the
same room). Things relayed by the puppet will be prefixed by the
name of the puppet.
Puppets are useful for keeping track of what is going on in two
rooms at once, as extensions of a player (such as a pet, for
example), or for testing code.
You can control your puppets using the @force command. It is
important to remember the DBREF numbers of your puppets so you can
control them even if they are not in the same room with you. You can
also have your puppets follow you by using the 'follow' command.
(example in help puppets2)
PUPPETS2
An example of a puppet:
> @create Punch
Created: Object #18.
> drop Punch
Dropped.
> @set punch=puppet
Punch is now listening.
Flag set.
> @force punch=go north
Punch has left.
Punch> The Finishing Place
Punch>
Punch> Obvious exits:
Punch> Door <S>
#18 :waves hello
Punch> Punch waves hello
To have an object relay things it hears to players other than it's
owner, use @forwardlist.
See also: PUPPET, @force, DBREF
QUEUE
QUEUE
The queue is the waiting line for commands to be executed by the
MUSH. Each time you enter a command, it goes into the queue and
stays there until its turn comes up, at which time the MUSH
processes the command and you see the results. The MUSH can execute
several commands every second, so normally you see results right
away.
However, if there are too many commands in the queue, there may be a
delay, called lag. The more common cause of lag, however, is network
delays between you and the MUSH. Commands that were queued by
another command (Like @switch, @force, @wait, etc.) also have a
small delay before they run.
See also: @ps, LOOPING
QUEUE POWER
Normally, the number of action lists an object can queue is limited by the
queue_quota @config option. Objects with this power can queue additional
action lists, equal to the number of objects in the database. Wizards have
the power implicitly.
See also: SEE_QUEUE POWER
QUIET
Flag: QUIET (all types)
This flag suppresses several acknowledgement messages from commands, such
as 'Set', 'Triggered', 'Teleported', etc.
QUIT
QUIT
Log out and leave the game. Must be in all capitals.
QUOTA()
quota(<player>)
Returns the player's quota, the maximum number of objects they can
create, if quotas are in effect. Returns 99999 for players with
unlimited quotas, so it's safe to use in numerical comparisons.
See also: @quota, @squota, @allquota
QUOTAS POWER
Objects with this power can see and change anyones quotas. Wizards have
the power implicitly.
See also: QUOTA, NO_QUOTA POWER, @quota
R()
r(<register>)
The r() function is used to access "local registers", as set by the setq(),
setr() or letq() functions, and returns the contents of the specified
register. Available register names can be found with the listq() function.
Registers whose name is a single character can be accessed with the
substitution '%q<register>'. Longer register names must be enclosed in
literal angle brackets. For example, r(0) and %q0 are equivilent, as far
r(foo) and %q<foo>.
See also: setq(), letq(), listq(), unsetq()
R-FUNCTION
r(<register>)
The r() function is used to access "local registers", as set by the setq(),
setr() or letq() functions, and returns the contents of the specified
register. Available register names can be found with the listq() function.
Registers whose name is a single character can be accessed with the
substitution '%q<register>'. Longer register names must be enclosed in
literal angle brackets. For example, r(0) and %q0 are equivilent, as far
r(foo) and %q<foo>.
See also: setq(), letq(), listq(), unsetq()
RAND()
rand()
rand(<num>)
rand(<min>, <max>)
Return a random number.
The first form returns a floating-point number in the range 0 <= n < 1.
The second form returns an integer between 0 and <num>-1, inclusive
(or between 0 and <num>+1, for negative <num>s).
The third returns an integer between <min> and <max>, inclusive.
If called with an invalid argument, rand() returns an error message
beginning with #-1.
See also: randword()
RANDWORD()
randword(<list>[, <delimiter>])
Returns a randomly selected element from <list>. Elements of the list are
separated by <delimiter>, which defaults to a space.
pickrand() is an alias for randword().
See also: rand()
READ
look [<object>]
look <container>'s <object>
look <exit>'s <object>
look/outside [<object>]
Displays the description of <object>, or the room you're in if you don't
name a specific object. You can also look at objects inside others, as
long as the <container> is not set OPAQUE, or at objects on the other side
of an exit, if the exit is set TRANSPARENT or CLOUDY.
If you're inside a container, look/outside allows you to look at the room
the container is in, or at other objects in your container's location, as
long as your container is not set OPAQUE.
Continued in 'help look2'.
RECV()
recv(<player|descriptor>)
Returns the number of characters received by a player during this
connection as indicated by SESSION.
You must be a Wizard, Royalty or See_All to use this function on anyone
but yourself.
See also: Connection Functions
REGEDIT()
regedit(<string>, <regexp>, <replace>[, ... , <regexpN>, <replaceN>])
regediti(<string>, <regexp>, <replace>[, ... , <regexpN>, <replaceN>])
regeditall(<string>, <regexp>, <replace>[, ... , <regexpN>, <replaceN>])
regeditalli(<string>, <regexp>, <replace>[, ... , <regexpN>, <replaceN>])
These functions edit <string>, replacing the part of the string which
matches the regular expression <regexp> with the accompanying <replace>.
In <replace>, the string "$<number>" is expanded during evaluation to the
<number>th sub-expression, with $0 being the entire matched section. If you
use named sub-expressions (?P<name>subexpr), they are referred to with
"$<name>". Note that, with named sub-expressions, the "<>" are literal.
regedit() only replaces the first match, while regeditall() replaces all
matches. The versions ending in i are case insensitive. The <replace>
argument is evaluated once for each match, allowing for more complex
transformations than is possible with straight replacement.
Examples:
> say regedit(this test is the best string, (?P<char>.)est, $<char>rash)
You say "this trash is the best string"
> say regeditall(this test is the best string, (.)est, capstr($1)rash)
You say "this Trash is the Brash string"
See also: edit(), @edit, regmatch(), regrab()
REGEDITALL()
regedit(<string>, <regexp>, <replace>[, ... , <regexpN>, <replaceN>])
regediti(<string>, <regexp>, <replace>[, ... , <regexpN>, <replaceN>])
regeditall(<string>, <regexp>, <replace>[, ... , <regexpN>, <replaceN>])
regeditalli(<string>, <regexp>, <replace>[, ... , <regexpN>, <replaceN>])
These functions edit <string>, replacing the part of the string which
matches the regular expression <regexp> with the accompanying <replace>.
In <replace>, the string "$<number>" is expanded during evaluation to the
<number>th sub-expression, with $0 being the entire matched section. If you
use named sub-expressions (?P<name>subexpr), they are referred to with
"$<name>". Note that, with named sub-expressions, the "<>" are literal.
regedit() only replaces the first match, while regeditall() replaces all
matches. The versions ending in i are case insensitive. The <replace>
argument is evaluated once for each match, allowing for more complex
transformations than is possible with straight replacement.
Examples:
> say regedit(this test is the best string, (?P<char>.)est, $<char>rash)
You say "this trash is the best string"
> say regeditall(this test is the best string, (.)est, capstr($1)rash)
You say "this Trash is the Brash string"
See also: edit(), @edit, regmatch(), regrab()
REGEDITALLI()
regedit(<string>, <regexp>, <replace>[, ... , <regexpN>, <replaceN>])
regediti(<string>, <regexp>, <replace>[, ... , <regexpN>, <replaceN>])
regeditall(<string>, <regexp>, <replace>[, ... , <regexpN>, <replaceN>])
regeditalli(<string>, <regexp>, <replace>[, ... , <regexpN>, <replaceN>])
These functions edit <string>, replacing the part of the string which
matches the regular expression <regexp> with the accompanying <replace>.
In <replace>, the string "$<number>" is expanded during evaluation to the
<number>th sub-expression, with $0 being the entire matched section. If you
use named sub-expressions (?P<name>subexpr), they are referred to with
"$<name>". Note that, with named sub-expressions, the "<>" are literal.
regedit() only replaces the first match, while regeditall() replaces all
matches. The versions ending in i are case insensitive. The <replace>
argument is evaluated once for each match, allowing for more complex
transformations than is possible with straight replacement.
Examples:
> say regedit(this test is the best string, (?P<char>.)est, $<char>rash)
You say "this trash is the best string"
> say regeditall(this test is the best string, (.)est, capstr($1)rash)
You say "this Trash is the Brash string"
See also: edit(), @edit, regmatch(), regrab()
REGEDITI()
regedit(<string>, <regexp>, <replace>[, ... , <regexpN>, <replaceN>])
regediti(<string>, <regexp>, <replace>[, ... , <regexpN>, <replaceN>])
regeditall(<string>, <regexp>, <replace>[, ... , <regexpN>, <replaceN>])
regeditalli(<string>, <regexp>, <replace>[, ... , <regexpN>, <replaceN>])
These functions edit <string>, replacing the part of the string which
matches the regular expression <regexp> with the accompanying <replace>.
In <replace>, the string "$<number>" is expanded during evaluation to the
<number>th sub-expression, with $0 being the entire matched section. If you
use named sub-expressions (?P<name>subexpr), they are referred to with
"$<name>". Note that, with named sub-expressions, the "<>" are literal.
regedit() only replaces the first match, while regeditall() replaces all
matches. The versions ending in i are case insensitive. The <replace>
argument is evaluated once for each match, allowing for more complex
transformations than is possible with straight replacement.
Examples:
> say regedit(this test is the best string, (?P<char>.)est, $<char>rash)
You say "this trash is the best string"
> say regeditall(this test is the best string, (.)est, capstr($1)rash)
You say "this Trash is the Brash string"
See also: edit(), @edit, regmatch(), regrab()
REGEXP
(This help text is largely from TinyMUSH 2.2.4, with permission)
The majority of matching in MUSH is done with wildcard ("globbing")
patterns. There is a second type of matching, using regular
expressions, that is available in certain circumstances.
For attributes that are $-commands or ^-listen-patterns, setting
that attribute "regexp" (with '@set <object>/<attribute>=regexp')
causes patterns to be matched using regular expressions rather than
globbing. In addition, the function regmatch() performs regular
expression matching.
In a regular expression match, the substring of the string which
matched the regexp pattern is %0; %1 through %9 are the substrings
of the string which matched parenthesized expressions within the
regexp pattern.
Continued in 'help regexps2'.
REGEXP CLASSES
In a character class, you can use a number of additional keywords
that match certain types of characters. The keywords are enclosed in
[: and :], within the character class, so the whole thing looks like
[[:NAME:]].
These keywords can be mixed with other things in the character
class, like [ab[:digit:]], which will match 'a, 'b', or a
digit. [:^NAME:] reverses the meaning of NAME - it expands to
everything but characters that would match [:NAME:].
Some recognized NAMEs:
digit, for numbers. [[:digit:]] is the same as \d.
[[:^digit:]] is the same as \D.
alpha, for letters.
alnum, for numbers and letters.
lower, for lower-case letters.
upper, for upper-case letters.
word, for word characters. [[:word:]] is the same as \w.
[[:^word:]] is the same as \W.
space, for whitespace characters. [[:space:]] is the same as \s.
[[:^space:]] is the same as \S.
Continued in 'help regexp classes2'
REGEXP CLASSES2
These keywords (Or the corresponding \codes) should be used instead of
explicit ranges where possible to improve portability. For example,
[A-Za-z] and [[:alpha:]] are not the same thing in languages with accented
characters.
Examples:
> say regmatch(foo_bar, lit(^[[:word:]]+$))
You say "1"
> say regmatch(foo bar, lit(^[[:word:]]+$))
You say "0"
Other, less useful, character class keywords include ascii, cntrl,
graph, print, punct, and xdigit.
REGEXP EXAMPLES
Topic: REGEXP EXAMPLES
The regexp pattern '.' is equivalent to the wildcard '?'; it matches
one and only one of an arbitrary character.
The regexp pattern '.*' is equivalent to the wildcard '*'; it matches
zero or more arbitrary characters. To match one or more arbitrary
characters, the regexp pattern is '.+'.
To match a string of numbers, use: [0-9]+ or \d+
To match a string of letters only, use: [A-Za-z]+ or \w+
See 'help regexp syntax' for a more detailed explanation.
REGEXP SYNTAX
PennMUSH uses PCRE for its regular expression engine. PCRE is an
open source library of functions to support regular expressions
whose syntax and semantics are as close as possible to those of the
Perl 5 language. The text below is excerpted from its man
page. PCRE was written by Philip Hazel <ph10@cam.ac.uk>, and is
Copyright (c) 1997-1999 University of Cambridge, England. You can
(Note that in PennMUSH, if the regular expression is in an eval'd
context (like an argument to regmatch), you'll have to do a lot of
escaping to make things work right. One way to escape an argument
like %0 is: regeditall(%0,\\W,\\$0) or similar).
Regular expression matching in PennMUSH can be used on user-defined
command or listen patterns. In this usage, regular expressions are
matched case-insensitively unless the attribute has the CASE flag
set. Regular expressions can also be matched in MUSHcode using
regmatch(), regrab(), regedit, etc. function families, which usually
come in case-sensitive and case-insensitive versions.
(Cont'd in help regexp syntax2)
REGEXP SYNTAX2
A regular expression is a pattern that is matched against a subject
string from left to right. Most characters stand for themselves in a
pattern, and match the corresponding characters in the subject.
There are two different sets of meta-characters: those that are
recognized anywhere in the pattern except within square brackets,
and those that are recognized in square brackets. Outside square
brackets, the meta-characters are as follows:
\ general escape character with several uses
^ assert start of subject
$ assert end of subject
. match any character except newline
[ start character class definition
| start of alternative branch ("or")
( start subpattern
) end subpattern
? 0 or 1 quantifier (after a unit to quantify)
or, minimal match (after a quantifier)
or, extends the meaning of ( after a (
* 0 or more quantifier
+ 1 or more quantifier
(Cont'd in help regexp syntax3)
REGEXP SYNTAX3
Part of a pattern that is in square brackets is called a
"character class". It matches any character listed in the class.
In a character class, the only metacharacters are:
\ general escape character
^ negate the class, if the first character in the class
- indicates character range (e.g. A-Z, 0-4)
[:NAME:] A symbol for a group of characters that can vary
according to the language the mush is using.
See 'help regexp classes' for more information.
] terminates the character class
A backslash will escape most metacharacters, and can turn
some normal characters into generic character types:
\d any decimal digit
\D any character that is not a decimal digit
\s any whitespace character
\S any character that is not a whitespace character
\w any "word" character (letter, digit, or underscore)
\W any "non-word" character
(Cont'd in help regexp syntax4)
REGEXP SYNTAX4
A backlash can also be used for two useful assertions -- conditions that
must be met at a particular point in a match:
\b word boundary
\B not a word boundary
A word boundary is a position in the subject string where the
current character and the previous character do not both match \w or
\W (i.e. one matches \w and the other matches \W), or the start
or end of the string if the first or last character matches \w,
respectively.
(Cont'd in help regexp syntax5)
REGEXP SYNTAX5
Quantifiers specify repetition of characters. Three are available:
* match 0 or more of whatever came before
+ match 1 or more of whatever came before
? match 0 or 1 of whatever came before
(In theory, you can match m-n of whatever came before with {m,n},
but the MUSH parser makes it difficult to use {}'s in functions unless
you store the regex pattern in an attribute and use v() to fetch it)
Quantifiers are usually greedy -- they match as much as possible.
Adding a ? after a quantifier causes it to match as little as
possible instead.
(Cont'd in help regexp syntax6)
REGEXP SYNTAX6
Outside a character class, a backslash followed by a digit greater
than 0 (and possibly further digits) is a back reference to a
capturing subpattern earlier (i.e. to its left) in the pattern,
provided there have been that many previous capturing left parentheses.
A back reference matches whatever actually matched the capturing
subpattern in the current subject string, rather than anything matching
the subpattern itself. So the pattern
(sens|respons)e and \1ibility
matches "sense and sensibility" and "response and responsibility", but
not "sense and responsibility".
You can give names to subpatterns and refer to them that way instead of
using numbers.
(?P<NAME>subexpr) (Note: Literal <>'s) is a named capture, and
(?P=NAME) refers back to it. The above pattern might be written:
(?P<word>sens|respons)e and (?P=word)ibility
(Cont'd in help regexp syntax7)
REGEXP SYNTAX7
An assertion is a test on the characters following or
preceding the current matching point that does not actually consume
any characters. There are two kinds: those that look ahead of the
current position in the subject string, and those that look behind it.
An assertion subpattern is matched in the normal way, except that it
does not cause the current matching position to be
changed. Lookahead assertions start with (?= for positive assertions
and (?! for negative assertions. For example, Lookbehind assertions
start with (?<= for positive assertions and (?<! for negative
assertions.
Assertion subpatterns are not capturing subpatterns, and may not be
repeated, because it makes no sense to assert the same thing several
times. If an assertion contains capturing subpatterns within it,
these are always counted for the purposes of numbering the capturing
subpatterns in the whole pattern.
(Cont'd in help regexp syntax8)
REGEXP SYNTAX8
PCRE's engine can also do conditional subpattern matching,
embedded comments in regexps, and a bunch of other things.
See a regexp book for details.
REGEXPS
(This help text is largely from TinyMUSH 2.2.4, with permission)
The majority of matching in MUSH is done with wildcard ("globbing")
patterns. There is a second type of matching, using regular
expressions, that is available in certain circumstances.
For attributes that are $-commands or ^-listen-patterns, setting
that attribute "regexp" (with '@set <object>/<attribute>=regexp')
causes patterns to be matched using regular expressions rather than
globbing. In addition, the function regmatch() performs regular
expression matching.
In a regular expression match, the substring of the string which
matched the regexp pattern is %0; %1 through %9 are the substrings
of the string which matched parenthesized expressions within the
regexp pattern.
Continued in 'help regexps2'.
REGEXPS2
Regular expressions are extremely useful when you want to enforce a
data type. For example, if you have a command where you want a
player to enter a string and a number ('+setnum <player>=<number>',
for example), you might do it like this:
&DO_NUM Command Object=$^\+setnum (.+)=([0-9]+)$: @va me=Data: %1 = %2
@set Command Object/DO_NUM = regexp
Then, '+setnum cookies=30' would set VA to "Data: cookies = 30".
This eliminates your having to check to see if the player entered a
number, since the regular expression matches only numbers.
Furthermore, the '+' guarantees that there needs to be at least one
character there, so a player can't enter '+setnum cookies=' or
'+setnum =10' or similarly malformed input.
The '+' sign in the command has to be escaped out, or it is taken as
a regexp token. Furthermore, the pattern-match has to be anchored
with ^ and $, or something like 'try +setnum cookies=30 now' would
also match.
Regular expression syntax is explained in 'help regexp syntax'.
REGISTERS
A register is essentially a little reserved piece of computer memory
that can hold some variable information that you want to pass on to
another command. There are ten registers on the MUSH available via
%-substitution (%0 - %9) and many setq registers available via
%q- substitution (%q0 - %q9, %qA - %qZ and arbitrary names).
The basic registers are filled with information that matches the
wildcard pattern of the command trigger. (Before you say "Huh?", here's
an example.)
&COMMAND me=$command *+*:@emit %0 is in register 0 and %1 is in register 1.
> command whee+blert foo
whee is in register 0 and blert foo is in register 1.
Continued in 'help registers2'.
REGISTERS()
registers([<pattern>[, <types>[, <osep>]]])
The registers() function returns a list of the names of all existing
registers of the specified <types>. <types> is a space-separated list
containing zero or more of:
qregisters - registers set with setq(), setr() and similar functions
args - %0-%9 arguments
iter - itext() context from iter() or @dolist
switch - stext() context from switch() or @switch
regexp - regexp capture names
If <types> is empty, all types of registers are included. If <pattern> is
specified, only registers whose name matches <pattern> will be included.
The results are separated by <osep>, which defaults to a single space.
The list returned may contain duplicates (for instance, if %0 and %q0 both
have a value, the list will include "0" twice), and is not sorted in any
particular order.
See also: listq(), setq(), setr(), letq(), r(), v(), stext(), itext()
REGISTERS2
As you can see from the above example, the command trigger had two
wildcards separated by a "+" sign. When the user types in the
command with some words taking the place of the wildcards, the first
register (register 0) is filled with whatever part of the command
replaces the first wildcard (in this case, "whee") and the second
register is filled with whatever replaces the second ("blert foo").
They can also be filled with information that is passed by an
@trigger command:
&SOMECODE me=@emit %0 is in register 0 and %1 is in register 1.
@trigger me/somecode=whee,foo bar
> whee is in register 0 and foo bar is in register 1.
The registers can also be accessed using the V-function (v(0) to v(9)).
Please see 'help setq()' for more information about the setq registers.
See also: SUBSTITUTIONS, @trigger, USER-DEFINED COMMANDS, setq(), v(), r(),
registers(), listq()
REGLATTR()
lattr(<object>[/<attribute pattern>][, <output separator>])
lattrp(<object>[/<attribute pattern>][, <output separator>])
reglattr(<object>[/<regexp>][, <output separator>])
reglattrp(<object>[/<regexp>][, <output separator>])
lattr() returns a list of all the attributes on <object> which you can see,
and which match the wildcard <attribute pattern>. If no <attribute pattern>
is given, it defaults to "*". Note that this does not include branches in
attribute trees; you must use the "**" wildcard to include those.
The resulting list will be separated by <output separator>, or a space if
no separator is given.
reglattr() returns attributes whose names match the regexp <regexp>. The
match is not case-sensitive (as attribute names are always upper-case),
and the "`" branch separator has no special meaning in the pattern.
lattrp() and reglattrp() also include attributes inherited from parents.
When returning large numbers of attributes, the results may be truncated
due to buffer limits. In these cases, you can use nattr() and xattr() to
retrieve the results in smaller pieces.
See also: nattr(), xattr(), hasattr(), examine, grep(), wildcards
REGLATTRP()
lattr(<object>[/<attribute pattern>][, <output separator>])
lattrp(<object>[/<attribute pattern>][, <output separator>])
reglattr(<object>[/<regexp>][, <output separator>])
reglattrp(<object>[/<regexp>][, <output separator>])
lattr() returns a list of all the attributes on <object> which you can see,
and which match the wildcard <attribute pattern>. If no <attribute pattern>
is given, it defaults to "*". Note that this does not include branches in
attribute trees; you must use the "**" wildcard to include those.
The resulting list will be separated by <output separator>, or a space if
no separator is given.
reglattr() returns attributes whose names match the regexp <regexp>. The
match is not case-sensitive (as attribute names are always upper-case),
and the "`" branch separator has no special meaning in the pattern.
lattrp() and reglattrp() also include attributes inherited from parents.
When returning large numbers of attributes, the results may be truncated
due to buffer limits. In these cases, you can use nattr() and xattr() to
retrieve the results in smaller pieces.
See also: nattr(), xattr(), hasattr(), examine, grep(), wildcards
REGMATCH()
(Help text from TinyMUSH 2.2.4, with permission)
regmatch(<string>, <regexp>[, <register list>])
regmatchi(<string>, <regexp>[, <register list>])
This function matches the regular expression <regexp> against the entirety
of <string>, returning 1 if it matches and 0 if it does not. regmatchi()
does the same thing, but case-insensitively.
If <register list> is specified, there is a side-effect: any parenthesized
substrings within the regular expression will be set into the specified
local registers. The syntax for this is X:Y, where X is the number (0 is
the entire matched text) or name of the substring, and Y is the q-register
to save it in. If X: isn't given, the nth substring based on the
register's position in the list minus one is used. The first element will
have the complete matched text, the second the first substring, and so on.
This is to maintain compatibility with old code; it's recommended for new
uses that the X:Y syntax be used.
If <regexp> is not a valid regular expression, an error in the form
"#-1 REGEXP ERROR: <description>" will be returned.
See 'help regmatch2' for an example.
See also: regrab(), regedit(), valid(), reswitch(), regexp syntax
REGMATCH2
For example, in
> think regmatch(cookies=30, (.+)=(\[0-9\]*) )
(note use of escaping for MUSH parser), then the 0th substring matched is
'cookies=30', the 1st substring is 'cookies', and the 2nd substring is
'30'. If <register list> is '0:0 1:3 2:5', then %q0 will become
"cookies=30", %q3 will become "cookies", and %q5 will become "30".
If <register list> was '0:0 2:5', then the "cookies" substring would
simply be discarded. '1:food 2:amount' would store "cookies" in %q<food>
and "30" in %q<amount>.
See 'help regexp syntax' for an explanation of regular expressions.
REGMATCHI()
(Help text from TinyMUSH 2.2.4, with permission)
regmatch(<string>, <regexp>[, <register list>])
regmatchi(<string>, <regexp>[, <register list>])
This function matches the regular expression <regexp> against the entirety
of <string>, returning 1 if it matches and 0 if it does not. regmatchi()
does the same thing, but case-insensitively.
If <register list> is specified, there is a side-effect: any parenthesized
substrings within the regular expression will be set into the specified
local registers. The syntax for this is X:Y, where X is the number (0 is
the entire matched text) or name of the substring, and Y is the q-register
to save it in. If X: isn't given, the nth substring based on the
register's position in the list minus one is used. The first element will
have the complete matched text, the second the first substring, and so on.
This is to maintain compatibility with old code; it's recommended for new
uses that the X:Y syntax be used.
If <regexp> is not a valid regular expression, an error in the form
"#-1 REGEXP ERROR: <description>" will be returned.
See 'help regmatch2' for an example.
See also: regrab(), regedit(), valid(), reswitch(), regexp syntax
REGNATTR()
nattr(<object>[/<attribute pattern>])
nattrp(<object>[/<attribute pattern>])
regnattr(<object>[/<regexp>])
regnattrp(<object>[/<regexp>])
nattr() returns the number of attributes on <object> that you can see
which match the given <attribute pattern>. It is considerably faster than
words(lattr()) and doesn't suffer from buffer length constraints. It's
designed primarily for statistical purposes. <attribute pattern> defaults
to "*", which does not include branches in attribute trees; use "**" if
you need to count attribute trees.
regnattr() matches attribute names against the regular expression <regexp>.
nattrp() and regnattrp() also count matching attributes on the parent.
attrcnt() and attrpcnt() are aliases for nattr() and nattrp() respectively.
See also: lattr(), hasattr(), xattr(), wildcards
REGNATTRP()
nattr(<object>[/<attribute pattern>])
nattrp(<object>[/<attribute pattern>])
regnattr(<object>[/<regexp>])
regnattrp(<object>[/<regexp>])
nattr() returns the number of attributes on <object> that you can see
which match the given <attribute pattern>. It is considerably faster than
words(lattr()) and doesn't suffer from buffer length constraints. It's
designed primarily for statistical purposes. <attribute pattern> defaults
to "*", which does not include branches in attribute trees; use "**" if
you need to count attribute trees.
regnattr() matches attribute names against the regular expression <regexp>.
nattrp() and regnattrp() also count matching attributes on the parent.
attrcnt() and attrpcnt() are aliases for nattr() and nattrp() respectively.
See also: lattr(), hasattr(), xattr(), wildcards
REGRAB()
grab(<list>, <pattern>[, <delimiter>])
regrab(<list>, <regexp>[, <delimiter>])
regrabi(<list>, <regexp>[, <delimiter>])
These functions return the first word in <list> which matches the pattern.
For grab(), <pattern> is a wildcard pattern ('help wildcards'). For
regrab() and regrabi(), the pattern is a regular expression. regrabi() is
case-insensitive. <delimiter> defaults to a space.
Basically, this is a much more efficient way to do:
elements(<list>, match(<list>, <pattern>[, <delimiter>])[, <delimiter>])
or the regular expression variation thereof.
See also: graball(), match(), extract(), element(), elements(), regmatch()
REGRABALL()
graball(<list>, <pattern>[, <delim>[, <osep>]])
regraball(<list>, <regexp>[, <delim>[, <osep>]])
regraballi(<list>, <regexp>[, <delim>[, <osep>]])
These functions work identically to the grab() and regrab()/regrabi()
functions, except they return all matches, not just the first: They return
all words in the <list> which match <pattern>. If none match, an empty
string is returned. <delim> defaults to a space, and <osep> defaults to
<delim>.
Examples:
> say graball(This is a test of a test,test)
You say "test test"
> say graball(This|is|testing|a|test,tes*,|)
You say "testing|test"
> say regraball(This is testing a test,s$)
You say "This is"
See also: match(), matchall(), grab(), regmatch()
REGRABALLI()
graball(<list>, <pattern>[, <delim>[, <osep>]])
regraball(<list>, <regexp>[, <delim>[, <osep>]])
regraballi(<list>, <regexp>[, <delim>[, <osep>]])
These functions work identically to the grab() and regrab()/regrabi()
functions, except they return all matches, not just the first: They return
all words in the <list> which match <pattern>. If none match, an empty
string is returned. <delim> defaults to a space, and <osep> defaults to
<delim>.
Examples:
> say graball(This is a test of a test,test)
You say "test test"
> say graball(This|is|testing|a|test,tes*,|)
You say "testing|test"
> say regraball(This is testing a test,s$)
You say "This is"
See also: match(), matchall(), grab(), regmatch()
REGRABI()
grab(<list>, <pattern>[, <delimiter>])
regrab(<list>, <regexp>[, <delimiter>])
regrabi(<list>, <regexp>[, <delimiter>])
These functions return the first word in <list> which matches the pattern.
For grab(), <pattern> is a wildcard pattern ('help wildcards'). For
regrab() and regrabi(), the pattern is a regular expression. regrabi() is
case-insensitive. <delimiter> defaults to a space.
Basically, this is a much more efficient way to do:
elements(<list>, match(<list>, <pattern>[, <delimiter>])[, <delimiter>])
or the regular expression variation thereof.
See also: graball(), match(), extract(), element(), elements(), regmatch()
REGREP()
grep(<object>, <attrs>, <substring>)
wildgrep(<object>, <attrs>, <pattern>)
regrep(<object>, <attrs>, <regexp>)
grepi(<object>, <attrs>, <substring>)
regrepi(<object>, <attrs>, <regexp>)
wildgrepi(<object>, <attrs>, <pattern>)
These functions return a list of attributes on <object> containing
<substring>, matching the wildcard <pattern>, or matching the
regular expression <regexp>. <attrs> is a wildcard pattern for
attribute names to search.
Parsing _does_ occur before this function is invoked. Therefore,
"special" characters will need to be escaped out.
grep()/wildgrep()/regrep() are case-sensitive.
grepi()/wildgrepi()/regrepi() are case-insensitive.
See also: @grep, lattr(), WILDCARDS
REGREPI()
grep(<object>, <attrs>, <substring>)
wildgrep(<object>, <attrs>, <pattern>)
regrep(<object>, <attrs>, <regexp>)
grepi(<object>, <attrs>, <substring>)
regrepi(<object>, <attrs>, <regexp>)
wildgrepi(<object>, <attrs>, <pattern>)
These functions return a list of attributes on <object> containing
<substring>, matching the wildcard <pattern>, or matching the
regular expression <regexp>. <attrs> is a wildcard pattern for
attribute names to search.
Parsing _does_ occur before this function is invoked. Therefore,
"special" characters will need to be escaped out.
grep()/wildgrep()/regrep() are case-sensitive.
grepi()/wildgrepi()/regrepi() are case-insensitive.
See also: @grep, lattr(), WILDCARDS
REGULAR EXPRESSION FUNCTIONS
These functions take a regular expression (regexp, or re) and match
it against assorted things.
regedit() regeditall() regeditalli() regediti() reglattr()
reglattrp() regmatch() regmatchi() regnattr() regnattrp()
regrab() regraball() regraballi() regrabi() regrep()
regrepi() reswitch() reswitchall() reswitchalli() reswitchi()
regxattr() regxattrp()
See also: string functions, regexp
REGXATTR()
xattr(<object>[/<attribute pattern>], <start>, <count>[, <osep>])
xattrp(<object>[/<attribute pattern>], <start>, <count>[, <osep>])
regxattr(<object>[/<regexp>], <start>, <count>[, <osep>])
regxattrp(<object>[/<regexp>], <start>, <count>[, <osep>])
xattr() fetches <count> or fewer attribute names from <object> starting
at position <start>. It is useful when the number of attributes on an
object causes lattr() to exceed the buffer limit. The resulting list is
separated by <osep>, if given, and spaces otherwise.
It is equivalent to
extract(lattr(<object>[/<attribute pattern>]), <start>, <count>, <osep>)
<attribute pattern> is a wilddcard pattern which defaults to "*".
regxattr() matches attributes against the regular expression <regexp>.
xattrp() and regxattrp() will include attributes from parents. Do note that
parent attributes are listed _after_ child attributes, not sorted
alphabetically.
See also: nattr(), lattr(), wildcards
REGXATTRP()
xattr(<object>[/<attribute pattern>], <start>, <count>[, <osep>])
xattrp(<object>[/<attribute pattern>], <start>, <count>[, <osep>])
regxattr(<object>[/<regexp>], <start>, <count>[, <osep>])
regxattrp(<object>[/<regexp>], <start>, <count>[, <osep>])
xattr() fetches <count> or fewer attribute names from <object> starting
at position <start>. It is useful when the number of attributes on an
object causes lattr() to exceed the buffer limit. The resulting list is
separated by <osep>, if given, and spaces otherwise.
It is equivalent to
extract(lattr(<object>[/<attribute pattern>]), <start>, <count>, <osep>)
<attribute pattern> is a wilddcard pattern which defaults to "*".
regxattr() matches attributes against the regular expression <regexp>.
xattrp() and regxattrp() will include attributes from parents. Do note that
parent attributes are listed _after_ child attributes, not sorted
alphabetically.
See also: nattr(), lattr(), wildcards
REMAINDER()
mod(<number1>, <number2>)
modulo(<number1>, <number2>)
modulus(<number1>, <number2>)
remainder(<number1>, <number2>)
remainder() returns the remainder of the integer division of the first
number by the second. modulo() returns the modulo of the two numbers.
For positive numbers, these are the same, but they may be different
for negative numbers:
modulo(13,4) ==> 1 and remainder(13,4) ==> 1
modulo(-13,4) ==> 3 but remainder(-13,4) ==> -1
modulo(13,-4) ==> -3 but remainder(13,-4) ==> 1
modulo(-13,-4) ==> -1 and remainder(-13,-4) ==> -1
remainder()s result always has the same sign as the first argument.
modulo()s result always has the same sign as the second argument.
mod() and modulus() are aliases for modulo().
See also: div(), fdiv(), lmath()
REMIT()
remit(<object list>, <message>)
nsremit(<object list>, <message>)
Sends a message to the contents of all the objects specified in
<object list>, as per @remit/list.
nsremit() works like @nsremit/list.
See also: @remit, pemit(), lemit()
REMOVE()
remove(<list>, <words>[, <delimiter>])
This function removes the first occurance of every word in the list
<words> from <list>, and returns the resulting <list>. It is case
sensitive.
Elements of <list> and <words> are both separated by <delimiter>, which
defaults to a space.
See also: insert(), ldelete(), setdiff()
RENDER()
render(<string>, <formats>)
This function renders the given <string> into a given format. Most useful
when coding bots, or inserting text into an SQL database to display on a
website. <formats> is a space-separated list of one or more of the
following:
ansi -- Convert colors to raw ANSI tags (requires Can_Spoof power)
html -- Escape HTML entities (< to <, etc) and convert Pueblo
to HTML tags
noaccents -- Downgrade accented characters, as per stripaccents()
markup -- Leave any markup not already converted by ansi/html as
internal markup tags. Without this, unhandled markup
will be stripped, as per stripansi()
Examples:
> say render(<Test 1> & [tagwrap(u,Test 2)], html)
You say, "<Test 1> & <u>Test 2</u>"
See also: stripaccents(), stripansi(), Pueblo, @sql, tagwrap()
REPEAT()
repeat(<string>, <number>)
This function simply repeats <string>, <number> times. No spaces
are inserted between each repetition.
Example:
> say repeat(Test, 5)
You say, "TestTestTestTestTest"
See also: space()
REPLACE()
replace(<list>, <position>, <new item>[, <delimiter>[, <osep>]])
This replaces the item at <position> in <list> with <new item>. <delimiter>
defaults to a space, and <osep> defaults to <delimiter>. Null items are
counted when determining position.
If <position> is negative, it counts backwards from the end of the list. A
<position> of -1 will replace the last element, -2 the element before last,
and so on.
Examples:
> say replace(Turn north at the junction,2,south)
You say, "Turn south at the junction"
> say replace(Turn north at the junction,-1,crossroads)
You say, "Turn north at the crossroads"
> say replace(blue|red|green|yellow,3,white,|)
You say, "blue|red|white|yellow"
See also: ldelete(), setdiff(), splice()
REST()
rest(<list>[, <delimiter>])
Returns a list minus its first element.
See also: after(), first(), last()
RESTARTS()
restarts()
Returns the number of times the server has been rebooted with
@shutdown/reboot since the last full startup.
See also: restarttime(), starttime()
RESTARTTIME()
restarttime()
Returns the time the MUSH was last restarted, including @shutdown/reboots,
in the same format as time(). If @shutdown/reboot hasn't been used since
the MUSH was started, this is the same value as starttime().
See also: convtime(), starttime(), restarts()
RESTRICT
Commands, functions and attributes can have their permission levels
controlled in the mush config files, or by wizards from the game via
@command, @function and @attribute.
In the config file, the syntax is:
restrict_command <command-name> <restriction> [" <error message>]
restrict_function <function-name> <restriction>
restrict_attribute <attribute-name> <restriction>
From the game:
@command/restrict <command-name>=<restriction> [" <error message>]
@function/restrict <function-name>=<restriction>
@attribute/access <attribute-name>=<restriction>
For commands, if <error message> is given, that message is sent to the
player who runs it instead of a generic, unhelpful error message.
Continued in 'help restrict2'.
RESTRICT2
For commands, <restriction> should be an @lock-style boolexp (though,
for backwards compatability, the restrictions below can be used, and will
be converted into an @lock automatically). For functions, <restriction>
should be any combination of the phrases below. For attributes,
<restriction> is a list of attribute flags, or "none" to create a standard
attribute with no restrictions (see 'help attribute flags').
god Command or function is usable only by God.
wizard Usable only by wizards.
admin Usable only by Wiz/Roy.
nogagged Usable only by non-GAGGED objects.
nofixed Usable only by non-FIXED objects.
noguest Usable only by non-guest @powered objects.
nobody Nothing can use it. Same as the /disable switch
to @command or @function.
logname When used, log cmd/fun name, and who is using it
logargs When used, log cmd/fun name and args, and who is using it
Functions only:
noparse Function arguments are not evaluated. Only applies
to @functions.
localize %q-registers are saved/restored when evaluating, as if
the @function were wrapped in localize().
userfn Function can only be called from within an @function.
nosidefx Don't allow side-effects for this function. See also the
function_side_effects @config option.
deprecated This function should no longer be used. Warns the executor's
owner whenever someone uses the function.
Commands only:
noplayer Cannot be used by players.
Commands can also give any flag, power or type, to restrict to
objects with one of those flags or powers, or of one of those types.
Continued in 'help restrict3'.
RESTRICT3
In cases where there are a function and command that do the same
thing (like pemit() and @pemit), the command's restrictions are also
checked when the function is called, so to use pemit() you must also be
able to use @pemit. However, a function's restrictions are not checked
when a command is called, to allow disabling side-effect functions.
Some functions (like name()) have non-side-effect and side-effect
versions depending on how many arguments they're called with. The
side-effect version can be disabled while keeping the safe
non-side-effect form with the 'nosidefx' restriction. This can also
be used to disable pure side-effect functions.
Examples:
Only allow admin to use ansi():
> @function/restrict ansi=admin
Don't let anyone set SUSPECT or GAGGED use @emit, and log the name of
anyone who uses it.
> @command/restrict @emit=logname
> @command/restrict @emit=!flag^suspect&!flag^gagged
See also: @command, @function, @attribute, @lock
RESWITCH()
reswitch(<str>, <re1>, <list1>[, ... , <reN>, <listN>][, <default>])
reswitchall(<str>, <re1>, <list1>[, ... , <reN>, <listN>][, <default>])
reswitchi(<str>, <re1>, <list1>[, ... , <reN>, <listN>][, <default>])
reswitchalli(<str>, <re1>, <list1>[, ... , <reN>, <listN>][, <default>])
These functions are just like switch() except they compare <string> against
a series of regular expressions, not wildcard patterns.
reswitch() and reswitchall() are case-sensitive.
reswitch() and reswitchi() return the <list> which corresponds to the first
matched <re>, while reswitchall() and reswitchalli() return the <list>s
corresponding to all matched <re>s. If no <re>s match, all four functions
return <default>.
The string "#$" in the <list>s will be replaced with the value of <str>,
/before/ <list> is evaluated. You can also use $N in <list> to refer to the
Nth subpattern which matched in <re>, with $0 being the entire matching
string. Use $<name> (the '<>' are literal) to refer to named subpatterns.
See also: switch(), regmatch(), regedit()
RESWITCHALL()
reswitch(<str>, <re1>, <list1>[, ... , <reN>, <listN>][, <default>])
reswitchall(<str>, <re1>, <list1>[, ... , <reN>, <listN>][, <default>])
reswitchi(<str>, <re1>, <list1>[, ... , <reN>, <listN>][, <default>])
reswitchalli(<str>, <re1>, <list1>[, ... , <reN>, <listN>][, <default>])
These functions are just like switch() except they compare <string> against
a series of regular expressions, not wildcard patterns.
reswitch() and reswitchall() are case-sensitive.
reswitch() and reswitchi() return the <list> which corresponds to the first
matched <re>, while reswitchall() and reswitchalli() return the <list>s
corresponding to all matched <re>s. If no <re>s match, all four functions
return <default>.
The string "#$" in the <list>s will be replaced with the value of <str>,
/before/ <list> is evaluated. You can also use $N in <list> to refer to the
Nth subpattern which matched in <re>, with $0 being the entire matching
string. Use $<name> (the '<>' are literal) to refer to named subpatterns.
See also: switch(), regmatch(), regedit()
RESWITCHALLI()
reswitch(<str>, <re1>, <list1>[, ... , <reN>, <listN>][, <default>])
reswitchall(<str>, <re1>, <list1>[, ... , <reN>, <listN>][, <default>])
reswitchi(<str>, <re1>, <list1>[, ... , <reN>, <listN>][, <default>])
reswitchalli(<str>, <re1>, <list1>[, ... , <reN>, <listN>][, <default>])
These functions are just like switch() except they compare <string> against
a series of regular expressions, not wildcard patterns.
reswitch() and reswitchall() are case-sensitive.
reswitch() and reswitchi() return the <list> which corresponds to the first
matched <re>, while reswitchall() and reswitchalli() return the <list>s
corresponding to all matched <re>s. If no <re>s match, all four functions
return <default>.
The string "#$" in the <list>s will be replaced with the value of <str>,
/before/ <list> is evaluated. You can also use $N in <list> to refer to the
Nth subpattern which matched in <re>, with $0 being the entire matching
string. Use $<name> (the '<>' are literal) to refer to named subpatterns.
See also: switch(), regmatch(), regedit()
RESWITCHI()
reswitch(<str>, <re1>, <list1>[, ... , <reN>, <listN>][, <default>])
reswitchall(<str>, <re1>, <list1>[, ... , <reN>, <listN>][, <default>])
reswitchi(<str>, <re1>, <list1>[, ... , <reN>, <listN>][, <default>])
reswitchalli(<str>, <re1>, <list1>[, ... , <reN>, <listN>][, <default>])
These functions are just like switch() except they compare <string> against
a series of regular expressions, not wildcard patterns.
reswitch() and reswitchall() are case-sensitive.
reswitch() and reswitchi() return the <list> which corresponds to the first
matched <re>, while reswitchall() and reswitchalli() return the <list>s
corresponding to all matched <re>s. If no <re>s match, all four functions
return <default>.
The string "#$" in the <list>s will be replaced with the value of <str>,
/before/ <list> is evaluated. You can also use $N in <list> to refer to the
Nth subpattern which matched in <re>, with $0 being the entire matching
string. Use $<name> (the '<>' are literal) to refer to named subpatterns.
See also: switch(), regmatch(), regedit()
REVERSE()
flip(<string>)
flip() reverses a string. reverse() is an alias for flip().
Example:
> say flip(foo bar baz)
You say, "zab rab oof"
See also: revwords()
REVWORDS()
revwords(<list>[, <delimiter>[, <output separator>]])
This function reverses the order of words in a list. List elements are
separated by <delimiter>, which defaults to a space. Elements in the
reversed list are separated by <ouput separator>, which defaults to
the delimiter.
Example:
> say revwords(foo bar baz eep)
You say, "eep baz bar foo"
See also: flip()
RIGHT()
right(<string>, <length>)
Returns the <length> rightmost characters from <string>.
See also: left(), mid()
RJUST()
rjust(<string>, <length>[, <fill>])
This function pads a string with leading characters ("right-justifies")
so it is <length> long. If <string> is longer than <length>, the <string>
is returned; it is not truncated. <fill> can be more than one character
in length, and defaults to a space.
Examples:
> say -[rjust(foo,6)]-
You say, "- foo-"
> say %r0[rjust(foo,6,-)]%r01234567
You say, "
0---foo7
01234567"
> say rjust(foo,12,=-)
You say, "=-=-=-=-=foo"
See also: align(), center(), ljust()
RLOC()
rloc(<object>, <levels>)
This function may be used to the get the location of <object>'s
location (and on through the levels of locations), substituting for
repeated nested loc() calls. <levels> indicates the number of
loc()-equivalent calls to make; i.e., loc(loc(<object>)) is
equivalent to rloc(<object>,2). rloc(<object>,0) is equivalent to
num(<object>), and rloc(<object>,1) is equivalent to loc(<object>).
If rloc() encounters a room, the dbref of that room is returned. If
rloc() encounters an exit, the dbref of that exit's destination is
returned. You must control <object>, be near it, or it must be a
findable player.
See also: loc(), where(), room(), rnum(), locate()
RNUM()
rnum(<container>, <object>)
This function looks for an object called <object> located inside
<container>. If a single matching object is found, its dbref is returned.
If several matching objects are found, #-2 is returned, and if nothing
matches, or you lack permission, #-1 is returned.
You must be in <container>, or be able to examine it, to use this function.
This function has been deprecated and may be removed in a future
patchlevel. locate() should be used instead.
See also: locate(), num(), rloc(), room()
ROOM()
room(<object>)
Returns the "absolute" location of an object. This is always a room; it is
the container of all other containers of the object. The "absolute"
location of an object is the place @lemit messages are sent to and NO_TEL
status determined. You must control the object, be See_All, or be near
the object in order for this function to work. The exception to this are
players; if <object> is a player, the ROOM() function may be used to find
the player's absolute location if the player is not set UNFINDABLE.
See also: loc(), rloc(), rnum(), where()
ROOMS
Rooms are outermost-containers: they cannot be moved. They are created
with @dig. Rooms can contain exits. They are checked for $-commands and
^-listens. Rooms do not have aliases.
@linking a room creates a drop-to. Rooms have no location; loc() on a room
returns its drop-to (as does home()).
See also: TYPES OF OBJECTS, type(), hastype(), @dig, DROP-TOS
ROOT()
root(<number>, <n>)
Returns the n-th root of <number>. The 2nd root is the square root,
the 3rd the cube root, and so on.
Examples:
> think root(27, 3)
3
> think power(3, 3)
27
See also: sqrt(), power()
ROUND()
round(<number>, <places>[, <pad>])
Rounds <number> to <places> decimal places. <places> must be between
0 and config(float_precision). If the optional <pad> argument is
true, the result will be padded with 0s if it would otherwise have
fewer than <places> digits after the decimal point.
Examples:
> think round(3.14159, 2)
3.14
> think round(3.5, 3, 1)
3.500
See also: ceil(), floor(), bound(), trunc()
ROYALTY
Flag: ROYALTY (all types)
The Royalty flag gives an object a limited subset of Wizard powers.
Royalty can use the admin WHO, @teleport any object to any location,
use @hide, and many other things. Unlike Wizards, they do not implicitly
control all objects.
Only Wizards can set players royalty, though players who are already set
royalty can set their own objects royalty as well.
Royalty grants the following @powers implicitly: functions, idle,
link_anywhere, login, long_fingers, no_quota, open_anywhere and see_all.
See 'help <power> power' for more info.
See also: WIZARD, @power
RQUOTA
RQUOTA
This attribute tracks remaining building quota if it is implemented.
It is settable in-game only by a wizard, and is only visible to wizards.
See also: @quota, @squota
RULES
rules [<topic>]
events [<topic>]
These commands, like news, work the same way as the help command,
except that the information provided in them is specific to this
particular MUSH. Not all MUSHes will have both or either of these
commands enabled.
See also: news, help
RUNOUT2
Example:
> @create Revolver
> @use Revolver=You pull the trigger.
> @ouse Revolver=pulls the trigger.
> @charges Revolver=6
> @ause Revolver=POSE fires into the air.
> @runout Revolver=POSE clicks, but is out of bullets.
> use revolver
You pull the trigger.
Revolver fires into the air.
> ex revolver/charges
CHARGES [#6$]: 5
The next 5 "use revolver"s work the same way, decrementing CHARGES
each time.
> ex revolver/charges
CHARGES [#6$]: 0
> use revolver
You pull the trigger.
Revolver clicks, but is out of bullets.
> ex revolver/charges
CHARGES [#6$]: 0
S()
s(<string>)
This function performs a second round of evaluation on <string>, and
returns the result. It should be considered extremely dangerous to use on
user input, or any other string which you don't have complete control over.
There are very few genuine uses for this function; things can normally be
achieved another, safer way.
Example:
> &test me=$eval *: say When we eval %0, we get [s(%0)]
> eval \[ucstr(test)]
You say, "When we eval [ucstr(test)], we get TEST"
See also: objeval(), decompose()
S-FUNCTION
s(<string>)
This function performs a second round of evaluation on <string>, and
returns the result. It should be considered extremely dangerous to use on
user input, or any other string which you don't have complete control over.
There are very few genuine uses for this function; things can normally be
achieved another, safer way.
Example:
> &test me=$eval *: say When we eval %0, we get [s(%0)]
> eval \[ucstr(test)]
You say, "When we eval [ucstr(test)], we get TEST"
See also: objeval(), decompose()
SAFE
Flag: SAFE (all types)
Objects set SAFE cannot be destroyed with @destroy (@nuke must be used
instead). If the "really_safe" @config option is on, objects set SAFE will
not be destroyed when their owner is @destroyed, but will be @chown'd to
God instead.
See also: @destroy
SAY
say <message>
say/noeval <message>
"<message>
Says <message> out loud. The message will be enclosed in double-quotes.
A single double-quote is the abbreviation for this common command.
If the /noeval switch is given, <message> will not be evaluated.
If you have a SPEECHMOD attribute set, it will be evaluated with <message>
passed as %0 and " (a double-quote) passed as %1. The result is shown
instead of <message>, as long as it evaluates to a non-empty string.
See also: pose, whisper, @speechmod, @emit, page
SCAN()
scan(<object>, <command>[, <switches>])
scan(<command>)
This function works like @scan, and returns a space-separated list of
dbref/attribute pairs containing $-commands that would be triggered if
<command> were run by <object>. You must control <object> or be See_All
to use this function. Only objects you can examine are included in the
output.
If no <object> is specified, this function works like @scan run by the
function's executor.
<switches> is a space-separated list of strings to limit which objects are
checked for $-commands. Valid switches are:
room -- match your location and its contents
self -- match yourself and your inventory
zone -- match your zone and your location's zone
globals -- match objects in the Master Room
all -- all of the above (the default)
break -- once a match is found, don't check in other locations
The order of searching for the "break" switch is the same as the order for
normal $-command matching, as described in 'help evaluation order'.
See also: @scan, @sweep, MASTER ROOM, EVALUATION ORDER, $-COMMANDS
SCORE
score
Displays how many pennies you are carrying. Helpful to see if any
machines are looping. If they are, your pennies will be being
rapidly drained. MUSH money may also be used for other purposes in
the game.
See also: LOOPING, @ps, QUEUE, MONEY
SCRAMBLE()
scramble(<string>)
This function scrambles a string, returning a random permutation of its
characters. Note that this function does not pay any attention to spaces
or other special characters; it will scramble these characters just like
normal characters.
Example:
> say scramble(abcdef)
You say, "cfaedb"
See also: shuffle()
SCREENHEIGHT
width(<player|descriptor>[, <default>])
height(<player|descriptor>[, <default>])
These two functions return the screen width and height for a
connected player. If the player's client is capable of doing so, it
will let the mush know what the correct sizes are on connection and
when the client is resized.
The defaults are 78 for width, and 24 for height, the normal minimal
values. These can be overridden when calling the function by
providing the default to the function. Players can change the value
that will be returned when the functions are called on them with the
special SCREENWIDTH and SCREENHEIGHT commands, both of which take a
number as their sole argument, and set the appropriate field.
When used on something that's not a visible player, the functions
return the default values.
The intent of these functions is allow softcode that does formatting
to be able to produce a display that can make full use of any given
screen size.
SCREENWIDTH
width(<player|descriptor>[, <default>])
height(<player|descriptor>[, <default>])
These two functions return the screen width and height for a
connected player. If the player's client is capable of doing so, it
will let the mush know what the correct sizes are on connection and
when the client is resized.
The defaults are 78 for width, and 24 for height, the normal minimal
values. These can be overridden when calling the function by
providing the default to the function. Players can change the value
that will be returned when the functions are called on them with the
special SCREENWIDTH and SCREENHEIGHT commands, both of which take a
number as their sole argument, and set the appropriate field.
When used on something that's not a visible player, the functions
return the default values.
The intent of these functions is allow softcode that does formatting
to be able to produce a display that can make full use of any given
screen size.
SEARCH POWER
The Search power allows someone to use @search and @stats on objects they
can't examine. It also allows them to use the objmem() and playermem()
functions.
See also: SEE_ALL POWER, @search, @stats, objmem(), playermem(), lsearch()
SEARCH()
lsearch(<player>[, ... , <classN>, <restrictionN>])
nlsearch(<player>[, ... , <classN>, <restrictionN>])
lsearchr(<player>[, ... , <classN>, <restrictionN>])
children(<object>)
nchildren(<object>)
This function is similar to the @search command, except it returns just a
list of dbref numbers. The function must have at least three arguments. You
can specify "all" or <player> for the <player> field; for mortals, only
objects they can examine are included. If you do not want to restrict
something, use "none" for <class> and <restriction>.
The possible <class>es and <restriction>s are the same as those accepted
by @search. lsearch() can accept multiple class/restriction pairs, and
applies them in a boolean "AND" fashion, returning only dbrefs that
fulfill all restrictions. See 'help @search' for information about them.
children() is exactly the same as lsearch([me|all], parent, <object>),
using "all" for See_All/Search players and "me" for others.
nlsearch(...) and nchildren(...) return the count of results that
would be returned by lsearch() or children() with the same args.
Continued in 'help lsearch2'.
SEARCH2
If <class> is one of the eval classes (EVAL, EEXITS, EROOMS, ETHINGS
or EPLAYERS), note that any brackets, percent signs, or other
special characters should be escaped, as the code in <restriction>
will be evaluated twice - once as an argument to lsearch(), and then
again for each object looked at in the search. Before the per-object
evaluation, the string "##" is replaced with the object dbref.
lsearch() is free unless it includes either an eval-class search or
an elock search that contains an eval or indirect lock. Otherwise,
it costs find_cost pennies to perform the lsearch.
lsearchr() is like an lsearch() run through revwords(). Results are
returned from highest dbref to lowest. search() is an alias for
lsearch().
Examples in 'help lsearch3'.
See also: @search, @find, lparent(), stats()
SEARCH3
lsearch() Examples:
lsearch(all, flags, Wc) <-- lists all connected wizards.
lsearch(me, type, room) <-- lists all rooms owned by me.
lsearch(me, type, room, flag, W) <-- lists Wizard rooms owned by me.
lsearch(me, type, room, 100, 200) <-- same, but only w/db# 100-200
lsearch(all, eplayer, \[eq(money(##),100)\]) <-- lists all players with 100
coins.
lsearch(all, type, player, elock, (FLAG^WIZARD|FLAG^ROYALTY)&!FLAG^IC)
^-- list all wiz and roy players
that are not IC.
lsearch(all, type, player, elock, sex:m*) <- lists all players with an
@sex beginning with 'm'
lsearch(me, elock, !desc:*) <-- lists all objects you own that
don't have an @desc set
SECS()
secs()
This function takes no arguments, and returns the number of elapsed
seconds since midnight, January 1, 1970 UTC. UTC is the base time
zone, formerly GMT. This is a good way of synchronizing things that
must run at a certain time.
See also: convsecs(), time()
SECURE()
secure(<string>)
This function returns <string> with all "dangerous" characters
replaced by spaces. Dangerous characters are ( ) [ ] { } $ % , ^ and ;
This can make output slightly ugly, but it's a good way of preventing
other people from doing nasty things with your objects.
See also: decompose(), escape()
SEE_ALL POWER
The See_All power allows an object to examine anything in the database.
Wizards and Royalty have the power implicitly.
SEE_QUEUE POWER
The See_Queue power allows an object to use @ps, lpids() and related
functions on any object/queue.
See also: @ps, lpids(), getpids(), pidinfo()
SEMAPHORES
The most complicated thing about semaphores is their name. Before
you try to use semaphores, you should first be familiar with the
"@wait" command. If you are, then you know that normally, you type:
@wait <number of seconds>=<action>
and the action takes place after that number of seconds has
passed. With a semaphore, you instead type:
@wait <object>=<action>
@wait <object>/<number of seconds before timeout>=<action>
and the action takes place after the object has been "notified" that
its time for it to happen. You can also set a timeout -- if the
object hasn't been notified by the time that number of seconds has
passed, the action will take place. Any object (player, thing, exit,
room) that you control or that is set LINK_OK can be used to wait
actions on.
Continued in 'help semaphores2'.
SEMAPHORES2
An object is notified using the "@notify" command. When you type
"@wait <object>=<action>", you are adding one to the SEMAPHORE
attribute on the object. When you type "@notify <object>", you are
decreasing the SEMAPHORE attribute on the object by one. Whenever
the attribute decreases, one of the actions waiting on the object
takes place. The actions occur in the order they were added.
You can make the semaphore attribute of an object negative by
@notify-ing it more times than things have been @wait-ed on it. If
you do so, anything @wait-ed on the object will add one to the
SEMAPHORE attribute and the action will take place immediately. You
can also make all the actions waiting on an object take place right
away by using "@notify/all", or wipe all the commands out and clear
the SEMAPHORE attribute by using "@drain". Please note that all
SEMAPHORE attributes are cleared out whenever the MUSH is restarted.
Semaphores can be used to make sure that events occur in the right
order, or to make sure that two players can't use the same object at
the same time.
Continued in 'help semaphores3'.
SEMAPHORES3
It's important to remember that the actions will be carried out NOT
by the object that they are being @waited on, but by whichever
object entered the @wait.
Examples:
> @wait semaphore=:tests.
> @notify semaphore
Wizard tests.
> @wait timer/30=:waits 30 seconds.
[ 30 seconds passes. ]
Wizard waits 30 seconds.
See also: @wait, @drain, @notify
Continued in 'help semaphores4'.
SEMAPHORES4
Semaphores can be used to enforce mutual exclusion - to prevent
the same object from being used simultaneously by two players.
The basic strategy is to ensure that the object always has a
SEMAPHORE of -1, to enclose commands in an @wait, and to
conclude the set of commands with an @notify me:
> &doit obj = $doit: @wait me={&doer me = %N; @tr me/report}
> &report obj = "[v(doer)] did it!; @notify me
> @startup obj = @drain me; @notify me
> @notify obj
> ex obj/SEMAPHORE
SEMAPHORE [#1ic+]: -1
> doit
obj says "Talek did it!
> ex obj/SEMAPHORE
SEMAPHORE [#1ic+]: -1
If a second player types doit as well, the second player's command
is put on the semaphore queue and not run until the @notify me at
the end of the REPORT attribute. Note the STARTUP attribute -
because semaphores are cleared when the MUSH starts up, you must
insure that the object gets @notify'd once when it starts up.
Continued in 'help semaphores5'.
SEMAPHORES5
Normally, semaphores use the SEMAPHORE attribute. However, other
attributes can be used, as long as they follow a few simple rules: If
the attribute is already set, it has to have the same owner (God) and
flags as the SEMAPHORE attribute would (typically no_inherit,
no_clone, and locked - see 'help @set' and '@atrlock'), and have a
numeric or empty value. If it's not set, it can't be one of the built
in attributes (See @list attribs) unless, naturally, it is SEMAPHORE.
See the help on @wait, @notify and @drain for details, but, briefly,
you can use named semaphores with <object>/<attribute> where you
would normally just use <object> in those commands. This means you
can't have a un-timed semaphore on an attribute with a numeric name.
Continued in 'help semaphores6'.
SEMAPHORES6
An example:
> @wait me/semtest=think blah
> ex me/semtest
SEMTEST [#1ic+]: 1
> @ps
...
Semaphore Queue:
[#8/SEMTEST]Raevnos(#8P):think blah
...
> @notify me/semtest
Notified.
blah
This allows you to use one object to control many different things --
for example, fights in a turn-based combat sytem.
SEMIPOSE
pose[/noeval] <action>
:<action>
pose/nospace[/noeval] <action>
semipose[/noeval] <action>
;<action>
The pose and semipose commands allow you to perform actions. Pose shows
your name, a space, and then <action>; semipose omits the space. They can
be abbreviated to ':' and ';' respectively. The /noeval switch stops
<action> from being evaluated.
If you have a SPEECHMOD attribute set, it will be evaluated with <action>
as %0 and either : (for pose) or ; (for semipose) as %1. The result is
used instead of <action>, as long as it returns a non-empty string.
See 'help pose2' for examples.
See also: say, @emit, @speechmod
SENT()
sent(<player|descriptor>)
Returns the number of characters sent by a player during this
connection as indicated by SESSION.
You must be a Wizard, Royalty or See_All to use this function on anyone
but yourself.
See also: Connection Functions
SESSION
SESSION [<prefix>]
The SESSION command is the same as the admin WHO, but instead of showing
the hostname, it shows the number of bytes sent to, received from, and
pending for each connection.
See also: WHO
SET()
set(<object>[/<attribute>], <flag>)
set(<object>, <attribute>:<value>)
This function is equivalent to @set, and can be used to toggle flags and
set attributes. The two arguments to the function are the same as the
arguments that would appear on either side of the '=' in @set. This
function returns nothing.
The attribute-setting ability of set() is deprecated. You should
use attrib_set() instead; it's easier to read, and allows you to
clear attributes, too.
See also: attrib_set(), @set, wipe()
SETDIFF()
setdiff(<list1>, <list2>[, <delimiter>[, <sort type>[, <osep>]]])
This function returns the difference of two sets -- i.e., the
elements in <list1> that aren't in <list2>. The list that is
returned is sorted. Normally, alphabetic sorting is done. You can
change this with the fourth argument, which is a sort type as
defined in 'help sorting'. If used with exactly four arguments where
the fourth is not a sort type, it's treated instead as the output
separator.
Example:
> say setdiff(foo baz gleep bar, bar moof gleep)
You say, "baz foo"
See also: setinter(), setunion()
SETINTER()
setinter(<list1>, <list2>[, <delimiter>[, <sort type>[, <osep>]]])
This function returns the intersection of two sets -- i.e., the
elements that are in both <list1> and <list2>. The list that is
returned is sorted. Normally, alphabetic sorting is done. You can
change this with the fourth argument, which is a sort type as
defined in 'help sorting'. If used with exactly four arguments where
the fourth is not a sort type, it's treated instead as the output
separator.
Example:
> say setinter(foo baz gleep bar, bar moof gleep)
You say, "bar gleep"
See also: setdiff(), setunion()
SETQ()
setq(<register1>, <string1>[, ... , <registerN>, <stringN>])
setr(<register1>, <string1>[, ... , <registerN>, <stringN>])
The setq() and setr() functions are used to copy strings into local
registers assigned arbitrary names (Much like variables in other
programming languages.) setq() returns a null string; it is a purely
"side effect" function. setr() returns the value stored. Multiple
registers can be assigned with a single setq() or setr(), with
additional pairs of registers and values in the function's
arguments. In this case, setr() returns the value stored in the
first register listed. All arguments are evaluated before any
registers are set; if you want to use the result of setting one
register in setting another, use multiple setq()s.
Registers set via setq() or setr() can be accessed via the r()
function. Single-character registers can also be accessed via the
%qN substitution, and ones with longer names via %q<NAME> (Note that
the <>'s are required.) Attempting to access a register that hasn't
been set results in an empty string.
Register names are case insensitive: setq(A, foo) and setq(a, foo)
both set the same register, and %qA and %qa both fetch its value.
See 'help setq2' for more on limits, or 'help setq3' for examples.
See also: r(), listq(), unsetq(), letq(), localize(), ulocal()
SETQ2
Register names follow the same rules for attribute names, but they
must be shorter than 64 characters in length.
Register names other than a-z or 0-9 have a per-localize limit,
defined with @config max_named_qregs. If setq or setr tries to set a
named q-register and it exceeds the limit, it will return the string
"#-1 TOO MANY REGISTERS". This is the only time setq will return a
string. setq() and setr() with registers a-z or 0-9 have nothing to
worry about.
The maximum number of q-registers you can have set is configured via
@config max_attrs_per_obj. That number is for the total number of
q-registers set in a queue entry: Including across localize()d calls.
Beyond that count, you can only use single character registers (a-z 0-9).
Attempts to create a new register will simply fail silently, with the
exception of setq().
See 'help setq3' for examples.
SETQ3
The setq() function is probably best used at the start of the string
being manipulated, such as in the following example:
> &TEST object=strlen(%0)
> &CMD object=$test *: say setq(0,u(TEST,%0))Test. %0 has length %q0.
> test Foo
Object says, "Test. Foo has length 3."
In this case, it is a waste to use setq(), since we only use the
function result once, but if TEST was a complex function being used
multiple times within the same command, it would be much more
efficient to use the local register, since TEST would then only be
evaluated once. setq() can thus be used to improve the readability
of MUSH code, as well as to cut down the amount of time needed to do
complex evaluations.
Swapping the contents of registers can be done without writing to
temporary registers by setting both registers at once, so the code:
> think setq(0,foo,one,bar)%q0%q<one> - [setq(0,r(one),one,%q0)]%q0%q<one>
foobar - barfoo
See 'help setq4' for scoping rules of setq().
SETQ4
The registers set by setq() can be used in later commands in the same
thread. That is, the registers are set to null on all $-commands,
^-commands, A-attribute triggers, etc., but are then retained from that
point forward through the execution of all your code. Code branches like
@wait and @switch retain the register values from the time of the branch.
Example:
> say setr(what,foo); @wait 0=say %q<what>; say setr(what,bar)
Object says "foo"
Object says "bar"
Object says "foo"
SETR()
setq(<register1>, <string1>[, ... , <registerN>, <stringN>])
setr(<register1>, <string1>[, ... , <registerN>, <stringN>])
The setq() and setr() functions are used to copy strings into local
registers assigned arbitrary names (Much like variables in other
programming languages.) setq() returns a null string; it is a purely
"side effect" function. setr() returns the value stored. Multiple
registers can be assigned with a single setq() or setr(), with
additional pairs of registers and values in the function's
arguments. In this case, setr() returns the value stored in the
first register listed. All arguments are evaluated before any
registers are set; if you want to use the result of setting one
register in setting another, use multiple setq()s.
Registers set via setq() or setr() can be accessed via the r()
function. Single-character registers can also be accessed via the
%qN substitution, and ones with longer names via %q<NAME> (Note that
the <>'s are required.) Attempting to access a register that hasn't
been set results in an empty string.
Register names are case insensitive: setq(A, foo) and setq(a, foo)
both set the same register, and %qA and %qa both fetch its value.
See 'help setq2' for more on limits, or 'help setq3' for examples.
See also: r(), listq(), unsetq(), letq(), localize(), ulocal()
SETTING-ATTRIBUTES
Standard attributes are set using @<attrib> <obj>=<value>
Nonstandard attributes are set using &<attrib> <obj>=<value>
Attributes may also be set using @set <obj>=<attrib>:<value> or the
attrib_set() or set() functions.
Attributes are cleared using @<attrib> <obj> or &<attrib> <obj> or
with @wipe or wipe().
Note that if the empty_attrs configuration option is set
(@config empty_attrs to check), there is a difference between
clearing an attribute and setting an attribute to a null value:
@va me <--- wipes out my VA attribute
@va me= <--- sets my VA attribute to be empty
Empty attributes retain their flags and atrlock status. Wiped
attributes are gone forever.
See also: ATTRIBUTES, NON-STANDARD ATTRIBUTES, @set, @wipe, attrib_set(),
set(), wipe()
SETUNION()
setunion(<list1>, <list2>[, <delimiter>[, <sort type>[, <osep>]]])
This function returns the union of two sets -- i.e., all the elements of
both <list1> and <list2>, minus any duplicate elements. The list returned
is sorted. Normally, alphabetic sorting is done. You can change this with
the fourth argument, which is a sort type as defined in 'help sorting'.
If used with exactly four arguments where the fourth is not a sort type,
it's treated instead as the output
separator.
Examples:
> say setunion(foo baz gleep bar, bar moof gleep)
You say, "bar baz foo gleep moof"
> say setunion(1.1 1.0, 1.000)
You say, "1.0 1.000 1.1"
> say setunion(1.1 1.0, 1.000, %b, f)
You say, "1.0 1.1"
See also: setdiff(), setinter()
SEX
Gender on a MUSH is entirely up to you. You can set yourself (or any
of your objects) to be male, female, neuter, or plural. If whatever
is in the SEX attribute is not recognizable, the MUSH will assume
the object is neuter. Setting a gender attribute will enable pronoun
substitution by the MUSH. The SEX attribute is visual to anyone who
wants to see it.
The obj(), subj(), poss() and aposs() functions return different pronouns
for an object based on its @sex, and the %o, %s, %p and %a substitutions
return the same pronouns for the enactor.
See also: @sex, SUBSTITUTION
SHA0()
sha0(<string>)
Returns the SHA-0 cryptographic hash of the string. See RFC 3174 for
more information. Deprecated; use digest() and higher strength algorithms
instead.
See also: digest().
SHA1
digest(list)
digest(<algorithm>, <string>)
Returns a checksum (hash, digest, etc.) of <string> using the given
<algorithm>. The result is a unique large number represented in base
16.
Typically at least the following algorithms are supported:
md4 md5 ripemd160 sha sha1 sha224 sha256 sha384 sha512 whirlpool
Depending on the host's OpenSSL version and how it was configured,
there might be more (or less) available. digest(list) returns the
methods a particular server understands if the OpenSSL library
version being used is recent enough (1.0.0 and higher), or '#-1
LISTING NOT SUPPORTED' on older versions. For portable code, stick
with MD5 and the SHA family.
digest(sha, whatever) is equivalent to sha0(whatever).
Example:
> think iter(digest(list), %i0(foo) => [digest(%i0, foo)], %b, %r)
...
MD4(foo) => 0ac6700c491d70fb8650940b1ca1e4b2
MD5(foo) => acbd18db4cc2f85cedef654fccc4a4d8
MDC2(foo) => 5da2a8f36bf237c84fddf81b67bd0afc
RIPEMD160(foo) => 42cfa211018ea492fdee45ac637b7972a0ad6873
SHA(foo) => 752678a483e77799a3651face01d064f9ca86779
SHA1(foo) => 0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33
SHA224(foo) => 0808f64e60d58979fcb676c96ec938270dea42445aeefcd3a4e6f8db
...
SHARED
Flag: SHARED (players)
The SHARED flag is used to designate a player as a Zone Master. Objects
owned by a Zone Master are controlled by anyone who passes the player's
zone @lock.
See also: ZONE MASTERS, @lock
SHARED PLAYERS
SHARED PLAYERS
Shared players are player objects which are used to mediate shared
control of objects. A shared player is an object of type PLAYER
which has the SHARED flag set. They are created like ordinary
players, and can connect, build, etc. The only difference is that
objects owned by a shared player are controlled by anything that
passes the @lock/zone of the shared player.
Anyone who passes the @lock/zone of the shared player can @chown
objects to it. This, however, does not refund the original creator's
money or quota, as does normal.
Shared players used to be known as Zone Masters. The term was
changed to emphasize the fact that they are not related to zone
master objects, which are used to affect search order for
user-defined commands.
Continued in HELP SHARED PLAYERS2
SHARED PLAYERS2
Some suggested uses of shared players:
1. If you are working on a building project with several people,
it may be useful to create a shared player and @lock/zone it to
all of you. That way, all of the players working on the
project will be able to modify the building, as long as the
shared player owns all the objects being built.
2. If local wizards are desired, a shared player may be created
and zone locked to the local wizards. Players building within
that zone should be @chowning to the shared player, or logged
in as it while creating objects. The local wizard will then be
able to control anything within that domain as long as the
object in question is owned by the shared player.
See also: SHARED, @lock
SHL()
shl(<number>, <count>)
Performs a leftwards bit-shift on <number>, shifting it <count> times.
This is equivalent to mul(<number>, power(2, <count>), but much faster.
See also: shr()
SHR()
shr(<number>, <count>)
Performs a rightwards bit-shift on <number>, shifting it <count> times.
This is equivalent to div(<number>, power(2, <count>), but much faster.
See also: shl()
SHUFFLE()
shuffle(<list>[, <delimiter>[, <osep>]])
This function shuffles the order of the items of a list, returning a
random permutation of its elements.
<delimiter> defaults to a space, and <osep> defaults to <delimiter>.
Example:
> say shuffle(foo bar baz gleep)
You say, "baz foo gleep bar"
See also: scramble(), pickrand()
SIGN()
sign(<number>)
Essentially returns the sign of a number -- 0 if the number is 0, 1 if the
number is positive, and -1 if the number is negative. This is equivilent
to bound(<number>, -1, 1).
Example:
> say sign(-4)
You say, "-1"
> say sign(2)
You say, "1"
> say sign(0)
You say, "0"
See also: abs(), bound()
SIN()
sin(<angle>[, <angle type>])
Returns the sine of <angle>, which should be expressed in the given
angle type, or radians by default.
See 'HELP ANGLES' for more on the angle type.
See also: acos(), asin(), atan(), cos(), ctu(), tan()
SLAY
slay <player/thing>
This is a Wizard-only command that kills objects without paying any
insurance to the victims. It is used in places where 'suicide'
should not pay.
(Su-ic-ide is pain-less... {MASH theme})
SLEV()
slev()
stext([<n>])
%$<n>
slev() returns the current nesting depth of switch*(), reswitch*() and
@switch/@selects. stext() returns the <string> being matched for the
current switch, or the <n>th switch where n=0 is the current switch, n=1
is the switch the current switch is nested in, and so on. It is a safer
replacement for the "#$" token, which (because it is replaced before
evaluation) is unsafe with user input, and unsuitable for use in nested
switches.
stext(L) returns the <string> for the outermost switch, and is equivilent
to stext(slev()). %$<n> is equivilent to stext(<n>), for <n>s of 0-9 or L.
Example:
> &cmd.whois me=$whois *: @pemit %#=switch(pmatch(%0),#-*,
I don't know '%0', '%0' is %$0)
> @switch foo=f*, say switch(bar, b*,%$1 %$0!)
You say, "foo bar!"
See also: switch(), reswitch(), @switch
SOCKET COMMANDS
These commands can only be entered by a connected player through
their client. They generally do things that only affect a specific
connection and would be meaningless if run by an object or
disconnected player.
IDLE INFO LOGOUT OUTPUTPREFIX OUTPUTSUFFIX
PROMPT_NEWLINES QUIT SCREENWIDTH SCREENHEIGHT
SOCKSET MSSP-REQUEST
In addition, the following commands can only be used at the login
screen:
cd ch cv connect create register
The WHO command can also be used at the login screen. Please note that
this is different to the in-game WHO command.
SOCKSET
SOCKSET [<option>=<value>]
@sockset [<descriptor>][=<option>, <value>[, ..., <optionN>, <valueN>]]
SOCKSET is a socket commands which sets or queries socket-specific options.
These options are usually set automatically, or negotiated by the MUSH and
your client, but this command lets you override those settings.
With no args, SOCKSET shows the current value of the socket options. With
an <option>=<value> pair, it attempts to set the given option.
@sockset is a similar in-game command, but can specify which descriptor to
change options for, and can set multiple options at once. Only Wizards can
change the options for other players' descriptors. <descriptor> defaults to
your least-idle descriptor, when used by a player; for non-players, it has
no default.
Options:
colorstyle: See help colorstyle
outputprefix: Same as OUTPUTPREFIX
outputsuffix: Same as OUTPUTSUFFIX
pueblo: Sets Pueblo-related options. If value has md5=...", then it
will set the pueblo checksum. If empty, Pueblo mode is
turned off.
telnet: Yes or no, to enable/disable telnet negotiation
width: Set your width(), same as SCREENWIDTH
height: Set your height(), same as SCREENHEIGHT
terminaltype: Your terminal type, used by terminfo()
Note that changing 'telnet' or 'pueblo' may stop your client from parsing
or displaying output correctly; only use if you know what you're doing!
See also: SOCKET COMMANDS, terminfo(), Pueblo, colorstyle
SOFTCODE
MUSHcode is the programming language available within the MUSH
itself with which you can create user-defined commands and macros.
It is sometimes called "softcode" to distinguish it from "hardcode",
which is the language that the source code for the MUSH server is
written in. (Incidentally, hardcode is written in the C programming
language.)
At its most basic, writing MUSHcode is just stringing together a
series of commands that you would otherwise just type in one at a
time. You can store MUSHcode in attributes on any type of object
you own or control (including yourself!). The series of commands
can be triggered by using a user-defined command or by using
@trigger.
Continued in 'help mushcode2'.
SORT()
sort(<list>[, <sort type>[, <delimiter>[, <osep>]]])
This sorts a list of words. If no second argument is given, it will
try to detect the type of sort it should do. If all the words are
numbers, it will sort them in order of smallest to largest. If all
the words are dbrefs, it will sort them in order of smallest to
largest. Otherwise, it will perform a lexicographic sort.
The second argument is a sort type. See 'help sorting'.
The optional third argument gives the list's delimiter character.
If not present, <delimiter> defaults to a space. The optional
fourth argument gives a string that will delimit the resulting list;
it defaults to <delimiter>.
See also: sortby(), sortkey()
SORTBY()
sortby([<obj>/]<attrib>, <list>[, <delimiter>[, <output separator>]])
This sorts an arbitrary list according to the ufun <obj>/<attrib>. This
ufun should compare two arbitrary elements, %0 and %1, and return
zero (equal), a negative integer (element 1 is less than element 2) or a
positive integer (element 1 is greater than element 2), similar to the
comp() function.
A simple example, which imitates a normal alphabetic sort:
> &ALPHASORT test=comp(%0,%1)
> say sortby(test/ALPHASORT,foo bar baz)
You say, "bar baz foo"
A slightly more complicated sort. #1 is "God", #2 is "Amby", "#3" is "Bob":
> &NAMESORT me=comp(name(%0),name(%1))
> say sortby(NAMESORT,#1 #2 #3)
You say, "#2 #3 #1"
Warning: the function invocation limit applies to this function. If
this limit is exceeded, the function will fail _silently_. List and
function sizes should be kept reasonable.
See also: anonymous attributes, sorting, sort(), sortkey()
SORTING
In functions where you can specify a sorting method, you can provide
one of these sort types:
Type Sorts:
a Sorts lexicographically (Maybe case-sensitive).
i Sorts lexicographically (Always case-insensitive).
d Sorts dbrefs.
n Sorts integer numbers.
f Sorts decimal numbers.
m Sorts strings with embedded numbers and dbrefs (as names).
name Sorts dbrefs by their names. (Maybe case-sensitive)
namei Sorts dbrefs by their names. (Always case-insensitive)
conn Sorts dbrefs by their connection time.
idle Sorts dbrefs by their idle time.
owner Sorts dbrefs by their owner dbrefs.
loc Sorts dbrefs by their location dbref.
ctime Sorts dbrefs by their creation time.
mtime Sorts dbrefs by their modification time.
lattr Sorts attribute names.
The special sort key attr:<aname> or attri:<aname> will sort dbrefs
according to their <aname> attributes. For example: Separating by
&factions or &species attrs. attr is probably case-sensitive, and
attri is case-insensitive.
Prefixing the sort type with a minus sign, -, reverses the order of
the sort.
Whether or not the 'a' sort type is case-sensitive or not depends on
the particular mush and its environment.
See also: sort(), sortby(), sortkey(), setunion(), setinter(), setdiff()
SORTKEY()
sortkey([<obj>/]<attrib>, <list>[, <sort type>[, <delimiter>[, <osep>]]])
This function creates a list of keys by passing every element of <list>
into the ufun given in <attrib>. The list is then sorted according to the
sorting method in <sort type>, or is automatically guessed (as per
'help sorting').
This is equivalent to:
> &munge_sort me=sort(%0[, <sort type>])
> say munge(munge_sort, map(<attrib>, <list>), <list>)
Only there is no risk with delimiters ocurring within the list.
A simple example, which sorts players by their names:
> @@ #1 is "God", #2 is "Amby", "#3" is "Bob"
> &KEY_NAME me=name(%0)
> say sortkey(key_name, #1 #2 #3)
You say, "#2 #3 #1"
See also: anonymous attributes, sorting, sortby()
SOUNDEX()
soundex(<word>)
The soundex function returns the soundex pattern for a word. A
soundex pattern represents the sound of the word, and similar
sounding words should have the same soundex pattern. Soundex
patterns consist of an uppercase letter and 3 digits.
> think soundex(foobar)
F160
For details of how the algorithm works, see 'help soundex2'.
See also: soundslike()
SOUNDEX2
Here's how the soundex algorithm works:
1. The first letter of the soundex code is the first letter of
the word (exception: words starting with PH get a soundex
starting with F)
2. Each remaining letter is converted to a number:
vowels, h, w, y ---------> 0
b, p, f, v --------------> 1
c, g, j, k, q, s, x, z --> 2
d, t --------------------> 3
l -----------------------> 4
m, n --------------------> 5
r -----------------------> 6
At this stage, "foobar" is "F00106"
3. Strings of the same number are condensed. "F0106"
4. All 0's are removed, because vowels are much less important
than consonants in distinguishing words. "F16"
5. The string is padded with 0's or truncated to 4 characters. "F160"
That's it. It's not foolproof (enough = "E520", enuf = "E510") but
it works pretty well. :)
SOUNDLIKE()
soundslike(<word>, <word>)
soundlike(<word>, <word>)
The soundslike function returns 1 if the two words have the same
soundex code (see 'help soundex()' for information), which means, in
general, if they sound alike.
Example:
> think soundslike(robin,robbyn)
1
> think soundslike(robin,roebuck)
0
See also: soundex()
SOUNDSLIKE()
soundslike(<word>, <word>)
soundlike(<word>, <word>)
The soundslike function returns 1 if the two words have the same
soundex code (see 'help soundex()' for information), which means, in
general, if they sound alike.
Example:
> think soundslike(robin,robbyn)
1
> think soundslike(robin,roebuck)
0
See also: soundex()
SPACE()
space(<number>)
Prints <number> spaces. Useful for times when you want to be able to use
lots of spaces to separate things. Same as [repeat(%b, <number>)].
Example:
> say a[space(5)]b
Amberyl says, "a b"
See also: repeat()
SPEAK()
speak(<speaker>, <string>[, <say string>
[, [<transform obj>/]<transform attr>
[, [<isnull obj>/]<isnull attr>[, <open>[, <close>]]]]])
This function is used to format speech-like constructs, and is
capable of transforming text within a speech string; it is useful
for implementing "language code" and the like.
If <speaker> begins with &, the rest of the <speaker> string is
treated as the speaker's name, so you can use it for NPCs or tacking
on titles (such as with @chatformat). Otherwise, the name of the object
<speaker> is used.
When only <speaker> and <string> are given, this function formats
<string> as if it were speech from <speaker>, as follows.
If <string> is... the resulting string is...
:<pose> <speaker's name> <pose>
: <pose> <speaker's name><pose> (but same as :<pose> if called
as SPEAKPENN())
;<pose> <speaker's name><pose>
|<emit> <emit>
"<speech> <speaker's name> says, "<speech>"
<speech> <speaker's name> says, "<speech>"
If <say string> is specified, it is used instead of "says," /
"says".
Continued in 'help Speak2'.
SPEAK2
Examples:
> say [name(me)]
You say, "Wizard"
> @emit [speak(me, :tests.)]
Wizard tests.
> @emit [speak(me, : 's testing.)]
Wizard's testing.
> @emit [speak(me, ;'s testing.)]
Wizard's testing.
> @emit [speak(me, |Test.)]
Test.
> @emit [speak(me, "Test.)]
Wizard says, "Test."
> @emit [speak(me, Test.)]
Wizard says, "Test."
> @emit [speak(me, Test., yells:)]
Wizard yells: "Test."
> @emit [speak(&Fido the Wonder Dog,:woofs!)]
Fido the Wonder Dog woofs!
> @emit [speak(&Mr. President,:has been misunderestimated.)]
Mr. President has been misunderestimated.
Continued in 'help Speak3'.
SPEAK3
If <transform> is specified (an object/attribute pair or attribute,
as with map() and similar functions), the speech portions of
<string> are passed through the transformation function.
Speech is delimited by double-quotes (i.e., "text"), or by the
specified <open> and <close> strings. For instance, if you wanted
<<text>> to denote text to be transformed, you would specify <open>
as << and close as >> in the function call. Only the portions of the
string between those delimiters are transformed. If <close> is not
specified, it defaults to <open>.
The transformation function receives the speech text as %0, the
dbref of <speaker> as %1, and the speech fragment number as %2. For
non-say input strings (i.e., for an original <string> beginning with
the :, ;, or | tokens), fragments are numbered starting with 1;
otherwise, fragments are numbered starting with 0. (A fragment is a
chunk of speech text within the overall original input string.)
Continued in 'help Speak4'.
SPEAK4
Examples:
> @va me = "Fragment %2 is: %0"
> @emit speak(me, test, ,va)
Wizard says, "Fragment 0 is: test"
> @emit speak(me, "test, ,va)
Wizard says, "Fragment 0 is: test"
> @emit speak(me, "test, yells:, va)
Wizard yells: "Fragment 0 is: test"
> @emit speak(me, :tests. "Hi.", ,va)
Wizard tests. "Fragment 1 is: Hi."
> @emit speak(me, : 's testing. "Hi.", ,va)
Wizard's testing. "Fragment 1 is: Hi."
> @emit speak(me, ;'s testing. "Hi.", ,va)
Wizard's testing. "Fragment 1 is: Hi."
> @emit speak(me, |This is a test. "Hi.", ,va)
This is a test. "Fragment 1 is: Hi."
> @emit speak(me, :tests. "Hi." And... "Bye." The end., ,va)
Wizard tests. "Fragment 1 is: Hi." And... "Fragment 2 is: Bye." The end.
> @emit speak(me, :tests. "Hi." And... <<Bye.>> The end., ,va, , <<, >>)
Wizard tests. "Hi." And... "Fragment 1 is: Bye." The end.
Continued in 'help Speak5'.
SPEAK5
If the result of transforming a given speech fragment is a null
string, and <isnull> is specified (an object/attribute pair or
attribute), that function is used evaluate an alternative result,
with %0 as the dbref of <speaker>, and %1 as the speech fragment
number.
The <isnull> functionality can be useful for gracefully handling
cases where speech may be processed down to nothing, such as with
language code where no words are successfully translated.
Consider this example, where the speech string may be randomly
removed:
> &MUTTER_FN me = [ifelse(rand(2),"%0",)]
> &NONE_FN me = [capstr(subj(%0))] mutters something.
> @emit speak(me, :tests. "Hello there.", mutters:, MUTTER_FN, NONE_FN)
Wizard tests. "Hello there."
OR
Wizard tests. He mutters something.
Continued in 'help Speak6'.
SPEAK6
Elegantly handling an empty string when the type of speech is a
plain say is a bit more difficult. In order to facilitate this, when
the speech type is a plain say, the '<speaker> says,' is only
prepended to the output if the transformation of the first speech
fragment produces something non-null. Also note that quotes are not
placed around such speech automatically, to allow the user's code to
insert whatever is appropriate.
Below is a more elegant version of the mutter example. Here, we find
the use for say-speech fragments being numbered starting from 0
rather than 1 -- if the speech fragment number is 0, we know we
haven't given any output yet.
> &MUTTER_FN me=if(rand(2),"%0")
> &NONE_FN me=switch(%1,0,name(%0),capstr(subj(%0)))] mutters something.
> @emit speak(me, Hello there., mutters:, MUTTER_FN, NONE_FN)
Wizard mutters: "Hello there."
OR
Wizard mutters something.
Continued in 'help Speak7'.
SPEAK7
Here's another example, where words between + signs are reversed,
but those within double-quotes are untouched (demonstrating a
technique useful in something where you want to allow users to mix
ordinary speech with transformed speech).
> &REV_FN me = [switch(%2,0,backwards,[capstr(subj(%1))] says backwards)],
"[revwords(%0)]"
> @emit speak(me,:tests. "Normal speech." +Mixed up speech+ Success!, ,
REV_FN, ,+)
Wizard tests. "Normal speech." He says backwards, "speech up Mixed" Success!
SPEAKPENN()
speak(<speaker>, <string>[, <say string>
[, [<transform obj>/]<transform attr>
[, [<isnull obj>/]<isnull attr>[, <open>[, <close>]]]]])
This function is used to format speech-like constructs, and is
capable of transforming text within a speech string; it is useful
for implementing "language code" and the like.
If <speaker> begins with &, the rest of the <speaker> string is
treated as the speaker's name, so you can use it for NPCs or tacking
on titles (such as with @chatformat). Otherwise, the name of the object
<speaker> is used.
When only <speaker> and <string> are given, this function formats
<string> as if it were speech from <speaker>, as follows.
If <string> is... the resulting string is...
:<pose> <speaker's name> <pose>
: <pose> <speaker's name><pose> (but same as :<pose> if called
as SPEAKPENN())
;<pose> <speaker's name><pose>
|<emit> <emit>
"<speech> <speaker's name> says, "<speech>"
<speech> <speaker's name> says, "<speech>"
If <say string> is specified, it is used instead of "says," /
"says".
Continued in 'help Speak2'.
SPELLNUM()
spellnum(<number>)
Given a number, return its written-out representation in words.
Example:
> think spellnum(12345)
twelve thousand three hundred forty-five
See also: ordinal()
SPLICE()
splice(<list1>, <list2>, <word>[, <delimiter>])
This function splices <list1> and <list2> together. <list1> and <list2>
are space-separated lists of words.
If a word in <list1> is the same as <word>, it is replaced by the word in
the corresponding position in <list2>. Both lists must have the same
number of words.
Example:
> say splice(foo bar baz,eek moof gleep,bar)
You say, "foo moof baz"
See also: merge()
SPOOFING
Spoofing is the act of making other characters think that a person
said or did something that they did not. This is very easy to
accomplish, and has some good effects, which is why it is allowed.
However, abusing it is very twinkish and will most likely get you in
hot water with your wizards. Note that if you are being spoofed and
want to know who is doing it, you can set yourself NOSPOOF and you
will be notified who is making the @emits.
See also: @emit, @pemit, @remit, @oemit, NOSPOOF
SQL EXAMPLES
Example of using sqlescape() to prevent injection attacks:
> &SEL_GETID obj=SELECT id FROM mytable WHERE name = '[sqlescape(%0)]'
> &DOIT obj=$do *: think setq(0,sql(u(SEL_GETID,%0),~,|)); @@ More cmds
Using mapsql() to format results:
> @@ Field, Type, Null?, Key?, Default, Extra
> &each_row me=align(<15 <15 <5 <5 <10 <14,%1,%2,%3,%4,%5,%6)
> &tabledesc me=mapsql(each_row,describe `[sqlescape(%0)]`,%r,1)
> think u(tabledesc,quotes)
Field Type Null Key Default Extra
quoteid int(11) PRI auto_increment
quote text
> &each_bb me=(%0) - %1 (%2)
> &query me=SELECT name, count(*) FROM bbs GROUP BY name ORDER BY name
> think mapsql(each_bb, v(query), %r)
(1) - Announcements (5)
(2) - Advertisements (20)
Using sql() to update fields:
> &update me=UPDATE `foo` SET `time` = '[sqlescape(%0)]' WHERE
`loc` = '[sqlescape(%1)]'
> &foo me=$foo *: think sql(u(update, %0, %L),,0)%q0 rows updated.
> foo bar
5 rows updated.
SQL FUNCTIONS
These functions perform queries or other operations on an SQL
database to which the MUSH is connected, if SQL support is available
and enabled.
sql() sqlescape() mapsql()
SQL()
sql(<query>[, <row separator>[, <field separator>[, <register>]]])
Performs an SQL query if the MUSH is configured to connect to an SQL
database server. This function requires a WIZARD flag or the Sql_Ok power.
By default, SELECT queries will return their data space-separated.
Usually, it's more useful to specify a character to delimit rows returned
(and sometimes another character to delimit the fields/columns returned,
if they may contain spaces).
<query> is evaluated, so it's useful to either read it from another
attribute with u() or use lit() to protect commas. If you will be
interpolating user-provided values into the query, be careful to escape
them with sqlescape().
A query that doesn't return any rows, such as an UPDATE or SELECT that
has no matches will return a null string.
If <register> is specified, and <query> alters the database (such as an
UPDATE or INSERT query), there is a side-effect: the number of affected
rows is stored into the specified q-register.
See 'help sql examples' for examples.
See also: sqlescape(), mapsql(), @sql, setq(), r(), @mapsql
SQL_OK POWER
This power lets an object use @sql, sql() and related commands and
functions, if the MUSH is connected to an SQL server. Wizards have the
power implicitly.
See also: @sql, sql(), @mapsql, mapsql(), sqlescape()
SQLESCAPE()
sqlescape(<string>)
This function performs SQL-server-implemented escaping of <string>. It's
important to escape arbitrary data before passing it to the sql() and
mapsql() functions, or @sql command, to prevent SQL injection attacks.
If using a Sqlite3 database, the game must also have MySQL support
compiled into the mush to use this function, since Sqlite3 does not
provide a way to do this.
Example:
> think sqlescape(You don't say)
You don\'t say
When used in an SQL query, the results of an sqlescape() function
should be enclosed in single quotes.
You must be a WIZARD or have the Sql_Ok power to use this function.
See also: sql(), mapsql(), @sql, @mapsql
SQRT()
sqrt(<number>)
Returns the square root of <number>. <number> cannot be negative.
See also: root()
SQUISH()
squish(<string>[, <character>])
This function removes the leading and trailing <character>s from <string>,
and condenses all inter-word <character>s to a single<character>. If no
character is given, a space is used.
Examples:
> say squish(%b%bfoo bar%b%bbaz blech%b%b%beek%b)
You say, "foo bar baz blech eek"
> say squish(||a|| b|c|d|, |)
You say, "a| b|c|d"
See also: trim()
SSL()
ssl(<player|descriptor>)
This function returns 1 if the player is using an SSL connection, and 0
otherwise. If SSL is disabled, it always returns 0. You must be See_All to
use this function on another player.
See also: terminfo()
STACK
For those unfamiliar with the term stack, it refers to a programming data
structure that follows a LIFO (Last-In-First-Out) principle. The stack in
MUSH holds the ten REGISTERS, which can be accessed via the V-function
(v(0) through v(9)) or via %-substitution (%0 through %9).
See also: REGISTERS
STARTTIME()
starttime()
Returns the time the MUSH first was last restarted (not including
@shutdown/reboots), in the same format as time().
Example:
> say starttime()
You say "Sat Dec 7 00:09:13 1991
See also: convtime(), restarttime(), restarts()
STATS()
lstats([<player>])
This function returns the breakdown of objects in the database, in a format
similar to "@stats". If <player> is "all" (the default), a breakdown is
done for the entire database. Otherwise, the breakdown is returned for
that particular player.
Only wizards and those with the Search power can LSTATS() other players.
The list returned is in the format:
<Total objects> <Rooms> <Exits> <Things> <Players> <Garbage>
stats() is an alias for lstats().
See also: nsearch()
STDDEV()
stddev(<number1>[, ... , <numberN>])
Returns the sample standard deviation of its arguments.
See also: mean(), median()
STEP()
step([<obj>/]<attr>, <list>, <step>[, <delim>[, <osep>]])
This function is similar to map(), except you can pass up to 10 elements
of the list at a time, in %0 to %9. <step> must be between 1 and 10, with
a step of 1 equivalent to map(). If the elements of the list can't be
split up evenly, the last evaluation will run with some of the registers
unset; the %+ substitution or the registers() function can be used to see
which/how many are set.
Example:
> &foo me=%0 - %1 - %2
> think step(foo, 1 2 3 4 5, 3,, %r)
1 - 2 - 3
4 - 5 -
Using registers() to avoid extra delimiters:
> &foo me=iter(registers(,args),v(%i0),,%b-%b)
> think step(foo, 1 2 3 4 5, 3,, %r)
1 - 2 - 3
4 - 5
See also: map(), iter(), fold(), anonymous attributes, registers()
STEXT()
slev()
stext([<n>])
%$<n>
slev() returns the current nesting depth of switch*(), reswitch*() and
@switch/@selects. stext() returns the <string> being matched for the
current switch, or the <n>th switch where n=0 is the current switch, n=1
is the switch the current switch is nested in, and so on. It is a safer
replacement for the "#$" token, which (because it is replaced before
evaluation) is unsafe with user input, and unsuitable for use in nested
switches.
stext(L) returns the <string> for the outermost switch, and is equivilent
to stext(slev()). %$<n> is equivilent to stext(<n>), for <n>s of 0-9 or L.
Example:
> &cmd.whois me=$whois *: @pemit %#=switch(pmatch(%0),#-*,
I don't know '%0', '%0' is %$0)
> @switch foo=f*, say switch(bar, b*,%$1 %$0!)
You say, "foo bar!"
See also: switch(), reswitch(), @switch
STICKY
Flag: STICKY (all types)
If a thing or player is STICKY, it goes home when dropped. It also goes
home when an object carrying it teleports or goes home, unless the object
controls it.
If a room is STICKY, its drop-to is delayed until the last person leaves.
This flag is meaningless for exits.
See also: home, @teleport, DROP-TOS
STRALLOF()
strfirstof(<expr>[, ... , <exprN>], <default>)
strallof(<expr>[, ... , <exprN>], <osep>)
strfirstof() returns the first <expr> which evaluates to a non-empty
string (a string at least 1 character long). If all <expr>s evaluate empty,
<default> is returned instead.
strallof() returns all <expr>s which evaluate to non-empty strings, with
each expression separated by <osep>.
Examples:
> say strfirstof(, ,@@(Nothing),foo,default)
You say, "foo"
> say strfirstof(get(%#/fullname), u(%#/ansiname), %n)
You say, "Mike"
> say strallof(, ,foo,@@(Nothing),%b,bar|baz,#-1,|)
You say, "foo| |bar|baz|#-1"
See also: allof(), firstof(), first(), strlen(), cat(), default()
STRCAT()
cat(<string>[, ... , <stringN>])
strcat(<string1>[, ... , <stringN>])
These functions concatenate multiple strings together. cat() adds a space
between each string; strcat() does not.
Example:
> say cat(foo bar, baz blech)
You say, "foo bar baz blech"
> say strcat(foo bar, baz blech)
You say, "foo barbaz blech"
STRFIRSTOF()
strfirstof(<expr>[, ... , <exprN>], <default>)
strallof(<expr>[, ... , <exprN>], <osep>)
strfirstof() returns the first <expr> which evaluates to a non-empty
string (a string at least 1 character long). If all <expr>s evaluate empty,
<default> is returned instead.
strallof() returns all <expr>s which evaluate to non-empty strings, with
each expression separated by <osep>.
Examples:
> say strfirstof(, ,@@(Nothing),foo,default)
You say, "foo"
> say strfirstof(get(%#/fullname), u(%#/ansiname), %n)
You say, "Mike"
> say strallof(, ,foo,@@(Nothing),%b,bar|baz,#-1,|)
You say, "foo| |bar|baz|#-1"
See also: allof(), firstof(), first(), strlen(), cat(), default()
STRING FUNCTIONS
String functions take at least one string and return a transformed
string, parts of a string, or a value related to the string(s).
accent() after() align() alphamax()
alphamin() art() before() brackets()
capstr() case() caseall() cat()
center() chr() comp() cond()
condall() decode64() decompose() decrypt()
delete() digest() edit() encode64()
encrypt() escape() flip() foreach()
if() ifelse() lcstr() left()
lit() ljust() lpos() merge()
mid() ord() ordinal() pos()
regedit() regmatch() repeat() right()
rjust() scramble() secure() sha0()
space() spellnum() squish() strallof()
strcat() strfirstof() strinsert() stripaccents()
stripansi() strlen() strmatch() strreplace()
switch() tr() trim() ucstr()
wrap()
See also: STRINGS
STRINGS
A string is simply a bunch of characters. A word is a string that
begins and ends with the space character. A sentence is a string
made up of smaller substrings that are words. Please note that a
"word" or "sentence" in this technical sense does not have to make
sense in English (or in any other language, for that matter). As far
as mush functions and commands are concerned, this is a perfectly
good sentence:
Foozle 09blert bar baz foo.
See also: string functions
STRINGSECS()
stringsecs(<timestring>)
The stringsecs() function takes a string of the form produced by
timestring() and converts it back into seconds.
Example:
> say stringsecs(5m 1s)
You say, "301"
See also: timestring(), etimefmt(), convtime()
STRINSERT()
strinsert(<string>, <position>, <insert>)
This function returns <string>, with <insert> added before the
<position> character in <string>. Note that the first character in
<string> is numbered 0, not 1.
If <position> is less than 0, an error is returned. If <position> is
greater than the length of <string>, <insert> is appended to it.
Examples:
> think strinsert(barbaz, 0, foo)
foobarbaz
> think strinsert(Myname, 2, %b)
My name
See also: delete(), insert(), strreplace()
STRIPACCENTS()
stripaccents(<string>)
Returns the string with accented characters converted to non-accented.
As with the accent() function, this assumes the ISO 8859-1 character set.
See also: accent(), @nameaccent, accname(), stripansi(), render()
STRIPANSI()
stripansi(<string>)
Returns the string with all ansi and HTML codes removed.
See also: stripaccents(), ansi(), tag(), render()
STRLEN()
strlen(<string>)
Returns the length of the string (the number of characters in it).
Example:
> say strlen(foobar)
You say, "6"
See also: words(), strfirstof()
STRMATCH()
strmatch(<string>, <pattern>[, <register list>])
This function matches <pattern> against the entire <string>. It returns
1 if it matches and 0 if it doesn't. It is not case-sensitive, and
<pattern> may contain wildcards.
If <register list> is given, there is a side-effect: Wildcards and
patterns are stored in q-registers, in the order they are given.
<register list> must be a space-separated list of digits or letters.
Examples:
> say strmatch(Foo bar baz, *Baz)
You say, "1"
> say strmatch(Foo bar baz,*Foo)
You say, "0"
> say strmatch(Foo bar baz,*o*a*)
You say, "1"
> say strmatch(foo:bar,*:*,0 1)/%q0/%q1
You say, "1/foo/bar"
See also: comp(), match(), setq(), r()
STRREPLACE()
strreplace(<string>, <start>, <length>, <text>)
Returns <string> with the <length> characters starting at <start>
replaced by <text>. As with most other string functions, the first
character is at position 0.
If <start> is less than 0, an error is returned, and if <start> is
greater than the length of <string>, <string> is returned.
Example:
> think strreplace(Fix teh typo, 4, 3, the)
Fix the typo
See also: delete(), strinsert(), ldelete(), replace()
SUB()
sub(<number1>, <number>[, ... , <number>])
sub() subtracts <number> from <number1>. If more than one <number> argument
is given, each is subtracted from the result of the previous subtraction
in turn. The result of the final subtraction is returned.
See also: add(), dec(), lmath(), vsub()
SUBJ()
subj(<object>)
Returns the subjective pronoun - he/she/it - for an object. You can
also use the %s substitution to get the subjective pronoun of the
enactor.
See also: aposs(), obj(), poss()
SUBSTITUTIONS
The % symbol is used in MUSH commands to indicate a substitution -- some
other character(s) or words are substituted for whatever follows the %
symbol. Some common substitutions are:
%b = a single space (just like [space(1)])
%r = a blank line
%t = A tab. Note that this may not look right on some screens.
%# = dbref of the ENACTOR (object that set off the command)
%n = the ENACTOR's name
%N = the ENACTOR's name, first letter capitalized
%~ = the ENACTOR's accented name
%: = the ENACTOR's unique identifier, like objid(%#)
%% = a literal %
Case makes a difference in all substitutions; capitalizing the first
letter after the % will capitalize the first letter of the resulting
substitution.
Continued in 'help substitutions2'.
SUBSTITUTIONS2
If the ENACTOR's gender is set, you can use these substitutions to get the
right pronoun for him/her:
%s = subjective pronoun: he, she, it, they. Same as subj(%#)
%o = objective pronoun: him, her, it, them. Same as obj(%#)
%p = possessive pronoun: his, her, its, their. Same as poss(%#).
%a = absolute possessive: his, hers, its, theirs. Same as aposs(%#).
Case makes a difference: %S will return He, She, It, They.
Some attributes can be retrieved via substitutions:
%va-%vz = the contents of the object's VA-VZ attributes, respectively
%wa-%wz, %xa-%xz = as above, for WA-WZ and XA-XZ
These are the equivilent of get(me/<attribute>).
Continued in 'help substitutions3'.
SUBSTITUTIONS3
Other substitutions:
%0-%9 = the contents of the REGISTERS 0-9, respectively
%@ = the caller's dbref number. Initially same as %#, changes when
something like a U-FUNCTION is called.
%! = the dbref number of the object the command is on (the EXECUTOR)
%L = the dbref of the ENACTOR's location
%c = text of the last command, _before_ evaluation
%u = text of the last command, after evaluation, available to locks/hooks
%? = The current function invocation and depth counts
%= = The dbref/attribute currently being evaluated
%+ = The number of arguments passed to the current ufun.
%qN = the equivalent of r(N), a register set by a setq() function.
%iN = equivilent of itext(N), the list element for iter()/@dolist.
%$N = equivilent of stext(N), the <string> in switch()/@switch.
See 'help substitutions4' for examples.
See also: EVALUATION, ENACTOR, EXECUTOR, DBREFS, REGISTERS, v()
SUBSTITUTIONS4
Example:
@sex me=male
@drop box=%N just dropped %p box.
drop box
> Cyclonus just dropped his box.
Let's say that Cyclonus's dbref number is #10 and the box's dbref
number is #11. The dbref # of the room Cyclonus is standing in is
#13. When Cyclonus dropped the box above, these were the values of
the following %-variables:
%N = Cyclonus
%# = #10
%@ = #10
%! = #11
%L = #13
SUCCESS
A "success" normally occurs when you attempt to do something that is
restricted by an @lock and you pass the @lock. (Note that if no lock
is set, you automatically pass it.) For example, the "basic" lock
restricts who can pick up a player/thing or who can go through an
exit. Whenever you successfully do either of these things, you will
set off the basic success messages on the object whose lock you have
just successfully passed.
Many other actions can also be locked - see @lock and locktypes for
more information. Many of these actions have standard attributes
that you can set messages in for when someone succeeds.
See also: FAILURE, @lock, VERBS, ATTRIBUTES, @success, @asuccess, @osuccess
SUSPECT
Flag: SUSPECT (all types)
This flag is only settable by wizards. Players with this flag have their
connects, disconnects, name changes, and kills reported to all connected
wizards. Actions by any object with this flag are also logged to the
MUSH log files.
SWITCH WILDCARDS
@switch, @select, switch() and switchall() normally do wildcard
matching between their first argument and the <expr>ession
arguments, with the normal * and ? special characters. However, if
one of the <expr>essions starts with "<" or ">", a less than or greater
than check is done instead of wildcard matching for that pair.
switch(X, >Y, A, B) returns A if X is greater than Y, and B if it's not.
switch(X, >=Y, A, B) returns A if X is greater than or equal to Y, and B
if it's not.
switch(X, <Y, A, B) returns A if X is less than Y, and B if it's not.
switch(X, <=Y, A, B) returns A if X is less than or equal to Y, and B if
it's not.
If X and Y are numbers, the test is like using gt()/lt() or gte()/lte().
If X and Y are non-numeric strings, the result of comp(X,Y) is used
to determine which string is alphabetically before (less than) the
other.
If you need to have a leading < or > that's treated like a normal
character in a wildcard match, use \\< or \\> (the \\ will turn into
\ when the argument is evaluated, and then that single \ will stop
the greater/less than check).
See also: WILDCARDS
SWITCH()
switch(<str>, <expr1>, <list1>[, ... , <exprN>, <listN>][, <default>])
switchall(<str>, <expr1>, <list1>[, ... , <exprN>, <listN>][, <default>])
case(<str>, <expr1>, <list1>[, ... , <exprN>, <listN>][, <default>])
caseall(<str>, <expr1>, <list1>[, ... , <exprN>, <listN>][, <default>])
These functions match <string> against the <expr>essions, returning
the corresponding <list>. If nothing is matched, the <default> is returned.
switch() and case() return the <str> for the first matching <expr>, while
switchall() and caseall() return the corresponding <list> for all <expr>s
which match.
switch() and switchall() use wildcard and lt/gt <expr>s, as described in
'help switch wildcards'. case() and caseall() do a case-sensitive exact
match, like member() or comp(). In this case, $0-$9 will be set to the text
that the nth wildcard character met.
If the string "#$" appears in the <list> to be evaluated, it will be
replaced with the evaluated value of <str> /before/ evaluation of
<list>. This is not done in case() and caseall(), for TinyMUSH 3
compatibility. Note that this replacement happens before evaluation, which
makes it unsafe when <str> contains user input, and makes it unsuitable for
use in nested switch()es. It is strongly recommended you use the %$<n>
substitution or stext() function instead, which solves these problems.
See 'help switch2' for examples.
See also: reswitch(), stext(), slev(), if(), cond(), firstof()
SWITCH2
Examples:
> say switch(test, *a*, foo, *b*, bar, *t*, neat, baz)
You say, "neat"
> say switchall(ack, *a*, foo, *b*, bar, *c*, neat, baz)
You say, "fooneat"
> say switch(moof, *a*, foo, *b*, bar, *t*, neat, baz)
You say, "baz"
> say switch(moof, *a*, foo, *b*, bar, *t*, neat, #$)
You say, "moof"
> say case(moof, *f, foo, moof, bar, baz)
You say, "bar"
> say switch(foo bazaar,f?o b*r,$0-$1)
You say, "o-azaa"
SWITCHALL()
switch(<str>, <expr1>, <list1>[, ... , <exprN>, <listN>][, <default>])
switchall(<str>, <expr1>, <list1>[, ... , <exprN>, <listN>][, <default>])
case(<str>, <expr1>, <list1>[, ... , <exprN>, <listN>][, <default>])
caseall(<str>, <expr1>, <list1>[, ... , <exprN>, <listN>][, <default>])
These functions match <string> against the <expr>essions, returning
the corresponding <list>. If nothing is matched, the <default> is returned.
switch() and case() return the <str> for the first matching <expr>, while
switchall() and caseall() return the corresponding <list> for all <expr>s
which match.
switch() and switchall() use wildcard and lt/gt <expr>s, as described in
'help switch wildcards'. case() and caseall() do a case-sensitive exact
match, like member() or comp(). In this case, $0-$9 will be set to the text
that the nth wildcard character met.
If the string "#$" appears in the <list> to be evaluated, it will be
replaced with the evaluated value of <str> /before/ evaluation of
<list>. This is not done in case() and caseall(), for TinyMUSH 3
compatibility. Note that this replacement happens before evaluation, which
makes it unsafe when <str> contains user input, and makes it unsuitable for
use in nested switch()es. It is strongly recommended you use the %$<n>
substitution or stext() function instead, which solves these problems.
See 'help switch2' for examples.
See also: reswitch(), stext(), slev(), if(), cond(), firstof()
SWITCHES
Commands can have "switches" which modify the behavior of the
command. Switches are attached after the end of a command.
For example, most people are familiar with the command
@lock me==me
The "enter" switch to @lock allows you to lock who can enter:
@lock/enter me==me
A command may have multiple switches:
@pemit/noeval/silent me=Hi!
Help on the switches available for a command is available in the help
file for that command.
(If you are looking for information on @switch, see 'help @switch'.)
T()
t(<expression>)
Returns 1 if <expression> is a true boolean value, and 0 otherwise. The
definitions of true and false vary depending on the value of the
'tiny_booleans' @config option. See 'help boolean values' for details.
See also: not(), if(), cond(), @break, or(), and()
TABLE()
table(<list>[, <field width>[, <line length>[, <delimiter>[, <osep>]]]])
This function returns the elements of <list> in a tabular format.
All other parameters are optional.
<field width> specifies how wide each table entry is allowed to be, and
defaults to 10. If <field width> begins with a "<", it is left-aligned.
">" makes it right-aligned, and "-" makes it centered. Elements longer than
<field width> are truncated to fit.
<line length> is how wide a table row can be, and defaults to 78.
<delimiter> is the delimiter used in <list>, and defaults to a space.
<osep> is a single character to be used between entries in the table, and
also defaults to a space.
Examples:
> think table(a b areallylongone d)
a b areallylon d
> think table(the quick brown fox, 10, 25, , |)
the |quick
brown |fox
See also: align()
TAG()
tag(<name>[, <param1>[, ... , <paramN>]])
This function outputs the named HTML/Pueblo tag with the given paramaters.
Example:
Will output (in HTML):
See also: endtag(), tagwrap(), html()
TAGWRAP()
Function: tagwrap(<name>[,<parameters>],<string>)
This function outputs <string>, wrapped in the <name> HTML/Pueblo tag
with the specified paramaters.
Example:
Will output (in HTML):
A particularly important use of this function is tagwrap(pre, <string>).
Because Pueblo works like an html browser, spaces and tabs are compressed
to a single space. If you have code (a +who function, for example) that
relies on exact spacing, surround its output with a tagwrap(pre,...)
so that Pueblo will render it as "preformatted" text.
See also: tag(), endtag(), html()
TAKE
get <object>
get <box>'s <object>
The first form of this command lets you pick up <object> from your
current location. The second form allows you to take <object> from
inside <box>'s inventory.
In both cases, you must pass <object>'s Basic @lock, and the
@lock/take of it's location.
To get an object from someone else's inventory, the possessive_get
@config option must be true (and, if <box> is a disconnected player,
so must possessive_get_d). <box> must also be set ENTER_OK.
'take' is usually an alias for the 'get' command.
See also: @lock, ENTER_OK, give, drop, @success, inventory
TAN()
tan(<angle>[, <angle type>])
Returns the tangent of <angle>, which should be expressed in the given
angle type, or radians by default. See HELP ANGLES for more information.
See also: acos(), asin(), atan(), cos(), ctu(), sin()
TEACH
teach <command>
teach/list <action list>
The teach command shows its argument (unparsed) to others in your location,
and then executes it as a command. If the /list switch is given, it will
run an <action list> of commands in much the same way as @triggering an
attribute. Otherwise, it executes a single <command>, exactly as if you'd
entered <command> from your client. Useful for helping newbies and
demonstrating commands.
> say To do a pose, use :<action>
You say "To do a pose, use :<action>"
> teach :waves hello.
Javelin types --> :waves hello.
Javelin waves hello.
> teach "[sort(c b a)]
Javelin types --> "[sort(c b a)]
Javelin says, "a b c"
> teach/list @switch 1=1, say Third; say First; @break 1; say Second
Javelin types --> @switch 1=1, say Third; say First; @break 1; say Second
You say, "First"
You say, "Third"
See also: @trigger, @include
TEL()
tel(<object>, <destination>[, <silent>[, <inside>]])
This function will teleport <object> to <destination>, exactly as
@teleport <object>=<destination>. <silent> is an optional boolean that, if
true, makes the function act like @teleport/silent. <inside> is an
optional boolean that, if true, makes the function act like
@teleport/inside.
See also: @teleport
TEL_OK
Flag: JUMP_OK (rooms)
When a room is set JUMP_OK, anyone who passes the room's @lock/teleport
can @teleport into it.
See also: @teleport, @lock, NO_TEL, Z_TEL
TERMINFO()
terminfo(<player|descriptor>)
Returns a list with at least one element - the type of client used
by the player, or "unknown" if the client being used doesn't support
being asked to identify itself using RFC 1091.
Other elements in the list describe client capabilities, and
currently include:
pueblo present if the client is in Pueblo mode.
telnet present if the client understands the telnet protocol.
ssl present if the client is using an SSL/TLS connection.
prompt_newlines see 'help prompt_newlines'
One of the color styles shown in 'help colorstyle' will also be included.
Other fields may be added in the future, if, for example, MXP
support is ever added.
Players can use terminfo() on their own connections. Using it on
other players is restricted to see_all objects.
See also: pueblo(), width(), height(), ssl(), @sockset
TERSE
Flag: TERSE (players, things)
When an object is set TERSE, it does not see the descriptions, or success
and failure messages in rooms. This is a useful flag if you're on a slow
connection or you're moving through a familiar area and don't want to see
tons of text.
When a player is TERSE, all of their objects are considered to be TERSE.
See also: MYOPIC
TESTLOCK()
testlock(<key>, <victim>)
testlock() returns 1 if the <victim> would pass the lock defined in <key>
as run by the caller, and 0 if it would fail.
testlock() evaluates the lock from the caller's perspective.
Example:
> think testlock(TYPE^PLAYER&FLAG^WIZARD, *Gandalf)
1
> think testlock(TYPE^PLAYER&FLAG^WIZARD, *Bilbo)
0
See also: @lock, lock(), elock(), lockfilter(), locktypes
TEXTENTRIES()
textfile(<type>, <entry>)
textentries(<type>, <pattern>[, <osep>])
textfile() returns the text of entries from cached text files (such
as "help", "news", "events", etc.) All whitespace and newlines are
included, so you may want to edit %r's and squish the result if you
plan to use the text as a list of words rather than a display.
textentries() returns any topic names which match the wildcard pattern
<pattern>, with topic names separated by <osep>, which defaults to a space.
Example:
> say textentries(help, ?who())
You say, "CWHO() LWHO() MWHO() NWHO() XWHO() ZWHO()"
> say textfile(help, ln\(\))
You say, " ln(<number>)
Returns the natural log of <number>.
See also: log()
"
TEXTFILE()
textfile(<type>, <entry>)
textentries(<type>, <pattern>[, <osep>])
textfile() returns the text of entries from cached text files (such
as "help", "news", "events", etc.) All whitespace and newlines are
included, so you may want to edit %r's and squish the result if you
plan to use the text as a list of words rather than a display.
textentries() returns any topic names which match the wildcard pattern
<pattern>, with topic names separated by <osep>, which defaults to a space.
Example:
> say textentries(help, ?who())
You say, "CWHO() LWHO() MWHO() NWHO() XWHO() ZWHO()"
> say textfile(help, ln\(\))
You say, " ln(<number>)
Returns the natural log of <number>.
See also: log()
"
THINGS
Things are created with @create. They can move around the MUSH, be entered
and carried. They are checked for $-commands and ^-listens. Things do not
have aliases.
@linking a thing sets its home.
See also: TYPES OF OBJECTS, type(), hastype(), @create
THINK
think <message>
You can use this command to send a private message to
yourself. Pronoun substitution is performed. This is essentially
equivalent to doing a "@pemit me=<message>", but with "think",
there's no prepended text.
One possible use: @adesc me=think %N just looked at you.
TIME FUNCTIONS
These functions return times or format times.
convsecs() convutcsecs() convtime() convutctime() ctime()
etime() etimefmt() isdaylight() mtime() restarttime()
secs() starttime() stringsecs() time() timefmt()
timestring() utctime() uptime()
TIME()
time([utc])
utctime()
time(<timezone>)
time(<dbref>)
time() gives you the current time on the MUSH. WARNING! This is
the time on the machine that the MUSH is running on, and not where
you are.
utctime() and time(utc) give the same time in UTC (aka GMT), not the
server's local timezone.
To control what time zone is used, specify it instead of 'utc'. See
HELP TIMEZONES for details.
Continued in HELP TIME2
TIME2
Examples (Assuming the server is the USA's Pacific timezone):
> think utctime()
Fri Mar 02 03:19:54 2012
> think time(utc)
Fri Mar 02 03:19:54 2012
> think time()
Thu Mar 01 19:19:54 2012
> think time(-8)
Thu Mar 01 19:20:25 2012
> think time(US/Pacific)
Thu Mar 01 19:20:25 2012
See also: timefmt(), timestring(), convsecs(), convtime()
TIMEFMT()
timefmt(<format>[, <secs>, <timezone>])
This function returns the time and date, formatted according to
<format>. <secs> is the time/date to format, as the number of
seconds since the epoch (as returned by secs(), convtime(), etc). If
no <secs> is given, the current date/time of the MUSH host is
used. If no <timezones> is provided, the MUSH host's timezone is
used. Note: Using a fractional timezone offset from GMT will result
in timefmt() showing the time zone name (if displayed) as GMT. Using
a symbolic name on a server that supports them should show the name
correctly.
A list of all codes is in 'help timefmt2'.
Example:
> think timefmt($A\, the $dth day of $B.)
Monday, the 17th day of July.
See also: convsecs(), etimefmt(), timezones
TIMEFMT2
All escape codes start with a $. To get a literal $, use $$.
Invalid codes will return #-1 INVALID ESCAPE CODE. Other text will be
passed through unchanged.
$a - Abbreviated weekday name $p - AM/PM ($P may also work)
$A - Full weekday name $S - Seconds after the minute
$b - Abbreviated month name $U - Week of the year from 1rst Sunday
$B - Full month name $w - Day of the week. 0 = Sunday
$c - Date and time $W - Week of the year from 1rst Monday
$d - Day of the month $x - Date
$H - Hour of the 24-hour day $X - Time
$I - Hour of the 12-hour day $y - Two-digit year
$j - Day of the year $Y - Four-digit year
$m - Month of the year $Z - Time zone
$M - Minutes after the hour $$ - $ character.
TIMESTRING()
timestring(<seconds>[, <pad flag>])
The timestring function takes a number of seconds as input and
returns the amount of time formatted into days, hours, minutes, and
seconds. If <pad flag> is 1, all time periods will be used even if
the number of seconds is less than a day, hour, or minute. If <pad
flag> is 2, all numbers will be 2 digits long.
Examples:
> say timestring(301)
You say, " 5m 1s"
> say timestring(301,1)
You say, "0d 0h 5m 1s"
> say timestring(301,2)
You say, "00d 00h 05m 01s"
See also: stringsecs(), convsecs(), etime(), etimefmt()
TIMEZONES
The time(), timefmt() and convsecs() functions have an optional time
zone argument that's used for formatting the time. Without this time
zone specified, the one the game's server is running under is used..
If the time zone argument is a dbref, the contents of that object's
@TZ attribute is used as the zone. The attribute is not evaluated.
If the object doesn't have this attribute, the server's time zone
will be used.
If it's the string 'UTC', that time zone is used instead of the
local one.
If it's a number between -24 and +24, it adds that many hours from
UTC/GMT. Fractional times are supported, e.g., -1.5 hours.
If the mush supports it (See @config compile), symbolic time zone
names can also be used.
See HELP TIMEZONES2 for a list of known time zones and HELP TIME2
for some examples.
TIMEZONES10
Etc/GMT-13 Etc/GMT-14
Etc/GMT-2 Etc/GMT-3
Etc/GMT-4 Etc/GMT-5
Etc/GMT-6 Etc/GMT-7
Etc/GMT-8 Etc/GMT-9
Etc/GMT0 Etc/Greenwich
Etc/UCT Etc/Universal
Etc/UTC Etc/Zulu
Europe/Amsterdam Europe/Andorra
Europe/Athens Europe/Belfast
Europe/Belgrade Europe/Berlin
Europe/Bratislava Europe/Brussels
Europe/Bucharest Europe/Budapest
Europe/Chisinau Europe/Copenhagen
Europe/Dublin Europe/Gibraltar
Europe/Guernsey Europe/Helsinki
Europe/Isle_of_Man Europe/Istanbul
Europe/Jersey Europe/Kaliningrad
Europe/Kiev Europe/Lisbon
Europe/Ljubljana Europe/London
Europe/Luxembourg Europe/Madrid
Europe/Malta Europe/Mariehamn
Europe/Minsk Europe/Monaco
Europe/Moscow Europe/Nicosia
Europe/Oslo Europe/Paris
Continued in HELP TIMEZONES11
TIMEZONES11
Europe/Podgorica Europe/Prague
Europe/Riga Europe/Rome
Europe/Samara Europe/San_Marino
Europe/Sarajevo Europe/Simferopol
Europe/Skopje Europe/Sofia
Europe/Stockholm Europe/Tallinn
Europe/Tirane Europe/Tiraspol
Europe/Uzhgorod Europe/Vaduz
Europe/Vatican Europe/Vienna
Europe/Vilnius Europe/Volgograd
Europe/Warsaw Europe/Zagreb
Europe/Zaporozhye Europe/Zurich
Factory GB
GB-Eire GMT
GMT+0 GMT-0
GMT0 Greenwich
Hongkong HST
Iceland Indian/Antananarivo
Indian/Chagos Indian/Christmas
Indian/Cocos Indian/Comoro
Indian/Kerguelen Indian/Mahe
Indian/Maldives Indian/Mauritius
Indian/Mayotte Indian/Reunion
Iran Israel
Jamaica Japan
Continued in HELP TIMEZONES12
TIMEZONES12
Kwajalein Libya
MET Mexico/BajaNorte
Mexico/BajaSur Mexico/General
Mideast/Riyadh87 Mideast/Riyadh88
Mideast/Riyadh89 MST
MST7MDT Navajo
NZ NZ-CHAT
Pacific/Apia Pacific/Auckland
Pacific/Chatham Pacific/Chuuk
Pacific/Easter Pacific/Efate
Pacific/Enderbury Pacific/Fakaofo
Pacific/Fiji Pacific/Funafuti
Pacific/Galapagos Pacific/Gambier
Pacific/Guadalcanal Pacific/Guam
Pacific/Honolulu Pacific/Johnston
Pacific/Kiritimati Pacific/Kosrae
Pacific/Kwajalein Pacific/Majuro
Pacific/Marquesas Pacific/Midway
Pacific/Nauru Pacific/Niue
Pacific/Norfolk Pacific/Noumea
Pacific/Pago_Pago Pacific/Palau
Pacific/Pitcairn Pacific/Pohnpei
Pacific/Ponape Pacific/Port_Moresby
Pacific/Rarotonga Pacific/Saipan
Pacific/Samoa Pacific/Tahiti
Continued in HELP TIMEZONES13
TIMEZONES13
Pacific/Tarawa Pacific/Tongatapu
Pacific/Truk Pacific/Wake
Pacific/Wallis Pacific/Yap
Poland Portugal
PRC PST8PDT
ROC ROK
Singapore Turkey
UCT Universal
US/Alaska US/Aleutian
US/Arizona US/Central
US/East-Indiana US/Eastern
US/Hawaii US/Indiana-Starke
US/Michigan US/Mountain
US/Pacific US/Pacific-New
US/Samoa UTC
W-SU WET
Zulu
TIMEZONES2
This is a list of IANA time zones names as of version 2011n of their
and sources.
Africa/Abidjan Africa/Accra
Africa/Addis_Ababa Africa/Algiers
Africa/Asmara Africa/Asmera
Africa/Bamako Africa/Bangui
Africa/Banjul Africa/Bissau
Africa/Blantyre Africa/Brazzaville
Africa/Bujumbura Africa/Cairo
Africa/Casablanca Africa/Ceuta
Africa/Conakry Africa/Dakar
Africa/Dar_es_Salaam Africa/Djibouti
Africa/Douala Africa/El_Aaiun
Africa/Freetown Africa/Gaborone
Africa/Harare Africa/Johannesburg
Africa/Juba Africa/Kampala
Africa/Khartoum Africa/Kigali
Africa/Kinshasa Africa/Lagos
Africa/Libreville Africa/Lome
Africa/Luanda Africa/Lubumbashi
Africa/Lusaka Africa/Malabo
Africa/Maputo Africa/Maseru
Africa/Mbabane Africa/Mogadishu
Africa/Monrovia Africa/Nairobi
Africa/Ndjamena Africa/Niamey
Africa/Nouakchott Africa/Ouagadougou
Continued in HELP TIMEZONES3
TIMEZONES3
Africa/Porto-Novo Africa/Sao_Tome
Africa/Timbuktu Africa/Tripoli
Africa/Tunis Africa/Windhoek
America/Adak America/Anchorage
America/Anguilla America/Antigua
America/Araguaina America/Argentina/Buenos_Aires
America/Argentina/Catamarca America/Argentina/ComodRivadavia
America/Argentina/Cordoba America/Argentina/Jujuy
America/Argentina/La_Rioja America/Argentina/Mendoza
America/Argentina/Rio_Gallegos America/Argentina/Salta
America/Argentina/San_Juan America/Argentina/San_Luis
America/Argentina/Tucuman America/Argentina/Ushuaia
America/Aruba America/Asuncion
America/Atikokan America/Atka
America/Bahia America/Bahia_Banderas
America/Barbados America/Belem
America/Belize America/Blanc-Sablon
America/Boa_Vista America/Bogota
America/Boise America/Buenos_Aires
America/Cambridge_Bay America/Campo_Grande
America/Cancun America/Caracas
America/Catamarca America/Cayenne
America/Cayman America/Chicago
America/Chihuahua America/Coral_Harbour
America/Cordoba America/Costa_Rica
Continued in HELP TIMEZONES4
TIMEZONES4
America/Cuiaba America/Curacao
America/Danmarkshavn America/Dawson
America/Dawson_Creek America/Denver
America/Detroit America/Dominica
America/Edmonton America/Eirunepe
America/El_Salvador America/Ensenada
America/Fort_Wayne America/Fortaleza
America/Glace_Bay America/Godthab
America/Goose_Bay America/Grand_Turk
America/Grenada America/Guadeloupe
America/Guatemala America/Guayaquil
America/Guyana America/Halifax
America/Havana America/Hermosillo
America/Indiana/Indianapolis America/Indiana/Knox
America/Indiana/Marengo America/Indiana/Petersburg
America/Indiana/Tell_City America/Indiana/Vevay
America/Indiana/Vincennes America/Indiana/Winamac
America/Indianapolis America/Inuvik
America/Iqaluit America/Jamaica
America/Jujuy America/Juneau
America/Kentucky/Louisville America/Kentucky/Monticello
America/Knox_IN America/Kralendijk
America/La_Paz America/Lima
America/Los_Angeles America/Louisville
America/Lower_Princes America/Maceio
Continued in HELP TIMEZONES5
TIMEZONES5
America/Managua America/Manaus
America/Marigot America/Martinique
America/Matamoros America/Mazatlan
America/Mendoza America/Menominee
America/Merida America/Metlakatla
America/Mexico_City America/Miquelon
America/Moncton America/Monterrey
America/Montevideo America/Montreal
America/Montserrat America/Nassau
America/New_York America/Nipigon
America/Nome America/Noronha
America/North_Dakota/Beulah America/North_Dakota/Center
America/North_Dakota/New_Salem America/Ojinaga
America/Panama America/Pangnirtung
America/Paramaribo America/Phoenix
America/Port-au-Prince America/Port_of_Spain
America/Porto_Acre America/Porto_Velho
America/Puerto_Rico America/Rainy_River
America/Rankin_Inlet America/Recife
America/Regina America/Resolute
America/Rio_Branco America/Rosario
America/Santa_Isabel America/Santarem
America/Santiago America/Santo_Domingo
America/Sao_Paulo America/Scoresbysund
America/Shiprock America/Sitka
Continued in HELP TIMEZONES6
TIMEZONES6
America/St_Barthelemy America/St_Johns
America/St_Kitts America/St_Lucia
America/St_Thomas America/St_Vincent
America/Swift_Current America/Tegucigalpa
America/Thule America/Thunder_Bay
America/Tijuana America/Toronto
America/Tortola America/Vancouver
America/Virgin America/Whitehorse
America/Winnipeg America/Yakutat
America/Yellowknife Antarctica/Casey
Antarctica/Davis Antarctica/DumontDUrville
Antarctica/Macquarie Antarctica/Mawson
Antarctica/McMurdo Antarctica/Palmer
Antarctica/Rothera Antarctica/South_Pole
Antarctica/Syowa Antarctica/Vostok
Arctic/Longyearbyen Asia/Aden
Asia/Almaty Asia/Amman
Asia/Anadyr Asia/Aqtau
Asia/Aqtobe Asia/Ashgabat
Asia/Ashkhabad Asia/Baghdad
Asia/Bahrain Asia/Baku
Asia/Bangkok Asia/Beirut
Asia/Bishkek Asia/Brunei
Asia/Calcutta Asia/Choibalsan
Asia/Chongqing Asia/Chungking
Continued in HELP TIMEZONES7
TIMEZONES7
Asia/Colombo Asia/Dacca
Asia/Damascus Asia/Dhaka
Asia/Dili Asia/Dubai
Asia/Dushanbe Asia/Gaza
Asia/Harbin Asia/Hebron
Asia/Ho_Chi_Minh Asia/Hong_Kong
Asia/Hovd Asia/Irkutsk
Asia/Istanbul Asia/Jakarta
Asia/Jayapura Asia/Jerusalem
Asia/Kabul Asia/Kamchatka
Asia/Karachi Asia/Kashgar
Asia/Kathmandu Asia/Katmandu
Asia/Kolkata Asia/Krasnoyarsk
Asia/Kuala_Lumpur Asia/Kuching
Asia/Kuwait Asia/Macao
Asia/Macau Asia/Magadan
Asia/Makassar Asia/Manila
Asia/Muscat Asia/Nicosia
Asia/Novokuznetsk Asia/Novosibirsk
Asia/Omsk Asia/Oral
Asia/Phnom_Penh Asia/Pontianak
Asia/Pyongyang Asia/Qatar
Asia/Qyzylorda Asia/Rangoon
Asia/Riyadh Asia/Riyadh87
Asia/Riyadh88 Asia/Riyadh89
Continued in HELP TIMEZONES8
TIMEZONES8
Asia/Saigon Asia/Sakhalin
Asia/Samarkand Asia/Seoul
Asia/Shanghai Asia/Singapore
Asia/Taipei Asia/Tashkent
Asia/Tbilisi Asia/Tehran
Asia/Tel_Aviv Asia/Thimbu
Asia/Thimphu Asia/Tokyo
Asia/Ujung_Pandang Asia/Ulaanbaatar
Asia/Ulan_Bator Asia/Urumqi
Asia/Vientiane Asia/Vladivostok
Asia/Yakutsk Asia/Yekaterinburg
Asia/Yerevan Atlantic/Azores
Atlantic/Bermuda Atlantic/Canary
Atlantic/Cape_Verde Atlantic/Faeroe
Atlantic/Faroe Atlantic/Jan_Mayen
Atlantic/Madeira Atlantic/Reykjavik
Atlantic/South_Georgia Atlantic/St_Helena
Atlantic/Stanley Australia/ACT
Australia/Adelaide Australia/Brisbane
Australia/Broken_Hill Australia/Canberra
Australia/Currie Australia/Darwin
Australia/Eucla Australia/Hobart
Australia/LHI Australia/Lindeman
Australia/Lord_Howe Australia/Melbourne
Australia/North Australia/NSW
Continued in HELP TIMEZONES9
TIMEZONES9
Australia/Perth Australia/Queensland
Australia/South Australia/Sydney
Australia/Tasmania Australia/Victoria
Australia/West Australia/Yancowinna
Brazil/Acre Brazil/DeNoronha
Brazil/East Brazil/West
Canada/Atlantic Canada/Central
Canada/East-Saskatchewan Canada/Eastern
Canada/Mountain Canada/Newfoundland
Canada/Pacific Canada/Saskatchewan
Canada/Yukon CET
Chile/Continental Chile/EasterIsland
CST6CDT Cuba
EET Egypt
Eire EST
EST5EDT Etc/GMT
Etc/GMT+0 Etc/GMT+1
Etc/GMT+10 Etc/GMT+11
Etc/GMT+12 Etc/GMT+2
Etc/GMT+3 Etc/GMT+4
Etc/GMT+5 Etc/GMT+6
Etc/GMT+7 Etc/GMT+8
Etc/GMT+9 Etc/GMT-0
Etc/GMT-1 Etc/GMT-10
Etc/GMT-11 Etc/GMT-12
Continued in HELP TIMEZONES10
TOPICS
Help is available on the following topics:
ACTION LISTS ANCESTORS ANONYMOUS ATTRIBUTES
ATTRIB-OWNERSHIP ATTRIBUTES BEING KILLED
BOOLEAN VALUES CHAT CLIENTS
CONTROL COPYRIGHT COSTS
CREDITS DBREFS DROP-TO
ENACTOR EVALUATION EXECUTOR
EXITS FAILURE FLAGS
FUNCTIONS GENDER GLOBALS
HERE HOMES INTERIORS
LINKING LISTENING LISTS
LOOPING MASTER ROOM MATCHING
Continued in 'help topics2'.
TOPICS2
ME MONEY MUSHCODE
NON-STANDARD ATTRIBUTES PARENTS POWERS
PUPPETS QUEUE REGEXPS
REGISTERS SEMAPHORES SETTING-ATTRIBUTES
SPOOFING STACK STRINGS
SUBSTITUTIONS SUCCESS SWITCHES
TYPES OF OBJECTS USER-DEFINED COMMANDS VERBS
WARNINGS WILDCARDS ZONE MASTER ROOMS
ZONE MASTERS ZONES
Type 'help <topic name>' for help.
For a list of all topics, see 'help entries'.
TPORT_ANYTHING POWER
The Tport_Anything power allows an object to teleport any object to a
location they are allowed to teleport to.
Tport_Anywhere allows an object to teleporting anything it is allowed
to teleport to any location.
See also: HEAVY, @teleport, NO_TEL, Z_TEL
TPORT_ANYWHERE POWER
The Tport_Anything power allows an object to teleport any object to a
location they are allowed to teleport to.
Tport_Anywhere allows an object to teleporting anything it is allowed
to teleport to any location.
See also: HEAVY, @teleport, NO_TEL, Z_TEL
TR()
tr(<string>, <find>, <replace>)
This function translates every character in <string> that exists in
<find> to the character at an identical position in <replace>. Ranges
of characters separated by -'s are accepted. <find> and <replace> must be
the same length after expansion of ranges. If a character exists more than
once in <find>, only the last instance will be counted. The example below
is the common ROT-13 algorithm for lower case strings, demonstrated with
every letter explicitly listed, and with the equivalent but briefer
character ranges. Literal -'s can be in <find> and <replace> if they
are the first or last characters in the arguments.
Examples:
> say tr(hello,abcdefghijklmnopqrstuvwxyz,nopqrstuvwxyzabcdefghijklm)
You say, "uryyb"
> say tr(uryyb, a-z, n-za-m)
You say, "hello"
See also: merge(), splice()
TRACK_MONEY
Flag: TRACK_MONEY (players)
By setting the TRACK_MONEY flag, a player can determine which
objects may be using their money. TRACK_MONEY reports all charges to
a player and their objects except the queue deposit.
> @set me=TRACK_MONEY
> give Javelin=50
You give 50 pennies to Javelin.
GAME: Walker spent 50 pennies!
> @create foo
GAME: Walker spent 10 pennies!
Created: Object #345.
> @for foo=@search eval=1
GAME: foo(#345) spent 100 pennies!
(search results)
> <a whole buncha commands>
GAME: Object Walker(#123) lost a Penny to queue loss.
See also: no_pay
TRANSLATION
Internationalization support in PennMUSH includes:
* Support for (8-bit) locale-based character sets, including
translation of iso-8859-1 accented characters to html entities for
Pueblo, the accent() and stripaccents() functions, and the NOACCENTS
flag.
* Support for locale-based date/time formats
* Support for locale-based message sets for translations of server
messages. There are active translation teams (and you can join!)
and several languages have practically complete translation files
available from the PennMUSH ftp site.
* Some support for locale-based string collation
* The ability to alias command and function names, so you can generate
a set of translated commands/functions.
Most of these features get enabled by setting an appropriate environment
variable in the PennMUSH restart script.
Unicode is not currently supported.
TRANSPARENT
Flag: TRANSPARENT (all types)
Transparent rooms show the "Obvious Exits" list in a long format; instead
of showing all exits on a single line, each exit is displayed on its own
line, with the name of its location. Any exits set OPAQUE are still shown
in short format, so you can mix the two.
Transparent exits show the description and contents of the destination
room, as well as the exit's desc, when looked at. If the exit is also set
CLOUDY, the destination's contents is not shown.
Example:
> @set here=transparent
> look
A Room
Obvious Exits:
Yellow Brick Road leads to Oz.
Looking Glass leads to Wonderland.
Locked Door leads nowhere.
See also: OPAQUE, CLOUDY, @exitformat
TRIM()
trim(<string>[, <characters to trim>[, <trim style>]])
trimpenn(<string>[, <characters to trim>[, <trim style>]])
trimtiny(<string>[, <trim style>[, <characters to trim>]])
trim() strips leading and/or trailing occurances of each of the
<characters to trim> from <string>.
<characters to trim> defaults to a space.
If no <trim style> is specified, characters are trimmed from both the
left and right sides of the string. If the 'l' trim style is specified,
characters are only trimmed from the left side. If the 'r' trim style is
specified, characters are only trimmed from the right side. If the 'b'
trim style is specified, or a style is omitted, characters are trimmed
off of both sides of the string.
Normally, the arguments for trim() are in the same order as trimpenn().
However, if the tiny_trim_fun @config option is on, the <characters to trim>
and <trim style> arguments are reversed. Use trimpenn() or trimtiny() if
you want to specify a particular argument sequence no matter how the option
is set.
Examples:
> say trim(%b%bfoo bar baz%b%b%beek%b%b)
You say, "foo bar baz eek"
> say trim(***BLAM***,*)
You say, "BLAM"
> say trim(-----> WOW <---,-,r)
You say, "-----> WOW <"
> say trim(=~=~=~= Trim Test =~=~=~=,= ~)
You say "Trim Test"
See also: squish(), edit()
TRIMPENN()
trim(<string>[, <characters to trim>[, <trim style>]])
trimpenn(<string>[, <characters to trim>[, <trim style>]])
trimtiny(<string>[, <trim style>[, <characters to trim>]])
trim() strips leading and/or trailing occurances of each of the
<characters to trim> from <string>.
<characters to trim> defaults to a space.
If no <trim style> is specified, characters are trimmed from both the
left and right sides of the string. If the 'l' trim style is specified,
characters are only trimmed from the left side. If the 'r' trim style is
specified, characters are only trimmed from the right side. If the 'b'
trim style is specified, or a style is omitted, characters are trimmed
off of both sides of the string.
Normally, the arguments for trim() are in the same order as trimpenn().
However, if the tiny_trim_fun @config option is on, the <characters to trim>
and <trim style> arguments are reversed. Use trimpenn() or trimtiny() if
you want to specify a particular argument sequence no matter how the option
is set.
Examples:
> say trim(%b%bfoo bar baz%b%b%beek%b%b)
You say, "foo bar baz eek"
> say trim(***BLAM***,*)
You say, "BLAM"
> say trim(-----> WOW <---,-,r)
You say, "-----> WOW <"
> say trim(=~=~=~= Trim Test =~=~=~=,= ~)
You say "Trim Test"
See also: squish(), edit()
TRIMTINY()
trim(<string>[, <characters to trim>[, <trim style>]])
trimpenn(<string>[, <characters to trim>[, <trim style>]])
trimtiny(<string>[, <trim style>[, <characters to trim>]])
trim() strips leading and/or trailing occurances of each of the
<characters to trim> from <string>.
<characters to trim> defaults to a space.
If no <trim style> is specified, characters are trimmed from both the
left and right sides of the string. If the 'l' trim style is specified,
characters are only trimmed from the left side. If the 'r' trim style is
specified, characters are only trimmed from the right side. If the 'b'
trim style is specified, or a style is omitted, characters are trimmed
off of both sides of the string.
Normally, the arguments for trim() are in the same order as trimpenn().
However, if the tiny_trim_fun @config option is on, the <characters to trim>
and <trim style> arguments are reversed. Use trimpenn() or trimtiny() if
you want to specify a particular argument sequence no matter how the option
is set.
Examples:
> say trim(%b%bfoo bar baz%b%b%beek%b%b)
You say, "foo bar baz eek"
> say trim(***BLAM***,*)
You say, "BLAM"
> say trim(-----> WOW <---,-,r)
You say, "-----> WOW <"
> say trim(=~=~=~= Trim Test =~=~=~=,= ~)
You say "Trim Test"
See also: squish(), edit()
TRUNC()
trunc(<string>)
This function truncates floating point numbers to integers. It can also
be used to return the leading numeric prefix of a string. If <string>
does not start with a number, 0 is returned.
Example:
> say trunc(3.141593)
You say, "3"
> say trunc(101Dalmations)
You say, "101"
val() is an alias for trunc().
See also: ceil(), floor(), bound(), round(), left()
TRUST
Flag: TRUST (all types)
Setting an object TRUST prevents anything else from controlling it, aside
from WIZARDs, the object's owner, or another object owned by the same
player which is also set TRUST. It also allows the object to control its
owner.
See also: MISTRUST, CONTROL
TYPE()
type(<object>)
This function returns the type of an object - one of PLAYER, THING, EXIT,
ROOM or GARBAGE - or #-1 if the object can't be found.
Example:
> @create Test
> think type(Test)
THING
> think type(me)
PLAYER
> think type(here)
ROOM
See also: hastype(), TYPES OF OBJECTS
TYPES
Everything on a MUSH is an object in the MUSH database. There are four main
types of objects: players, things (once called 'objects'), rooms and exits.
You can see the type of an object when you 'examine' it, or with the
type() function.
There is also a 'garbage' type, used for objects which have been created
and then @destroyed. Garbage objects cannot be used in any way, and their
dbrefs will be recycled (with a new objid) when something new is created.
For more information on any of the types, see 'help <type>'.
The @stats command lists how many objects of each type currently exits in
the database.
See also: type(), hastype()
TYPES OF OBJECTS
Everything on a MUSH is an object in the MUSH database. There are four main
types of objects: players, things (once called 'objects'), rooms and exits.
You can see the type of an object when you 'examine' it, or with the
type() function.
There is also a 'garbage' type, used for objects which have been created
and then @destroyed. Garbage objects cannot be used in any way, and their
dbrefs will be recycled (with a new objid) when something new is created.
For more information on any of the types, see 'help <type>'.
The @stats command lists how many objects of each type currently exits in
the database.
See also: type(), hastype()
U()
ufun([<object>/]<attribute>[, <arg0>[, ... , <arg9>]])
ulambda([<object>/]<attribute>[, <arg0>[, ... , <arg9>]])
ufun() evaluates <attribute> on <object> (or on the caller, if no <object>
is given), and returns the result. Up to 10 <arg>s can be passed, available
to the attribute as %0, %1, ..., %9. This can be used to create "user
defined functions".
u() is an alias for ufun(), for TinyMUSH compatability.
ulambda() is the same, but accepts anonymous attributes. See 'help lambda'.
Continued in 'help ufun2'.
U2
The attribute is evaluated by the object it's set on, with that object's
priviledges, and NOT by the object using ufun(). Because of this, allowing
arbitrary use of ufun() can be insecure.
You must be able to examine an attribute to ufun() it. If the safer_ufun
@config option is on, you must also have equal priviliges (in terms of
mortal/Royalty/Wizard/God) to the object the attribute is on. However,
attributes with the 'public' flag on can be evaluated by anyone. This is
necessary for attributes like 'describe', but should not be set on
attributes containing code unless you're sure it's safe for anyone to use
them.
Continued in 'help ufun3'.
U3
Example:
> &testcmd 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.
See also: anonymous attributes, udefault(), get(), ATTRIBUTES, ulocal(),
pfun(), attribute flags, @include
UCSTR()
ucstr(<string>)
Returns <string> with all letters converted to uppercase.
Example:
say ucstr(Foo BAR baz)
You say, "FOO BAR BAZ"
See also: lcstr(), capstr()
UDEFAULT()
udefault([<object>/]<attribute>, <default case>[, <arg0>[, ... , <arg9>]])
uldefault([<object>/]<attribute>, <default case>[, <arg0>[, ... <arg9>]])
If the given <attribute> on <object> (or the caller, if no <object> is
given) can be read, the attribute is evaluated, and the result returned.
Up to ten <arg>s can be passed to the attribute, as per ufun().
If the attribute cannot be read, <default case> is evaluated and returned
instead. The <default case> is not evaluated if the attribute exists.
uldefault() saves the global registers %q0-%q9 and %qa-%qz before
evaluation, and restores them afterwards, as per ulocal().
Examples:
> &TEST me=center(%0,5,*)
> say udefault(Test,-- BOOM --,ACK)
You say "*ACK*"
> &TEST me
> say udefault(me/Test,-- BOOM --,ACK)
You say "-- BOOM --"
See also: get(), eval(), ufun(), default(), edefault(), ulocal(), localize()
UFUN()
ufun([<object>/]<attribute>[, <arg0>[, ... , <arg9>]])
ulambda([<object>/]<attribute>[, <arg0>[, ... , <arg9>]])
ufun() evaluates <attribute> on <object> (or on the caller, if no <object>
is given), and returns the result. Up to 10 <arg>s can be passed, available
to the attribute as %0, %1, ..., %9. This can be used to create "user
defined functions".
u() is an alias for ufun(), for TinyMUSH compatability.
ulambda() is the same, but accepts anonymous attributes. See 'help lambda'.
Continued in 'help ufun2'.
UFUN2
The attribute is evaluated by the object it's set on, with that object's
priviledges, and NOT by the object using ufun(). Because of this, allowing
arbitrary use of ufun() can be insecure.
You must be able to examine an attribute to ufun() it. If the safer_ufun
@config option is on, you must also have equal priviliges (in terms of
mortal/Royalty/Wizard/God) to the object the attribute is on. However,
attributes with the 'public' flag on can be evaluated by anyone. This is
necessary for attributes like 'describe', but should not be set on
attributes containing code unless you're sure it's safe for anyone to use
them.
Continued in 'help ufun3'.
UFUN3
Example:
> &testcmd 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.
See also: anonymous attributes, udefault(), get(), ATTRIBUTES, ulocal(),
pfun(), attribute flags, @include
ULAMBDA()
ufun([<object>/]<attribute>[, <arg0>[, ... , <arg9>]])
ulambda([<object>/]<attribute>[, <arg0>[, ... , <arg9>]])
ufun() evaluates <attribute> on <object> (or on the caller, if no <object>
is given), and returns the result. Up to 10 <arg>s can be passed, available
to the attribute as %0, %1, ..., %9. This can be used to create "user
defined functions".
u() is an alias for ufun(), for TinyMUSH compatability.
ulambda() is the same, but accepts anonymous attributes. See 'help lambda'.
Continued in 'help ufun2'.
ULDEFAULT()
udefault([<object>/]<attribute>, <default case>[, <arg0>[, ... , <arg9>]])
uldefault([<object>/]<attribute>, <default case>[, <arg0>[, ... <arg9>]])
If the given <attribute> on <object> (or the caller, if no <object> is
given) can be read, the attribute is evaluated, and the result returned.
Up to ten <arg>s can be passed to the attribute, as per ufun().
If the attribute cannot be read, <default case> is evaluated and returned
instead. The <default case> is not evaluated if the attribute exists.
uldefault() saves the global registers %q0-%q9 and %qa-%qz before
evaluation, and restores them afterwards, as per ulocal().
Examples:
> &TEST me=center(%0,5,*)
> say udefault(Test,-- BOOM --,ACK)
You say "*ACK*"
> &TEST me
> say udefault(me/Test,-- BOOM --,ACK)
You say "-- BOOM --"
See also: get(), eval(), ufun(), default(), edefault(), ulocal(), localize()
ULOCAL()
ulocal([<object>/]<attribute>[, <arg0>[, ... , <arg9>]])
The ulocal() function is similar to ufun(); it evaluates <attribute> on
<object> (or the caller, if no <object> is given), passing up to ten
<arg>s. However, before evaluating the attribute, ulocal() stores the
36 global registers (%q0-%q9, %qa-%qz), in the same way as the localize()
function, and restores them after the attribute is evaluated. It's useful
when you need to evaluate an attribute on an untrusted object which might
alter the values of the registers.
See 'help ulocal2' for examples.
ULOCAL2
Examples:
> &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!"
See also: ufun(), setq(), letq(), r(), localize()
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.
Wizards, Royalty, and players with the Hide and Idle @powers who are idle
for longer than the idle_timeout @config option who are set UNFINDABLE
will automatically be @hidden.
See also: loc(), @whereis, @hide
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.
See also: follow, dismiss, desert, followers(), @follow, @ofollow, @afollow
UNIMPLEMENTED_COMMAND
This internal command is run when someone attempts to use an unimplemented
command. Currently, this only occurs when a command has been added with
@command/add but has not been properly @hooked to run softcode.
UNIMPLEMENTED_COMMAND cannot be run directly.
By default, the command just shows the message "This command has not been
implemented.", but you can @hook it to perform other actions.
See also: huh_command, warn_on_missing, @command, @hook
UNINSPECTED
Flag: UNINSPECTED (rooms)
This flag has no hardcoded purpose, but may be used by MUSH staff to
indicate that a room has been inspectedapproved by staff yet.
See also: UNREGISTERED
UNIQUE()
unique(<list>[, <sort type>[, <delim>[, <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. Elements of <list> are separated by
<delim>, which defaults to a space. Each element of the output is separated
by <osep>, which defaults to <delim>.
Examples:
> 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
See also: setunion(), sort()
UNKILLABLE POWER
Objects with the Unkillable power cannot be "kill"ed by a non-wizard.
If a player has this power and is not set MISTRUST, his objects have the
power implicitly.
See also: kill, slay, MISTRUST
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.
See also: UNINSPECTED
UNSETQ()
listq([<pattern>])
unsetq([<pattern1> [<pattern2> [...]]])
listq() returns a space-separated list of set q-registers with values
available in the current q-register scope. If <pattern> is provided, then
only those that match the wildcard pattern <pattern> will be returned.
unsetq() without arguments clears all registers. Otherwise, unsetq()
treats its argument as a list of register name patterns, and will
unset all those registers within the local scope.
If unsetq() is inside of a letq(), and does not have an argument,
it will clear the registers that letq() has protected. unsetq()
with arguments clears the specified registers.
unsetq(<arg>) will clear all registers returned by listq(<arg>).
Example:
> think setq(name,Walker,num,#6061,loc,Bahamas)[listq()]
LOC NAME NUM
> think setq(name,Walker,num,#6061,loc,Bahamas)[listq(n*)]
NAME NUM
> think setq(name,Walker,num,#6061,loc,Bahamas)[unsetq(name)][listq()]
LOC NUM
> think setq(name,Walker,num,#6061,loc,Bahamas)[unsetq(n*)][listq()]
LOC
See also: setq(), letq(), r(), localize(), registers()
UPTIME()
UPTIME([<type>])
This function returns the time, as a number of seconds, that something
happend (or will happen). Exactly what is returned depends on the given
<type>, which should be one of:
upsince - The time the MUSH was started. This is the default.
reboot - The time the MUSH was last rebooted.
save - The time the MUSH last saved, or -1 if it hasn't.
nextsave - The time of the next automatic save.
dbck - The time of the next automatic dbck.
purge - The time of the next automatic purge.
warnings - The time of the next automatic warnings check, or -1 if
automated warnings are disabled.
See also: @uptime, secs(), convsecs(), time(), starttime(), restarttime(),
restarts(), @dbck, @purge, @warnings, @config, @dump, @shutdown
USE
use <object>
This command attempts to "use" <object>. If you do not pass <object>'s
@lock/use, the UFAIL/OUFAIL/AUFAIL attributes are triggered.
If you pass the lock, you will see <object>'s USE attribute, and others in
your location will see <object>'s OUSE. Depending on <object>'s CHARGES
attribute, one of <object>'s AUSE or RUNOUT attributes will be triggered -
see 'help @charges' for more information.
See also: @use, @charges, @lock, @ufail
USER-DEFINED COMMANDS
User-defined commands can be created by setting $-commands on players,
things, and rooms. Exits cannot have $-commands. To set a $-command:
&<attribute> <object>=$<command name>:<action list>
Whenever someone in the same room as the object types the command name,
the action list is carried out by the object, as long as:
- the person typing the command passes the object's @lock/use
and @lock/command
- the object is not set NO_COMMAND or HALT
Such attributes can also be @triggered as if the $<command name>: did not
exist.
It is recommended that <command name> not begin with "@", as many built-in
commands start with "@". Conventionally, global commands are often named
with the "+" prefix, and local $-commands often have a "+" or "." prefix.
Continued in 'help user-defined2'.
USER-DEFINED2
Any number of *'s and ?'s may be in the command name. A * matches any
number of characters, and a ? matches any single character. When the
actions are executed, the values on the stack in %0-%9 are the portions
of what the user types that match the first ten *'s or ?'s. You can also
match a regular expression rather than wildcards. See 'help regexps'
for details.
For example, to make a 'wave' command, you could do the following:
&DO_WAVE me=$wave *: pose waves to %0.
You could then type:
> wave Guest
Rhyanna waves to Guest.
If a command would match, but the enactor can't pass the lock, the object
may define generic failure behavior by setting the COMMAND_LOCK`FAILURE,
COMMAND_LOCK`OFAILURE, and/or COMMAND_LOCK`AFAILURE attributes. These are
triggered on all objects with matching commands and failing locks, but only
if no command successfully matched, and take the place of the usual
"Huh?" message.
*BE SURE TO @LOCK/USE ME==ME IF YOU SET MACROS ON YOURSELF!*
See also: GLOBAL COMMANDS, EVALUATION ORDER, STACK, SUBSTITUTIONS, @lock
UTCTIME()
time([utc])
utctime()
time(<timezone>)
time(<dbref>)
time() gives you the current time on the MUSH. WARNING! This is
the time on the machine that the MUSH is running on, and not where
you are.
utctime() and time(utc) give the same time in UTC (aka GMT), not the
server's local timezone.
To control what time zone is used, specify it instead of 'utc'. See
HELP TIMEZONES for details.
Continued in HELP TIME2
UTILITY FUNCTIONS
These functions don't quite fit into any other category.
allof() ansi() atrlock() beep() benchmark()
checkpass() clone() create() die() dig()
endtag() firstof() functions() fn() html()
ibreak() ilev() inum() isdbref() isint()
isnum() isobjid() isregexp() isword() itext()
letq() localize() link() list() listq()
lnum() lset() null() numversion() objeval()
open() pcreate() r() rand() s()
scan() set() setq() setr() slev()
soundex() soundslike() speak() stext() tag()
tagwrap() tel() testlock() textentries() textfile()
unsetq() valid() wipe() @@() uptime()
V()
v(<variable>)
v(<attribute>)
The first form of this function returns the value of the <variable> %-sub.
In most cases, using the %-sub is preferable. Not all %-subs can be
accessed this way; only the following <variable>s are valid:
0-9, #, @, !, n, l, and c.
Unlike %-subs, the v() function is not case-sensitive: v(n) and v(N) are
both equivilent to %n (whereas %N is equivilent to [capstr(%n)]).
The second form of this function is equivilent to xget(me, <attribute>),
but is usually slightly more efficient.
See also: SUBSTITUTIONS, get(), r(), ATTRIBUTES
V-FUNCTION
v(<variable>)
v(<attribute>)
The first form of this function returns the value of the <variable> %-sub.
In most cases, using the %-sub is preferable. Not all %-subs can be
accessed this way; only the following <variable>s are valid:
0-9, #, @, !, n, l, and c.
Unlike %-subs, the v() function is not case-sensitive: v(n) and v(N) are
both equivilent to %n (whereas %N is equivilent to [capstr(%n)]).
The second form of this function is equivilent to xget(me, <attribute>),
but is usually slightly more efficient.
See also: SUBSTITUTIONS, get(), r(), ATTRIBUTES
VADD()
vadd(<vector1>, <vector2>[, <delimiter>])
Returns the sum of two vectors. A vector is a list of numbers
separated by spaces or <delimiter>.
> think vadd(1 2 3, 4 5 6)
5 7 9
> think vadd(0|0|0, 1|2|3, |)
1|2|3
See also: VECTOR FUNCTIONS
VAL()
trunc(<string>)
This function truncates floating point numbers to integers. It can also
be used to return the leading numeric prefix of a string. If <string>
does not start with a number, 0 is returned.
Example:
> say trunc(3.141593)
You say, "3"
> say trunc(101Dalmations)
You say, "101"
val() is an alias for trunc().
See also: ceil(), floor(), bound(), round(), left()
VALID()
valid(<category>, <string>)
The valid() function checks to see if <string> is a valid member of
<category>, and returns 1 if it is, 0 if not, and #-1 if an invalid
category is used.
The categories are:
name Test for a valid object name.
attrname Test for a valid attribute name.
playername Test for a valid player name that can be set with
@name or @alias.
password Test for a valid password.
command Test for a valid command name for @command/add
function Test for a valid function name for @function
flag Test for a valid flag/power name for @flag/add and @power/add
qreg Test for a valid name for a q-register.
colorname Test for a valid color name for ansi()/colors()
ansicodes Test for a valid color code sequence for ansi(<string>, ...)
Note that, for "playername", valid() returns 0 if the name is valid but
currently in use by a player other than the caller.
For "ansicodes", when not using new-style color names or hex codes, valid()
always returns 1, and invalid codes are simply ignored, the same as when
used in the ansi() function.
> think valid(name,Foobar)
1
> think valid(attrname,Foo bar)
0
See also: colors(), ansi()
VARIABLE EXITS
@destination <exit>[=<destination>]
@exitto <exit>[=<destination>]
The DESTINATION attribute is used by variable exits. To make a variable
exit, you create it in the usual way (with @open), then @link it to
"variable" instead of a dbref. When someone attempts to pass through the
exit, the DESTINATION attribute will be evaluated, and should return a
dbref; the dbref will be used as the location for the person to go to.
The exit name or alias the moving player used is passed to the attribute
as %0.
The exit must be able to @link itself to the dbref returned by the
attribute. This means the exit must control the destination, the
destination must be set LINK_OK, or the exit must have the Link_Anywhere
@power.
If no DESTINATION attribute is set on a variable exit, the MUSH will also
check for an EXITTO attribute, for cross-platform compatability. It works
exactly the same as the DESTINATION attribute.
Note that, unlike most attributes, @destination cannot be abbreviated and
must be typed in full.
Example:
> @open Random Exit;re
> @link re=variable
> @power re=link_anywhere
> @destination re=pickrand(#5 #123 #999 [home(%#)] %L)
See also: EXITS, @link, @open, LINK_OK, Link_Anywhere Power
VCROSS()
vcross(<vector1>, <vector2>[, <delimiter>])
Returns the 3-dimensional vector that is the cross product of its
3-dimensional argument vectors. The cross product is defined as:
x = Ay * Bz - By * Az
y = Az * Bx - Bz * Ax
z = Ax * By - Bx * Ay
> think vcross(4 5 6, 7 8 9)
-3 6 -3
See also: VECTOR FUNCTIONS
VDIM()
vdim(<vector>[, <delimiter>])
Returns the dimensionality of a vector.
> think vdim(1 2 3 4)
4
See also: VECTOR FUNCTIONS
VDOT()
vdot(<vector1>, <vector2>[, <delimiter>])
Returns the dot product of two vectors. A dot product is the sum of
the products of the corresponding elements of the two vectors,
e.g. vdot(a b c,d e f) = ad + be + cf. The vectors must be of the
same length.
> think vdot(1 2 3, 2 3 4)
20
See also: VECTOR FUNCTIONS
VECTOR FUNCTIONS
These functions operate on n-dimensional vectors. A vector
is a delimiter-separated list of numbers (space-separated, by default):
vadd() vcross() vdim() vdot() vmag()
vmax() vmin() vmul() vsub() vunit()
See also: Math functions
VERBOSE
Flag: VERBOSE (all types)
An object set VERBOSE echoes the commands it executes to its owner before
executing them. This differs from the PUPPET flag in that the owner sees
the command itself, rather than the output from the command. This flag is
extremely useful in debugging, especially if used in conjunction with the
PUPPET and DEBUG flags.
Setting the VERBOSE flag on a PUPPET also causes the puppet to relay sound
to its owner, even when they are in the same room.
Example:
> @create Test
Created: Object #5.
> @set Test=VERBOSE
Test - VERBOSE set.
> @force Test=say capstr(hello)
#5] say capstr(hello)
Test says, "Hello"
See also: PUPPET, DEBUG
VERBS
Verb attributes are ones which are shown (or triggered) when you use a
particular command, or perform a certain action. There are normally three:
the 'verb' attribute (shown to the enactor), the 'overb' attribute (shown
to others in the enactor's location), and the 'averb' attribute (an action
list which is triggered). One example is @use, @ouse, and @ause, which are
shown/triggered when the 'use' command is run on an object.
Some verbs which involve movement have a fourth attribute, 'oxverb', shown
in the enactor's old location (for example, @oxmove), while some verbs have
less (for example, @oname/@aname are shown when an object's name changes,
but there is no @name attribute).
You can create your own verbs for softcoded commands/actions with the
@verb command.
Continued in 'help verbs2'.
VERBS2
Normally, the enactor's name and a space are prepended to the 'overb' and
'oxverb' attributes automatically. The NOSPACE attribute flag prevents a
space being placed between the name and attribute value, and the NONAME
attribute flag stops the name being added at all.
Example:
> @ouse Foo=has used Foo!
> use Foo
Sketch has used Foo!
> @ouse Foo='s used Foo!
> @set Foo/ouse=nospace
> use Foo
Sketch's used Foo!
> @ouse Foo=Foo has been used by %n!
> @set Foo/ouse=noname
> use Foo
Foo has been used by Sketch!
See also: @verb, attribute flags
VERSION()
version()
numversion()
version() returns a string which contains various version
information for the MUSH you're on. numversion() returns an integer
representation of the version/patchlevel which can be used for
softcode comparison.
Example:
> say version()
You say "PennMUSH version 1.8.1 patchlevel 4 [12/06/2005]"
> say numversion()
You say "1008001004"
> say version()
You say, "PennMUSH version 1.8.5 patchlevel 0 [02/12/2012]
(r1374 2012-02-23)"
> say numversion()
You say, "1008005000"
See also: @version
VISIBLE()
visible(<object>, <victim>[/<attribute>])
If no attribute name is provided, this function returns 1 if
<object> can examine <victim>, or 0, if it cannot. If an attribute
name is given, the function returns 1 if <object> can see the
attribute <attribute> on <victim>, or 0, if it cannot.
If <object>, <victim>, or <attribute> is invalid, the function
returns 0.
See also: controls(), VISUAL
VISUAL
Flag: VISUAL (all types)
When this flag is set on an object, it allows any other player who passes
the object's @lock/examine to examine it and see all the object's
attributes, and other information such as parent, zone, home, location,
etc. It does not allow them to make changes to the object. Very useful
for getting help with code.
There is also a VISUAL attribute flag, which only affects a single
attribute, and a VISUAL lock flag, which affects @locks. See
'help attribute flags' and 'help @lset' for details.
See also: examine, brief, @lock
VMAG()
vmag(<vector>[, <delimiter>])
Returns the magnitude of a vector, using a Euclidean distance
metric. That is, for vector a b c d, returns sqrt(a^2+b^2+c^2+d^2).
> think vmag(3 4)
5
See also: VECTOR FUNCTIONS
VMAX()
vmax(<vector1>, <vector2>[, <delimiter>])
Returns a new vector made out of the maximums of each corresponding
pair of numbers from the two vectors. The vectors must be of the
same length.
> think vmax(1 2 3, 4 1 2)
4 2 3
See also: VECTOR FUNCTIONS
VMIN()
vmin(<vector1>, <vector2>[, <delimiter>])
Returns a new vector made out of the minimums of each corresponding
pair of numbers from the two vectors. The vectors must be of the
same length.
> think vmin(1 2 3, 4 1 2)
1 1 2
See also: VECTOR FUNCTIONS
VMUL()
vmul(<vector1|number1>, <vector2|number2>[, <delimiter>])
Returns the result of either multiplying a vector by a number, or
the element-wise product of two vectors. The element-wise product of
a b c by w x z is aw bx cz
> think vmul(1 2 3, 2)
2 4 6
> think vmul(1 2 3, 2 3 4)
2 6 12
See also: VECTOR FUNCTIONS
VRML
@VRML_URL Object=<URL>
This provides an object (usually a room) with a VRML world. When a
Pueblo-user enters this object, the VRML World listed in @VRML_URL
will be loaded.
Example:
To learn about the VRML Format, have a look at the Pueblo Help, which
mentions several good sites for learning.
See also: 'HTML'.
VSUB()
vsub(<vector1>, <vector2>[, <delimiter>])
Returns the difference between two vectors.
> think vsub(3 4 5, 3 2 1)
0 2 4
See also: VECTOR FUNCTIONS
VUNIT()
vunit(<vector>[, <delimiter>])
Returns the unit vector (a vector of magnitude 1), which points in
the same direction as the given vector.
> think vunit(2 0 0)
1 0 0
> think vmul(vunit(5 6 7), vmag(5 6 7))
5 6 7
See also: VECTOR FUNCTIONS
WALKTHROUGH
This helpfile is a quick walkthrough of some of PennMUSH's standard
systems. It uses the same syntax as the other helpfiles; if you're
not familiar with the syntax of the PennMUSH helpfiles, please read
'help newbie' first, as it's explained there.
For help with getting around, please see 'help gs moving'.
To talk to people in the room with you, see 'help gs talking'.
For a brief guide to the PennMUSH chat system, see 'help gs chat'.
For information on how to send and read mail using PennMUSH's built-in
mail system, @mail, please type 'help gs mail'.
WARN_ON_MISSING
This internal command is run when someone attempts to run a command which
starts with a function, for example:
&test me=$test: [emit(test)]
By default it sends the owner of the offending object a message, so they
can fix the code to use a command instead of a function. The command must
be enabled (either in restrict.cnf or with @command/enable) in order to
be used. It can be @hooked to set custom behaviour.
Example:
> @hook/override warn_on_missing=#0, wom
> &wom #0=$warn_on_missing: @pemit/list %# [owner(%!)]=[name(%!)] has
broken code in %=!
> &wom #0=$warn_on_missing *: @pemit [owner(%!)]=[name(%!)] has broken
code in %= - attempted to run %0!
See also: huh_command, unimplemented_command
WARNINGS
If the building warning system has been enabled in the source code,
players may receive regular warnings about potential building
problems on objects that they own, and will be able to check
individual objects for warnings.
For more information, see the following help topics:
@warnings @wcheck NO_WARN warnings list
WARNINGS LIST
The building warning system, supports the following types of warnings:
exit-unlinked Warn on unlinked exits
exit-oneway Warn on exits with no return exit
exit-multiple Warn on multiple exits from A to B
exit-msgs Warn on missing succ/osucc/odrop/fail
exit-desc Warn on missing description
room-desc Warn on missing description
thing-msgs Warn on missing succ/osucc/odrop/fail
thing-desc Warn on missing description
my-desc Warn on missing player description
lock-checks Warn on @lock problems
Continued in 'help warnings list2'.
WARNINGS LIST2
These warnings combine the functionality of multiple warnings above:
serious exit-unlinked, thing-desc, room-desc, my-desc,
lock-checks
normal serious, exit-oneway, exit-multiple, exit-msgs
extra normal, thing-msgs
all all of the above
The warning "none" indicates no warnings.
You can exclude warnings from a larger list by using !<warning>
after the larger list. For example: @warnings me=all !exit-oneway
WHERE()
where(<object>)
This function returns the "true" location of an object. This is the
standard location (i.e. where the object is) for things and players,
the source room for exits, and #-1 for rooms.
In other words, the "true" location of an object is where it is
linked into the database. For example, an exit appears in the room
of its "home", not its "location" (the LOC() function on an exit
will return the latter). A room's "real" location is always Nothing
(the LOC() function will return its drop-to).
See also: room(), loc(), rnum(), locate(), home(), @whereis
WHISPER
whisper <player>=<message>
whisper/silent <player>=<message>
whisper/noisy <player>=<message>
whisper/noeval <player>=<message>
whisper/list <players>=<message>
Whispers the message to the named person, if they are nearby. If <message>
is prefixed with a ':' or ';' it will be posed or semiposed, respectively.
With the /noisy switch, other players in the room may be informed who you
whisper to (but not what you whisper); the probability that a noisy whisper
will be heard is set by the 'whisper_loudness' @config option. With the
/silent switch, the whisper will not be overheard. (When neither switch is
given, the default behaviour is controlled by the 'noisy_whisper' @config
option.)
<message> will not be evaluated if the /noeval switch is given.
The /list switch lets you whisper to multiple people at once. In this case,
<players> is a space-separated list of names, and names with spaces should
be enclosed in double-quotes, as per page/list.
See also: page, pose, @pemit
WHO
WHO [<prefix>]
DOING [<prefix>]
For mortals, the WHO command displays a list of players currently
connected to the MUSH, the amount of time they've been connected,
their idle time, and their @doing. Hidden players are not shown.
For admin, WHO shows the names of online players, their location,
connection/idle times, the number of commands typed through the
connection, the descriptor/port number, and the host the player is
connected from. It also includes hidden players, and connections which
are at the login screen, but have not yet connected to a player.
Admin can use the DOING command to see the same output mortals see with
WHO, with the exception that dark/hidden players are included.
If a <prefix> is given for either command, only connected players whose
names start with <prefix> are shown.
Continued in 'help who2'.
WHO2
In earlier versions of PennMUSH, WHO was a socket command (meaning only
players could use it, and that while it could not be overwritten, you
could use softcoded 'who' commands along side it which worked as long as
they weren't typed in all upper-case). Existing games which have softcoded
'who' commands can maintain this feature by using an @hook/ignore on the
WHO command, such as:
> &HOOK.WHO <object>=not(comp(left(%c,3),WHO))
> @hook/ignore WHO=<object>,HOOK.WHO
@hooks are not maintained across reboots, and should be placed into an
@startup on a low-dbref object.
Note: The WHO command available at the login screen is totally separate
from the in-game WHO command, and is not affected by any changes to the
in-game WHO. To alter that, use the WHO_FILE @config option.
See also: @doing, @poll, SESSION
WIDTH()
width(<player|descriptor>[, <default>])
height(<player|descriptor>[, <default>])
These two functions return the screen width and height for a
connected player. If the player's client is capable of doing so, it
will let the mush know what the correct sizes are on connection and
when the client is resized.
The defaults are 78 for width, and 24 for height, the normal minimal
values. These can be overridden when calling the function by
providing the default to the function. Players can change the value
that will be returned when the functions are called on them with the
special SCREENWIDTH and SCREENHEIGHT commands, both of which take a
number as their sole argument, and set the appropriate field.
When used on something that's not a visible player, the functions
return the default values.
The intent of these functions is allow softcode that does formatting
to be able to produce a display that can make full use of any given
screen size.
WILDCARDS
PennMUSH has two standard wildcards in user-defined commands: an
asterisk (*) matches any string, including an empty string, and a
question mark (?) matches a single character. For example, let's
say that you want a command called
"supercalifragalisticexpealidocious" (don't ask me why), but you
don't want to force people to type the whole thing to trigger the
command. You could use a wildcard in the command trigger to match
substrings of it:
> &TOO_LONG_CMD object=$supercali*:@emit whee
> super
(nothing happens)
> supercali
whee
> supercalifra
whee
> supercalifragalisticexpealidocious
whee
> supercalifoobert
whee
A backslash (\) can be used to escape * and ? if you want to match
a literal asterisk or question mark.
The ** wildcard is also available for matching attribute names. See HELP
ATTRIBUTE TREES2 for more information.
See also: USER-DEFINED COMMANDS, REGEXP
WILDGREP()
grep(<object>, <attrs>, <substring>)
wildgrep(<object>, <attrs>, <pattern>)
regrep(<object>, <attrs>, <regexp>)
grepi(<object>, <attrs>, <substring>)
regrepi(<object>, <attrs>, <regexp>)
wildgrepi(<object>, <attrs>, <pattern>)
These functions return a list of attributes on <object> containing
<substring>, matching the wildcard <pattern>, or matching the
regular expression <regexp>. <attrs> is a wildcard pattern for
attribute names to search.
Parsing _does_ occur before this function is invoked. Therefore,
"special" characters will need to be escaped out.
grep()/wildgrep()/regrep() are case-sensitive.
grepi()/wildgrepi()/regrepi() are case-insensitive.
See also: @grep, lattr(), WILDCARDS
WILDGREPI()
grep(<object>, <attrs>, <substring>)
wildgrep(<object>, <attrs>, <pattern>)
regrep(<object>, <attrs>, <regexp>)
grepi(<object>, <attrs>, <substring>)
regrepi(<object>, <attrs>, <regexp>)
wildgrepi(<object>, <attrs>, <pattern>)
These functions return a list of attributes on <object> containing
<substring>, matching the wildcard <pattern>, or matching the
regular expression <regexp>. <attrs> is a wildcard pattern for
attribute names to search.
Parsing _does_ occur before this function is invoked. Therefore,
"special" characters will need to be escaped out.
grep()/wildgrep()/regrep() are case-sensitive.
grepi()/wildgrepi()/regrepi() are case-insensitive.
See also: @grep, lattr(), WILDCARDS
WIPE()
wipe(<object>[/<attribute pattern>])
This function is equivalent to @wipe, and attempts to wipe all the
attributes on <object> whose names match <attribute pattern>, or "*" if no
pattern is given. It returns nothing. Like @wipe, this function will
destroy entire attribute trees; to safely remove a single attribute, use
attrib_set() instead.
See also: @wipe, attrib_set(), set()
WITH
with[/room] <obj>=<command>
Attempts to run a user-defined command on a specific object. If the /room
switch is given, <obj> must be a room or your current location, and its
contents are checked for commands as if it was a master room.
<obj> must be an object near you, an object you control, your ZMO or (if
the /room switch is given) the Master Room.
See also: USER-DEFINED COMMANDS, EVALUATION ORDER
WIZARD
Flag: WIZARD (all types)
Objects set WIZARD control all other objects on the MUSH (except God), can
use a wide variety of commands, perform many actions remotely via dbref
number or *<player>, and have many powers and privileges which mortal
players do not.
Only God can set or clear the WIZARD flag on players, though wizards may
set objects they own WIZARD. WIZARD objects share the same powers as
WIZARD players, with the exception that they cannot @nuke players.
See also: ROYALTY, @power
WORDPOS()
wordpos(<list>, <number>[, <delimiter>])
Returns the number of the word within <list> where the <number>th
character falls. Characters and words are numbered starting with 1, and
<delimiter>s between words are treated as belonging to the word that
follows them. If the list is less than <number> characters long, #-1 is
returned. <delimiter> defaults to a space.
Example:
> say wordpos(foo bar baz, 5)
You say, "2"
See also: member(), pos()
WORDS()
words(<list>[, <delimiter>])
words() returns the number of elements in <list>. Elements of <list> are
separated by <delimiter>, which defaults to a space.
When the <delimiter> is a space, empty elements are not counted.
Example:
> think words(1 2%b%b3, %b)
3
> think words(1|2||3, |)
4
See also: strlen(), items()
WRAP()
wrap(<string>, <width>[, <first line width>[, <line separator>]])
This function takes <string> and splits it into lines containing no
more than <width> characters each. If <first line width> is given,
the first line may have a different width. If <line separator> is
given, it is inserted between each line; by default the separator is
a newline (%r).
Examples:
> @desc here=wrap(Wrapped paragraph, 72)
> @desc here=wrap([space(4)]Indented paragraph, 72)
> @desc here=iter(wrap(Hanging indent, 72, 76, %r),
switch(#@, >1, space(4))%i0, %r, %r)
XATTR()
xattr(<object>[/<attribute pattern>], <start>, <count>[, <osep>])
xattrp(<object>[/<attribute pattern>], <start>, <count>[, <osep>])
regxattr(<object>[/<regexp>], <start>, <count>[, <osep>])
regxattrp(<object>[/<regexp>], <start>, <count>[, <osep>])
xattr() fetches <count> or fewer attribute names from <object> starting
at position <start>. It is useful when the number of attributes on an
object causes lattr() to exceed the buffer limit. The resulting list is
separated by <osep>, if given, and spaces otherwise.
It is equivalent to
extract(lattr(<object>[/<attribute pattern>]), <start>, <count>, <osep>)
<attribute pattern> is a wilddcard pattern which defaults to "*".
regxattr() matches attributes against the regular expression <regexp>.
xattrp() and regxattrp() will include attributes from parents. Do note that
parent attributes are listed _after_ child attributes, not sorted
alphabetically.
See also: nattr(), lattr(), wildcards
XATTRP()
xattr(<object>[/<attribute pattern>], <start>, <count>[, <osep>])
xattrp(<object>[/<attribute pattern>], <start>, <count>[, <osep>])
regxattr(<object>[/<regexp>], <start>, <count>[, <osep>])
regxattrp(<object>[/<regexp>], <start>, <count>[, <osep>])
xattr() fetches <count> or fewer attribute names from <object> starting
at position <start>. It is useful when the number of attributes on an
object causes lattr() to exceed the buffer limit. The resulting list is
separated by <osep>, if given, and spaces otherwise.
It is equivalent to
extract(lattr(<object>[/<attribute pattern>]), <start>, <count>, <osep>)
<attribute pattern> is a wilddcard pattern which defaults to "*".
regxattr() matches attributes against the regular expression <regexp>.
xattrp() and regxattrp() will include attributes from parents. Do note that
parent attributes are listed _after_ child attributes, not sorted
alphabetically.
See also: nattr(), lattr(), wildcards
XCON()
xcon(<object>, <start>, <count>)
xvcon(<object>, <start>, <count>)
xcon() fetches <count> or fewer item dbrefs from <object>'s contents
starting at position <start>. It is useful when the number of
objects in a container causes lcon() to exceed the buffer limit.
It is equivalent to extract(lcon(<object>), <start>, <count>)
xvcon() is identical, but follows the restrictions of lvcon().
See also: ncon(), lcon(), lvcon()
XEXITS()
xexits(<room>, <start>, <count>)
xvexits(<room>, <start>, <count>)
xexits() fetches <count> or fewer exit dbrefs from <room> starting
at position <start>. It is useful when the number of exits in a
container causes lexits() to exceed the buffer limit.
It is equivalent to extract(lexits(<room>), <start>, <count>)
xvexits() is identical, but follows the restrictions of lvexits().
See also: nexits(), lexits(), lvexits()
XGET()
get(<object>/<attribute>)
xget(<object>, <attribute>)
These functions return the string stored in an <object>'s <attribute>
attribute, without evaluating it. You must be able to examine the
attribute. get() and xget() are identical, apart from the argument
separator.
Example:
> &test me=This is [a test].
> think get(me/test)
This is [a test].
See also: hasattr(), visible(), ufun(), default(), udefault()
XMWHO()
xwho([<looker>, ]<start>, <count>)
xmwho(<start>, <count>)
xwhoid([<looker>, ]<start>, <count>)
xmwhoid(<start>, <count>)
xwho() fetches <count> or fewer player dbrefs from the list of connected
players, starting at position <start>. It is useful when the number of
players connected causes lwho() or pemits in +who $-commands to exceed
buffer limits. If a <looker> is given, only includes players who <looker>
can see are online. It is equivalent to:
extract(lwho([<looker>]), <start>, <count>)
xmwho() does not include hidden players (like mwho()).
xwhoid() and xmwhoid() return objids instead of dbrefs.
See also: lwho(), mwho(), nwho(), zwho()
XMWHOID()
xwho([<looker>, ]<start>, <count>)
xmwho(<start>, <count>)
xwhoid([<looker>, ]<start>, <count>)
xmwhoid(<start>, <count>)
xwho() fetches <count> or fewer player dbrefs from the list of connected
players, starting at position <start>. It is useful when the number of
players connected causes lwho() or pemits in +who $-commands to exceed
buffer limits. If a <looker> is given, only includes players who <looker>
can see are online. It is equivalent to:
extract(lwho([<looker>]), <start>, <count>)
xmwho() does not include hidden players (like mwho()).
xwhoid() and xmwhoid() return objids instead of dbrefs.
See also: lwho(), mwho(), nwho(), zwho()
XOR()
xor(<boolean1>, <boolean2>[, ... , <booleanN>])
Takes two or more booleans and returns a 1 if one, and only one, of
the inputs is equivalent to true(1).
See also: BOOLEAN VALUES, and(), or(), not(), nor()
XPLAYERS()
xplayers(<object>, <start>, <count>)
xvplayers(<object>, <start>, <count>)
xplayers() fetches <count> or fewer player dbrefs from <object>'s contents
starting at position <start>. It is useful when the number of players in a
container causes lplayers() to exceed the buffer limit. It is equivalent to
extract(lplayers(<object>), <start>, <count>)
xvplayers() is identical, but follows the restrictions of lvplayers().
See also: nplayers(), lplayers(), lvplayers(), xthings(), xexits()
XTERM256
Flag: XTERM256 (players)
This flag indicates to the MUSH that the player's client can handle the
256 XTERM colors.
The flag is aliased to COLOR256 for MUX compatability.
XTERM colors can also be enabled on a per-connection basis with @sockset.
See also: ANSI, COLOR, ansi(), @sockset
XTHINGS()
xthings(<object>, <start>, <count>)
xvthings(<object>, <start>, <count>)
xthings() fetches <count> or fewer non-player dbrefs from <object>'s
contents starting at position <start>. It is useful when the number
of things in a container causes lthings() to exceed the buffer
limit. It is equivalent to:
extract(lthings(<object>), <start>, <count>)
xvthings() is identical, except it follows the restrictions of lvthings().
See also: nthings(), lthings(), lvthings(), xplayers(), xexits()
XVCON()
xcon(<object>, <start>, <count>)
xvcon(<object>, <start>, <count>)
xcon() fetches <count> or fewer item dbrefs from <object>'s contents
starting at position <start>. It is useful when the number of
objects in a container causes lcon() to exceed the buffer limit.
It is equivalent to extract(lcon(<object>), <start>, <count>)
xvcon() is identical, but follows the restrictions of lvcon().
See also: ncon(), lcon(), lvcon()
XVEXITS()
xexits(<room>, <start>, <count>)
xvexits(<room>, <start>, <count>)
xexits() fetches <count> or fewer exit dbrefs from <room> starting
at position <start>. It is useful when the number of exits in a
container causes lexits() to exceed the buffer limit.
It is equivalent to extract(lexits(<room>), <start>, <count>)
xvexits() is identical, but follows the restrictions of lvexits().
See also: nexits(), lexits(), lvexits()
XVPLAYERS()
xplayers(<object>, <start>, <count>)
xvplayers(<object>, <start>, <count>)
xplayers() fetches <count> or fewer player dbrefs from <object>'s contents
starting at position <start>. It is useful when the number of players in a
container causes lplayers() to exceed the buffer limit. It is equivalent to
extract(lplayers(<object>), <start>, <count>)
xvplayers() is identical, but follows the restrictions of lvplayers().
See also: nplayers(), lplayers(), lvplayers(), xthings(), xexits()
XVTHINGS()
xthings(<object>, <start>, <count>)
xvthings(<object>, <start>, <count>)
xthings() fetches <count> or fewer non-player dbrefs from <object>'s
contents starting at position <start>. It is useful when the number
of things in a container causes lthings() to exceed the buffer
limit. It is equivalent to:
extract(lthings(<object>), <start>, <count>)
xvthings() is identical, except it follows the restrictions of lvthings().
See also: nthings(), lthings(), lvthings(), xplayers(), xexits()
XWHO()
xwho([<looker>, ]<start>, <count>)
xmwho(<start>, <count>)
xwhoid([<looker>, ]<start>, <count>)
xmwhoid(<start>, <count>)
xwho() fetches <count> or fewer player dbrefs from the list of connected
players, starting at position <start>. It is useful when the number of
players connected causes lwho() or pemits in +who $-commands to exceed
buffer limits. If a <looker> is given, only includes players who <looker>
can see are online. It is equivalent to:
extract(lwho([<looker>]), <start>, <count>)
xmwho() does not include hidden players (like mwho()).
xwhoid() and xmwhoid() return objids instead of dbrefs.
See also: lwho(), mwho(), nwho(), zwho()
XWHOID()
xwho([<looker>, ]<start>, <count>)
xmwho(<start>, <count>)
xwhoid([<looker>, ]<start>, <count>)
xmwhoid(<start>, <count>)
xwho() fetches <count> or fewer player dbrefs from the list of connected
players, starting at position <start>. It is useful when the number of
players connected causes lwho() or pemits in +who $-commands to exceed
buffer limits. If a <looker> is given, only includes players who <looker>
can see are online. It is equivalent to:
extract(lwho([<looker>]), <start>, <count>)
xmwho() does not include hidden players (like mwho()).
xwhoid() and xmwhoid() return objids instead of dbrefs.
See also: lwho(), mwho(), nwho(), zwho()
Z_TEL
Flag: Z_TEL (things, rooms)
The Z_TEL flag, when set on a zoned room or on the ZMO of a room, prevents
objects in the room from being @teleported out of the zone - that is,
objects can only be @teleported to a room which is zoned to the same ZMO.
Setting this flag on the ZMO affects all rooms zoned to it. Like NO_TEL,
the "home" command will still work. This flag is intended for use in puzzle
rooms and IC areas.
See also: ZONES, ZONE MASTERS, @chzone, ZONE MASTER ROOMS, NO_TEL, JUMP_OK
ZEMIT()
zemit(<zone>, <message>)
nszemit(<zone>, <message>)
zemit() emits <message> in every room @chzone'd to <zone>, as per @zemit.
nszemit() works like @nszemit.
See also: @zemit, zone(), zfun(), zwho(), ZONES
ZFUN()
zfun(<attribute>[, <arg0>[, <arg1>[, ... , <arg9>]]])
This function evaluates an attribute on the caller's Zone object. It is
essentially identical to
ufun(zone(me)/<attribute>[, <arg0>[, ... , <arg9>]])
See also: ufun(), get(), zone(), zemit(), zwho(), ZONES
ZMO
Zones are areas of the MUSH that can have the same user-defined
commands without having to @parent every object in the zone or make
the commands mush-wide globals.
The default zone is NOTHING. Any building done by a player defaults
to belonging to the same zone that the player belongs to. Every
zone is defined by a Zone Master Object (ZMO). The ZMO is an
ordinary MUSH object owned by some player. A wizard may change the
zone of an object or player to a ZMO.
If the ZMO is a room, it is called a "zone master room." Most of the
statements about ZMOs also apply to zone master rooms; for details,
see the help topic ZONE MASTER ROOMS.
See 'help ZONES2' for more.
ZMP
SHARED PLAYERS
Shared players are player objects which are used to mediate shared
control of objects. A shared player is an object of type PLAYER
which has the SHARED flag set. They are created like ordinary
players, and can connect, build, etc. The only difference is that
objects owned by a shared player are controlled by anything that
passes the @lock/zone of the shared player.
Anyone who passes the @lock/zone of the shared player can @chown
objects to it. This, however, does not refund the original creator's
money or quota, as does normal.
Shared players used to be known as Zone Masters. The term was
changed to emphasize the fact that they are not related to zone
master objects, which are used to affect search order for
user-defined commands.
Continued in HELP SHARED PLAYERS2
ZMR
Zone master rooms are a subset of zones. If a room is used as a zone
master, it is a zone master room (ZMR). ZMRs are like local "master"
rooms. Exits in the ZMR are global to that zone, and $-commands on
objects in the ZMR are global to that zone ($-commands on the ZMR
itself, like $-commands on the master room, are ignored). If a ZMR
is a player's personal zone, objects in the ZMR are checked for
commands that the player can use anywhere (but exits are not checked
unless the player is in a zoned room).
Zone master rooms are best used for very large zones which have a
lot of global exits, or for zones with restricted commands that can
go on a separate use-locked object from general ones.
See also: ZONES, MASTER ROOM, EVALUATION
ZMT
Zones are areas of the MUSH that can have the same user-defined
commands without having to @parent every object in the zone or make
the commands mush-wide globals.
The default zone is NOTHING. Any building done by a player defaults
to belonging to the same zone that the player belongs to. Every
zone is defined by a Zone Master Object (ZMO). The ZMO is an
ordinary MUSH object owned by some player. A wizard may change the
zone of an object or player to a ZMO.
If the ZMO is a room, it is called a "zone master room." Most of the
statements about ZMOs also apply to zone master rooms; for details,
see the help topic ZONE MASTER ROOMS.
See 'help ZONES2' for more.
ZMWHO()
zwho(<object>[, <viewer>])
zmwho(<object>)
These functions return the dbrefs of all currently-connected players in
locations @chzone'd to <object>. zmwho() does not include hidden players,
while zwho() returns all players that the caller can see are online. You
must be See_All or pass <object>'s @lock/zone to use these functions.
See_All players can pass a <viewer> argument to zwho() to get only those
players that <viewer> can see is online.
See also: lwho(), nwho(), zone(), zfun(), zemit()
ZONE
Flag: SHARED (players)
The SHARED flag is used to designate a player as a Zone Master. Objects
owned by a Zone Master are controlled by anyone who passes the player's
zone @lock.
See also: ZONE MASTERS, @lock
ZONE MASTER OBJECTS
Zones are areas of the MUSH that can have the same user-defined
commands without having to @parent every object in the zone or make
the commands mush-wide globals.
The default zone is NOTHING. Any building done by a player defaults
to belonging to the same zone that the player belongs to. Every
zone is defined by a Zone Master Object (ZMO). The ZMO is an
ordinary MUSH object owned by some player. A wizard may change the
zone of an object or player to a ZMO.
If the ZMO is a room, it is called a "zone master room." Most of the
statements about ZMOs also apply to zone master rooms; for details,
see the help topic ZONE MASTER ROOMS.
See 'help ZONES2' for more.
ZONE MASTER ROOMS
Zone master rooms are a subset of zones. If a room is used as a zone
master, it is a zone master room (ZMR). ZMRs are like local "master"
rooms. Exits in the ZMR are global to that zone, and $-commands on
objects in the ZMR are global to that zone ($-commands on the ZMR
itself, like $-commands on the master room, are ignored). If a ZMR
is a player's personal zone, objects in the ZMR are checked for
commands that the player can use anywhere (but exits are not checked
unless the player is in a zoned room).
Zone master rooms are best used for very large zones which have a
lot of global exits, or for zones with restricted commands that can
go on a separate use-locked object from general ones.
See also: ZONES, MASTER ROOM, EVALUATION
ZONE MASTERS
SHARED PLAYERS
Shared players are player objects which are used to mediate shared
control of objects. A shared player is an object of type PLAYER
which has the SHARED flag set. They are created like ordinary
players, and can connect, build, etc. The only difference is that
objects owned by a shared player are controlled by anything that
passes the @lock/zone of the shared player.
Anyone who passes the @lock/zone of the shared player can @chown
objects to it. This, however, does not refund the original creator's
money or quota, as does normal.
Shared players used to be known as Zone Masters. The term was
changed to emphasize the fact that they are not related to zone
master objects, which are used to affect search order for
user-defined commands.
Continued in HELP SHARED PLAYERS2
ZONE OBJECTS
Zones are areas of the MUSH that can have the same user-defined
commands without having to @parent every object in the zone or make
the commands mush-wide globals.
The default zone is NOTHING. Any building done by a player defaults
to belonging to the same zone that the player belongs to. Every
zone is defined by a Zone Master Object (ZMO). The ZMO is an
ordinary MUSH object owned by some player. A wizard may change the
zone of an object or player to a ZMO.
If the ZMO is a room, it is called a "zone master room." Most of the
statements about ZMOs also apply to zone master rooms; for details,
see the help topic ZONE MASTER ROOMS.
See 'help ZONES2' for more.
ZONE()
zone(<object>[, <new zone>])
Returns <object>'s zone, or #-1 if it has no zone. You must be able to
examine the object; if you can't, zone() returns #-1.
If a <new zone> is given, zone() attempts to change the zone of <object>
to <new zone> first.
See also: @chzone, zfun(), zwho(), zemit() ZONES
ZONES
Zones are areas of the MUSH that can have the same user-defined
commands without having to @parent every object in the zone or make
the commands mush-wide globals.
The default zone is NOTHING. Any building done by a player defaults
to belonging to the same zone that the player belongs to. Every
zone is defined by a Zone Master Object (ZMO). The ZMO is an
ordinary MUSH object owned by some player. A wizard may change the
zone of an object or player to a ZMO.
If the ZMO is a room, it is called a "zone master room." Most of the
statements about ZMOs also apply to zone master rooms; for details,
see the help topic ZONE MASTER ROOMS.
See 'help ZONES2' for more.
ZONES2
$-commands on a ZMO are treated as global within that zone. The
game attempts to match $-commands for the ZMO of the player's
location, as well as $-commands for the player's own zone.
If you want restricted global commands defined over only a small
area, you can define that area to be part of a zone, and place the
desired $-commands upon the ZMO. If you want players to be able to
use special commands for a culture they belong to, the $-commands
should go on the ZMO, and the players @chzoned to it so they can use
the commands anywhere.
See also: @chzone, SHARED PLAYERS
ZWHO()
zwho(<object>[, <viewer>])
zmwho(<object>)
These functions return the dbrefs of all currently-connected players in
locations @chzone'd to <object>. zmwho() does not include hidden players,
while zwho() returns all players that the caller can see are online. You
must be See_All or pass <object>'s @lock/zone to use these functions.
See_All players can pass a <viewer> argument to zwho() to get only those
players that <viewer> can see is online.
See also: lwho(), nwho(), zone(), zfun(), zemit()