user warning: Table './zuggsoftdb/accesslog' is marked as crashed and should be repaired query: INSERT INTO accesslog (title, path, url, hostname, uid, sid, timer, timestamp) values('', 'node/420', '', '38.107.179.240', 0, 'p9hsf3bgjdo5ftg4qbk7n6hpq6', 6725, 1337600504) in /home/tessh/public_html/modules/statistics/statistics.module on line 64.

Documentation

random

Syntax: %random(min,max)

return a random integer >= min and <= max. If max is omitted, then min specifies the maximum value, and 0 is used as the minimum value. If %random is used without any arguments, it returns a random integer between 0 and 99 (inclusive).

Examples:

#VAR dirList {n|e|s|w|ne|se|sw|nw|u|d}
#20 {%item(@dirList,%random(5,8
))}
sends 20 randomized diagonal directions to the mud.
#VAR dType 12
#VAR dNum 6
#VAR dOffset 22
#VAR sum @dOffset
#LOOP @dNUM {#ADD sum %random(1,@dType)}
#SAY @sum
displays the sum of 6 rolls with a 12-sided die plus an offset of 22
Note: The 'short version' of this example is
#SAY %dice(6d12+22)

Add comment

Login or register to post comments