Help

JS-MUD

For immortals Also: JAVASCRIPT-MUD

The Mud object has utility methods that are specific to mud JavaScripting.

Class Properties:

pulse           Returns the current mud pulse which contains the number
                of pulses since the mud booted up.  There are four pulses
                per second.

Class Methods:

dice( x, y, z )    This provides a convenient way of doing random number
                   generation from within JavaScript.  y and z
                   are optional.  This function calculates 1dx,
                   xdy, or xdy+z,
                   depending on whether x and/or z is specified.  Ex:
                   "Mud.dice( 5 )" calculates 1d5 while "Mud.dice( 2, 4, 3 )"
                   calculates 2d4+3.
possessionDesc(o,p)This formats a possession description.  For example,
                   "Mud.possessionDesc( 'Bess', 'a short sword' )" returns
                   "Bess' short sword".
isRuleActive( r )  Returns true if the specified rule is active.
randomSocial()     See JS-SOCIALS for more information.
useCharge()        See JS-MUD-CHARGES.
showCharges()      See JS-MUD-CHARGES.
hasCharges()       See JS-MUD-CHARGES.
counter()          See JS-MUD-COUNTER.
capForLevel( l )   Returns the cap for level l.

Last edited by Engada in October 2007.