Simple Matching Games

By supergeo on May 15, 2005

Put this in a bot's remotes. Choose whichever one you like. The first one has 10 numbers, the second has 50, the third has 100, and the fourth has 1000.

on *:TEXT:!nummatch*:{
  set %tomatch $rand(1,10)
  set %trymatch $2
  msg $chan The number you chose was: %trymatch
  msg $chan The number to match was %tomatch
  if (%trymatch == %tomatch) { 
  msg $chan Congradulations $nick Your number: %trymatch matched the number chosen: %tomatch. You win!
}
}

on *:TEXT:!nummatch*:{
  set %tomatch $rand(1,50)
  set %trymatch $2
  msg $chan The number you chose was: %trymatch
  msg $chan The number to match was %tomatch
  if (%trymatch == %tomatch) { 
  msg $chan Congradulations $nick Your number: %trymatch matched the number chosen: %tomatch. You win!
}
}
on *:TEXT:!nummatch*:{
  set %tomatch $rand(1,100)
  set %trymatch $2
  msg $chan The number you chose was: %trymatch
  msg $chan The number to match was %tomatch
  if (%trymatch == %tomatch) { 
  msg $chan Congradulations $nick Your number: %trymatch matched the number chosen: %tomatch. You win!
}
}
on *:TEXT:!nummatch*:{
  set %tomatch $rand(1,1000)
  set %trymatch $2
  msg $chan The number you chose was: %trymatch
  msg $chan The number to match was %tomatch
  if (%trymatch == %tomatch) { 
  msg $chan Congradulations $nick Your number: %trymatch matched the number chosen: %tomatch. You win!
}
}

Comments

Sign in to comment.
PuRpLeFrEaK   -  Jun 14, 2005

how do you start it??

 Respond  
xDaeMoN   -  May 15, 2005

Instead of having them choose, why not make it configurable by having them set the minimum & maximum number to be guessed. Also you might want to put a check if the person typed in a 2nd parameter.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.