ok, here you go:
code:
var SentAlready = new Array();
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MessageKind){
SentAlready[ChatWnd.Handle] = 0;
if(Message.match("Hey") && SentAlready[ChatWnd.Handle] == 0){
ChatWnd.SendMessage('Hi ' + Origin + '! Time to chat again :)');
SentAlready[ChatWnd.Handle] = 1;
}else{
ChatWnd.SendMessage(':yay:');
}
}
function OnEvent_ChatWndDestroyed(ChatWnd){
if(SentAlready[ChatWnd.Handle]) SentAlready[ChatWnd.Handle] = 0;
}
NOTE: i have not tested this, and if you contact says "alfdsgakljfgnklas Hey knsdfkljgn balh" it will send the message stuff.
NOTE 2: this will (should) reset when you close the chat window... if you dont want that to happen, just take out the last function