on *:INPUT:#: {
if ($regex($1-,/^(?:de)?(h?op|admin|owner|voice) (\S+)|^(?:un)?(ban) (\S+)/i)) && ($pos($prefix,$left($nick(#,$me).pnick,1)) < 5) {
var -s %+- $iif($regex(+-,$1,/^(?:de|un)/i),-,+), %mode $iif($regml(1) == owner,q,$left($regml(1),1))
mode # $+(%+-,%mode) $regml(2)
}
elseif ($regex($1-,/^kick (\S+) (.*)/i)) kick # $regml(1) $regml(2)
}
menu channel {
Number Game
.Set Channel:set %ng #$?"Enter Name Of Channel Here, Without The #" | echo $ja $+ 11,1 Channel is set to %ng $+ $ja
.Check Set Channel: echo $ja $+ 8,1 Number Game will be played in %ng $+ $ja
.Check Low Score: if (%high == 50) echo 12 There is no Low Score yet | else echo $ja $+ 8,1 $read(highscore.ini) With %high Guesses $+ $ja | { halt }
.Remove User: write -c highscore.ini | unset -s %high %ng
.Open Highscore.ini:run notepad $scriptdirhighscore.ini
.-
.Send To $$1:send $$1 $script | /msg $chan 12Move NumberGame.mrc To main mIRC dir | /msg $chan 12then type===> 4 /load -rs NumberGame.mrc
.Unset Switches: unset -s %ng %rn %gswitch %high %tries %guesses
}
on *:text:!NumberGame*:%ng {
msg %ng 12For help with triggers type !!help
if (%high == $null) set %high 50
if (%gswitch == on) { msg %ng $ja $+ 8,1 There is a game in progress, Please finish this game first. Type !guess and your number or you can type !stopgame then type !numbergame $+ $ja }
else set %rn $rand(0,100) | { set %gswitch on | msg %ng 4 A new game has started. Type !guess and a number from 1 to 1,00 | echo 3 -a %rn }
if (%high == 50) { msg %ng 4Low score and it's owner will be shown at the end of this game. }
else { msg %ng $ja $+ 8,1 $read(highscore.ini) holds Low Score of %high $+ $ja }
}
on 1:text:!stopgame:%ng: {
if (%gswitch != on) msg %ng $ja $+ 8,1 There is no game to stop :/ $+ $ja
if (%rn != $null) .msg %ng $ja $+ 8,1 The game has been stopped. The number was %rn $+ . $+ $ja
set %gswitch off | unset %tries | unset %rn | unset %guesses
}
on +1:text:*!guess*:%ng: {
inc %guesses
inc %tries
if (%gswitch != on) { msg %ng $ja $+ 9,1 There is no game in progress. To start a new game type !numbergame $+ $ja | unset %tries | unset %guesses | halt }
if (%guesses >= %high) { msg %ng $ja $+ 8,1 Sorry you did not beat $read(highscore.ini) $+ 's low score of %high $+ $ja | set %gswitch off | unset %tries | unset %rn | unset %guesses | halt }
if (!$2) { msg %ng 4Oppps You forgot to type a number! | HALT }
elseif ($2 > 100) { msg %ng 12 $+ $nick $+ , That number is out of range, Please enter a valid number from 1 to 1,00 | halt }
elseif ($2 < %rn) { msg %ng Sorry $nick $+ , that number is to low try again | HALT }
elseif ($2 > %rn) { msg %ng Sorry $nick $+ , that number is to high, try again | HALT }
elseif ($2 == %rn) { msg %ng $ja $+ 9,1 Congratulations $nick you guessed the number. It was %rn $+ $ja | set %gswitch off | unset %guesses }
unset %rn
msg %ng $ja $+ 9,1 You got the correct answer in %tries tries, $nick $+ $ja
if (%high == 50) { msg %ng 4Creating highscore.ini file and writing 1st low score nick. | write -c highscore.ini $nick | set %high %tries | .timer1 1 4 msg %ng 12All Finished $nick }
elseif (%tries < %high) { msg %ng $ja $+ 8,1 $read(highscore.ini) Held old record with %high tries $+ $ja | write -c highscore.ini $nick | set %high %tries }
unset %tries %rn
}
alias ja return 14,5«15,4¤14,5»
on 1:text:!!help:%ng: {
notice $nick 1. To start the game type !numbergame | notice $nick 2. To guess the number type !guess your number here | notice $nick 3. To stop the game type !stopgame
}
on *:Connect: {
/msg NickServ IDENTIFY shibby
}
on *:Text:!identify:#: {
/msg NickServ IDENTIFY shibby
}