What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Need help making a new script

Need help making a new script
Author: Message:
win_crook
Junior Member
**


Posts: 63
Reputation: 2
31 / Male / Flag
Joined: Apr 2007
RE: Need help making a new script
You need to add two functions to your script.

code:
function OnGetScriptCommands()
{
    var s = "<ScriptCommands>";
    s += "<Command>";
    s += "<Name>!!COMMAND NAME HERE!!</Name>";
    s += "<Description>!!COMMAND DESC. HERE!!</Description>";
    s += "</Command>";
    s += "</ScriptCommands>";
    return s;
}


code:
function OnEvent_ChatWndSendMessage(ChatWnd, strMessage)
{
    if (strMessage.charAt(0) != '/') return strMessage;
    var arrMessage = strMessage.split(' ');
    var strCommand = arrMessage[0];
    switch(strCommand){
        case "/!!COMMAND NAME HERE!!":
            !!DO COMMAND STUFF HERE!!
            return "";
        default:
            return strMessage;
    }
}


The parts which you will need to edit I have highlighted with "!!". :D

Good Luck (Y),
David
04-16-2007 02:55 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Need help making a new script - by Emperor on 04-15-2007 at 04:51 PM
RE: Need help making a new script - by win_crook on 04-16-2007 at 02:55 PM
RE: Need help making a new script - by Emperor on 04-17-2007 at 12:47 AM
RE: Need help making a new script - by Lou on 04-17-2007 at 12:51 AM
RE: Need help making a new script - by Emperor on 04-17-2007 at 09:08 PM
RE: RE: Need help making a new script - by matty on 04-18-2007 at 01:30 AM
RE: Need help making a new script - by Emperor on 04-18-2007 at 02:34 AM


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