What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » im having troble with my script

im having troble with my script
Author: Message:
LifelesS
Full Member
***


Posts: 115
Reputation: 4
32 / Male / Flag
Joined: Dec 2006
RE: im having troble with my script
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 :)

This post was edited on 08-08-2007 at 10:52 AM by LifelesS.
Best Regards,
Joćo Godinho
08-08-2007 10:51 AM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
im having troble with my script - by killa on 08-06-2007 at 05:23 PM
RE: im having troble with my script - by pollolibredegrasa on 08-06-2007 at 05:53 PM
RE: im having troble with my script - by killa on 08-07-2007 at 01:40 PM
RE: im having troble with my script - by Volv on 08-07-2007 at 01:55 PM
RE: im having troble with my script - by killa on 08-08-2007 at 10:00 AM
RE: im having troble with my script - by Volv on 08-08-2007 at 10:40 AM
RE: im having troble with my script - by LifelesS on 08-08-2007 at 10:51 AM
RE: im having troble with my script - by matty on 08-08-2007 at 12:47 PM
RE: im having troble with my script - by Volv on 08-08-2007 at 01:01 PM
RE: im having troble with my script - by Matti on 08-08-2007 at 03:19 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