This is 1.7.6p16-1.8.0p0 patch. After applyig this patch to PennMUSH 1.7.6p16, you will have version 1.8.0p0. But it might be better to just build 1.8.0p0 from a tarball, and port over your database! To apply this patch, save it to a file in your top-level MUSH directory, and do the following: *** READ THE UPGRADING FILE! *** patch -p1 < 1.7.6p16-1.8.0p0.patch make clean make install *** READ THE UPGRADING FILE, IF YOU FOOLISHLY DIDN'T! *** If you use GNU patch 2.2, you probably want the above to be 'patch -b -p1', not just 'patch -p1'. Unix (or cygwin) users need not worry about failed hunks in src/switchinc.c, hdrs/switches.h, hdrs/cmds.h, or hdrs/funs.h. These files are automatically rebuilt on compile. On the off chance they appear not to be, simply rm them and re-run make. Then @shutdown and restart your MUSH. - Alan/Javelin In this patch: Major Changes (since 1.7.6): * SQL support (MySQL server). * SSL support. * Attribute trees. * Object ids uniquely identify an object across recycling dbrefs. * Anonymous attributes via #lambda. * Ancestor objects for each object type. * Interactions (something like "realms" in mux2) control conditions under which objects can see, hear, match, or establish the presence of each other. See local.c. * New flag/power internals, no more limits on number of flags, flags can be added/removed at runtime. * New game/chat db formats, more readable, extensible, and better at detecting problems. * New framework for performing lock failure activities in hardcode. * Customized mush.cnf configuration parameters can be easily added. * New chunk memory allocator does our own paging to disk, so the resident memory footprint is much lower. * Lock system rewrite. #true and #false atoms for locks. * minimal.db is no more. If you start up the server and there's no db to be found, it creates a new minimal database in memory. * New commands: @command/alias, buy, @boot/silent, @assert, huh_command, @decomp/prefix, @edit/first, ex/parent, empty, @nscemit, @function, @nsemit, @nsoemit, @nslemit, @nsremit, @nszemit, ], @command/add, @command/del, warn_on_missing, @switch/regexp, @*emit/spoof, @tel/inside, @hook/ignore, @hook/override, @chan/recall, with/room, IDLE, @sitelock/check, SCREENWIDTH, SCREENHEIGHT, ex/all * New functions: zwho, zmwho, l/lv/n/nv/x/xvthings, malias, locks, llocks, lset, lockflags, llockflags, lattrp, nattr/p, xattr/p, mailsend, x/xv/n/nv/exits/players/things, nsemit/cemit/remit/lemit/oemit/zemit, andlflags, andlpowers, orlflags, orlpower, andpowers, orpowers, align, sent, recv, scan, valid, allof, firstof, tr, vcross, hostname, ipaddr, cmds, reswitch*, digest, cowner, baseconv, randword, trimtiny, trimpenn, terminfo, lports, strreplace, fraction, root, children, accname, lpos, width, height * New behaviors: @adisconnect, No_Pay, @name, @lock/speech, examine, @cemit, give, @cost, SUSPECT, @startup, escape(), time(), merge(), @set, move, @name, etimefmt(), insert(), PUPPET, help, rand, DEBUG, TERSE, powers(), @config/set, @function/restrict, %~, @lock/leave, tel(), @descformat, @idescformat, @aconnect * @lock/interact can prevent other players from transmitting any normal sound to you (that is, you won't hear them speak, pose, emit, etc., like gagging them in a client). * New flags: HEAVY, ORPHAN, MISTRUST * New powers: Debit, Can_NSPemit * New attribute flags: NO_NAME, NO_SPACE, DEBUG, NEARBY, PUBLIC, VEILED * New channel flags: Notitles, Nonames, Nocemit * You can log setting/resetting of flags/powers, as well as individual commands or function calls. * Rolling activity log dumped on panic dumps or visible with @uptime. * A new test harness for developing regression test suites in perl for PennMUSH is now included; few test suites are. If you can figure out how to use this, write some tests for us! * More and better telnet negotiation. * Many internal improvements. Many old compile-time options removed or replaced by run-time options. Source code commenting using doxygen. Improved internationalization. * New config directives: unconnected_idle_timeout, max_guests, max_global_fns, read_remote_desc, default_home Minor Changes (since last 1.7.7): * The LFAIL/OLFAIL/ALFAIL messages are activated whenever a @lock/leave is checked and failed, not just when a 'leave' command fails. (So they work for failed attempts to leave rooms by exits/@tel). Suggested by Zith@Lovarii. Fixes (since last 1.7.7): * Help for grab() now references graball(). Report by Sketch@M*U*S*H. * Reference to 'ducats' in code replaced by appropriate plural currency unit. Report by Kinumi@ShoujoAi. Prereq: 1.7.6p16 *** 1_7_6.186/Patchlevel Wed, 28 Apr 2004 10:30:49 -0500 dunemush (pennmush/5_Patchlevel 1.17.1.11.1.1.1.16 600) --- 1_8_0.7(w)/Patchlevel Tue, 21 Dec 2004 10:09:27 -0600 dunemush (pennmush/5_Patchlevel 1.17.1.11.1.43 600) *************** *** 1,2 **** Do not edit this file. It is maintained by the official PennMUSH patches. ! This is PennMUSH 1.7.6p16 --- 1,2 ---- Do not edit this file. It is maintained by the official PennMUSH patches. ! This is PennMUSH 1.8.0p0 *** 1_7_6.186/README Mon, 11 Nov 2002 20:39:30 -0600 dunemush (pennmush/4_README 1.13 600) --- 1_8_0.7(w)/README Tue, 21 Dec 2004 10:09:46 -0600 dunemush (pennmush/4_README 1.14 600) *************** *** 1,5 **** ============================================================================ ! User's Guide to PennMUSH 1.7.x ============================================================================ Some of this Guide was written by Amberyl, and is used with permission. --- 1,5 ---- ============================================================================ ! User's Guide to PennMUSH 1.8.x ============================================================================ Some of this Guide was written by Amberyl, and is used with permission. *** 1_7_6.186/FAQ Mon, 11 Nov 2002 20:39:30 -0600 dunemush (pennmush/6_FAQ 1.4 600) --- 1_8_0.7(w)/FAQ Tue, 21 Dec 2004 10:08:39 -0600 dunemush (pennmush/6_FAQ 1.5 600) *************** *** 37,43 **** advanced to 1.7.0. Currently, the active development team is Javelin, Talek, and Raevnos. ! The stable version is 1.7.6, and the development version is 1.7.7. 1. How do I ask for help with a problem? --- 37,43 ---- advanced to 1.7.0. Currently, the active development team is Javelin, Talek, and Raevnos. ! The stable version is 1.8.0, and the development version is 1.8.1. 1. How do I ask for help with a problem? *** 1_7_6.186/CHANGES.OLD Wed, 19 Feb 2003 13:19:44 -0600 dunemush (pennmush/7_CHANGES.OL 1.6.1.5 600) --- 1_8_0.7(w)/CHANGES.OLD Fri, 18 Jun 2004 09:58:12 -0500 dunemush (pennmush/7_CHANGES.OL 1.6.1.4.1.2 600) *************** *** 2658,2664 **** Fixed by [TAP]. ! Version 1.6.7 patchlevel 0 Augest 22, 1996 Major Changes: --- 2658,2664 ---- Fixed by [TAP]. ! Version 1.6.7 patchlevel 0 August 22, 1996 Major Changes: *** 1_7_6.186/CHANGES.176 Wed, 28 Apr 2004 10:30:49 -0500 dunemush (pennmush/g/17_CHANGES 1.10.1.6.1.2.1.2.1.1.1.1.1.2.1.1.1.1.1.1.1.1.1.1.1.3.1.1.1.1.1.9.1.1.1.1.1.2.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.2.1.1.1.1.1.2.1.1.1.1.1.1.1.1.1.1.1.2.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.2.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.2.1.1.1.1.1.1.1.2.1.1.1.1.1.1.1.1.1.1.1.2.1.1.1.1.1.2.1.1.1.1.1.1.1.1.1.1.1.1.1.1 600) --- 1_8_0.7(w)/CHANGES.176 Sat, 01 May 2004 12:50:17 -0500 dunemush (pennmush/g/17_CHANGES 1.10.1.6.1.2.1.2.1.1.1.1.1.2.1.1.1.1.1.1.1.1.1.1.1.3.1.1.1.1.1.9.1.1.1.1.1.2.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.2.1.1.1.1.1.2.1.1.1.1.1.1.1.1.1.1.1.2.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.2.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.2.1.1.1.1.1.1.1.2.1.1.1.1.1.1.1.1.1.1.1.2.1.1.1.1.1.2.1.1.1.1.1.1.1.1.1.1.1.1.1.2 600) *************** *** 1,9 **** - This is the most current changes file for PennMUSH. Please look it - over; each version contains new things which might significantly affect - the function of your server. Changes are reported in reverse - chronological order (most recent first) - [TN] is Thorvald Natvig, a PennMUSH developer (aka Trivian) [TAP] is T. Alexander Popiel, a PennMUSH developer (aka Talek) [SW] is Shawn Wagner, a PennMUSH developer (aka Raevnos) --- 1,4 ---- *** 1_7_6.186/game/txt/hlp/penntop.hlp Sat, 31 May 2003 16:30:52 -0500 dunemush (pennmush/13_penntop.hl 1.2.1.27.1.3.1.2.1.2.1.1.1.1.1.1.1.1.1.12.1.1.1.1.1.1 600) --- 1_8_0.7(w)/game/txt/hlp/penntop.hlp Wed, 01 Dec 2004 20:21:44 -0600 dunemush (pennmush/13_penntop.hl 1.2.1.27.1.3.1.2.1.2.1.1.1.1.1.1.1.1.1.12.1.1.1.1.1.8.1.11.1.1.1.3 600) *************** *** 6,11 **** --- 6,12 ---- 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 For information about PennMUSH: help code For a list of flags: help flag list *************** *** 16,22 **** 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 send mail to dunemush@pennmush.org. & newbie --- 17,25 ---- 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 send mail to dunemush@pennmush.org, who maintains ! PennMUSH (and its distributed help files) but probably has no relation ! to this MUSH in particular. & newbie *************** *** 75,91 **** & topics Help is available on the following topics: ! ACTION LISTS 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 --- 78,94 ---- & 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 *************** *** 135,144 **** Test 3, success. See also: ATTRIBUTES, SUBSTITUTION, @asuccess, @dolist & ATTRIB-OWNERSHIP ATTRIBUTE OWNERSHIP ! The first person who creates 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 --- 138,232 ---- Test 3, success. See also: ATTRIBUTES, SUBSTITUTION, @asuccess, @dolist + & ANCESTORS + ANCESTORS + + Objects can inherit attributes from other objects through the + use of parents. An object's parent, its parent's parent, its + parent's parent's parent, etc. constitute the object's "parent chain" + and lookups work the way up the chain until an inheritance occurs. + + Ancestors are "virtual parents" that are assumed to be last on every + parent chain. There is one ancestor for each object type (room, exit, + thing, player), and @config lists the dbref of each ancestor object + (@config ancestor_room, etc.) Under normal circumstances, if an attribute + can't be retrieve from an object or any of its explicit parents, + the attribute will be looked on 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. + + See also: PARENTS, ORPHAN + & ANONYMOUS ATTRIBUTES + & LAMBDA + & #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/ + + instead, and the code will be treated as an attribute's body. + The code will normally be parsed twice, so special characters + should be escaped where needed. + + These anonymous attributes should be used for short and simple + pieces of code. Anything long or complicated should go in an + actual attribute, for readability and maintainability. + + See HELP ANONYMOUS2 for examples. + & ANONYMOUS2 + A typical usage of anonymous attributes would be to convert + a list of dbrefs to names, as so: + + >say map(#lambda/name(\%0), #3 #12 #23) + You say, "Joe Robert Sally" + + Because the code is parsed twice, you can actually build parts of + it in place, which is very convenient. Consider this implementation + of a lattrval function, which is like lattr() but it only returns + non-empty attributes: + + &lattrval me= + filter(#lambda/hasattrval([secure(before(%0, /))], \%0), lattr(%0)) + + The first time '#lambda/hasattrval([secure(before(%0, /))], \%0)' is + parsed in a call like 'u(lattrval, #1234)', it is turned into + '#lambda/hasattrval(#1234, %0)', thus avoiding the need for a setq() or + the like to store the top-level %0 for use in a real attribute called by + filter(). However, this can lead to problems with evaluating un-trusted + code. Use secure() or escape() where neccessary. + + See HELP ANONYMOUS3 for another example. + & ANONYMOUS3 + + You can also use lit() to avoid having the code evaluated twice, if + needed. For example, this code, which returns all unlinked exits in + a room: + + &lunlinked me=filter(lit(#lambda/strmatch(loc(%0), #-1)), lexits(%0)) + + This approach is useful both for security in making it harder to evaluate + a string that shouldn't be, and for making the code look nicer by not + having to escape percent signs, brackets, and other special + characters. However, it also makes it harder to build the code string on + the fly. Use what's most appropriate. + + See HELP ANONYMOUS4 for a list of functions that support anonymous + attributes. + & ANONYMOUS4 + The following functions support anonymous attributes: + + filter() filterbool() fold() foreach() map() + mix() munge() sortby() step() & 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 *************** *** 202,211 **** would. To see the attributes that are set on you or on any of the objects you own, ! you should use the "examine" command. This will list all of the attributes ! and their contents. As this can get very spammy for any large object, you ! can also examine specific attributes by using this format: ! examine / (continued in help attributes4) & ATTRIBUTES4 --- 290,296 ---- 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 *************** *** 225,231 **** to examine and work on objects. See also: ATTRIB-OWNERSHIP, @set, examine, @atrchown, @atrlock, hasattr() ! get(), v(), NON-STANDARD ATTRIBUTES, SETTING-ATTRIBUTES & BEING KILLED Getting killed is no big deal. If you are killed, you return to --- 310,317 ---- to examine and work on objects. See also: ATTRIB-OWNERSHIP, @set, examine, @atrchown, @atrlock, hasattr() ! get(), v(), NON-STANDARD ATTRIBUTES, SETTING-ATTRIBUTES, ATTRIBUTE TREES ! & BEING KILLED Getting killed is no big deal. If you are killed, you return to *************** *** 305,313 **** ----------------------------------------------------------------------- UNIX Tinyfugue tf.tcp.com /pub/tinyfugue ! WINDOWS 32-bit MUSHClient ftp.pennmush.org ! /pub/PennMUSH/Win32Binaries SimpleMU http://simplemu.onlineroleplay.com MACINTOSH MUDDweller http://www.shareware.com (search for Muddweller) & CONTROL --- 391,399 ---- ----------------------------------------------------------------------- UNIX Tinyfugue tf.tcp.com /pub/tinyfugue ! WINDOWS 32-bit MUSHClient http://www.mushclient.com SimpleMU http://simplemu.onlineroleplay.com + MuckClient http://www.xcalibur.co.uk/MuckClient/ MACINTOSH MUDDweller http://www.shareware.com (search for Muddweller) & CONTROL *************** *** 320,338 **** 2. If V is Wizard, O must be Wizard or God 3. If O is a Wizard, O controls V 4. If V is Royalty, O must be Royalty, Wizard or God ! 5. If V and O are owned by the same player: ! 5a. If V is not TRUST, O controls V ! 5b. If V is TRUST, O must be TRUST or the player must be TRUST ! 6. If V is on a zone, and isn't a player and isn't TRUST, O controls V if O passes the zone-lock of the zone. ! 7. If V is owned by a SHARED player, and V isn't a player and isn't set TRUST, O controls V if O passes the zone-lock of the SHARED player. ! Step 6 is skipped if config(zone_control_zmp_only) is on. There's also one special case: anyone can @link an unlinked exit (at which point the exit is @chowned to the linker). ! See also: controls(), TRUST, ZONES, SHARED PLAYERS & COSTS These are usually: --- 406,425 ---- 2. If V is Wizard, O must be Wizard or God 3. If O is a Wizard, O controls V 4. If V is Royalty, O must be Royalty, Wizard or God ! 5. If O is MISTRUST, O must be V to control V ! 6. If V and O are owned by the same player: ! 6a. If V is not TRUST, O controls V ! 6b. If V is TRUST, O must be TRUST or the player must be TRUST ! 7. If V is on a zone, and isn't a player and isn't TRUST, O controls V if O passes the zone-lock of the zone. ! 8. If V is owned by a SHARED player, and V isn't a player and isn't set TRUST, O controls V if O passes the zone-lock of the SHARED player. ! Step 7 is skipped if config(zone_control_zmp_only) is on. There's also one special case: anyone can @link an unlinked exit (at which point the exit is @chowned to the linker). ! See also: controls(), TRUST, MISTRUST, ZONES, SHARED PLAYERS & COSTS These are usually: *************** *** 352,361 **** See also: MONEY, money(), score & CREDITS Maintainer: Javelin ! Developers: Talek [TAP], Trivian [TN], Halatir [LdW], Raevnos [SW] Porters: Nick Gammon [NJG] (win32), Dan Williams [DW] (MacOS), ! Sylvia (OS/2), Ervin Hearn III [EEH] (win32) ! Former devteam: Rhyanna [RLM] 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 --- 439,448 ---- See also: MONEY, money(), score & CREDITS Maintainer: Javelin ! Developers: Talek [TAP], Raevnos [SW], Ervin Hearn III [EEH] Porters: Nick Gammon [NJG] (win32), Dan Williams [DW] (MacOS), ! Sylvia (OS/2) ! Former developers: Rhyanna [RLM], Trivian [TN], Halatir [LdW] 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 *************** *** 433,448 **** See also: @link, STICKY, LINK_OK, @lock & %# & %N & ENACTOR The enactor is the object that does something (enacts something :). 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). Any type of object can be an enactor. ! There are two %-substitutions that involve the enactor: %# and %N. The ! first returns the enactor's dbref # and the second returns the enactor's ! name. If, for example, you have an @osucc on an object that includes the ! %N symbol, whenever someone picks up the object, that %N will be replaced with the name of the enactor (the person who typed 'get ' in this case). --- 520,542 ---- See also: @link, STICKY, LINK_OK, @lock & %# & %N + & %~ + & %: & ENACTOR The enactor is the object that does something (enacts something :). 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). Any type of object can be an enactor. ! There are five %-substitutions that involve the enactor: ! %# = the enactor's dbref ! %N = the enactor's name, first letter capitalized ! %n = the enactor's name, first letter as-is ! %~ = the enactor's accented name ! %: = the enactor's unique identifier, like objid(%#) ! ! If, for example, you have an @osucc on an object that includes the ! %n symbol, whenever someone picks up the object, that %n will be replaced with the name of the enactor (the person who typed 'get ' in this case). *************** *** 479,488 **** matched. Local commands are always checked first and ALWAYS negate global commands. - Note that if something is typed in that results in a "Huh?" all the - objects in the master room will end up being checked for it. This is - one of the reasons why having too many global commands can lead to lag. - 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 --- 573,578 ---- *************** *** 561,573 **** take a player or thing, and you don't pass their @lock, you will set off their @fail/@ofail/@afail attributes. If you try to go through an exit, and you don't pass its @lock, you will similarly ! set off its @fail/@ofail/@afail. Many other things can also be locked -- see @lock and locktypes for more information. However, there are failure messages at this time ! only for the above, for failing to enter an object ! (@efail/@oefail/@aefail), and for failing to leave an object ! (@lfail/@lefail/@alfail). See also: @lock, @fail, @efail, @lfail & GENDER --- 651,667 ---- take a player or thing, and you don't pass their @lock, you will set off their @fail/@ofail/@afail attributes. If you try to go through an exit, and you don't pass its @lock, you will similarly ! set off its @fail/@ofail/@afail. Other failure sets include: ! ! Failing to enter an object (@efail, @oefail, @aefail) ! Failing to leave an object (@lfail, @olfail, @alfail) ! Failing to use an object (@ufail, @oufail, @aufail) ! Other failures (&`FAILURE, &`OFAILURE, &`AFAILURE) ! where the can be: FOLLOW_LOCK, PAGE_LOCK Many other things can also be locked -- see @lock and locktypes for more information. However, there are failure messages at this time ! only for the above. See also: @lock, @fail, @efail, @lfail & GENDER *************** *** 650,656 **** LAST and LASTLOGOUT These attributes show the last times you connected and disconnected from ! the MUSH. & LASTSITE & LASTIP LASTSITE and LASTIP --- 744,750 ---- LAST and LASTLOGOUT These attributes show the last times you connected and disconnected from ! the MUSH. & LASTSITE & LASTIP LASTSITE and LASTIP *************** *** 840,846 **** All attributes can be used in attribute locks and can be 'owned' independent of object ownership. ! See also: ATTRIBUTES, ATTRIB-OWNERSHIP, Attribute Functions & PARENT & PARENTS & OBJECT PARENTS --- 934,941 ---- 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 & PARENT & PARENTS & OBJECT PARENTS *************** *** 937,942 **** --- 1032,1038 ---- 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. *************** *** 960,970 **** 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. tport_anything Can @teleport anything. tport_anywhere Can @teleport to anywhere. unkillable Can not be killed ! See also: @power & 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 --- 1056,1068 ---- 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 Can not be killed + can_nspemit Can use @nspemit and nspemit() ! See also: help @power, and especially @power/list & 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 *************** *** 1213,1220 **** 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. --- 1311,1320 ---- 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. *************** *** 1225,1232 **** 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. There are other keywords, but the ones listed are the most ! useful. Examples: > say regmatch(foo_bar, lit(^[[:word:]]+$)) --- 1325,1331 ---- 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:]]+$)) *************** *** 1234,1239 **** --- 1333,1341 ---- > 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 *************** *** 1464,1472 **** %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. ! %N = name of the ENACTOR (object that set off the command) ! %# = the ENACTOR's database reference number ! (continued in help SUBSTITUTIONS2) & SUBSTITUTIONS2 If the ENACTOR's gender is set, you can use these substitutions to get the --- 1566,1577 ---- %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, first letter capitalized ! %n = the ENACTOR's name, first letter as-is ! %~ = the ENACTOR's accented name ! %: = the enactor's unique identifier, like objid(%#) ! (continued in help SUBSTITUTIONS2) & SUBSTITUTIONS2 If the ENACTOR's gender is set, you can use these substitutions to get the *************** *** 1593,1599 **** 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 uselock - the object is not set NO_COMMAND or HALT Such attributes can also be @triggered as if the $: --- 1698,1705 ---- 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 $: *************** *** 1621,1626 **** --- 1727,1739 ---- > 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: STACK, SUBSTITUTIONS, @lock *************** *** 1695,1705 **** 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. Zone master rooms are ! only defined if globals are used. 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 --- 1808,1823 ---- 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 only defined if globals are used. 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 *************** *** 1781,1794 **** * me (yourself) * here (the room you're in) Usually, you can also qualify an object with an adjective to help ! the MUSH determine which object you mean, when there is ambiguity. ! Adjectives include: * my - an object you're carrying * this - an object in your location (also: this here ) * toward - an exit in your location * 1st, 2nd, etc. - 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). You may combine some adjectives (my 1st box, this here 2nd box). & &HELP This is the AHELP index. --- 1899,1912 ---- * me (yourself) * here (the room you're in) Usually, you can also qualify an object with an adjective to help ! the MUSH determine which object you mean. Adjectives include: * my - an object you're carrying * this - an object in your location (also: this here ) * toward - an exit in your location * 1st, 2nd, etc. - 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 may combine some adjectives (my 1st box, this here 2nd box). & &HELP This is the AHELP index. *************** *** 1799,1810 **** and @function. In the config file, the syntax is: ! restrict_command command-name restriction restrict_function function-name restriction From the game: ! @command/restrict command-name=restriction @function/restrict function-name=restriction (Continued in restrict2) & RESTRICT2 --- 1917,1931 ---- and @function. In the config file, the syntax is: ! restrict_command command-name restriction [" ] restrict_function function-name restriction From the game: ! @command/restrict command-name=restriction [" ] @function/restrict function-name=restriction + + For commands, if is given, that message is sent to the + player who runs it instead of a generic, unhelpful error message. (Continued in restrict2) & RESTRICT2 *************** *** 1817,1822 **** --- 1938,1945 ---- noguest Usable only by non-guest @powered objects. nobody Nothing can use it. Same as the /disable switch to @command or @function. + noparse Function arguments are not evaluated. Only applies + to @functions. Commands can also use the 'noplayer' restriction, which stops player objects from using the command, as well as any generic *** 1_7_6.186/game/txt/hlp/pennmail.hlp Sun, 15 Sep 2002 15:53:06 -0500 dunemush (pennmush/15_pennmail.h 1.10 600) --- 1_8_0.7(w)/game/txt/hlp/pennmail.hlp Mon, 05 Apr 2004 00:46:42 -0500 dunemush (pennmush/15_pennmail.h 1.11 600) *************** *** 125,132 **** @mail/nuke Only wizards may stats players other than themselves. The mail statistics ! commands are computationally expensive, and thus are subject to "daytime" ! restrictions. They also cost the same as a @find (100 pennies). 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 --- 125,131 ---- @mail/nuke Only wizards may stats players other than themselves. The mail statistics ! commands are computationally expensive and cost the same as @find. 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 *** 1_7_6.186/game/txt/hlp/pennfunc.hlp Fri, 26 Mar 2004 16:27:06 -0600 dunemush (pennmush/16_pennfunc.h 1.2.1.50.1.1.1.1.1.2.1.7.1.8.1.1.1.1.1.1.1.1.1.1.1.1.1.3.1.1.1.1.1.1.1.1.1.1.1.1.1.9.1.1.1.1.1.3.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1 600) --- 1_8_0.7(w)/game/txt/hlp/pennfunc.hlp Tue, 21 Dec 2004 10:14:47 -0600 dunemush (pennmush/16_pennfunc.h 1.2.1.50.1.1.1.1.1.2.1.7.1.8.1.1.1.1.1.1.1.1.1.1.1.1.1.3.1.1.1.1.1.1.1.1.1.1.1.1.1.9.1.1.1.1.1.3.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.25 600) *************** *** 34,40 **** See also: MUSHCODE & 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. --- 34,39 ---- *************** *** 44,72 **** 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) Dbref functions: return dbref info related to objects (LOC, LEXITS) - Global functions: local MUSH-specific functions defined with @function 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) String functions: string manipulation (ESCAPE, FLIP) Time functions: Formatting and display of time (TIME, CONVSECS) Utility functions: general utilities (ISINT, COMP) The command "@config/functions" lists all of the game's built-in functions. ! The command "@function" lists all of the game's global functions. & Attribute functions All these functions access attributes on an object. aposs() default() edefault() eval() filter() filterbool() fold() foreach() get() grep() ! grepi() lattr() obj() poss() regrep() ! regrepi() subj() udefault() ufun() uldefault() ! ulocal() v-function xget() zfun() See also: ATTRIBUTES, NON-STANDARD ATTRIBUTES & Bitwise functions --- 43,73 ---- Boolean functions: produce 0 or 1 (false or true) answers (OR, AND) Channel functions: Get information about channels (CTITLE, CWHO) Communication functions: Send messages to objects (PEMIT, OEMIT) + Connection functions: Get information about a player's connection (CONN) Dbref functions: return dbref info related to objects (LOC, LEXITS) Html functions: output html tags for Pueblo-compatible clients Information functions: find out something about objects (FLAGS, MONEY) List functions: manipulate lists (REVWORDS, FIRST) Mail functions: manipulate @mail (MAIL, FOLDERSTATS) Math functions: number manipulation, generic or integers only (ADD, DIV) Regular expression functions: Regular expressions (REGMATCH, REGEDIT) + SQL functions: Access SQL databases (SQL, SQLESCAPE) String functions: string manipulation (ESCAPE, FLIP) Time functions: Formatting and display of time (TIME, CONVSECS) Utility functions: general utilities (ISINT, COMP) The command "@config/functions" lists all of the game's built-in functions. ! The command "@function" lists all of the game's custom global functions ! defined via the @function command. & Attribute functions All these functions access attributes on an object. aposs() default() edefault() eval() filter() filterbool() fold() foreach() get() grep() ! grepi() lattr() nattr() obj() poss() ! regrep() regrepi() subj() udefault() ufun() ! uldefault() ulocal() v-function xget() zfun() See also: ATTRIBUTES, NON-STANDARD ATTRIBUTES & Bitwise functions *************** *** 78,85 **** (In binary) '0110'. These functions are useful for storing small lists of toggle (Yes/No) options efficiently. ! band() bnand() bnot() bor() bxor() ! shl() shr() & Boolean functions Boolean functions all return 0 or 1 as an answer. --- 79,86 ---- (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() & Boolean functions Boolean functions all return 0 or 1 as an answer. *************** *** 97,138 **** & Channel functions Channel functions work with the channel system. ! cflags() channels() clock() ctitle() cwho() & Communication functions Communication functions are side-effect functions that send a message to an object or objects. ! cemit() emit() lemit() nspemit() oemit() pemit() remit() zemit() & Dbref functions Dbref functions return a dbref or list of dbrefs related to some value on an object. ! con() entrances() exit() followers() following() ! home() lcon() lexits() loc() locate() ! lparent() lplayers() lsearch() lvcon() lvexits() ! lvplayers() next() num() owner() parent() ! pmatch() rloc() rnum() room() where() ! zone() See also: DBREF & Information functions ! Information functions return values related to objects. ! andflags() config() ! conn() controls() ctime() doing() elock() ! findable() flags() fullname() hasattr() hasattrp() ! hasflag() haspower() hastype() hidden() idle() ! iname() lock() lstats() lwho() money() ! mtime() mwho() name() nattr() nearby() ! objmem() orflags() playermem() poll() ports() ! powers() quota() type() visible() & Mail functions Mail functions work with @mail. folderstats() mail() maildstats() mailfrom() mailfstats() ! mailstats() mailstatus() mailsubject() mailtime() & List functions List functions take at least one list of elements and return transformed --- 98,151 ---- & Channel functions Channel functions work with the channel system. ! cflags() channels() clock() cowner() ctitle() ! cwho() & Communication functions Communication functions are side-effect functions that send a message to an object or objects. ! cemit() emit() lemit() nsemit() nslemit() ! nsoemit() nspemit() nsremit() nszemit() oemit() pemit() remit() zemit() + & Connection functions + Connection functions return information about the connections open + on a game, or about specific connections. + + cmds() conn() doing() height() hostname() + hidden() idle() ipaddr() lports() lwho() + mwho() nmwho() nwho() ports() pueblo() + recv() sent() ssl() terminfo() width() + xmwho() xwho() zmwho() zwho() & 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() next() num() owner() ! parent() pmatch() rloc() rnum() room() ! where() zone() See also: DBREF & Information functions ! Information functions return values related to objects or the game. ! andflags() andlflags() config() controls() ctime() ! elock() findable() flags() fullname() hasattr() ! hasattrp() hasflag() haspower() hastype() iname() ! lflags() lock() lstats() money() mtime() ! mudname() name() nattr() nearby() objid() ! objmem() orflags() orlflags() playermem() poll() ! powers() quota() restarts() type() version() ! visible() & Mail functions Mail functions work with @mail. folderstats() mail() maildstats() mailfrom() mailfstats() ! mailsend() mailstats() mailstatus() mailsubject() mailtime() ! malias() & List functions List functions take at least one list of elements and return transformed *************** *** 150,186 **** See also: LISTS & Math functions ! Math functions take one or more numbers and return a numeric value. ! What is allowed as a 'number' depends on @config settings (see help). ! These functions can taken both integers and floating point numbers: ! abs() add() bound() lmath() max() ! mean() median() min() mul() sign() ! stddev() sub() trunc() val() These functions operate only on integers (if passed floating point numbers, they will return an error or misbehave): ! dec() dist2d() dist3d() div() floordiv() ! inc() mod() ! ! These functions operate on floating point numbers: ! acos() asin() atan() atan2() ceil() ! cos() ctu() e() exp() fdiv() ! floor() fmod() ln() log() pi() ! power() round() sin() sqrt() tan() These functions operate on n-dimensional vectors. A vector is a delimiter-separated list of numbers (space-separated, by default): ! vadd() vdim() vdot() vmag() vmax() ! vmin() vmul() vsub() vunit() & Regular expression functions ! This functions take a regular expression (regexp, or re) and match it against assorted things. regedit() regeditall() regeditalli() regediti() regmatch() regmatchi() regrab() regraball() regraballi() regrabi() ! regrep() regrepi() See also: string functions, regexp & 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). --- 163,205 ---- See also: LISTS & 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() 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() & Regular expression functions ! These functions take a regular expression (regexp, or re) and match it against assorted things. regedit() regeditall() regeditalli() regediti() regmatch() regmatchi() regrab() regraball() regraballi() regrabi() ! regrep() regrepi() reswitch() reswitchall() reswitchalli() ! reswitchi() See also: string functions, regexp + & 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() + & 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). *************** *** 188,231 **** accent() after() alphamin() alphamax() art() before() brackets() capstr() case() caseall() cat() center() comp() chr() decrypt() ! delete() edit() encrypt() escape() if() ! ifelse() lcstr() left() lit() ljust() ! merge() mid() ord() pos() regedit() ! regmatch() repeat() reverse() right() rjust() ! scramble() secure() sha1() space() spellnum() ! squish() strcat() strinsert() stripaccents() ! stripansi() strlen() strmatch() switch() trim() ! ucstr() wrap() See also: STRINGS & Time functions These functions return times or format times. convsecs() convutcsecs() convtime() ctime() etimefmt() ! isdaylight() mtime() restarts() restarttime() secs() ! starttime() time() timefmt() timestring() utctime() & Utility functions These functions don't quite fit into any other category. ! ansi() atrlock() beep() checkpass() clone() ! create() die() dig() functions() isdbref() ! isint() isnum() isword() localize() link() ! list() lnum() mudname() null() objeval() ! open() pcreate() r-function rand() restarts() ! s-function set() setq() setr() soundex() ! soundslike() tel() textfile() valid() version() wipe() @@() & @@() & NULL() @@() ! null() The @@() function does nothing and returns nothing. It could be used for commenting, perhaps. It does not evaluate its argument. ! The null() function is similar, but does evaluate its argument, so side-effects can occur within a null(). Useful for eating the output of functions when you don't use that output. & ABS() --- 207,250 ---- accent() after() alphamin() alphamax() art() before() brackets() capstr() case() caseall() cat() center() comp() chr() decrypt() ! delete() digest() edit() encrypt() escape() ! if() ifelse() lcstr() left() lit() ! ljust() merge() mid() ord() pos() ! regedit() lpos() regmatch() repeat() reverse() ! right() rjust() scramble() secure() sha0() ! space() spellnum() squish() strcat() strinsert() ! stripaccents()stripansi() strlen() strmatch() strreplace() ! switch() trim() ucstr() wrap() See also: STRINGS & Time functions These functions return times or format times. convsecs() convutcsecs() convtime() ctime() etimefmt() ! isdaylight() mtime() restarttime() secs() starttime() ! time() timefmt() timestring() utctime() & Utility functions These functions don't quite fit into any other category. ! allof() ansi() atrlock() beep() checkpass() ! clone() create() die() dig() firstof() ! functions() isdbref() isint() isnum() isword() ! localize() link() list() lnum() null() ! objeval() open() pcreate() r-function rand() ! s-function scan() set() setq() setr() ! soundex() soundslike() tel() textfile() valid() wipe() @@() & @@() & NULL() @@() ! null([,,...]) The @@() function does nothing and returns nothing. It could be used for commenting, perhaps. It does not evaluate its argument. ! 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. & ABS() *************** *** 326,331 **** --- 345,413 ---- > think after(foo bar baz,ba) r baz + & ALIGN() + align(,,..,[,[,[,]) + + Creates columns of text, each column designated by . + Each column is individually wrapped inside its own column, allowing + for easy creation of book pages, newsletters, or the like. + + 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 further modify this by prefixing the number + with '<', '-' or '>'. A < before a number causes the field to be + left-aligned. A '-' causes it to be centered, and '>' makes it + right-aligned. No prefix defaults to left-aligned. A '.' after the + number implies the column is to be repeated for as long as there is + a non-repeating column. + + is a single character that, if given, is the character used + to fill empty columns and remaining spaces. , if given, is + inserted between every column, on every row. , if given, is + inserted between every line. By default, and are + a space, and is a newline. + + Continued in HELP ALIGN2 + & ALIGN2 + Examples: + + > &line me=align(<5 10 20,\([left(xget(%0,sex),1)]\),name(%0),name(%L)) + > th iter(lwho(),u(line,##)) + (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 + + +----------------------------------------+ + + & ALLOF() + allof([, ...,], ) + + Evaluates every expression argument (including side-effects) and returns + the results of those which are true, in a list separated by osep. The + output separator argument is required and must be a single character, + or can be left empty, in which case a space will be used to separate the + results by default. + + The meaning of true or false depends on configuration options as + explained in the 'BOOLEAN VALUES' help topics. + + > &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" + + See also: firstof(), BOOLEAN VALUES & ALPHAMAX() alphamax(, , , ...) *************** *** 352,371 **** See also: BOOLEAN VALUES, or(), xor(), not() & ANDFLAGS() ! andflags(,) This function returns 1 if has all the flags in a specified ! list, and 0 if it does not. The list is specified with a single letter ! standing for each flag, like the output of the FLAGS() function. A '!' ! preceding a flag letter means "not flag". ! Thus, ANDFLAGS(me,WD) would return 1 if I was set WIZARD and DARK. ANDFLAGS(me,W!Dc) would return 1 if I was set WIZARD, not DARK, and CONNECTED. ! ! If a letter does not correspond to any flag, doesn't have ! it, so the function returns 0. There can be an arbitrary number of ! flags. Do not put spaces between flag letters. & ANSI() ansi(,) --- 434,466 ---- See also: BOOLEAN VALUES, or(), xor(), not() & ANDFLAGS() ! andflags(,) This function returns 1 if has all the flags in a specified ! string, and 0 if it does not. The string is specified with a single ! letter standing for each flag, like the output of the FLAGS() ! function. A '!' preceding a flag letter means "not flag". ! Thus, ANDFLAGS(me,WD) would return 1 if I was set WIZARD and DARK. ANDFLAGS(me,W!Dc) would return 1 if I was set WIZARD, not DARK, and CONNECTED. ! ! If a letter does not correspond to any flag, doesn't have it, ! so the function returns 0. There can be an arbitrary number of flags. Do ! not put spaces between flag letters. ! & ANDLFLAGS() ! andlflags(,) ! ! This function returns 1 if has all the flags in a specified ! list, and 0 if it does not. The list is a space-separated list of ! flag names. A '!' preceding a flag name means "not flag". ! ! Thus, ANDLFLAGS(me,wizard dark) would return 1 if I was set WIZARD ! and DARK. ANDFLAGS(me,wizard !Dark connected) would return 1 if I ! was set WIZARD, not DARK, and CONNECTED. ! ! If a name does not correspond to any flag, doesn't have it, ! so the function returns 0. There can be an arbitrary number of flags. & ANSI() ansi(,) *************** *** 435,440 **** --- 530,540 ---- Does a bitwise AND of all its arguments, returning the result (A number with only the bits set in every argument set in it). + & BASECONV() + baseconv(, , ) + + Converts , which is in base into base . + The bases can be between 2 (binary) and 36. & BEEP() beep([]) *************** *** 489,494 **** --- 589,596 ---- . If it's lower than the lower bound, the lower bound is returned. If it's higher than the higher bound, the higher bound is returned. + + See also: ceil(), floor(), round(), trunc() & BXOR() bxor(, ,...) *************** *** 499,504 **** --- 601,608 ---- Returns with the first character capitalized. Example: capstr(foo bar baz) returns "Foo bar baz" + + See also: lcstr(), ucstr() & CAT() cat(,[,,,...]) *************** *** 508,513 **** --- 612,619 ---- ceil() Returns the least integral value greater than or equal to . + + See also: floor(), bound(), round(), trunc() & CEMIT() cemit(, [, ]) *************** *** 588,596 **** & CLOCK() clock([/][, ]) ! With one argument, returns the value of a lock on a channel. ! If no locktype is given, "JOIN" is assumed. ! With two arguments, sets the lock. See also: @clock & CLONE() --- 694,704 ---- & CLOCK() clock([/][, ]) ! 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 & CLONE() *************** *** 599,604 **** --- 707,742 ---- This function clones , and returns the dbref number of the clone. This is a side-effect function and may not be enabled on some MUSHes. + & CMDS() + cmds() + + Returns the number of commands issued by a player during this + connection as indicated by WHO. + + 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 + & SENT() + sent() + + Returns the number of characters sent by a player during this + connection as indicated by SESSION. + + 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 + & RECV() + recv() + + Returns the number of characters received by a player during this + connection as indicated by SESSION. + + 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 & COMP() comp(, [, ]) *************** *** 610,620 **** comparison. By giving the optional , the comparison can be specified: Comparison ! A Case-sensitive lexicographic (default) ! I Case-insensitive lexicographic D Dbrefs of valid objects N Integers F Floating point numbers & CON() con() --- 748,761 ---- comparison. By giving the optional , the comparison can be specified: 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. & CON() con() *************** *** 638,644 **** Ex: config(money_singular) => "Penny" & CONN() ! conn() This function returns the number of seconds a player has been connected. must be the full name of a player, or a player's dbref. --- 779,785 ---- Ex: config(money_singular) => "Penny" & CONN() ! conn() This function returns the number of seconds a player has been connected. must be the full name of a player, or a player's dbref. *************** *** 713,718 **** --- 854,863 ---- You say, "0" See HELP CTU() for more on the angle type. + & COWNER() + cowner() + + Returns the dbref of the owner of a channel. & PCREATE() pcreate(,) *************** *** 842,847 **** --- 987,1005 ---- the dbref number of the new room. This is a side-effect function and may not be enabled on some MUSHes. + & DIGEST() + digest(, ) + + Returns a checksum (Hash, digest, etc.) of using the given + . If the mush is compiled with SSL support (See @config + compile), 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. + + See also: sha0() & DIST2D() dist2d(x1, y1, x2, y2) *************** *** 873,879 **** See also: MODULO & DOING() ! doing() Given the name of a connected player, returns that player's @doing string if they can be seen on the WHO list. --- 1031,1037 ---- See also: MODULO & DOING() ! doing() Given the name of a connected player, returns that player's @doing string if they can be seen on the WHO list. *************** *** 969,978 **** --- 1127,1140 ---- See also: @lock, locktypes & EMIT() + & NSEMIT() emit() + nsemit() Sends a message to the room, as per @emit. + nsemit() is a wizard-only variation that works like @nsemit. + & ENCRYPT() encrypt(, ) *************** *** 1011,1017 **** preventing function evaluation in the next pass of the parser. It returns after adding the escape character ('\') at the beginning of the string, and before the following characters: ! % ; [ ] { } \ This function prevents strings entered by players from causing side effects, such as performing an unintended GET() of an attribute. It --- 1173,1179 ---- preventing function evaluation in the next pass of the parser. It returns after adding the escape character ('\') at the beginning of the string, and before the following characters: ! % ; [ ] { } \ ( ) , ^ $ This function prevents strings entered by players from causing side effects, such as performing an unintended GET() of an attribute. It *************** *** 1095,1100 **** --- 1257,1264 ---- > &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 & FINDABLE() findable(,) *************** *** 1109,1121 **** --- 1273,1329 ---- Returns the first element of a list. See also: rest(), last() + & FIRSTOF() + firstof(, [, ... ,]) + + Returns the first evaluated expression that is true. If no arguments + are true, then the last argument, , is returned as the default + expression, whether it is true or false. + + The meaning of true or false is dependent on configuration options + as explained in the 'BOOLEAN VALUES' help topics. + + This function does evaluate each argument while testing, including + side-effects, stopping (short-circuits) when the true expression is + found. + + > 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 & FLAGS() flags() flags(/) + flags() Flags returns a string consisting of the flags attached to the object or the attribute on the object. The string is a single word made up of all the appropriate flag letters. + + Given no arguments, this function returns a string consisting of + all the flag letters of all the flags the server knows. Note that + some flags may not have flag letters, and multiple flags may have + the same letter (and will appear twice). + + See also: lflags() + & LFLAGS() + lflags() + lflags(/) + lflags() + + Lflags returns a space-separated list consisting of the names of flags + attached to the object or the attribute on the object. + + Given no arguments, this function returns a space-separated list + of all flag names known to the server. + + See also: flags() & FLIP() & REVERSE() flip() *************** *** 1127,1132 **** --- 1335,1342 ---- floor() Returns the greatest integral value less than or equal to . + + See also: ceil(), bound(), round(), trunc() & FMOD() fmod(,) *************** *** 1171,1176 **** --- 1381,1388 ---- > &ADD_NUMS test=add(%0,%1) > say [fold(test/add_nums,1 2 3 4 5)] You say, "15" + + See also: anonymous attributes & FOLDERSTATS() folderstats() folderstats(folder#) *************** *** 1220,1226 **** --- 1432,1462 ---- > &is_alphanum me=[regmatch(%0, \[\[:alnum:\]\])]%b > say [foreach(is_alphanum,jt1o+)] You say, "1 1 1 1 0 " + + See also: anonymous attributes + & ACCNAME() + accname() + + accname() returns the name of object , applying the object's + @nameaccent, if any. + + Related functions: NAME(), FULLNAME(), INAME() + & FRACTION() + fraction() + + This function returns a fraction representing the floating-point . + 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 , but something close to it. + + Examples: + > think fraction(.75) + 3/4 + > think fraction(pi()) + 348987/111086 + > think fraction(2) + 2 & FULLNAME() fullname() *************** *** 1231,1237 **** >"[fullname(south)] You say, "South;sout;sou;so;s" ! Related functions: NAME(), INAME() & FUNCTIONS() functions() --- 1467,1473 ---- >"[fullname(south)] You say, "South;sout;sou;so;s" ! Related functions: NAME(), ACCNAME(), INAME() & FUNCTIONS() functions() *************** *** 1256,1265 **** regrabi() is case-insensitive. Basically, this is a much more efficient way to do: ! extract(list, match(list, pattern, delimiter), 1) or ! extract(list, regmatch(list, regexp, delimiter), 1) ! See also: match(), extract(), element(), elements(), index(), regmatch() & GRABALL() & REGRABALL() & REGRABALLI() --- 1492,1502 ---- regrabi() is case-insensitive. Basically, this is a much more efficient way to do: ! extract(list, match(list, pattern, delimiter), 1, delimiter) or ! the regular expression variation thereof. ! See also: match(), extract(), element(), elements(), index(), regmatch(), ! graball() & GRABALL() & REGRABALL() & REGRABALLI() *************** *** 1291,1297 **** These functions return a list of attributes on containing (or matching ). is a wildcard pattern for ! attribute names to search; if you want to search all attributes, use "*". The list returned is similar to that returned by @grep/list /= --- 1528,1534 ---- These functions return a list of attributes on containing (or matching ). is a wildcard pattern for ! attribute names to search. The list returned is similar to that returned by @grep/list /= *************** *** 1351,1358 **** HASTYPE() function. If an attribute is given, checks to see if the attribute has the ! given attribute flag. See help @set2 for attribute flag names. & HASPOWER() haspower(, ) --- 1588,1596 ---- HASTYPE() function. If an attribute is given, checks to see if the attribute has the ! given attribute flag. See help attribute flags for attribute flag names. + See also: orlflags(), andlflags(), orflags(), andflags() & HASPOWER() haspower(, ) *************** *** 1364,1373 **** hastype(, ) Returns 1 if the object is of the named type, otherwise 0. ! Valid types are: ROOM, EXIT, PLAYER, THING. ! If an invalid type is given, #-1 is returned. & HIDDEN() ! hidden() Returns 1 if the player is hidden, otherwise 0. Can only be called by someone privileged to see hidden players. --- 1602,1611 ---- hastype(, ) Returns 1 if the object is of the named type, otherwise 0. ! Valid types are: ROOM, EXIT, PLAYER, THING, GARBAGE. ! If an invalid type is given, #-1 NO SUCH TYPE is returned. & HIDDEN() ! hidden() Returns 1 if the player is hidden, otherwise 0. Can only be called by someone privileged to see hidden players. *************** *** 1377,1386 **** Returns the object's 'home'. This is the home for a player or thing, the drop-to of a room, or source of an exit. & IDLE() & IDLESECS() ! idle() ! idlesecs() This function returns the number of seconds a player has been idle, much as WHO does. must be the full name of a player, or --- 1615,1638 ---- Returns the object's 'home'. This is the home for a player or thing, the drop-to of a room, or source of an exit. + & HOST() + & HOSTNAME() + host() + hostname() + + Returns the hostname of a player as indicated by WHO. This may + be more reliable that get(/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. + + See also: Connection Functions, ipaddr(), ports(), lports() & IDLE() & IDLESECS() ! idle() ! idlesecs() This function returns the number of seconds a player has been idle, much as WHO does. must be the full name of a player, or *************** *** 1449,1466 **** See also: extract(), elements(), grab() & INSERT() insert(,,[,]) ! ! This inserts before the item of at . That means that then becomes the th element of . If a separator 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" ! & ISDAYLIGHT() isdaylight() --- 1701,1731 ---- See also: extract(), elements(), grab() & INSERT() insert(,,[,]) ! ! If is a positive integer, this inserts BEFORE ! the item at from the left in . ! That means that then becomes the th element of . If a separator is not given, a space is assumed. Null items are counted when determining position, as in 'items()'. + + If is a negative integer, this inserts AFTER + the item at the absolute value of from the RIGHT in . + + This is the same as reversing the list before inserting , + and then reversing it again into correct order. For example, when + is -1, will be the last in the list; when + is -2, will be the second item from the right, + and so on. 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" ! & ISDAYLIGHT() isdaylight() *************** *** 1606,1611 **** --- 1871,1888 ---- > say [iter(red blue green,iter(fish shoe, [itext(1)]:[itext(0)]))] You say, "red:fish red:shoe blue:fish blue:shoe green:fish green:shoe" + & IPADDR() + ipaddr() + + Returns the IP address of the connected player or descriptor. This + may be more reliable that get(/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() & LAST() last([,]) *************** *** 1613,1639 **** See also: first(), rest() & LATTR() lattr([/]) ! Returns a space-separated list of the attribute names on the object. ! You must either be a Wizard or Royalty, own the object, have the See_All power, or have the object set VISUAL in order to use this function on the object. If a wildcarded attribute pattern is provided, only attribute names ! matching that pattern will be returned. & NATTR() & ATTRCNT() ! nattr() ! attrcnt() This function (known by two names) returns the number of attributes ! on the object. You must have permission to examine the object ! in order to use this function, but its count may include attributes ! that are not visible to you. This function is considerably faster ! than words(lattr()) and doesn't suffer from buffer length constraints. ! It's designed primarily for statistical purposes. See also: lattr() & LCON() --- 1890,1927 ---- See also: first(), rest() & LATTR() + & LATTRP() lattr([/]) + lattrp([/]) ! Returns a space-separated list of the attribute names on the object ! that you are permitted to examine. To see the complete list, ! you must either be a Wizard or Royalty, own the object, have the See_All power, or have the object set VISUAL in order to use this function on the object. If a wildcarded attribute pattern is provided, only attribute names ! matching that pattern will be returned. lattr() uses the same ! wildcards as examine (?, *, **). ! ! lattrp() also includes attributes inherited from parents. + See also: nattr(), examine & NATTR() + & NATTRP() & ATTRCNT() ! & ATTRPCNT() ! nattr([/]) ! nattrp([/]) ! attrcnt([/]) ! attrpcnt([/]) This function (known by two names) returns the number of attributes ! on the object that you are permitted to examine. This function is ! considerably faster than words(lattr()) and doesn't suffer from buffer ! length constraints. It's designed primarily for statistical purposes. ! ! nattrp() and attrpcnt() also count matching attributes on the parent. See also: lattr() & LCON() *************** *** 1653,1658 **** --- 1941,1948 ---- Returns with all letters converted to lowercase. Example: lcstr(Foo BAR bAz) returns "foo bar baz" + + See also: capstr(), ucstr() & LDELETE() Ldelete(,[,]) *************** *** 1670,1680 **** --- 1960,1974 ---- Returns the first characters from string. + & NSLEMIT() & LEMIT() lemit() + nslemit() Sends a message to the outermost room, as per @lemit. + nslemit() is a wizard-only variation that works like @nslemit. + & LEXITS() lexits() *************** *** 1833,1838 **** --- 2127,2133 ---- m - "me" ( itself) n - Neighbors (other objects in same location as ) p - Player names prefixed by '*' + y - Player names with or without a '*' prefix z - English-style matching (my 2nd book) of * - All of the above (try a complete match) *************** *** 1851,1857 **** This is a side-effect function and may not be enabled on some MUSHes. ! See also: @lock, locktypes & LOG() log([, ]) --- 2146,2196 ---- This is a side-effect function and may not be enabled on some MUSHes. ! See also: @lock, locktypes, lockflags(), llockflags(), lset(), llocks() ! & LLOCKS() ! & LOCKS() ! llocks() ! locks() ! ! llocks(), aliased locks(), list locks set on , including ! user-defined locks (prefixed with USER:) ! ! > @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() ! & LOCKFLAGS() ! lockflags([/]) ! lockflags() ! ! lockflags() returns a string consisting of the flags attached to ! the specified lock on the object. The string is a single word ! made up of all the appropriate flag letters. ! ! Given no arguments, this function returns a string consisting of ! all the flag letters the server knows. ! ! See also: llockflags(), lset(), lock(), llocks() ! & LLOCKFLAGS() ! llockflags([/]) ! llockflags() ! ! llockflags returns a space-separated list consisting of the names ! of flags attached to the specified lock on the object. ! ! Given no arguments, this function returns a space-separated list ! of all flag names known to the server. ! ! See also: llockflags(), lset(), lock(), llocks() ! & LSET() ! lset(/,[!]) ! ! This functions sets or clears flags on locks. ! ! See 'help @lset' for more information on what flags are available. & LOG() log([, ]) *************** *** 1871,1882 **** see_all power. You must be in or control it to use this function. ! See also: lvplayers(), lcon() & LSEARCH() & SEARCH() & LSEARCHR() lsearch([, [, [, [, ]]]]) lsearchr([, [, [, [, ]]]]) This function is similar to the @search command, except it returns just a list of dbref numbers. It is computationally expensive, and --- 2210,2247 ---- see_all power. You must be in or control it to use this function. ! See also: lvplayers(), lcon(), lthings() ! & LTHINGS() ! lthings() ! ! This function returns the dbrefs of all things, dark or not, in ! . You must be in or control it to use this function. ! ! See also: lvthings(), lcon() ! & LPOS() ! lpos(, ) ! ! This function returns a list of the positions where occupies ! in , 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 is a null argument, space is used. ! If is not found anywhere in , an empty list is ! returned. ! ! Example: ! > say lpos(a-bc-def-g, -) ! You say, "1 4 8" ! ! See also: pos() & LSEARCH() & SEARCH() & LSEARCHR() + & CHILDREN() lsearch([, [, [, [, ]]]]) lsearchr([, [, [, [, ]]]]) + children() This function is similar to the @search command, except it returns just a list of dbref numbers. It is computationally expensive, and *************** *** 1889,1894 **** --- 2254,2262 ---- The possible es and s are the same as those accepted by @search. See 'help @search' for information about them. + + children() is exactly the same as lsearch(,parent,), + using "all" for See_All/Search_All players and "me" for others. See 'help lsearch2' for more details. & LSEARCH2 *************** *** 1957,1970 **** 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. & LWHO() lwho() This returns a list of the dbref numbers for all currently-connected players. When mortals use this function, the dbref numbers of DARK wizards or royalty do NOT appear on the dbref list. ! See also: mwho() & MAIL() mail() mail() --- 2325,2349 ---- 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. + & LVTHINGS() + lvthings() + + This function returns the dbrefs of all connected and non-dark things + inside an object. You must be in the object or control it to use this + function. & LWHO() lwho() + lwho() This returns a list of the dbref numbers for all currently-connected players. When mortals use this function, the dbref numbers of DARK wizards or royalty do NOT appear on the dbref list. ! If lwho() is given an argument, and used by an object that can see ! DARK and Hidden players, lwho() returns the output of lwho() from ! 's point of view. ! ! See also: mwho(), nwho(), xwho() & MAIL() mail() mail() *************** *** 2018,2023 **** --- 2397,2422 ---- > think mailfstats(One) <# sent> <# sent unread> <# sent cleared> <# sent bytes> <# received> <# received unread> <# received cleared> <# received bytes> + & MAILSEND() + mailsend(,[/]) + + This function sends a message to a player, just like @mail/send. + It returns nothing if successful, or an error message. + & MALIAS() + malias([]) + malias() + malias([,]) + + 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 + . + + 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. + & MAP() map([/],[,][, ]) *************** *** 2039,2045 **** > say [map(times_two,1;2;3;4;5,;)] You say, "2;4;6;8;10" ! & MATCH() match(, [, ]) --- 2438,2445 ---- > say [map(times_two,1;2;3;4;5,;)] You say, "2;4;6;8;10" ! ! See also: anonymous attributes & MATCH() match(, [, ]) *************** *** 2081,2091 **** & MEAN() mean(,...) ! Returns the mean (Average) of its arguments. & MEDIAN() median(,...) Returns the median (the middlemost numerically) of its arguments. & MEMBER() member(,[,]) --- 2481,2495 ---- & MEAN() mean(,...) ! Returns the mean (arithmetic average) of its arguments. ! ! See also: median(), stddev() & MEDIAN() median(,...) Returns the median (the middlemost numerically) of its arguments. + + See also: mean(), stddev() & MEMBER() member(,[,]) *************** *** 2097,2120 **** member() is case-sensitive and requires an exact match. For wild card patterns, use match(). & MERGE() ! merge(, , ) ! This function merges and , depending on . ! If a character in is the same as , it is replaced ! by the character in the corresponding position in . The two ! strings must be of the same length. Example: > say [merge(AB--EF,abcdef,-)] You say, "ABcdEF" ! Spaces need to be treated specially. A null character is considered to ! equal a space, for . Example: > say [merge(AB[space(2)]EF,abcdef,)] You say, "ABcdEF" ! & MID() mid(, , ) --- 2501,2525 ---- member() is case-sensitive and requires an exact match. For wild card patterns, use match(). & MERGE() ! merge(, , ) ! This function merges and , depending on . ! If a character in is the same as one in , it is ! replaced by the character in the corresponding position in . 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 . Example: > say [merge(AB[space(2)]EF,abcdef,)] You say, "ABcdEF" ! ! See also: TR() & MID() mid(, , ) *************** *** 2151,2157 **** > &add_nums me=[add(%0, %1, %2)] > say [mix(add_nums, 1:1:1, 2:2:2, 3:3:3, :)] You say, "6:6:6" ! & MOD() & MODULO() & MODULUS() --- 2556,2563 ---- > &add_nums me=[add(%0, %1, %2)] > say [mix(add_nums, 1:1:1, 2:2:2, 3:3:3, :)] You say, "6:6:6" ! ! See also: anonymous attributes & MOD() & MODULO() & MODULUS() *************** *** 2256,2261 **** --- 2662,2669 ---- > &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 & MWHO() mwho() *************** *** 2278,2284 **** error, but enough old code has been written that expects this behavior that it will continue to do this for the time being. Don't rely on it. ! Related functions: FULLNAME(), INAME() & NAND() nand(, ,...) --- 2686,2692 ---- error, but enough old code has been written that expects this behavior that it will continue to do this for the time being. Don't rely on it. ! Related functions: FULLNAME(), ACCNAME(), INAME() & NAND() nand(, ,...) *************** *** 2316,2321 **** --- 2724,2738 ---- apply to exits, as well. See also: lcon(), lexits(), con(), exit() + & NMWHO() + nmwho() + + This 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 who need an unprivileged count + of who's online. + + See also: nwho(), mwho(), xmwho() & NOR() nor(, ,...) *************** *** 2334,2354 **** see help BOOLEAN VALUES for details. See also: and(), or(), nor(), xor() - & NSPEMIT() - nspemit(,) - This wizard-only function will send each object on the list a - message, as per the @nspemit/list command. It returns nothing. It is - similar to pemit(), except it does not include any nospoof information. - Like @nspemit, it is meant for use with globals where nospoof - information isn't wanted. - - See also: pemit(), @nspemit & NUM() num() Returns the dbref number of the object, which must be in the same room as the object executing num. & OBJ() obj() --- 2751,2813 ---- see help BOOLEAN VALUES for details. See also: and(), or(), nor(), xor() & NUM() num() Returns the dbref number of the object, which must be in the same room as the object executing num. + & NVCON() + & NCON() + ncon() + nvcon() + + These functions return a count of the contents in a container. + + ncon() is identical to words(lcon()) + nvcon() is identical to words(lvcon()) + + See also: nexits(), nplayers(), xcon(), lcon(), lvcon() + & NVEXITS() + & NEXITS() + nexits() + nvexits() + + These functions return a count of the exits in a room. + + nexits() is identical to words(lexits()) + nvexits() is identical to words(lvexits()) + + See also: ncon(), nplayers(), xexits(), lexits(), lvexits() + & NVPLAYERS() + & NPLAYERS() + nplayers() + nvplayers() + + These functions return a count of the players in a container. + + nplayers() is identical to words(lplayers()) + nvplayers() is identical to words(lvplayers()) + + See also: ncon(), nexits(), xplayers(), lplayers(), lvplayers() + & NVTHINGS() + & NTHINGS() + nthings() + nvthings() + + These functions return a count of the things in a container. + + nthings() is identical to words(lthings()) + nvthings() is identical to words(lvthings()) + + See also: ncon(), nexits(), xthings(), lthings(), lvthings() + & NWHO() + nwho() + + This returns a count of all currently-connected players. When + mortals use this function, DARK wizards or royalty are NOT counted. + + See also: lwho(), nmwho(), xwho() & OBJ() obj() *************** *** 2365,2370 **** --- 2824,2843 ---- This function is useful for securing objects which need to evaluate attributes on things owned by others. + & OBJID() + objid() + + This function returns the object id, 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. + + 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 enacting object. + & OBJMEM() objmem() *************** *** 2374,2384 **** --- 2847,2861 ---- See also: playermem() & OEMIT() + & NSOEMIT() oemit([/] [ ...],) + nsoemit([/] [ ...],) Sends to all objects in (default is the location of (s)) except (s), as per @oemit. + nsoemit() is a wizard-only variation that works like @nsoemit. + & OPEN() open(, ) *************** *** 2398,2416 **** See also: BOOLEAN VALUES, and() & ORFLAGS() ! orflags(,) This function returns 1 if has at least one of the flags in ! a specified list, and 0 if it does not. The list is specified with a ! single letter standing for each flag, like the output of the FLAGS() function. A '!' preceding a flag letter means "not flag". ! Thus, ORFLAGS(me,Wr) would return 1 if I am set WIZARD or ROYALTY. ORFLAGS(me,D!c) would return 1 if I am DARK or not CONNECTED. ! ! If a letter does not correspond to any flag, doesn't have ! it, so it is simply ignored. There can be an arbitrary number of ! flags. Do not put spaces between flag letters. & OWNER() owner([/]) --- 2875,2906 ---- See also: BOOLEAN VALUES, and() & ORFLAGS() ! orflags(,) This function returns 1 if has at least one of the flags in ! a specified string, and 0 if it does not. The string is specified with ! a single letter standing for each flag, like the output of the FLAGS() function. A '!' preceding a flag letter means "not flag". ! Thus, ORFLAGS(me,Wr) would return 1 if I am set WIZARD or ROYALTY. ORFLAGS(me,D!c) would return 1 if I am DARK or not CONNECTED. ! ! If a letter does not correspond to any flag, doesn't have it, ! so it is simply ignored. There can be an arbitrary number of flags. Do ! not put spaces between flag letters. ! & ORLFLAGS() ! orlflags(,) ! ! This function returns 1 if has at least one of the flags in ! a specified list, and 0 if it does not. The list is a space-separated ! list of flag names. A '!' preceding a flag name means "not flag". ! ! Thus, ORLFLAGS(me,wizard royalty) would return 1 if I am set ! WIZARD or ROYALTY. ORLFLAGS(me,dark !connected) would return 1 if I am ! DARK or not CONNECTED. ! ! If a name does not correspond to any flag, doesn't have it, ! so it is simply ignored. There can be an arbitrary number of flags. & OWNER() owner([/]) *************** *** 2424,2434 **** --- 2914,2929 ---- If you specify a second argument, it tries to re-parent the object. In this case, you must control the object. & PEMIT() + & NSPEMIT() pemit(,) + nspemit(,) This function 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. + + nspemit() is a wizard-only variation that works like @nspemit/list. + & PI() pi() *************** *** 2462,2475 **** This function returns the current @poll. See also: @poll, doing(), @doing & PORTS() ports() ! This function returns the list of descriptors ("ports") that a player, ! specified by full player name, or by dbref, is connected to. Only players ! who are See_All or privileged may use this function; in other cases, ! an empty list is returned. Otherwise, a list of ports is returned in ! order of most recent connection to least recent connection. & POS() pos(,) --- 2957,2981 ---- This function returns the current @poll. See also: @poll, doing(), @doing + & LPORTS() & PORTS() + lports() ports() ! These function returns 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. Only players who ! are See_All or privileged may use these functions; in other cases, ! lports() returns #-1, and ports() an empty list. As an exception, ! players can use ports() on themselves. ! ! 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. & POS() pos(,) *************** *** 2485,2495 **** power(,) Returns to the power of . & POWERS() powers() - Returns a space-separate list of powers possessed by the object. - If the object does not exist, #-1 will be returned. & QUOTA() quota() --- 2991,3007 ---- power(,) Returns to the power of . + + See also: root() & POWERS() powers() + powers(,) + + The first form returns a space-separate list of powers possessed by + the object. If the object does not exist, #-1 will be returned. + + The second form attempts to set on , as per @power. & QUOTA() quota() *************** *** 2510,2519 **** See "help SETQ()" for details about registers. & RAND() rand() - Rand returns an integer between 0 and num-1, inclusive. If called with an invalid argument, rand() returns an error message beginning with #-1. & REGEDIT() & REGEDITALL() & REGEDITI() --- 3022,3044 ---- See "help SETQ()" for details about registers. & RAND() rand() + rand(, ) + + Return a random number. + + The first form returns an integer between 0 and -1, inclusive. + The second returns an integer between and , inclusive. If called with an invalid argument, rand() returns an error message beginning with #-1. + & RANDWORD() + & PICKRAND() + randword([, ]) + + Returns a randomly selected element from . is the list + delimiter: if not specified, whitespace delimits the list. + + pickrand() may be an alias for randword() on some servers. & REGEDIT() & REGEDITALL() & REGEDITI() *************** *** 2569,2578 **** --- 3094,3106 ---- See also: regrab() & REMIT() + & NSREMIT() remit(, ) + nsremit(, ) Sends a message to the contents of , as per @remit. + nsremit() is a wizard-only variation that works like @nsremit. & REMOVE() remove(,[,]) *************** *** 2685,2696 **** --- 3213,3238 ---- are players; if is a player, the ROOM() function may be used to find the player's absolute location if the player is not set UNFINDABLE. + & ROOT() + root(, ) + + Returns the n-th root of . The 2nd root is the square root, + the 3rd the cube root, and so on. + + Example: + > think root(27, 3) + 3 + > think power(3, 3) + 27 + + See also: sqrt(), power() & ROUND() round(,) Rounds to decimal places. must be between 0 and 6. + See also: ceil(), floor(), bound(), trunc() & S() & S-FUNCTION s(string) *************** *** 2706,2735 **** type @trigger /ve, it would return "This is ", but if vf were @trigger me/ve, then triggering the vf makes the ve return "This is " ! & SCRAMBLE() scramble() ! ! This function scrambles a string, returning a random permutation of its characters. For example, "[scramble(abcdef)]" might return "cfaedb". Note that this function does not pay any attention to spaces or other special characters; it will scramble these characters just like normal characters. ! & 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. & SECURE() secure() ! This function returns 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: ESCAPE() --- 3248,3289 ---- type @trigger /ve, it would return "This is ", but if vf were @trigger me/ve, then triggering the vf makes the ve return "This is " ! ! & SCAN() ! scan(, ) ! scan() ! ! This function works like @scan, and returns a space-separated list of ! dbref/attribute pairs containing $commands that would be triggered if ! were run by . You must control or be ! See_All to use this function. ! ! If no is specified, this function works like @scan run ! by the function's executor. ! & SCRAMBLE() scramble() ! ! This function scrambles a string, returning a random permutation of its characters. For example, "[scramble(abcdef)]" might return "cfaedb". Note that this function does not pay any attention to spaces or other special characters; it will scramble these characters just like normal characters. ! & 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. & SECURE() secure() ! This function returns 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: ESCAPE() *************** *** 2752,2759 **** This function returns the difference of two sets -- i.e., the elements in that aren't in . The list that is returned is sorted. Normally, alphabetic sorting is done. You can ! change this with the fourth argument, which takes the same form as ! sort()'s second. If used with exactly four arguments where the fourth is not a sort type, it's treated instead as the output separator. Example: --- 3306,3313 ---- This function returns the difference of two sets -- i.e., the elements in that aren't in . 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: *************** *** 2766,2773 **** This function returns the intersection of two sets -- i.e., the elements that are in both and . The list that is returned is sorted. Normally, alphabetic sorting is done. You can ! change this with the fourth argument, which takes the same form as ! sort()'s second. If used with exactly four arguments where the fourth is not a sort type, it's treated instead as the output separator. Example: --- 3320,3327 ---- This function returns the intersection of two sets -- i.e., the elements that are in both and . 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: *************** *** 2837,2844 **** elements of both and , minus any duplicate elements. Think of it as CAT() without words duplicated. The list returned is sorted. Normally, alphabetic sorting is done. You can ! change this with the fourth argument, which takes the same form as ! sort()'s second. If used with exactly four arguments where the fourth is not a sort type, it's treated instead as the output separator. Example: --- 3391,3398 ---- elements of both and , minus any duplicate elements. Think of it as CAT() without words duplicated. 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. Example: *************** *** 2848,2857 **** You say, "1.0 1.000 1.1" > say setunion(1.1 1.0, 1.000, %b, f) You say, "1.0 1.1" ! & SHA1() ! sha1() ! Returns the SHA-1 cryptographic hash of the string. See RFC 3174 for more information. & SHL() shl(,) --- 3402,3411 ---- You say, "1.0 1.000 1.1" > say setunion(1.1 1.0, 1.000, %b, f) You say, "1.0 1.1" ! & SHA0() ! sha0() ! Returns the SHA cryptographic hash of the string. See RFC 3174 for more information. & SHL() shl(,) *************** *** 2891,2904 **** 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 following letters as a second argument specify a certain sort: - 'a': Sort lexicographically. - 'd': Sort dbrefs. - 'n': Sort integer numbers. - 'f': Sort decimal numbers. - The optional third argument gives the list's delimiter character. If not present, defaults to a space. The optional fourth argument gives a string that will delimit --- 3445,3453 ---- 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, defaults to a space. The optional fourth argument gives a string that will delimit *************** *** 2925,2930 **** --- 3474,3508 ---- 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 + 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. + 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. + + The special sort key attr: or attri: will sort dbrefs + according to their attributes. For example: Separating by + &factions or &species attrs. attr is probably case-sensitive, and + attri is case-insensitive. + + Whether or not the 'a' sort type is case-sensitive or not depends + on the particular mush and its environment. + + See also: sort(), sortby(), setunion(), setinter(), setdiff() & SOUNDEX() soundex() *************** *** 2997,3006 **** --- 3575,3626 ---- > say [splice(foo bar baz,eek moof gleep,bar)] You say, "foo moof baz" + & SQL() + sql(,[[,]) + + 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). + + 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(), like this: + + &SEL_GETID obj = SELECT id FROM mytable WHERE name = '[sqlescape(%0)]' + &DOIT obj = $do *: ... [setq(0,u(SEL_GETID,%0))] ... + + See also: sqlescape(), @sql + + & SQLESCAPE() + sqlescape() + + This function performs SQL-server-implemented escaping of strings. + It's important to escape arbitrary data before passing it to the + sql() function or @sql command to prevent SQL injection attacks. + + 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(), @sql + & SQRT() sqrt() Returns the square root of . cannot be negative. + + See also: root() & SQUISH() squish([, ]) *************** *** 3018,3025 **** & STARTTIME() Function: starttime() ! Returns a string which is the time the MUSH first started up. The time ! is in the same format as the TIME() function returns. Example: > say starttime() --- 3638,3646 ---- & STARTTIME() Function: starttime() ! Returns a string containing the time the MUSH first started up (not ! including @shutdown/reboots). The time is in the same format that the ! TIME() function returns. Example: > say starttime() *************** *** 3038,3043 **** --- 3659,3673 ---- Returns the number of times the server has been rebooted with @shutdown/reboot since the last full startup. + & SSL() + ssl() + + This function returns 1 if the player is using an SSL connection, + and 0 otherwise. If SSL is disabled, it always returns 0. + Players can check the SSL status of their own connection. + The See_All power is required to check other connections. + + See also: terminfo() & STEP() step([/], , [, , ]) *************** *** 3057,3067 **** 1 - 2 - 3 4 - 5 - ! See also: map(), iter() & STDDEV() stddev(,...) Returns the sample standard deviation of its arguments. & STRCAT() strcat(, ) --- 3687,3699 ---- 1 - 2 - 3 4 - 5 - ! See also: map(), iter(), anonymous attributes & STDDEV() stddev(,...) Returns the sample standard deviation of its arguments. + + See also: mean(), median() & STRCAT() strcat(, ) *************** *** 3103,3109 **** strmatch(Foo bar baz,*Baz) will return 1. strmatch(Foo bar baz,*Foo) will return 0. strmatch(Foo bar baz,*o*a*) will return 1. ! & SUB() sub(, ) --- 3735,3750 ---- strmatch(Foo bar baz,*Baz) will return 1. strmatch(Foo bar baz,*Foo) will return 0. strmatch(Foo bar baz,*o*a*) will return 1. ! & STRREPLACE() ! strreplace(string, start, length, text) ! ! Returns string with the characters starting at replaced ! by . As with other string functions, the first character is at ! position 0. ! ! Example: ! > think strreplace(Fix teh typo, 4, 3, the) ! Fix the typo & SUB() sub(, ) *************** *** 3112,3117 **** --- 3753,3773 ---- subj() Returns the subjective pronoun - he/she/it - for an object. + & RESWITCH() + & RESWITCHI() + & RESWITCHALL() + & RESWITCHALLI() + reswitch(, , , [, ], ... []) + reswitchall(, , , [, ], ... []) + reswitchi(, , , [, ], ... []) + reswitchalli(, , , [, ], ... []) + + These functions are just like switch() except they compare + against a series of regular expressions, not wildcard patterns. reswitch() + is case-sensitive, reswitchi() is case-insensitive. The reswitchall versions + evaluate every corresponding , not just the first that matches a regexp. + + See also: switch() & SWITCH() & SWITCHALL() & CASE() *************** *** 3211,3222 **** See HELP CTU() for more on the angle type. & TEL() ! tel(,) This function will teleport to , exactly as ! @tel =. See also: @tel & TEXTFILE() & dynhelp() textfile(,) --- 3867,3899 ---- See HELP CTU() for more on the angle type. & TEL() ! tel(,[,[,]]) This function will teleport to , exactly as ! @tel =. is an optional boolean that, ! if true, makes the function act like @tel/silent. ! is an optional boolean that, if true, makes the function act like ! @tel/inside (some value for must also be specified). See also: @tel + & TERMINFO() + terminfo() + + 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. + + 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. & TEXTFILE() & dynhelp() textfile(,) *************** *** 3239,3244 **** --- 3916,3923 ---- & UTCTIME() time([utc]) utctime() + time() + time() time() gives you the current time on the MUSH. WARNING! This is the time on the machine that the mush is running *************** *** 3247,3252 **** --- 3926,3939 ---- utctime() and time(utc) give the same time in UTC (Aka GMT), not the server's local timezone. + If a timezone (-24 to +24) is given, it adds that many hours to UTC + to return the correct timezone. Timezone may contain decimals (-1.5) + + If is given, and is a valid object containing an attribute + TZ, it modifies the resulting time according to said timezone. time() + on a player will always return a time, and if TZ is not a number between + -24 and +24 inclusive, the time returned is UTC. + See also: timefmt(), timestring(), convsecs(), convtime() & ETIMEFMT() etimefmt([, ]) *************** *** 3283,3288 **** --- 3970,3989 ---- You can also put a number between the $ and letter to specify a minimum width for the expanded code. The capital letter codes are the same as the lower case codes if you don't provide a width. + 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. + + Continued in HELP ETIMEFMT3 + & ETIMEFMT3 + Some 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 & TIMEFMT() timefmt([, ]) *************** *** 3329,3336 **** --- 4030,4059 ---- > say [timestring(301,2)] You say, "00d 00h 05m 01s" + & TR() + tr(,,) + + This function translates every character in that exists in + to the character at an identical position in . Ranges of + characters seperated by -'s are accepted. and must be the + same length after expansion of ranges. If a character exists more than + once in , 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 and 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() & TRIM() trim([,][,]) + trimpenn([,][,]) + trimtiny([,][,]) This function trims leading and trailing characters from a string. The character trimmed is normally a space; if a second argument is *************** *** 3344,3350 **** to trim, since the trim style must be the third argument to the function. If the tiny_trim_fun config option is "yes", the character and style ! arguments are reversed. Examples: > say [trim( foo bar baz eek )] --- 4067,4074 ---- to trim, since the trim style must be the third argument to the function. If the tiny_trim_fun config option is "yes", the character and 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( foo bar baz eek )] *************** *** 3363,3368 **** --- 4087,4093 ---- also be used to return the leading numeric prefix of a string, or "0" if there isn't one. For example, "val(101Dalmations)" => 101. + See also: ceil(), floor(), bound(), round() & TYPE() type() *************** *** 3410,3415 **** --- 4135,4142 ---- Returns with all letters converted to uppercase. Example: ucstr(Foo BAR baz) returns "FOO BAR BAZ" + + See also: lcstr(), capstr() & UDEFAULT() Function: udefault([/],[,]...) *************** *** 3520,3531 **** --- 4247,4272 ---- 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 > think valid(name,Foobar) 1 > think valid(attrname,Foo bar) 0 + & VCROSS() + vcross(, [, ]) + + 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 & VDIM() vdim([,]) *************** *** 3559,3565 **** corresponding pair of numbers from the two vectors. The vectors must be of the same length. ! > think vmin(1 2 3, 4 1 2) 4 2 3 & VERSION() --- 4300,4306 ---- 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 & VERSION() *************** *** 3620,3626 **** 1 0 0 > think vmul(vunit(5 6 7),vmag(5 6 7)) 5 6 7 ! & WHERE() where() --- 4361,4387 ---- 1 0 0 > think vmul(vunit(5 6 7),vmag(5 6 7)) 5 6 7 ! & WIDTH() ! & HEIGHT() ! & SCREENWIDTH ! & SCREENHEIGHT ! width() ! height() ! ! 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 changed with the special ! SCREENWIDTH and SCREENHEIGHT commands, both of which take a number as ! their sole argument, and set the appropriate field. ! ! If used on something that's not a 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. & WHERE() where() *************** *** 3665,3671 **** --- 4426,4447 ---- @desc here=[wrap([space(4)]Indented paragraph,72)] @desc here=[iter(wrap(Hanging indent,72,76,|), [switch(#@,>1,space(4))]##,|,%r)] + & XATTR() + & XATTRP() + xattr([/],start,count) + xattrp([/],start,count) + + xattr() fetches or fewer attribute names from + starting at position . It is useful when the number of attributes + on an object causes lattr() to exceed the buffer limit. + + It is equivalent to extract(lattr([/]),,) + + xattrp() will include attributes from parents. Do note that parent + attributes are listed _after_ child attributes, not sorted + alphabetically. + See also: nattr(), lattr() & XGET() xget(, ) *************** *** 3681,3691 **** --- 4457,4570 ---- inputs is equivalent to true(1). See BOOLEAN VALUES. See also: and(), or(), not(), nor() + & XVCON() + & XCON() + xcon(,,) + xvcon(,,) + + xcon() fetches or fewer item dbrefs from 's contents + starting at position . It is useful when the number of objects + in a container causes lcon() to exceed the buffer limit. + + It is equivalent to extract(lcon(),,) + + xvcon() is identical, except it follows the restrictions of + lvcon() + + See also: ncon(), lcon(), lvcon() + & XVEXITS() + & XEXITS() + xexits(,,) + xvexits(,,) + + xexits() fetches or fewer exit dbrefs from + starting at position . It is useful when the number + of exits in a container causes lexits() to exceed the buffer + limit. + + It is equivalent to extract(lexits(),,) + + xvexits() is identical, except it follows the restrictions of + lvexits() + + See also: nexits(), lexits(), lvexits() + & XVPLAYERS() + & XPLAYERS() + xplayers(,,) + xvplayers(,,) + + xplayers() fetches or fewer player dbrefs from + starting at position . It is useful when the number of + players in a container causes lplayers() to exceed the buffer limit. + + It is equivalent to extract(lplayers(),,) + + xvplayers() is identical, except it follows the restrictions of + lvplayers() + + See also: nplayers(), lplayers(), lvplayers() + & XVTHINGS() + & XTHINGS() + xthings(,,) + xvthings(,,) + + xthings() fetches or fewer non-player dbrefs from 's + contents starting at position . It is useful when the number of + players in a container causes lthings() to exceed the buffer limit. + + It is equivalent to extract(lthings(),,) + + xvthings() is identical, except it follows the restrictions of + lvthings() + + See also: nthings(), lthings(), lvthings() + & XWHO() + & XMWHO() + xwho(start,count) + xmwho(start,count) + + xwho() fetches or fewer player dbrefs from the list of connected + players. It is useful when the number of players connected causes lwho() + or pemits in +who $-commands to exceed buffer limits. + + It is equivalent to extract(lwho(),,). + + xmwho() is identical, except it is limited to non-DARK and non-HIDE + players. + + See also: lwho(), mwho(), nwho() + + & ZMWHO() + zmwho() + + This returns a list of the dbref numbers for all current-connected, + non-hidden players within a location belonging to the specified zone. + It's exactly the same as zwho() used by a mortal, and is suitable for + use on privileged global objects who need an unprivileged zwho-list. + + See also: zwho() + + & ZWHO() + zwho([,]) + + This returns a list of the dbref numbers for all currently-connected + players within a location belonging to the specified zone. When mortals + use this function, the dbref numbers of DARK wizards or hidden royalty + do NOT appear on the dbref list. + + If is given by a privileged user, zwho() returns a dbref list + using 's privileges. + + See also: zmwho() & ZEMIT() + & NSZEMIT() zemit(, ) + nszemit(, ) Sends a message to everything zoned to , as per @zemit. Costs apply. + + nszemit() is a wizard-only variation that works like @nszemit. & ZFUN() zfun(, , , ... ) *** 1_7_6.186/game/txt/hlp/pennflag.hlp Sat, 15 Mar 2003 20:26:18 -0600 dunemush (pennmush/17_pennflag.h 1.1.1.1.1.2.1.1.1.2.1.1.1.2.1.1.2.1.2.1.1.1.1.2.1.4.1.2.2.1 600) --- 1_8_0.7(w)/game/txt/hlp/pennflag.hlp Mon, 31 May 2004 08:41:25 -0500 dunemush (pennmush/17_pennflag.h 1.1.1.1.1.2.1.1.1.2.1.1.1.2.1.1.2.1.2.1.1.1.1.2.1.4.1.2.2.17 600) *************** *** 12,18 **** To un-set a flag, use the exclamation point (!) before the flag name. For help on any particular flag, type: help ! The list of flags is available in: help flag list (continued in help flags2) & FLAGS2 --- 12,19 ---- To un-set a flag, use the exclamation point (!) before the flag name. For help on any particular flag, type: help ! A descriptive list of flags is available in: help flag list ! A complete list of flags is available through: @flag/list (continued in help flags2) & FLAGS2 *************** *** 31,38 **** indicate the TYPE of an object. The absence of these four special flags indicates the object is of type THING. ! See also: examine, flags(), hasflag(), orflags(), andflags() ! types of objects, type(), hastype() & FLAG LIST & FLAGS LIST Flag Title Flag Title Flag Title --- 32,39 ---- indicate the TYPE of an object. The absence of these four special flags indicates the object is of type THING. ! See also: examine, flags(), hasflag(), orflags(), andflags(), ! orlflags(), andlflags(), types of objects, type(), hastype(), @flag & FLAG LIST & FLAGS LIST Flag Title