on *:text:!randno *:#:{
if $2 !isnum 1-79 || %randno [ $+ [ $site ] ] { return }
set -u[color:red]5[/color] %randno $+ $site 1
set -ln %a $left($($str($!r([color:blue]0,99[/color]) + $+ $chr(32),$2),2),-2)
msg # %a = $calc(%a)
}
The %randno $+ $site variable is not related to the random number generator, it's just a simple flood protection scheme: a user who said "!randno <number>" must wait 5 seconds before saying it again (the script will just ignore them if they say it before the 5 seconds have elapsed). If you want to change that interval, you must change the red number.
Since you didn't specify the range of random numbers, I used 0-99. If you want another range, change the blue 0,99 to something else.