The handler calls AOL’s server directly over http using curl. It returns true if the server thinks the passed screen name is signed online, and false if they’re offline. It does not indicate away or idle status.
if on_aim for "AScreenName" then
	say "Yay!"
else
	say "Boo."
end if
to on_aim for x
	try
		do shell script "curl -L " & quoted form of ("http://big.oscar.aol.com/" & x & "?on_url=file://true&off_url=file://false")
	on error msg
		msg contains "true"
	end try
end on_aim
If you’d rather not have curl look for local files, you can switch the protocol to http://, I just thought local would be faster, and it seems to be. Suggestions welcome.