roll

From RPTools Wiki
Revision as of 14:15, 14 April 2009 by Verisimilar (talk | contribs) (Initial write-up.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

 This article is a stub, you can help the RPTools Wiki project by contributing content to expand this article.

roll() Function

Generates random numbers to emulate dice rolls. You may also think of this function as a method of generating a random number between times and times*sides.

Usage

roll(times, sides)
dice(times, sides)
d(times, sides)

Parameters

  • times - The number of times to roll the dice.
  • sides - The number of sides the dice possess.

Examples

Roll a twenty-sided dice.
[t: roll(1, 20)]

Returns a number that is between 1 and 20.

Roll five ten-sided dice, using variables.

[h: DiceTimes = 5]
[h: DiceSides = 10]
[t: roll(DiceTimes, DiceSides)]
Returns a number than is between 5 and 50.

See Also

For another method of rolling dice, see Dice Expressions.