Well I'm going to try to make my first ever script, which will be an easy bot that I will upgrade more and more the more I learn. So what I want now is a code that "searches" through the message that someone gives me and look for a word like "hello". If it matches "hello" then it will reply randomly messages that I have in a file and the messages will simply be separated with enter. Also the thing it will search for will also be in a file that is separated with enter.
It should be fairly easy for experienced coders, but I don't know much about coding in MSN+ so ya thanks
EDIT: My friend forced me to post this, he made it for me, perhaps it can help
code:
int curWord = 0;
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MessageKind) {
if(Origin != Messenger.MyName) {
var parts = sMessage.split(" ");
while(1) {
if(parts[curWord] == "hello" || parts[curWord] == "Hello" parts[curWord] == "HELLO") {
ChatWnd.SendMessage("Hello.");
break;
}
if(parts[curWord] == NULL) {
break;
}
if(curWord >= 200) {
break;
}
curWord += 1;
}
}
}