Hello. This is a simple addon: just GUESS a number from 1 to 100
An user can attempt in a row, i mean after an attempt he can make another ine immediately (if wrong)
Code
on *:TEXT:!game*:#Alessandra:{
  if ($2 != $null) { set %number $rand(1,$2) | msg # Guess the number 1 to $2 | return }
  else /set %number $rand(1,100) | msg # Guess the number 1 to 100 | return
}
on *:TEXT:!number*:#Alessandra:{
  if (%number == $2) { msg # $nick $read(you.txt) you win! The number was  $+ %number $+  | unset %number | set %score $read(win.txt, s, $nick) | write -ds $+ $nick win.txt | write win.txt $nick $calc(%score + 1) | unset %score | return }
  if (%number >= $2) { msg # The number is higher than $2 | return }
  if (%number <= $2) { msg # The number is lower than $2 | return }
  else /halt
}
on *:TEXT:!score*:#Alessandra:{
  if ($2 == $null) {
    notice $nick Nick: --- Score: | play -n $nick win.txt points
  }
  else /msg # Score for  $+ $2 $+  $+ : $read(win.txt, s, $2) points
}

If the number is wrong I wish the user must wait (for example) 300sec before to can attempt again.
Thanks for help