Why not do this?
on *:text:!roll:#: describe $chan rolls the dice and gets $rand(1,12)
If you want it to roll multiple dice and get a total, you can do this:
on *:text:!roll *:#: {
if ($2 isnum) {
describe $chan rolls $2 dice and gets $rand($2,$calc($2 * 6))
}
else notice $nick Invalid format.
}
Example of use:
!roll 5
Output is:
/me rolls 5 dice and gets 5-30
(depending on the random number)Minimum would be 5 (1 on 5 dice = 5), maximum is 30 (6 on 5 dice = 30).