Advertisement
Iire

Update

May 16th, 2011
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 3.23 KB | None | 0 0
  1. menu channel {
  2.   Number Game
  3.   .Set Channel:set %ng #$?"Enter Name Of Channel Here, Without The #" | echo $ja $+ 11,1 Channel is set to %ng  $+ $ja
  4.   .Check Set Channel: echo  $ja $+ 8,1 Number Game will be played in %ng  $+ $ja
  5.   .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 }
  6.   .Remove User: write -c highscore.ini | unset  -s %high %ng
  7.   .Open Highscore.ini:run notepad $scriptdirhighscore.ini
  8.   .-
  9.   .Send To $$1:send $$1 $script | /msg $chan 12Move NumberGame.mrc To main mIRC dir | /msg $chan 12then type===> 4 /load -rs NumberGame.mrc
  10.   .Unset Switches: unset -s %ng %rn %gswitch %high %tries %guesses
  11. }
  12. on *:text:!NumberGame*:%ng {
  13.   msg %ng 12For help with triggers type !!help
  14.   if (%high == $null) set %high 50
  15.   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 }
  16.   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 }
  17.   if (%high == 50) { msg %ng 4Low score and it's owner will be shown at the end of this game. }
  18.   else { msg %ng $ja $+ 8,1 $read(highscore.ini) holds Low Score of %high  $+ $ja }
  19. }
  20. on 1:text:!stopgame:%ng: {
  21.   if (%gswitch != on) msg %ng $ja $+ 8,1 There is no game to stop :/  $+ $ja
  22.   if (%rn != $null) .msg %ng $ja $+ 8,1 The game has been stopped. The number was %rn $+ .  $+ $ja
  23.   set %gswitch off | unset %tries | unset %rn | unset %guesses
  24. }
  25. on +1:text:*!guess*:%ng: {
  26.   inc %guesses
  27.   inc %tries
  28.   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 }
  29.   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 }
  30.   if (!$2) { msg %ng 4Oppps You forgot to type a number! | HALT }
  31.   elseif ($2 > 100) { msg %ng 12 $+ $nick $+ , That number is out of range, Please enter a valid number from 1 to 1,00 | halt }
  32.   elseif ($2 < %rn) { msg %ng Sorry $nick $+ , that number is to low try again | HALT }
  33.   elseif ($2 > %rn) {  msg %ng Sorry $nick $+ , that number is to high, try again | HALT }
  34.   elseif ($2 == %rn) { msg %ng $ja $+ 9,1 Congratulations $nick you guessed the number. It was %rn  $+ $ja | set %gswitch off | unset %guesses }
  35.   unset %rn
  36.   msg %ng $ja $+ 9,1 You got the correct answer in %tries tries, $nick  $+ $ja
  37.   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 }
  38.   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 }
  39.   unset %tries  %rn
  40. }
  41. alias ja return 14,5ยซ15,4ยค14,5ยป
  42. on 1:text:!!help:%ng: {
  43.   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
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement