All pastes #186731 Raw Edit

Anonymous

public text v1 · immutable
#186731 ·published 2006-09-30 11:55 UTC
rendered paste body
on 1:TEXT:!play*:#:{
  if (%number == $null) {
    set %number $rand($2,$3)
    /notice $chan Guess the number! Between $2 and $3 :)
  /notice $chan To make a guess, say !guess number. }
  elseif (%number != $null) { 
  /notice $nick A game is already in session! }
}
on 1:TEXT:!guess *:#:{
  if (%number != $null) {
    if ($2 == %number) {
      /notice $chan 1Well done!7 $nick 1got it, the number was %number!
    /set %number $null }
    else {
    /notice $chan 7 $nick 1guessed $2 but it was wrong! Keep trying :D }
  }
  elseif (%number == $null) {
  /notice $chan There isn't a game in session! }
}