Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on *:TEXT:*:*: {
- if ( $1 == sorteio ) {
- if ( $2 isnum ) {
- var %x 1
- while ( %x <= $2 ) {
- set %Sorteio %Sorteio %x
- inc %x
- }
- msg $active Foram criadas $2 equipes
- haltdef
- }
- if ( $2 == apagar ) {
- unset %sorteio*
- msg $active Sorteio existente apagado
- }
- if ( !$2 ) {
- if ( %sorteio ) {
- set %SorteioEquipa1 $gettok( %Sorteio, $rand( 1, $gettok( %Sorteio, 0, 32)), 32)
- set %Sorteio $remtok( %Sorteio, %SorteioEquipa1, 1, 32)
- set %SorteioEquipa2 $gettok( %Sorteio, $rand( 1, $gettok( %Sorteio, 0, 32)), 32)
- set %Sorteio $remtok( %Sorteio, %SorteioEquipa2, 1, 32)
- msg $active Equipa %SorteioEquipe1 VS Equipa %SorteioEquipa2
- msg $active Restam de momento $gettok( %Sorteio, 0, 32) equipas
- unset %SorteioEqui*
- haltdef
- }
- else {
- msg $active Necessita correr o comando 4sorteio número para defenir o número de equipas
- haltdef
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment