Really Basic Question From Someone New To AppleScript

So I’m trying to set up a script and I’m new to AppleScript. I want iChat to display a message that says a person is online when they get online and offline when they get offline, and I want the time of this event to be displayed too. Is this possible? How can I do this? I know this is a really basic question that probably makes me sound pretty stupid, but I could use some help. Thanks in advance!

EDIT: I guess I would need it to be possible for multiple messages to appear at the same time, for instance so that if I’m away from my computer I could see when someone both got online and went offline. Thanks!

ADMIN: I have moved this post from Code Exchange to AppleScript OS X.