Help

JS-MUD-COUNTER

The Mud.counter() method can be used to perform a simple countdown of a variable on a player. The syntax is:

Mud.counter( <obj>, <name>, <count> )

Where obj is the object to store the count on, name is the name of the variable to store the count under, and count is the initial count to use.

This method returns the number of counts left. When it returns 0 it means the countdown as completed.

For example:

var left = Mud.counter( actor.db, "_beastsSlainForUzzkaal", 20 );
if ( !left )
  talk( actor, 'Congratulations!   You have slain the beasts!' );
else
  talk( actor, 'Beasts remaining to be slain:  ' + left );