code:
function OnEvent_ChatWndReceiveMessage(pChatWnd,sOrigin,sMessage,nKind){
if(sOrigin != Messenger.MyName && sMessage.match(/hi/i)){
pChatWnd.SendMessage("Hello.");
}
}
You could also add && (Messenger.MyStatus == 3 || Messenger.MyStatus == 4) so it'd only reply when you're online or busy.