xTrivia — File Browser

xTriviav1.0 / xTriviav1.0 / xTriviaByRibellina / xtrivia / bot / caos.mrc

caos.mrc — 8.93 KB — Download this file

; mIRCAoS®, Versione 2.00
; 16 Aprile 2003 - Questa è la nuova versione in italiano di Caos per mIRC - by |K0rS4r0|
; -------------------------------------------------------------------------------------------
; Installazione e Funzionamento: 
; - Descritti nel file leggimi.txt
;--------------------------------------------------------------------------------------------
; Aggiunti:
; - Colori
; - Comandi (!comandicaos)
; - Timer
; - Risoluzione bugs
;--------------------------------------------------------------------------------------------
; Mi trovi sul chan #nonsoloquiz
; #nonsoloquiz: Quiz, Scarabeo, Bersaglio, Acro, Caos, Anagrammi e tanti amici ti aspettano!
; Http://caos.rr.nu
; Http://digilander.iol.it/nonsoloquiz
; |K0rS4r0|
;-------------------------------------------------------------------------------------------
; Se vuoi aggiungere nuove categorie inviale all'indirizzo web http://caos.rr.nu
; Se durante il gioco appare la categoria da te formulata, sarà indicato che sei stato tu a 
; inviarla.
;--------------------------------------------------------------------------------------------
; Chaos rip-off done by Despayre (and stasia) and is an official 4,1Despayrewayre® product. 
; Version 1.03
; Chaos is copyright (1997) by Kenrick Mock.
; Game  elements and previous concepts by Michelle Hoyle.
;--------------------------------------------------------------------------------------------
on 1:TEXT:!caosoff:%game_channel:{ /unset %game_in_progress }
on 1:TEXT:!spcaos:%game_channel:{msg %game_channel 0,2Regole 4CAOS0. Scopo del gioco: trovare il + alto numero di parole della categoria indicata. All'avvio iscriversi in una squadra. Le risposte vanno scritte 4SUL CANALE0 e 04UNA PER RIGA0. Se la risposta corrisponde a una di quelle previste e se sarai il + veloce a scriverla, ti verrà assegnato il punto. Ogni partita dura4 50 round. Se cambi nick durante il gioco non terrà più conto delle tue risposte.}
on 1:TEXT:!caostart:%game_channel:{
  if %game_in_progress == $null { set %game_in_progress 9,2mIR4C6A7o11S }
  else { notice $nick Spiacente $nick, devi attendere. C'è già una partita di %game_in_progress in corso. | halt }
  if $nick(0,$chan) < 3 {
    msg %game_channel 4,2Spiacente $nick. 0E' necessario che tu abbia almeno un avversario per giocare a Caos 
    unset %game_in_progress 
    halt
  }
  unset %chaos*  
  chaoscount
  set %chaosteam1score 0
  set %chaosteam2score 0
  .enable #chaosjoin
  .enable #chaosteams
  .disable #chanprot
  msg %game_channel 9,2mIR4C6A7o11S 0,2Avviato0! 0Per giocare devi iscriverti in una squadra digitando sul chan, entro 30 secondi, 4team1 00o 4team20
  msg %game_channel 0,2Il round04 10 partirà tra 30 secondi...
  set %chaosround 0
  .timer 1 35 .ctcp $!me start_chaos
}

#chaosjoin off
on 1:JOIN:#:{
  if $nick(0,$chan) < 2 && %game_in_progress == 9,2mIR4C6A7o11S00 { disable #chaosjoin | unset %game_in_progress }
  if $nick(0,$chan) > 2  { .notice $nick C'è una partita di 9,2mIR4C6A7o11S00 in corso,  Per giocare devi iscriverti in una squadra digitando sul chan 9team100 o 9team200 }
}
#chaosjoin end

#chaosteams off
on 1:TEXT:team1:*:{
  if $nick !isin %chaosteam2 && $nick !isin %chaosteam1 {
    set %chaosteam1 $nick %chaosteam1 
    .msg %game_channel 4,02 $nick 11Sei iscritto nel 8Team 1
  }
}
on 1:TEXT:team2:*:{
  if $nick !isin %chaosteam2 && $nick !isin %chaosteam1 { 
    set %chaosteam2 $nick %chaosteam2 
    .msg %game_channel 4,02 $nick 11Sei iscritto nel 8Team 2
  }
}

CTCP 1:start_chaos:{
  if %chaosteam1 == $null { msg %game_channel 4,2ERRORE:00 Nessun iscritto nel team 1. }
  if %chaosteam2 == $null { msg %game_channel 4,2ERRORE:00 Nessun iscritto nel team 2. }
  if %chaosteam1 == $null || %chaosteam2 == $null { 
    unset %game_in_progress
    .disable #chaosjoin
    .disable #chaosteams
    .disable #chaosanswers
    .enable #floodprot
    halt
  }
  unset %chaos_correct_answers
  unset %chaos_current_round_winners  
  inc %chaosround
  :round1to5
  set %chaos_current  $r(1,%chaos_categories)
  if $exists($mircdirplayed.cat) == $true && $lines($mircdirplayed.cat) == %chaos_categories { remove $mircdirplayed.cat }
  if $exists($mircdirplayed.cat) == $true { set %chaos_cat_check $lines($mircdirplayed.cat) }
  else { set %chaos_cat_check 0 }
  :fileloop
  if %chaos_cat_check < 1 { goto fileend }
  set %chaos_fileline $read -l $+ %chaos_cat_check $mircdirplayed.cat
  if %chaos_current == %chaos_fileline { goto round1to5 }
  dec %chaos_cat_check
  goto fileloop
  :fileend
  write $mircdirplayed.cat %chaos_current
  msg %game_channel 0,13Round %chaosround  [ 8,12 $read -l1 [ $mircdir [ $+ [ %chaos_current ] ] ] ]
  if %chaosround == 5 { msg %game_channel 4,2Ultimo Round!00 Le risposte valgono 3 punti! }
  echo $comchan($me,1) Current File In Use:2 $scriptdir $+ %chaos_current
  .enable #chaosanswers
  .timer 1 35 msg %game_channel 0,5Attenzione!00 Mancano 10 secondi alla fine del tempo
  .timer 1 45 .disable #chaosanswers
  .timer 1 46 chaos_success
  chaosanswers
  halt
}
on 1:TEXT:!comandicaos:#: { msg %game_channel 9,2Comandi Caos: 4!teams 00(per conoscere le squadre) 4!spiegacaos 00(per vedere le regole del gioco) }

on 1:TEXT:!spiegacaos:#: { msg %game_channel 00,2Regole 4,2CAOS00. 00Scopo del gioco: trovare il + alto numero di parole della categoria indicata. All'avvio iscriversi in una squadra. Le risposte vanno scritte 4SUL CANALE00 e 4UNA PER RIGA00. Se la risposta corrisponde a una di quelle previste e se sarai il + veloce a scriverla, ti verrà assegnato il punto. Ogni partita dura04 500 round. Se cambi nick durante il gioco non terrà più conto delle tue risposte.  }

on 1:TEXT:!teams:#: { msg %game_channel 0,03Composizione squadre09: 1Team100: %chaosteam1   1Team200: %chaosteam2  }
#chaosteams end

#chaosanswers off
on 1:TEXT:*:%game_channel:{
  if $nick isin %chaosteam1 || $nick isin %chaosteam2 {
    if " $+ $1- $+ " isin %chaos_correct_answers && $1-  !isin %chaos_current_round_winners {
      set %chaos_current_round_winners $nick $+ , $+ $1- $+ , $+  %chaos_current_round_winners
      set %chaostempanswer  " $+ $1- $+ "
      set %chaos_correct_answers $remove(%chaos_correct_answers,%chaostempanswer)
      if $nick isin %chaosteam1 {
        inc %chaosteam1score 2 
        if %chaosround == 5 { inc %chaosteam1score 1 }
      }
      elseif $nick isin %chaosteam2 {
        inc %chaosteam2score 2 
        if %chaosround == 5 { inc %chaosteam2score 1 }
      }
    }
  }
}

#chaosanswers end

alias chaoscount {
  set %chaos_categories 1
  :loop
  set %chaos_file $scriptdir $+ %chaos_categories
  if $exists(%chaos_file) == $true { 
    inc %chaos_categories
    goto loop
  }
  if $exists(%chaos_file) == $false {
    dec %chaos_categories
  }
}

alias chaosanswers {
  set %chaos_counter 1
  :loop
  if %chaos_counter > $calc($lines(%chaos_current) -1) { goto end }
  inc %chaos_counter
  set %chaos_temp3 $read -l $+ %chaos_counter %chaos_current 
  set %chaos_correct_answers " $+ %chaos_temp3 $+ " %chaos_correct_answers
  goto loop
  :end
}

alias chaos_success {
  msg %game_channel 0,3Risposte esatte:
  set %chaos_temp2 1
  :loop
  if $gettok(%chaos_current_round_winners,%chaos_temp2,44) == $null { goto end }
  msg %game_channel 4,2 $+ $gettok(%chaos_current_round_winners,$calc(%chaos_temp2 + 1),44) 00,2di00:4,2 $gettok(%chaos_current_round_winners,%chaos_temp2,44)
  inc %chaos_temp2 2
  goto loop  
  :end
  msg %game_channel 8,2Risposte NON trovate:00 %chaos_correct_answers
  msg %game_channel 0,3Punteggi:
  msg %game_channel 8,12Team1:04 %chaosteam1score 00- 8,12Team2:04 %chaosteam2score 
  if %chaosround < 5 {
    msg %game_channel 0,5Fine del Round08 %chaosround $+  0- 0,5Prossimo round tra 20 secondi 
    .timer 1 20 .ctcp $!me start_chaos 
  }
  if %chaosround >= 5 {
    msg %game_channel 0,2Gioco Terminato.0 Questa partita di 9mIR4C6A7o11S 0è finita! Vince la partita....
    if %chaosteam1score == %chaosteam2score {
      msg %game_channel 4,2Tutti!! 0C'è un pareggio!00 Bravissimi tutti quanti! 4:D)
      msg %game_channel 9,2Giocatori del Team 1:04 %chaosteam1
      msg %game_channel 9,2Giocatori del Team 2:04 %chaosteam2
    }
    if %chaosteam1score > %chaosteam2score {
      msg %game_channel 4,2Team 100!!! 
      msg %game_channel $read  $mircdirCaoswin.txt
    }
    if %chaosteam1score < %chaosteam2score { 
      msg %game_channel 4,2Team 200!!! 
      msg %game_channel $read  $mircdirCaoswin.txt
    }
    msg %game_channel 9,2 I giocatori del Team 1 erano:04 %chaosteam1
    msg %game_channel 9,2 I giocatori del Team 2 erano:04 %chaosteam2
    .timer 1 5 msg %game_channel 9,2mIR4C6A7o11S00 2.0 by |K0rS4r0|- Game Over.
    .disable #chaosjoin  
    .disable #chaosteams
    .enable #chanprot
    .timer 1 6  unset %game_in_progress
  }
}