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
}