Is there a way to make a dice rolling hack? I know it could be helpful for running a game at gaming UBB's with a role playing board (and if people want to game there as well).
Now, dice are usually in the flavors of 4, 6, 8, 10, 12, 20 and 100 sided. But there are times when you need different ones, like a 3 sider. I'll use [roll] as the tag, but I'm thinking [dice] could also work.
So, we could be looking at something like..
[roll]2d4[/roll]
The script comes up with the result of 7.
Result: 7
Simple enough. There's more....
Sometimes you need to add to a result.
[roll]3d6 + 1[/roll]
Shouldn't be too hard to add 1 to a result of say 11 (from the 3d6).
Result: 12
There are some systems that don't go by the totals but by the die results themselves, namely anything by White Wolf/Black Dog. They use only 10 sided dice and everything is based on a difficulty. Meet that number or pass it, you succeed. Simple. And it also requires a certain number of successes out of a dice pool.
So, here's what we would be looking at, using [pool] for the tag (as in dice pool).
[pool]6d10[/pool]
Results: 8 5 10 3 8 9
That way, we know how many successes, failures or botches (1's) we have - for the ST system.
There are other systems that go by the dice pool. Shattered Dreams does. Star Wars does. Star Trek does.
One last thing, and this would be the harder part...
Is it possible to make it so it cannot be edited, save by a moderator, mainly for the purpose of preventing cheating? Just something I thought of, in case it does come up.
While this could be best used for role playing, it could come in handy for getting a random number if someone needs it, or if people are bored, they can play dice games in a thread. Who knows...
There are numerous dice bots and dice scripts available for IRC that do much the same exact thing, but I don't know if they can do both a simple roll (for totals) or a dice pool (for results). But they are there in case you'd need something to look at for writing this.
As for editing, or lack thereof...
Have the script display the result with HTML coding that we cannot duplicate with UBB code, that way we can tell if someone simply typed it and didn't roll. Or else if it's uneditable, it shouldn't show up if I hit the edit button - if it's there, then someone's gone and faked their roll.