Originally Posted By: Tomao
Code:
on *:text:!newlines:#:{
  var %newlines = player1 player2 player3 player4 player5 player6 player7 player8 player9 player10 player11 player12
  tokenize 32 %newlines
  var %r = 1, %i
  while (%r <= $0) {
    %i = %i $($+($,$r(1,$0)),2)
    inc %r
  }
  msg # $gettok(%i,1-3,32)
  msg # $gettok(%i,4-6,32)
  msg # $gettok(%i,7-9,32)
  msg # $gettok(%i,10-12,32)
} 



nope. this just makes 12 random selections from %newlines, without replacement, that can and almost certainly will contain duplicates.

if he wanted to make the code more efficient, he could use:

Code:
  var %output
  while (%newlinecounter <= 12) {
    %output = $instok(%output, $gettok(%newlines, %newlinecounter, 32), $rand(1, %newlinecounter), 32)
    inc %newlinecounter
  }


then %output contains a scrambled version of %newlines.


"The only excuse for making a useless script is that one admires it intensely" - Oscar Wilde