Go Back   The Clock Crew
Register FAQ Members List Search Today's Posts Mark Forums Read

Tutorials:mirc:middle_scrambler
Home   Backlinks   5 Views   Index   Random  
   

on 1:INPUT:*: {
  if ($1 == /stop) { 
    remote off 
    halt
  }
  if ($left($1,1) != /) {
    %gloph = $1-
    scramble
    halt
  }
}


alias scramble {
  var %x = $numtok(%gloph,32), %o, %n, %t, %l, %w, %fl, %ll, %gk
  while (%x) {
    %w = $gettok(%gloph,%x,32)
    if ($len(%w) > 3) {
      while ($len(%w)) {
        %t = %t $mid(%w,1,1)
        %w = $right(%w,-1)
      }
      %fl = $gettok(%t,1,32)
      %ll = $gettok(%t,$numtok(%t,32),32)
      %gk = $deltok(%t,1,32)
      %gk = $deltok(%gk,$numtok(%gk,32),32)
      while ($numtok(%gk,32)) {
        %n = $rand(1,$numtok(%gk,32))
        %w = $gettok(%gk,%n,32) $+ %w
        %gk = $deltok(%gk,%n,32)
      }
      %w = %fl $+ %w $+ %ll
      %o = %w %o
      unset %t
      var %t
    } 
    if ($len(%w) <= 3) {
      %o = %w %o
    }
    dec %x
  }
  say %o
}

 

Powered by vBulletin® Version 3.6.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.