napa182 commented on a Page, guessing game  -  Sep 02, 2008

why not make it all on one on text event like this

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 }
  }
}
 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.