This is a simple mod. So simple that I literally cannot be forgeted to upload it to RTB and wait thirty to fifty times the length of time it took to make for it to be made available.
Script_Dice.zip
This adds three commands:
/roll AdB[±bonus] [comparison] - Roll A B-sided dice, such as '2d6' for two six-sided dice. Up to 1-15 dice of 3-100 sides by default. Samples:
- /roll 1d6 - One six-sided dice.
- /roll 1d6+2 - One six-sided dice with 2 added onto the result.
- /roll 1d6-1 - One six-sided dice with 1 subtracted from the result.
- /roll 1d6+2>5 - One six-sided dice with 2 added onto the result, with a success message if the result is over 5.
/proll AdB[±bonus] [comparison] - As with /roll except only you will see the result.
/flip - Flip a coin for heads or tails.
This now also adds an event:
Brick -> rollDice [ Input, Sub Data ] - Input is the same format as /roll and /proll. Sub Data is the same format as VCE sub data for ifValue/ifVariable - If a comparison is present in the input, it will process onVariableTrue/onVariableFalse the same way VCE does. If no comparison is present, this value is ignored.
The input supports variable replacers, though if the result is erroneous a message will be printed to the client who activated it.
There's some prefs (not added to RTB's pref manager) at the top of server.cs if you want to change them.
A note: With $Dice::HardErrors set to 0, if someone tries to roll more dice than $Dice::MaxCount or with more sides than $Dice::MaxSides, the values will be modified and no error will be thrown.
"A gambling vagabond who finds freedom from society's narrow views of morality aboard his airship, the Blackjack..."
-Setzer Gabbiani
Now i can be a gambler, if only someone made card projectile's and dart projectile's.... and oh, yeah a giant Blimp witha cassino inside. Yeah life is great!