Guest User

Untitled

a guest
Jul 13th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 1.02 KB | None | 0 0
  1. on *:TEXT:*:*: {
  2.   if ( $1 == sorteio ) {
  3.     if ( $2 isnum ) {
  4.       var %x 1
  5.       while ( %x <= $2 ) {
  6.         set %Sorteio %Sorteio %x
  7.         inc %x
  8.       }
  9.       msg $active Foram criadas $2 equipes
  10.       haltdef
  11.     }
  12.     if ( $2 == apagar ) {
  13.       unset %sorteio*
  14.       msg $active Sorteio existente apagado
  15.     }
  16.     if ( !$2 ) {
  17.       if ( %sorteio ) {
  18.         set %SorteioEquipa1 $gettok( %Sorteio, $rand( 1, $gettok( %Sorteio, 0, 32)), 32)
  19.         set %Sorteio $remtok( %Sorteio, %SorteioEquipa1, 1, 32)
  20.         set %SorteioEquipa2 $gettok( %Sorteio, $rand( 1, $gettok( %Sorteio, 0, 32)), 32)
  21.         set %Sorteio $remtok( %Sorteio, %SorteioEquipa2, 1, 32)
  22.         msg $active Equipa %SorteioEquipe1 VS Equipa %SorteioEquipa2
  23.         msg $active Restam de momento $gettok( %Sorteio, 0, 32) equipas
  24.         unset %SorteioEqui*
  25.         haltdef
  26.       }
  27.       else {
  28.         msg $active Necessita correr o comando 4sorteio número para defenir o número de equipas
  29.         haltdef
  30.       }
  31.     }
  32.   }
  33. }
Add Comment
Please, Sign In to add comment