Rushed a bit but its basically what you want
code:
function OnEvent_ChatWndSendMessage(ChatWnd, Message){
if (Message.substr(0, 4)== "test"){
return'test1'
}
if (Message.substr(0, 4) == "cant"){
return'can't'
}
if (Message.substr(0, 4) == "dont"){
return'don't'
}
}
To add more just copy and past one of the if commands then change the Message.substr(0, 4) to how ever many letters it is. For example the word hello would have
code:
Message.substr(0, 5)
because it has 5 letters etc
If you need any more help, just ask