Top

guessing game


mIRC Code
+ 2 likes
Please Register to submit score.
Bookmark and Share
Average Score  4.0 (of 2 scores)
Date Added  Sep 01, 2008
Last Updated  Sep 01, 2008
Tags  guess 

Description

just a basic guessing game. leech/rip w/e

rate & hate

commands:
!number
!guess

Grab the Code

ON *:TEXT:!number:#:{ inc %scriptcount | 
  set %number [ $+ [ $chan ] ] $rand(1,999) 
  msg $chan I Have Choosen A Random Number Between: 1 And 999 To Guess What It Is Type: !guess <number> 
} 
ON *:TEXT:!guess*:#:{ inc %scriptcount | 
  if ($2 == %number [ $+ [ $chan ] ]) { msg # WOW nice job!!$nick The Number Was $2 | unset %number [ $+ [ $chan ] ] }  
  elseif ($2 < %number [ $+ [ $chan ] ]) { msg # It's Higher Than  $2 } 
  elseif ($2 > %number [ $+ [ $chan ] ]) { msg # It's Lower Than $2 } 
  else { notice Script Error! } 
} 
 

Comments

  (12)  RSS
^Alexis^
Comments: 60
 
mIRC Snippet:  guessing game
Posted on Sep 1, 2008 1:06 pm
Oh btw, it came with color. and forgot to add it sorry! x.x
Firstmate
Comments: 125
 
mIRC Snippet:  guessing game
Posted on Sep 1, 2008 2:56 pm
Add a way to check if a game is already going, that way people don't just keep going !number
!number
!number

Also notice Script Error?
maybe notice $nick Script Error, or notice $me Script Error
ChunkieMonkey
Comments: 126
 
mIRC Snippet:  guessing game
Posted on Sep 1, 2008 3:26 pm
Code:
 if ($2 == %number [ $+ [ $chan ] ]) { msg # WOW nice job!!$nick The Number Was $2 | unset %number [ $+ [ $chan ] ] } 



umm..

Code:
 if ($2 == %number [ $+ [ $chan ] ]) { msg # WOW nice job!! $+ $nick The Number Was $2 | unset %number [ $+ [ $chan ] ] } 
ChunkieMonkey
Comments: 126
 
mIRC Snippet:  guessing game
Posted on Sep 1, 2008 3:28 pm
And why complicate the script?
DragonFlare
Comments: 117
 
mIRC Snippet:  guessing game
Posted on Sep 2, 2008 12:28 am
Why did you post the same script twice?
Its Eating Space On Hawkee.
-.-
napa182
Comments: 1,692
 
mIRC Snippet:  guessing game
Posted on Sep 2, 2008 4:36 am
why not make it all on one on text event like this
Code:
ON *:TEXT:*:#:{
  if ($strip($1) == !number) {
    if (!$($+(%,number,$chan),2)) {
      set $+(%,number,$chan) $r(1,100)
      msg $chan I Have Choosen A Random Number Between: 1 And 100 To Guess What It Is Type: !guess <number>
    }
    elseif (!$($+(%,$chan,$nick,yesgame),2)) { msg $chan Game already in progress. Please Type " !guess 1-100 " to play. | set -u5 $+(%,$chan,$nick,yesgame) $nick }
  }
  if ($strip($1) == !guess) && (!$($+(%,flood,$chan),2)) {
    set -u3 $+(%,flood,$chan) $nick
    if ($($+(%,number,$chan),2)) {
      if (!$2) || ($2 !isnum 1-100) { msg $chan Please pick a number 1-100 ex: !guess 34 }
      elseif ($2 == $($+(%,number,$chan),2)) { msg # WOW nice job!! $nick The Number Was $2 | unset $+(%,number,$chan) } 
      else { msg # $iif($2 < $($+(%,number,$chan),2),It's Higher Than $2,It's Lower Than $2) }
    }
    elseif (!$($+(%,$chan,$nick,nogame),2)) { msg $chan No Game in progress. Please Type " !number " to start a game. | set -u10 $+(%,$chan,$nick,nogame) $nick }
  }
}
^Neptune
Comments: 629
 
mIRC Snippet:  guessing game
Posted on Sep 2, 2008 5:22 am
napa stop... napa-ing things D:
Rottybot
Comments: 3
 
mIRC Snippet:  guessing game
Posted on Oct 9, 2008 7:16 pm
{ msg # WOW nice job!!$nick The Number Was $2 |

I found it needs a space between job!! and $nick

otherwise it says what the script says and not the actual $nick
ChunkieMonkey
Comments: 126
 
mIRC Snippet:  guessing game
Posted on Nov 4, 2008 1:38 am
Quote:
{ msg # WOW nice job!!$nick The Number Was $2 |

I found it needs a space between job!! and $nick

otherwise it says what the script says and not the actual $nick


I pointed that out above...Thanks you for bringing back a dead script!
Gizb
Comments: 1
 
mIRC Snippet:  guessing game
Posted on Jan 18, 2009 9:40 pm
Just two questions.

How editing the script i can give voice to the person that guesses the correct number

and how can i restrict the time between guesses?

thanks
Blitzjager
Comments: 192
 
mIRC Snippet:  guessing game
Posted on Jan 18, 2009 10:28 pm
Napa posted one that does.
Here's another one. TO change the time between guesses change the 10 in set -u10 %guessact 1
Code:
ON *:TEXT:!number:#: {
  if (!%number [ $+ [ $chan ] ]) {
    set %number [ $+ [ $chan ] ] $rand(1,999)
    msg $chan I Have Chosen A Random Number Between: 1 And 999 To Guess What It Is Type: !guess <number>
  }
}
ON *:TEXT:!guess*:#: {
  if (%number [ $+ [ $chan ] ]) && ($2 isnum 1-999) && (!%guessact) {
    set -u10 %guessact 1
    inc %guesses
    if ($2 == %number [ $+ [ $chan ] ]) { msg # WOW nice job!! $nick The Number Was $2 $+ ! It took %guesses guesses. | unset %number [ $+ [ $chan ] ] | unset %scriptcount }
    elseif ($2 < %number [ $+ [ $chan ] ]) { msg # It's Higher Than $2 }
    elseif ($2 > %number [ $+ [ $chan ] ]) { msg # It's Lower Than $2 }
    else { echo Script Error! }
  }
}
Bluepower10
Comments: 93
 
mIRC Snippet:  guessing game
Posted on Jan 19, 2009 5:40 pm
Works good, but it answers weird.

Commenting Options

Register or Login to Hawkee.com or use your Facebook or Twitter account by clicking the corresponding button below.

  

Bottom