Public paste
Undefined
By: higherlower | Date: Dec 17 2006 19:37 | Format: None | Expires: never | Size: 1.06 KB | Hits: 1437

  1. on *:TEXT:$($me $+ *):#:{
  2.   if ($2 == higherlower) {
  3.     if (%higherlower) { halt }
  4.     else {
  5.       set %higherlower $rand(10,99)
  6.       set %higherlower.number $rand(1,%higherlower)
  7.       msg $chan Guess a number between 1 and %higherlower $+ . What could it be? Guess it with $me guess <number> 
  8.       echo -a Number: %higherlower.number
  9.     }
  10.   }  
  11.   if ($2 == guess) {
  12.     if (%higherlower.number) && (%higherlower) {
  13.       if ($3 isnum) {
  14.         if ($3 > %higherlower.number) {
  15.           msg $chan Nice try $nick $+ , but the correct number is lower than $3 $+ ! Try again
  16.           halt
  17.         }
  18.         if ($3 < %higherlower.number) {
  19.           msg $chan Nice try $nick $+ , but the correct number is higher than $3 $+ ! Try again
  20.           halt
  21.         }
  22.         if ($3 == %higherlower.number) {
  23.           msg $chan Good job $nick $+ , you guessed the correct number: %higherlower.number
  24.           unset %higher*
  25.         }
  26.       }
  27.       else {
  28.         notice $nick Error, you need to type a number!
  29.         halt
  30.       }
  31.     }
  32.   }
  33. }
  34.