on *:TEXT:!magicnumber*:#:{ if(%gameison == $no) /set %randnum $rand(1,100) /set %gameison $yes msg $chan $me is thinking of a number can u guess it? *hint* My number is 1-100. if(%gameison == $yes) } on *:TEXT:!magicnumber*:#:{ if(%gameison == yes) msg $chan There is already a game going on $nick !! } on *:TEXT:!guess*:#:{ if($2 != %randnum) if(%gameison == $yes) msg $chan sorry $nick that is not the correct number keep guessing! } on *:TEXT:!guess*:#:{ if($2 == %randnum) if(%gameison == $yes) msg $chan Congratulations $nick !! the magic number was %randnum ! well done! /set %gameison $no }