# Dice (MPI)

### From Tapestries MUCK

(Difference between revisions)

WhiteWizard (Talk | contribs) (→dice) |
|||

(6 intermediate revisions not shown) | |||

Line 1: | Line 1: | ||

- | [[Category: | + | [[Category:functions (MPI)]][[Category:Math Functions (MPI)]] |

=dice= | =dice= | ||

<mpi>{dice:X} | <mpi>{dice:X} | ||

Line 9: | Line 9: | ||

(YdX) A third parameter, if given, is just added to this sum as a modifier. (YdX+Z) | (YdX) A third parameter, if given, is just added to this sum as a modifier. (YdX+Z) | ||

+ | |||

+ | '''FYI:''' On Tapestries, this function is broken. {dice:1,X} will always return X. {dice:n>1,X} works as expected. |

## Latest revision as of 00:51, 23 February 2013

# dice

{dice:X} {dice:X,Y} {dice:X,Y,Z}

Given one parameter, picks a random number between 1 and X. (1dX)

Given two parameters, it randomly generates Y numbers between 1 and X, and adds them together.

(YdX) A third parameter, if given, is just added to this sum as a modifier. (YdX+Z)

**FYI:** On Tapestries, this function is broken. {dice:1,X} will always return X. {dice:n>1,X} works as expected.