What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [HELP]Auto respond on a specific message

[HELP]Auto respond on a specific message
Author: Message:
Jonte135
Junior Member
**


Posts: 57
– / – / Flag
Joined: Aug 2007
O.P. [HELP]Auto respond on a specific message
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 :P

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;
    }
    }
}

This post was edited on 10-18-2008 at 07:58 PM by Jonte135.
10-18-2008 07:41 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[HELP]Auto respond on a specific message - by Jonte135 on 10-18-2008 at 07:41 PM
RE: [HELP]Auto respond on a specific message - by prashker on 10-18-2008 at 08:01 PM
RE: RE: [HELP]Auto respond on a specific message - by Jonte135 on 10-18-2008 at 08:32 PM
RE: [HELP]Auto respond on a specific message - by SmokingCookie on 10-20-2008 at 08:41 AM
RE: RE: [HELP]Auto respond on a specific message - by Jonte135 on 10-20-2008 at 06:09 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On