All pastes #558129 Raw Edit

Mine

public text v1 · immutable
·published 2007-06-11 08:05 UTC
rendered paste body
on $*:TEXT:/^!number( .+)?$/Si:#:{
  if (!$2 !isnum 1-10) || (!$regex($2,/^[0-9]+$/S)) .notice $nick You must specify an integer between 1 and 10.
  else {
    var %r = $r(1,10)
    if (%r == $2) .notice $nick Well done, you guessed correctly!
    else .notice $nick Wrong! The number was $+(%r,.)
  }
}