Code:
on *:TEXT:!random*:#: { 
  if ($2 !isnum) || ($3 !isnum) { msg $chan $nick Usage: !random n1 n2 }
  else { msg $chan $nick Result: $rand($2,$3) }
}


Not sure exactly what you want. This will produce a random number between n1 and n2.