While you can write an AppleScript to check iChat and page you with a message, there's an easier solution -- just let AIM handle it for you.
Just go to the Mobile AIM page and set up "IM Forwarding." Then, your AIM iChat messages will automatically be forwarded to your mobile phone when you are offline or away from your Mac. You can even reply to them using your phone! Seems a lot more efficient than running AppleScripts, which won't let you reply -- or turn off your Mac.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20050523114055301