User:Misza13/Random

This template is an attempt at creating a "random number generator" using WikiSyntax. It generates pseudorandom numbers that change whenever a page containing it is edited or every minute (the latter update may require purging the page's cache).

Usage:
 *   produces a random decimal digit: 
 *   produces a random number from M to M+N-1, i.e. it rolls a 1dN+M-1, where the M, if ommited, is set to 0. (As you might've guessed by now, N defaults to 10.) Example:    generates a two-digit number: 

You can (or rather should!) also specify up to 6 seeds for the generator, which (I think) should be different prime numbers:
 *   gives 
 *   gives 

Notes:
 * This template does not render properly when previewing a page. This is because the   variable (one of the sources of "randomness") is not set on preview. It will show up after saving, though.
 * The seed parameters should not be set to high values to avoid integer overflow. You'll know something's wrong when the generator produces negative numbers while it shouldn't.

Have fun! --Misza 13 T C