Use this. Change words.txt to whatever filename you're going to use.

Code:
on *:text:!random &:#: {
  if ($nick !isop $chan) { .notice $nick Only ops can use this command. | return }
  if ($2 !isnum 1-4) { msg $chan Invalid format: Use !random 1, !random 2, !random 3, or !random 4 | return }
  var %cnt = 1
  while (%cnt <= $2) {
     while ($istok(%words,%word,32) || %word == $null) {
       var %word = $read(words.txt)
     }
     var %words = %words %word
     var %num = $iif(%cnt = 1,First,$iif(%cnt = 2,Second,$iif(%cnt = 3,Third,$iif(%cnt = 4,Fourth))))
     msg $chan %num random word is %word
     inc %cnt
  }
}


Edited: fixed something and made it op-only.

Last edited by Riamus2; 17/03/07 02:30 PM.