$r(1,1800) is not a fixed value.

Change it to a real fixed value (e.g. 1, 2, 3, 3000) and then try it. Don't use $r, that gives a random number and hence a random test.

Also note that there is caching involved, even after you close mIRC. The first run of the alias will take longer than subsequent ones, even in seperate mIRC sessions.