rendered paste bodyon *:INPUT:*:{
if ($1- === THROW DICE) {
/set %diceone 1
/set %dicetwo 1
/set %dicethree 1
/set %nine 0
/set %ten 0
while ((%diceone < 7) && (%dicetwo < 7) && (%dicethree < 7)) {
if ( $calc( [ [ %diceone ] + [ %dicetwo ] + [ %dicethree ] ] ) == 9) {
inc %nine
}
else if ( $calc( [ [ %diceone ] + [ %dicetwo ] + [ %dicethree ] ] ) == 10) {
inc %ten
}
if (%dicethree < 6) {
inc %dicethree
}
else {
if (%dicetwo < 6) {
%dicethree = 1
inc %dicetwo
}
else {
%dicetwo = 1
%dicethree = 1
inc %diceone
}
}
}
//echo -a There are %nine possible ways to get nine
//echo -a There are %ten possible ways to get ten
halt
}
else {
}
}