Admin[Plugin] Dice Roller MyCode
#1
Exclamation 
Source:
https://community.mybb.com/mods.php?action=changelog&pid=955

Description:
Roll dice in a variety of exciting ways!

Demonstration:

Code:
## Syntax
* [roll=low-high]
 * Rolls a single dice with values between low and high, inclusive.
 * e.g. [roll=1-10]
 * *potential output* - Rolling 1-10: 5
* [roll=low-high+/-F]
 * Rolls a single dice with values between low and high, inclusive. Adds or subtracts the given offset F.
 * e.g. [roll=1-10+5]
 * *potential output*  - Rolling 1-10: 2 + 5 = 7
 * [roll=1-10-5]
 * *potential output* - Rolling 1-10: 2 - 5 = -3
* [roll=dS]
 * Rolls a single dice with with values between 1 and S, inclusive.
 * e.g. [roll=d6]
 * *potential output* - Rolling d6: 4
* [roll=NdS]
 * Rolls N dice with values between 1 and S, inclusive.
 * e.g. [roll=3d6]
 * *potential output* - Rolling 3d6: 4 + 2 + 6 = 12
* [roll=dS+/F]
 * Rolls a single dice with values between low and high, inclusive. Adds or subtracts the given offset F.
 * e.g. [roll=d6+5]
 * *potential output* - Rolling d6+5: 4 + 5 = 9
* [roll=NdS+/-F]
 * Rolls N dice with values between 1 and S, inclusive. Adds or subtracts the given offset F.
 * e.g. [roll=3d6+20]
 * *potential output* - Rolling 3d6+20: 4 + 1 + 6 + 20 = 31
* [roll=weighted list]
 * Rolls a single dice with as many values as there are items in weighted list. Each item in weighted list represents how likely that index is to be selected.
 * e.g. [roll=25,25,50] gives 1 a 25% chance to be rolled, 2 a 25% chance, and 3 a 50% chance.
 * *potential output* - Rolling 25,25,50: 3



Examples:
Rolling a d20 with +5 modifier:
Code:
[roll=d20+5]


Rolling d20+5: 2 +5 = 7



Rolling four d20s:
Code:
[roll=4d20]


Rolling 4d20: 20 + 1 + 8 + 14 = 43
Reply


Messages In This Thread
[Plugin] Dice Roller MyCode - by Admin - 09-18-2017, 10:09 PM
RE: [Plugin] Dice Roller MyCode - by Admin - 02-16-2018, 08:34 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)