All pastes #277078 Raw Edit

Mine

public text v1 · immutable
·published 2006-12-12 21:51 UTC
rendered paste body
+++++++++++++++++++++++++++ Guessing Script ++++++++++++++++++
on *:text:!startguess:#: {
  if (%guess == off) {
    set %guess on
    msg $chan 4Starting guessing game by Kakarot6. All numbers are between 1 and 100.
    set %guessnumber $rand(1,100)
  }
  elseif (%guess == on) {
    msg $chan 4There is allready an active guessing game on.
  }
}
on *:text:!tryguess *:#: {
  if (%guess == on) && ($2 == %guessnumber) {
    msg $chan 4You got the right number, $nick ! Way to go.
    set %guessnumber $rand(1,100)
 }
  elseif (%guess == on) && ($2 != %guessnumber) {
    if ($2 < %guessnumber) {
      msg $chan 4You got the wrong number, $nick . The right answer is higher.
    }
    if ($2 > %guessnumber) {
      msg $chan 4You got the wrong number, $nick . The right answer is lower.
    }
  }
  if (%guess == off) {
    msg $chan 4Guess game not activated. Type !startguess .
  }
}
on *:text:!stopguess:#:{
  if (%guess == on) {
    set %guess off
    msg $chan 4Guess game disabled. Type !startguess to er-enable.
}
  elseif (%guess == off) {
    msg $chan 4Guess game is allready disabled. Type !startguess to enable.
  }
}