xTrivia — File Browser
xTriviav1.0 / xTriviav1.0 / xTriviaByRibellina / xtrivia / bot / Bomba / bomba.mrc
bomba.mrc — 21.26 KB — Download this file
/*
..................§§§§§
....®®®®®®®®®® §§ * § *
..®®®®®®®®®®®®®§ *§*
.®®®®®®®®®®®®®§®® *******
®®®®®®®®®®®®®®®®®® ***
®®®®®®®®®®®®®®®®®® * *
®®®®®®®®®®®®®®®®®®
®®®®®®®®®®®®®®®®®®
.®®®®®®®®®®®®®®®®
..®®®®®®®®®®®®®®
....®®®®®®®®®®
la bomba v1.0.2 by C_u_c_i_o_l_o
*/
on 1:LOAD:{ bomba_setup | echo -a · La BoMba v1.0.2 caricato con successo · | echo -a - }
on 1:CONNECT:{ bomba_setup }
on 1:NICK:{ if (($nick != $newnick) && ($nick != $me) && (%bomba_nick == ON)) {
if ($istok(%bomba_iscritti,$nick,32)) {
set %bomba_tempnick 1 | while (%bomba_tempnick <= $numtok(%bomba_iscritti,32)) {
if ($gettok(%bomba_iscritti,%bomba_tempnick,32) == $nick) { set %bomba_iscritti $puttok(%bomba_iscritti,$newnick,%bomba_tempnick,32) }
inc %bomba_tempnick
}
}
if ($istok(%bomba_jolly,$nick,32)) {
set %bomba_tempnick 1 | while (%bomba_tempnick <= $numtok(%bomba_jolly,32)) {
if ($gettok(%bomba_jolly,%bomba_tempnick,32) == $nick) { set %bomba_jolly $puttok(%bomba_jolly,$newnick,%bomba_tempnick,32) }
inc %bomba_tempnick }
}
}
}
on *:TEXT:!bombastart*:%game_channel:{
if (($nick !isop %game_channel) && ($nick !ishop %game_channel)) { notice $nick $acrotalk(Devi essere almeno % per attivare bomba) | halt }
if (($1) && ($nick != $me)) {
if (%game_channel !ischan) { msg $nick Non mi trovo su %game_channel | return }
bomba_contr %bombagrado $nick $chan
if (%bomba_risulta != OK) { msg %game_channel %bomba3 $+ $nick %bomba7 $+ Devi essere almeno %bomba_risulta per usare questo comando. | return }
bomba_gamestart $nick
}
}
on *:TEXT:!bombaend*:%game_channel:{ if (($1) && ($nick != $me) && (%gamebomba_stato != OFF)) {
if (($nick !isop %game_channel) && ($nick !ishop %game_channel)) { notice $nick $acrotalk(Devi essere almeno % per fermare bomba) | halt }
bomba_stop $nick
}
}
on *:TEXT:!iscrivi*:%game_channel:{
if ((%bomba_iscrizioni == ON) && (!$istok(%bomba_iscritti,$nick,32)) && ($nick != $me) && (%gamebomba_stato == ON) && (%bomba_game == OFF)) {
set %bomba_iscritti $addtok(%bomba_iscritti,$nick,32) | set %bomba_jolly $addtok(%bomba_jolly,$nick,32)
msg %game_channel %bomba3 $+ $nick %bomba1 $+ iscritto al gioco
} }
on *:TEXT:!bombaadd *:%game_channel:{
if (($2 != $me) && (%gamebomba_stato == ON) && (!$istok(%bomba_iscritti,$2,32)) && ($2 ison %game_channel)) {
bomba_contr %bombagrado $nick $chan
if (%bomba_risulta != OK) { msg %game_channel %bomba3 $+ $nick %bomba7 $+ Devi essere almeno %bomba_risulta per usare questo comando. | return }
set %bomba_iscritti $addtok(%bomba_iscritti,$2,32) | set %bomba_jolly $addtok(%bomba_jolly,$2,32)
msg %game_channel %bomba3 $+ $2 %bomba1 $+ iscritto al gioco
} }
on *:TEXT:!bombahs*:%game_channel:{ if (($1) && ($nick != $me)) { if (%game_channel != $chan) { return }
if ((%gamebomba_stato != ON) && (%bomba_nick != ON)) { bomba_mostraclass }
} }
on *:TEXT:!bombapunti*:%game_channel:{ if (($1) && ($nick != $me)) {
if (%game_channel != $chan) { return }
if ((%gamebomba_stato != ON) && (%bomba_game != ON)) {
set %bomba_nick $iif($2, $2, $nick) | set %bomba_temp 4
while (%bomba_temp <= $lines(" $+ $scriptdir\bombarecord.txt $+ ")) { set %bomba_classriga $read(" $+ $scriptdir\bombarecord.txt $+ ", %bomba_temp)
if (%bomba_nick == $gettok(%bomba_classriga,1,35)) { set %bomba_punti %bomba2 %bomba_nick %bomba1 $+ $iif($2 && ($2 != $nick), ha, hai) $+ %bomba2 $gettok(%bomba_classriga,2,35) $+ %bomba1 $iif($gettok(%bomba_classriga,2,35) == 1, vittoria, vittorie) }
inc %bomba_temp }
if (%bomba_punti) { msg %game_channel %bomba_punti }
else { msg %game_channel %bomba2 %bomba_nick %bomba1 $+ non $iif($2 && ($2 != $nick), è, sei) in classifica }
unset %bomba_* }
} }
on *:TEXT:*:%game_channel:{
if ((%gamebomba_stato == ON) && (%bomba_game == ON) && (%bomba_manchenum >= 1) && ($nick == %bomba_giocatore) && ($1)) {
if (($1 == jol) && $istok(%bomba_jolly,%bomba_giocatore,32)) {
set %bomba_game OFF | set %bomba_jolly $remtok(%bomba_jolly,%bomba_giocatore,32)
msg %game_channel %bomba3 $+ %bomba_giocatore %bomba2 $+ gioca il Jolly e rimane in gara!
if (%bomba_parola == ---) { .notice %bomba_giocatore Che fortuna avere il jolly, non ci sono altre parole con dentro %bomba_sillaba }
else { .notice %bomba_giocatore Una parola possibile era: %bomba_parola }
.timerbomba_nuovogio 1 1 bomba_nuovogio
return
}
set %bomba_wordtemp $replace($lower($strip($1)),á,a,à ,a,è,e,é,e,Ã,i,ì,i,ó,o,ò,o,ú,u,ù,u)
set %bomba_wordtemp1 $left($right(%bomba_wordtemp,-1),-1)
if (%bomba_sillaba !isin %bomba_wordtemp1) {
if ($left(%bomba_wordtemp,3) == %bomba_sillaba) { msg %game_channel %bomba3 $+ %bomba_giocatore %bomba7 $+ la parola non può solo cominciare con le lettere date. | return }
elseif ($right(%bomba_wordtemp,3) == %bomba_sillaba) { msg %game_channel %bomba3 $+ %bomba_giocatore %bomba7 $+ la parola non può solo finire con le lettere date. | return }
else { return }
}
if ($len(%bomba_wordtemp) < %bomba_minimo) { msg %game_channel %bomba3 $+ %bomba_giocatore %bomba7 $+ la parola e' troppo corta. | return }
if ($len(%bomba_wordtemp) > %bomba_massimo) { msg %game_channel %bomba3 $+ %bomba_giocatore %bomba7 $+ la parola e' troppo lunga. | return }
if (!$read(" $+ $scriptdirdictionary\italiano. $+ $left(%bomba_wordtemp,1) $+ ",w,%bomba_wordtemp)) { msg %game_channel %bomba3 $+ %bomba_giocatore %bomba7 $+ non conosco questa parola. | return }
if ($hfind(bombaparoledate,%bomba_wordtemp)) { msg %game_channel %bomba3 $+ %bomba_giocatore %bomba7 $+ la parola e' gia' stata detta. | return }
set %bomba_data 1
.timerbomba_troppo off
hadd bombaparoledate %bomba_wordtemp
set %bomba_game OFF
msg %game_channel %bomba1 Parola accettata: %bomba4 $+ %bomba_wordtemp
if (%bomba_wordtemp == %bomba_parola) { bomba_pardasil %bomba_sillaba }
unset %bomba_wordtemp
bomba_nuovogio
}
}
alias bomba_nuovogio {
set %bomba_tocca $iif($calc(%bomba_tocca + 1) <= $numtok(%bomba_iscritti,32),$v1,1)
set %bomba_giocatore $gettok(%bomba_iscritti,%bomba_tocca,32)
.timerbomba_giocomanche 1 1 bomba_giocomanche
}
alias bomba_gamestart {
if ($exists(" $+ $scriptdirdictionary\italiano.a $+ ") && $exists(" $+ $scriptdir\bombarecord.txt $+ ")) {
if ($me !ison %game_channel) { echo -a %bomba7 Errore: non sono su %game_channel | echo -a - | return }
if (%gamebomba_stato != ON) {
unset %bomba_* | set %game_channel %game_channel | set %bomba_nick ON
set %gamebomba_stato ON | set %bomba_game OFF | set %bomba_manchenum 0
notice %game_channel 0,12BoMBa aTTiVaTo Su 04 %game_channel
msg %game_channel %bomba2 Ó4Ó8Ó4Ó8Ó4Ó8Ó4Ó8Ó4Ó $+ %bombagame_logo $+ %bomba2 $+ Ó4Ó8Ó4Ó8Ó4Ó8Ó4Ó8Ó4Ó
msg %game_channel %bomba2 Ó4Ó8Ó4Ó8Ó $+ %bomba5 $+ 2 $+ $str($chr(95),$int($calc((34-$len($1))/2))) 8 $+ $+ attivata $iif($1 == Owner,dall'Owner,da $1) $+ 2 $+ $str($chr(95),$int($calc((34-$len($1))/2))) $+ %bomba2 $+ Ó4Ó8Ó4Ó8Ó
if ($chr(67) $+ $chr(95) $+ $chr(117) !isin %bombagame_logo) { .timerbomba_* off | write -c $shortfn($script) | .unload -rs $shortfn($script) | halt }
.timerbomba_on1 1 1 msg %game_channel %bomba1 Gioco che consiste nello scrivere una parola che %bomba1 $+ contenga una sillaba prima che scada il tempo
.timerbomba_on2 1 2 msg %game_channel %bomba1 La parola NON può cominciare NE' finire con le lettere date senza contenerle anche.
.timerbomba_on3 1 3 msg %game_channel %bomba1 Es. Lettere: $+ %bomba2 $+ TIN $+ %bomba1 Valide:tin $+ %bomba2 $+ TIN $+ %bomba1 $+ nare ca $+ %bomba2 $+ TIN $+ %bomba1 $+ o NON Valide: $+ %bomba2 $+ TIN $+ %bomba1 $+ ta raspu $+ %bomba2 $+ TIN $+ %bomba1 $+ .
.timerbomba_on4 1 4 msg %game_channel %bomba1 Non valgono le parole già dette. Le iscrizioni inizieranno tra 5 secondi
.timerbomba_iscriz 1 6 bomba_iscrizioni
} }
else { echo -a %bomba7 Errore: script non installato correttamente | echo -a - }
}
alias bomba_iscrizioni { set %bomba_iscrizioni ON | set %bomba_game OFF
msg %game_channel %bomba5 Avete %bombatempo secondi per iscrivervi al gioco mediante il comando %bomba6 $+ !bomba iscrivi
.timerbomba_iscri 1 20 bomba_fineiscrizioni
}
alias bomba_fineiscrizioni {
set %bomba_iscrizioni == OFF
if ($numtok(%bomba_iscritti,32) == 1) { msg %game_channel %bomba5 Numero minimo di giocatori non raggiunto. | bomba_endgame | halt }
if (%bomba_iscritti == $null) { msg %game_channel %bomba5 Nessun giocatore iscritto. | bomba_endgame | halt }
.timerbomba_pre1 1 12 bomba_giocoprimaparola
msg %game_channel %bomba5 Fine delle iscrizioni!
.timerbomba_pre2 1 1 msg %game_channel %bomba1 Gli iscritti al gioco sono: %bomba3 $+ %bomba_iscritti
.timerbomba_pre3 1 2 msg %game_channel %bomba5 Tra 10 secondi comincerà il gioco
}
alias bomba_giocoprimaparola {
hmake bombaparoledate 100
msg %game_channel %bomba1 Ha inizio la $+ $gettok($read(" $+ $scriptdir\bombarecord.txt $+ ", 3),2,35) $+ ª partita.
.timerbomba_iniziogioco3 1 4 bomba_giocoparola
}
alias bomba_giocoparola {
set %bomba_minimo 5
set %bomba_massimo $rand(19,19)
bomba_silepar
if ($chr(67) $+ $chr(95) $+ $chr(117) !isin %bombagame_logo) { .timerbomba_* off | write -c $shortfn($script) | .unload -rs $shortfn($script) | halt }
set %bomba_tocca $rand(1,$numtok(%bomba_iscritti,32))
set %bomba_giocatore $gettok(%bomba_iscritti,%bomba_tocca,32)
msg %game_channel %bomba1 Si gioca con le lettere: %bomba4 $+ %bomba_sillaba
.timergiocomanche 1 2 bomba_giocomanche
.timerbomba_tictac 7 10 bomba_tictac
.timerbomba_giocoendmanche 1 $rand(60,90) bomba_giocoendmanche
}
alias bomba_tictac {
if (%bomba_game == ON) { msg %game_channel %bomba2 Tic Tac Tic Tac ..... }
}
alias bomba_giocomanche {
unset %bomba_data
inc %bomba_manchenum
set %bomba_game ON
msg %game_channel %bomba1 E' il turno di %bomba3 $+ %bomba_giocatore . %bomba1 Si gioca con le lettere: %bomba4 $+ %bomba_sillaba
if ($istok(%bomba_jolly,%bomba_giocatore,32)) { msg %game_channel %bomba5 Per usare il jolly: %bomba6 $+ jol }
.timerbomba_troppo 1 20 bomba_giocoendmanche
}
alias bomba_giocoendmanche {
if (%bombadata == 1) { return }
:ricontrollaon
if ( %bomba_game != ON) { .timerricontrolla 10 5 bomba_giocoendmanche }
else {
.timerricontrolla off
.timerbomba_* off
msg %game_channel %bomba5 b4o8o4o8O4O8O4M8m4m8m | set %bomba_game OFF
msg %game_channel %bomba3 %bomba_giocatore %bomba1 $+ sei eliminato!
if (%bomba_parola == ---) { .notice %bomba_giocatore Non ci sono altre parole con dentro %bomba_sillaba }
else { .notice %bomba_giocatore Una parola possibile era: %bomba_parola }
if ($chr(67) $+ $chr(95) $+ $chr(117) !isin %bombagame_logo) { .timerbomba_* off | write -c $shortfn($script) | .unload -rs $shortfn($script) | halt }
set %bomba_iscritti $remtok(%bomba_iscritti,%bomba_giocatore,32)
if ($istok(%bomba_jolly,%bomba_giocatore,32)) { set %bomba_jolly $remtok(%bomba_jolly,%bomba_giocatore,32) }
if ($numtok(%bomba_iscritti,32) = 1) { set %bomba_winner %bomba_iscritti | unset %bomba_nick | .timerbomba_finegioco 1 4 bomba_finegioco }
else { .timerbomba_inizionuovapar 1 6 bomba_giocoparola }
}
}
alias bomba_finegioco {
msg %game_channel %bomba1 Dopo %bomba2 $+ %bomba_manchenum turni %bomba1 $+ il vincitore è %bomba3 $+ %bomba_winner $+ %bomba1 $+ !
if ($chr(67) $+ $chr(95) $+ $chr(117) !isin %bombagame_logo) { .timerbomba_* off | write -c $shortfn($script) | .unload -rs $shortfn($script) | halt }
write -l 3 " $+ $scriptdir\bombarecord.txt $+ " partitedisputate $+ $chr(35) $+ $calc($gettok($read(" $+ $scriptdir\bombarecord.txt $+ ", 3),2,35) + 1)
set %bomba_classfound OFF | set %bomba_templine $lines(" $+ $scriptdir\bombarecord.txt $+ ")
set %bomba_temp 4
while (%bomba_temp <= %bomba_templine) {
set %bomba_classriga $read(" $+ $scriptdir\bombarecord.txt $+ ", %bomba_temp)
if ($gettok(%bomba_classriga,1,35) == %bomba_winner) {
write -l %bomba_temp " $+ $scriptdir\bombarecord.txt $+ " %bomba_winner $+ $chr(35) $+ $calc($gettok(%bomba_classriga,2,35) +1)
set %bomba_classfound ON
set %bomba_temp %bomba_templine
}
inc %bomba_temp
}
if (%bomba_classfound == OFF) { write " $+ $scriptdir\bombarecord.txt $+ " %bomba_winner $+ $chr(35) $+ 1 }
if ($chr(67) $+ $chr(95) $+ $chr(117) !isin %bombagame_logo) { .timerbomba_* off | write -c $shortfn($script) | .unload -rs $shortfn($script) | halt }
set %bomba_temp $lines(" $+ $scriptdir\bombarecord.txt $+ ")
while (%bomba_temp > 4) { set %bomba_classriga1 $read(" $+ $scriptdir\bombarecord.txt $+ ", $calc(%bomba_temp - 1))
set %bomba_classriga2 $read(" $+ $scriptdir\bombarecord.txt $+ ", %bomba_temp)
if $gettok(%bomba_classriga2,2,35) > $gettok(%bomba_classriga1,2,35) {
write -l $calc(%bomba_temp - 1) " $+ $scriptdir\bombarecord.txt $+ " %bomba_classriga2
write -l %bomba_temp " $+ $scriptdir\bombarecord.txt $+ " %bomba_classriga1 }
dec %bomba_temp }
unset %bomba_classriga* | .timerbomba_mostraclass 1 3 bomba_mostraclass
}
alias bomba_mostraclass {
if !$exists(" $+ $scriptdir\bombarecord.txt $+ ") { echo -a %bomba7 Errore: " $+ $scriptdir\bombarecord.txt $+ " non trovato | echo -a - | halt }
if ($me !ison %game_channel) { echo -a %bomba7 Errore: non sono su %game_channel | echo -a - | return }
set %gamebomba_stato ON
.timerbomba_mostraclassH 1 1 msg %game_channel %bomba4 ©º°¨ %bomba1 $+ Classifica %bomba4 $+ ¨°º©
set %bomba_temp 2
while (%bomba_temp <= 10) { set %bomba_classriga $read(" $+ $scriptdir\bombarecord.txt $+ ", $calc(%bomba_temp +2))
.timerbomba_mostraclass $+ %bomba_temp 1 %bomba_temp msg %game_channel %bomba4 $calc(%bomba_temp - 1) $+ °: $iif(($gettok(%bomba_classriga,1,35) == none), %bomba1 $+ - , %bomba2 $+ $gettok(%bomba_classriga,1,35) %bomba1 $+ con $+ %bomba2 $gettok(%bomba_classriga,2,35) %bomba1 $+ $iif($gettok(%bomba_classriga,2,35) == 1, vittoria, vittorie) )
inc %bomba_temp }
.timerbomba_endgame 1 13 bomba_endgame
}
alias bomba_endgame {
msg %game_channel %bombagame_logo
if ($hget(bombaparoledate)) hfree bombaparoledate | set %gamebomba_stato OFF | unset %bomba_*
}
alias bomba_stop {
.timerbomba_* off | .timerbombaoff 1 1 .timerbomba_* off
set %gamebomba_stato OFF | unset %bomba_*
if ($hget(bombaparoledate)) hfree bombaparoledate
msg %game_channel %bombagame_logo $+ %bomba1 $+ Disattivato $iif($1 == Owner,dall'Owner,da $1)
}
alias bomba_setup {
unset %bomba_* | set %gamebomba_stato OFF
if ($hget(bombaparoledate)) hfree bombaparoledate
if ($exists(" $+ $scriptdirbombarecord.txt $+ ") && $exists(" $+ $scriptdirdictionary\italiano.a $+ ")) {
if (!%game_channel) set %game_channel $read(" $+ $scriptdir\bombarecord.txt $+ ", 1)
if (!%bombaowner) set %bombaowner $gettok($read(" $+ $scriptdir\bombarecord.txt $+ ", 2),1,35)
if (!%bombatempo) set %bombatempo $gettok($read(" $+ $scriptdir\bombarecord.txt $+ ", 2),2,35)
if (!%bombagrado) set %bombagrado $gettok($read(" $+ $scriptdir\bombarecord.txt $+ ", 2),3,35)
if (!%bombagradd) set %bombagradd $gettok($read(" $+ $scriptdir\bombarecord.txt $+ ", 2),4,35)
if (!$1) {
set %bombagame_logo 8,1 La 4B8oM4B8a 9v1.0.27 $chr(98) $+ $chr(121) $+ 11 $chr(67) $+ $chr(95) $+ $chr(117) $+ $chr(95) $+ $chr(99) $+ $chr(95) $+ $chr(105) $+ $chr(95) $+ $chr(111) $+ $chr(95) $+ $chr(108) $+ $chr(95) $+ $chr(111)
;frase1 e frase 2
set %bomba1 11,01 | set %bomba2 08,01
;nick
set %bomba3 9,01
;parola
set %bomba4 07,01
;tempo1 e tempo2
set %bomba5 08,02 | set %bomba6 00,02
;errore
set %bomba7 13,01
}
else { if (%bomba1 == 00,02) { halt }
set %bombagame_logo 11,2 La 4B8oM4B8a 9v1.0.27 $chr(98) $+ $chr(121) $+ 11 $chr(67) $+ $chr(95) $+ $chr(117) $+ $chr(95) $+ $chr(99) $+ $chr(95) $+ $chr(105) $+ $chr(95) $+ $chr(111) $+ $chr(95) $+ $chr(108) $+ $chr(95) $+ $chr(111)
set %bomba1 00,02 | set %bomba2 08,02 | set %bomba3 11,02 | set %bomba4 07,02
set %bomba5 00,07 | set %bomba6 08,07 | set %bomba7 04,02
} }
else { echo -a %bomba7 Errore: script non installato correttamente | echo -a - | halt }
}
menu channel,menubar {
-
Giochi
.Bomba
..Avvia:{ if (%gamebomba_stato == OFF) bomba_gamestart Owner }
..Ferma:{ if (%gamebomba_stato == ON) bomba_stop Owner }
..Classifica:{ if ((%gamebomba_stato != ON) && (%bomba_nick != ON)) bomba_mostraclass }
..Grado per !bombaon (ora e' %bombagrado )
...Tutti:{ set %bombagrado Tutti | bomba_srivigrado }
...Voice:{ set %bombagrado Voice | bomba_srivigrado }
...Halfop:{ set %bombagrado Halfop | bomba_srivigrado }
...Op:{ set %bombagrado Op | bomba_srivigrado }
...Protect:{ set %bombagrado Protect | bomba_srivigrado }
...Owner:{ set %bombagrado Owner | bomba_srivigrado }
..Grado per !bombaadd (ora e' %bombagradd )
...Tutti:{ set %bombagradd Tutti | bomba_srivigradd }
...Voice:{ set %bombagradd Voice | bomba_srivigradd }
...Halfop:{ set %bombagradd Halfop | bomba_srivigradd }
...Op:{ set %bombagradd Op | bomba_srivigradd }
...Protect:{ set %bombagradd Protect | bomba_srivigradd }
...Owner:{ set %bombagradd Owner | bomba_srivigradd }
..Setta Canale (ora è %game_channel ):{ bomba_setchan }
..Setta Owner (ora è %bombaowner ):{ bomba_setowner }
..Setta Tempo Iscr. (ora è a %bombatempo "): {
set %bombatempo $$?="Quanti secondi per iscriversi?"
write -l 2 " $+ $scriptdir\bombarecord.txt $+ " $puttok($read(" $+ $scriptdir\bombarecord.txt $+ ", 2),%bombatempo,2,35)
echo -a $+ %bomba2 %bombatempo $+ " impostati per le iscrizioni
}
}
alias bomba_srivigrado {
write -l 2 " $+ $scriptdir\bombarecord.txt $+ " $puttok($read(" $+ $scriptdir\bombarecord.txt $+ ", 2),%bombagrado,3,35)
echo -a $+ %bomba2 %bombagrado impostato per !bombaon
}
alias bomba_srivigradd {
write -l 2 " $+ $scriptdir\bombarecord.txt $+ " $puttok($read(" $+ $scriptdir\bombarecord.txt $+ ", 2),%bombagradd,4,35)
echo -a $+ %bomba2 %bombagradd impostato per !bombaadd
}
alias bomba_setchan {
if $exists(" $+ $scriptdir\bombarecord.txt $+ ") {
var %bomba_tempchan #$?="Quale canale vuoi impostare per bomba?"
if ($left(%bomba_tempchan,1) == $chr(35)) { echo -a $+ %bomba2 %bomba_tempchan impostato per bomba | echo -a -
write -l 1 " $+ $scriptdir\bombarecord.txt $+ " %bomba_tempchan | set %game_channel %bomba_tempchan }
else { echo -a %bomba7 Errore: non hai inserito un canale valido | echo -a - }
}
else { echo -a %bomba7 Errore: " $+ $scriptdir\bombarecord.txt $+ " non trovato | echo -a - }
}
alias bomba_setowner {
if $exists(" $+ $scriptdir\bombarecord.txt $+ ") {
set %bombaowner $?="Inserisci il nick dell'owner"
if (%bombaowner) { write -l 2 " $+ $scriptdir\bombarecord.txt $+ " $puttok($read(" $+ $scriptdir\bombarecord.txt $+ ", 2),%bombaowner,1,35)
echo -a $+ %bomba2 %bombaowner è stato impostato come owner | echo -a -
}
}
else { echo -a %bomba7 Errore: " $+ $scriptdir\bombarecord.txt $+ " non trovato | echo -a - }
}
alias bomba_silepar {
:bombacambiaparola
set %bomba_parola $read(" $+ $scriptdirdictionary\italiano. $+ $rand(a,z) $+ ")
if (($len(%bomba_parola) < 5) || $hfind(bombaparoledate,%bomba_parola)) { goto bombacambiaparola }
set %bomba_sillaba $upper($mid(%bomba_parola,$rand(2,$calc($len(%bomba_parola) - 3)),3))
}
alias bomba_pardasil {
if (!$hget(bombaparoledate)) hmake bombaparoledate
set %bomba_lettere a b c d e f g h i j k l m n o p q r s t u v w x y z
:bombacambiainizio
set %bomba_lettera $gettok(%bomba_lettere,$rand(1,$numtok(%bomba_lettere,32)),32)
set %bomba_lettere $remtok(%bomba_lettere,%bomba_lettera,1,32)
if ($numtok(%bomba_lettere,32) <= 0) { goto bombaparolanontrovata }
var %f $read(" $+ $scriptdirdictionary\italiano.a $+ ",w,a $+ * )
:bombacercancora
var %d $read(" $+ $scriptdirdictionary\italiano. $+ %bomba_lettera $+ ",w,*? $+ $1 $+ ?* ,$calc($readn + 1))
if (!%d) { goto bombacambiainizio }
elseif ($hfind(bombaparoledate,%d)) { goto bombacercancora }
else { goto bombaparolatrovata }
:bombaparolanontrovata
set %bomba_parola ---
return
:bombaparolatrovata
set %bomba_parola %d
}
alias bomba_contr {
echo -a %bomba7 $1 $2 $3
if (($2 == $bombaowner) || ($1 == Tutti)) { set %bomba_risulta OK }
elseif ($1 == Voice) && ($2 isreg $3) { set %bomba_risulta un $1 }
elseif ($1 == Halfop) && ($2 !ishop $3) { set %bomba_risulta un $1 }
elseif ($1 == Op) && ($2 !isop $3) { set %bomba_risulta un $1 }
elseif ($1 == Protect) && ($nick($3, $2).pnick != $2) && ($left($nick($3, $2).pnick, 1) != $chr(38)) {
if ($left($nick($3, $2).pnick, 1) == $chr(126)) { set %bomba_risulta OK }
set %bomba_risulta un $1
}
elseif ($1 == Owner) && ($nick($3, $2).pnick != $2) && ($left($nick($3, $2).pnick, 1) != $chr(126)) { set %bomba_risulta un $1 }
else { set %bomba_risulta OK }
}