This is a fairly advanced dice rolling script, that i wrote in cooperation with [Paradox].
it's activated using !roll [number]
it has a limit in the amount of dice that can be rolled, it's set to 10 as default. it can be changed by editing line 3.
it has a simple built in floodprotection, that stops the script from working if !roll [number] is said 2ce within 3 seconds.
allso has a counter, tracking the amount of rolls made.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;Dice rolling script
;;coded by:
;;Mastha [irc.giveupallready.com #scripting]
;;with help from :
;;[paradox] [irc.undernet.org #scripting]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
on *:text:!roll*:*: {
if ($1 == !roll) {
var %max 10
if (($0 == 2) && ($2 isnum 1- [ $+ [ %max ] ] )) {
set -u3 %dice.rolling $2
set -u3 %dice.now $calc(%dice.now + 1)
if (%dice.now >= 2) {
halt
}
var %loop 1
var %msg msg $chan $nick rolled the following:
while (%loop <= %dice.rolling) {
var %die = $rand(1,6)
var %msg = %msg 4 %die $+ $+ $chr(44)
var %total = $calc(%total + %die)
inc %loop
}
%msg totalling 4 %total $+ .
inc %dice.rolled
msg $chan the dice have been rolled %dice.rolled times.
}
else {
msg $chan $nick $+ , you can only roll 1 to %max dice.
halt
}
}
else {
halt
}