What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Help] Code

[Help] Code
Author: Message:
vladinator
Junior Member
**

Avatar

Posts: 21
34 / Male / –
Joined: Apr 2003
RE: [Help] Code
Il use this topic to continue my topic from here:
http://www.mpscripts.net/showthread.php?tid=79

Reason I post here is since you already started the begining of the problem, and il just continue it. :)

Now this is the code I managed to make:
code:
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MessageKind)
{

    //Help text
    if( Message.match(/!help/i) )
    {
        ChatWnd.SendMessage('!help = Show this text. !song = Show the song im listening to. !sendsong = Send you the song im listening to.')
    }

    //Song name
    if( Message.match(/!song/i) )
    {
        ChatWnd.SendMessage('/np')
    }
   
    //Send Song
    if( Message.match(/!sendsong/i) )
    {
        ChatWnd.SendMessage('/sendsong')
    }

}


But there are a few problems.

1) When you !help it spams it alot.
2) If you say !help in the middle of a sentence, it still works.
3) If you use !help and the !help contains !song and !sendsong it registers it and you get a loop of the commands.

Also I would like to know how to make a new line for the help thingy, so I can separate. And simply make it only work if its in the begining of the message and only the command, nothing else behind or before. Thats simply what I need to fix and this code will work like a dream. ^^ (and remove loop /cry)
[Image: banner.gif]
09-25-2006 06:48 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[Help] Code - by Eddie on 09-10-2006 at 03:38 PM
RE: [Help] Code - by absorbation on 09-10-2006 at 03:41 PM
RE: [Help] Code - by Eddie on 09-10-2006 at 03:41 PM
RE: [Help] Code - by Eddie on 09-10-2006 at 03:48 PM
RE: [Help] Code - by Felu on 09-10-2006 at 03:58 PM
RE: [Help] Code - by Eddie on 09-10-2006 at 04:00 PM
RE: [Help] Code - by Matti on 09-10-2006 at 04:45 PM
RE: [Help] Code - by vladinator on 09-25-2006 at 06:48 PM
RE: [Help] Code - by Eljay on 09-25-2006 at 07:09 PM
RE: [Help] Code - by Shondoit on 09-25-2006 at 07:20 PM
RE: RE: [Help] Code - by vladinator on 09-25-2006 at 07:32 PM
RE: [Help] Code - by DennisMartijn on 10-06-2006 at 05:07 PM
RE: [Help] Code - by Matti on 10-06-2006 at 05:10 PM
RE: [Help] Code - by vladinator on 10-07-2006 at 07:30 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