Help Entries starting with 'D'
@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 <player>[=<message>]
This command sets the message displayed to the killer when <player> is killed. Typing just '@death <player>' or '@death <player>=' without a message will clear the currently set message.
Example:
@death me=You have just slain Cyclonus!
Note that some MUSHes choose to disable the KILL command, which makes this attribute rather pointless.
@DEBUGFORWARDLIST
- @debugforwardlist <object>[=<listofdbrefs>]
When an object is set DEBUG, its @debugforwardlist attribute is checked, and if present, the debug output is forwarded to all the dbrefs 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, if it has a @lock/forward set, pass its @lock/forward. (If you want to allow all objects you own to forward to you, regardless of whether or not they control you, use @lock/forward me=$me)
@decompile
- @decompile[</switch>] <object>[/<attribute-pattern>]
- @decompile/prefix <object>[/<attribute-pattern>]=<prefix>
This command produces 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.
When the /prefix switch is specified, and a prefix given, all output lines will be prefixed with <prefix>. Good for creating client-side scripts to edit code with.
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 name>
for each attribute. You can also use wildcards in <attribute name> to @decompile a list of similarly-named attributes.
(continued in help @decompile2)
@decompile2
@decompile takes five switches: /db, /flags, /attribs, /tf, /skipdefault Multiple switches may be usefully combined (other than /tf).
@decompile/db
This command 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.
@decompile/attribs
Only the code to set the object's attributes is printed.
@decompile/skipdefault
Don't output commands to set attribute flags if those flags are the
defaults for that attribute on that MUSH.
If an attribute contains special characters, such as %r or %t, ansi, pueblo, or begins or ends with spaces, then the command sent will be an @set command that has its special characters escaped, and with such %rs, %ts, and %bs as to exactly duplicate the attribute as it is currently set.
(continued in help @decompile3)
@decompile3
- @decompile/tf <object>[/<attribute>]
Supplying the /tf switch makes @decompile act exactly as if you typed: @decompile/prefix <object>[/<attribute>]=FugueEdit >%b
You can use a string other than "FugueEdit > " by setting your TFPREFIX attribute. You are strongly urged to do so. Using @decompile/tf with the default prefix presents the opportunity for a malicious player to load your TinyFugue command line with a harmful command for you to execute inadvertantly.
The /tf switch is handy for grabbing code and placing it right into your input window. To do this:
In TinyFugue:
/def -ag -mglob -p100 -t"FugueEdit > *" fe = /grab %-2
In SimpleMU:
Set your Options -> Grab Password
@set me=tfprefix:<grabpassword>FugueEdit >%b
@descformat
- @descformat <object>[=<text>]
Replaces the usual description of the object when it is looked at by player-specified text. The evaluated DESCRIBE attribute is passed as %0; the unevaluated DESCRIBE can be acquired through v(DESCRIBE).
This is useful for things like room parents that enforce a consistent "look" for each room's @desc.
@describe
- @describe <object>[=<description>]
This command sets the description of the object, which will be seen whenever something looks at the object with the command 'look <object>'. Every object should have a description, even if just a short one describing its purpose. If the [=<description>] is left out, the desc. on the object will be reset to nothing. When you look at something that has no desc., you are told, "You see nothing special."
@describe can be abbreviated as @desc
@destroy
- @destroy[/override] <object>OR@recycle[/override]<object>
- @undestroy <object>OR@unrecycle<object>
- @nuke <object>
NOTE: @destroy and @recycle are the same command - some MUSHes choose to use @recycle instead of @destroy to avoid the typo of '@dest obj' for '@desc obj'. Others use @destroy. @nuke is an alias for @dest/override.
Recycles <object> and returns the player's investment (the cost of @create). You should always @destroy objects you no longer need; this keeps the database down to a manageable size. When an object is @destroyed, it is set GOING, its queue is cleared and any semaphores are drained, and its ADESTROY attribute is immediately triggered.
(continued in help @destroy2)
@destroy2
GOING objects are actually removed from the db approximately every 10-20 minutes. Until then, you may use the @undestroy/@unrecycle command to abort the destruction sequence. If you @undestroy an object, its STARTUP attribute is triggered. If you @destroy a GOING object, it is purged immediately.
Wizards may @nuke players. If the destroy_possessions config option is set (see @config), destroying a player destroys all non-SAFE things the player owns, and @chowns SAFE things to God. If not, destroying a player @chowns all their objects to God.
@dig
- @dig[/teleport] <roomname>[=<exitname>;<alias>*,<exitname>;<alias>*]
This command is used to create a new room, possibly with exits linking it to the room you are standing in. This command normally costs 10 pennies, although some MUSHes may have different amounts or may restrict this command to those with the builder @power.
@dig/teleport will automatically @tel the digger to the new room.
If you use the long form of this command, an exit to the new room from the one you are standing in and an exit back from the new room will both be automatically @open'ed and @link'ed. You may have as many or as few exit aliases for an exit as you like, separated in the command by semicolons. The exit leading to the new room is separated from the exit leading back by a single comma.
(continued in help @dig2)
@dig2
Example:
@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>;n;north;kitchen;k". It will appear in the
list of Obvious exits as just "Kitchen <N>", but you will be able to
go through it by typing any of the following: n, k, north, kitchen
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>;s;south;out;o" coming back from the kitchen
to whatever room you are currently in.
@doing
- @doing <message>
- @doing/header <message>
This command sets a short message that shows up in the WHO/DOING listing next to your name. @doing/header <message> works exactly like @poll and can only be used by Wizards or those with the poll power.
@dolist
- @dolist[/notify][/delimit] [<delim>]<list>=<action>
@dolist executes the <action> for each element in <list>. If <list> is a function, it will be evaluated to obtain the necessary list to use. It may be any space-separated list of strings, which can be object numbers, attributes, or arbitrary words. If the /delimit switch is given, the first character of the list is used as the separator, instead of space.
<action> is a command or list of commands enclosed in braces { } and is performed once for every item in <list>. The special symbol "##" is replaced by the corresponding item from <list>. The special symbol "#@" is replaced by the position of that item in the list.
If the /notify switch is used, a "@notify me" is queued after all the list commands. This is useful for object synchronization with semaphores.
Example:
would cause you to say the name of all objects in the room.
@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, the 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 the help for: SEMAPHORES, @notify, @wait
@drop
@drop <object> [=<message>]. <object> can be a thing, player, exit, or room, specified as <name> or #<number> or 'me' or 'here'. Sets the drop message for <object>. The message is displayed when a player drops <object>. Without a message argument, it clears the message.
On an exit, this message is sent to a player after they pass through the exit.
@dump
- @dump[/paranoid][checkinterval]
This is a wizard only command that saves a copy of the current memory database out to a save file. This preempts the normal regular dumping that the mud performs on its own.
If the /paranoid switch is used, the game performs additional consistency checking which corrects possible data corruption. 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. This switch should ONLY be used if a normal @dump is not being done correctly. Paranoid dumps 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.
DARK
Flag: DARK (all types)
If a room is DARK, then no items are shown when a person 'looks' there. If a thing is DARK, then "look" does not list that object in the room's Contents:, and if an exit is DARK, it doesn't show up in the Obvious Exits: list. Puppets and audible objects with @forwardlist are not concealed by this flag. Note that players, puppets, and other "hearing" objects still trigger enter/leave messages when in DARK areas. There is a config option for "full invisibility": players and objects that are dark will be slightly disguised in speech and poses. Such actions by these objects will show as being from Someone or Something depending on whether it was an object or wizard player.
See 'help DARK2' for more.
DARK2
Players who can hide from the WHO list should use @hide/on and @hide/off to control this, not the DARK flag. While any player can turn off their DARK flag, only Wizards can set their DARK flag.
Wizards who are DARK "disappear" completely -- they are not on the WHO list, do not announce connects and disconnects, etc.
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 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()
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!
DEBUG
Flag: DEBUG (all types)
The DEBUG flag is used for debugging MUSHcode. It is meant to be used in conjunction with the VERBOSE flag. If 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>
Note that verbose output is "#obj]" - debug output is "#obj!".
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.
To add a target to an object's DEBUGFORWARDLIST, the object must pass the target's @lock/forward, or control the target.
See "help DEBUG2" for more.
DEBUG2
Objects run under this flag are computationally expensive. Avoid leaving it set on objects. It can also generate huge amounts of spam from the output.
Create test, and set it DEBUG.
Example:
> @va test=$wc *:"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."
DEC()
- dec(<integer>)
- dec(<string-ending-in-integer>)
Dec returns the integer minus 1. If given a string that ends in an integer, it decrements only the final integer portion. That is:
Example:
> 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().
DECOMPOSE()
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.
DECRYPT()
- decrypt(<string>, <password>)
Decrypts a string encrypted with the encrypt() function, if given the string and the same password.
DEFAULT()
- default([<obj>/]<attr>[, ... ,[<obj>]/<attr>], <default case>)
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 the default case, and returns that. Note that the default case is only evaluated if the attribute does not exist or cannot 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.
Example:
> &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!"
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.
Example:
> say delete(abcdefgh, 3, 2)
You say, "abcfgh"
> say delete(abcdefgh, 3, -2)
You say, "abefgh"
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.
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 a @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.
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 sums 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 20. If a third argument is given and it's a true value, the result will be a space-seperated list of the individual rolls rather than their sum.
Example:
> think die(3, 6)
6
> think die(3, 6, 1)
5 2 1
DIG()
- dig(<name>[, <exit to>[, <exit from>]])
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.
This is a side-effect function and may not be enabled on some MUSHes.
DIGEST()
- digest(<algorithm>, <string>)
Returns a checksum (Hash, digest, etc.) of <string> using the given <algorithm>. If the mush is compiled with SSL support (See @config compile), <algorithm> can be one of:
md2 md4 md5 sha sha1 dss1 mdc2 ripemd160
Without SSL, only the sha algorithm is enabled. In both cases, sha returns the same thing as the sha0() function.
dismiss
The dismiss command stops <object> from following you. If no object is given, it stops everyone from following you.
DIST2D()
- dist2d(<x1>, <y1>, <x2>, <y2>)
Returns the distance between two points in the Cartesian plane that have coordinates (<x1>, <y1>) and (<x2>, <y2>).
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>).
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.
DOING
This command displays the list of players currently connected to the MUSH. For mortals, it is identical to WHO. For wizards, it displays the WHO in the format mortals see. The wizard WHO shows location and host, but does not show @doing messages. DOING shows @doing messages but not location or host.
DOING()
- doing(<player|descriptor>)
Given the name of a connected player, returns that player's @doing string if they can be seen on the WHO list.
download
The latest version of this MUSH code is available at http://download.pennmush.org/Source. It will be called something like pennmush-1.7.6p0.tar.Z, depending on the version number. You will also find files of translations of server messages into various languages in Source/translations/<version>. See help i18n for more.
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 the Web at http://www.pennmush.org/~alansz/guide.html
drop
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. Some MUSHes may have @lock/drop enabled, which allows you to set who is permitted to drop the object.
Note that as of 1.6.6, the TEMPLE flag and SACRIFICING have been disabled.
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 droped in the room will go to its home.
If the room is set STICKY, objects dropped in the room will stay there until the last player leaves/disconnects, at which point they will be transported as described above.
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.
Drop-tos are useful for keeping rooms uncluttered.
Generated at Mon Jul 2 00:35:04 2007