Easiest way to reset $readn to 0 is to just do something which will cause $read to not find anything. Just add a line at the beginning or end of your code with something like .echo -q $read(resetting readn,0) - mIRC will try to read line 0 of file 'resetting readn' and fail, which will reset $readn to 0.