openTest: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(Initial write-up.)
 
(Needs clarification)
Line 14: Line 14:


|examples=
|examples=
{{Clarify|Obviously not the right function used.}}
Roll five ten-sided dice.
Roll five ten-sided dice.
<source lang="mtmacro" line>
<source lang="mtmacro" line>

Revision as of 17:55, 5 November 2012

 This article is a stub, you can help the RPTools Wiki project by contributing content to expand this article.
 This article needs: Better explanation, perhaps examples on how to strip out the dice rolls from the string that is returned.

openTest() Function

Generates random numbers to emulate dice rolls; returns a formatted string containing the result of each dice(using an exploded roll), and the highest.

Usage

openTest(times, sides)

Parameters

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

Examples

Needs Clarification:
Obviously not the right function used.

Roll five ten-sided dice.

[t: roll(5, 10)]

Returns a string that is similar to Dice: 5, 4, 19, 6, 3, Maximum: 19

Roll five ten-sided dice, using variables.

[h: DiceTimes = 5]
[h: DiceSides = 10]
[t: roll(DiceTimes, DiceSides)]
Returns a string that is similar to Dice: 5, 4, 19, 6, 3, Maximum: 19

See Also

For another method of rolling dice, see Dice Expressions.