on *:TEXT:!game*:#:{
  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*:#:{
  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*:#:{
  if ($2 == $null) {
    notice $nick Nick: --- Score: | play -n $nick win.txt points
  }
  else /msg # Score for  $+ $2 $+  $+ : $read(win.txt, s, $2) points
}
Published in: mIRC
Download

Related snippets