You could have it done with 2 arrays, like:
code:
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MessageKind)
{
var receive = new Array("brb", "bye"); //on this array you store the arriving messages
var send = new Array("okey dokey", "ok if u dont get lost soon i will kill you\njk jk"); //on this array you store the sending messages
//note that they have to match in the array order
if(Origin != Messenger.MyName && activate == 1) //very important, or you would asnwer yourself if you typed brb or something lol
{
for(i=0; i<receive.length; i++) //simple loop, while i less than receive.length [which in this case is 1 (zero based)] adds 1
{
if(Message == receive[i]) //if Message is equal to receive[i] (the first time it would be 0 which is brb)
{
ChatWnd.SendMessage(send[i]);//sends the message in send[i], this is y they need to match, so if receive[i] & send[i] is 0, it sends "okeydokey"
}
}
}
}
it works, I've tested it