What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » correction please

correction please
Author: Message:
phalanxii
Full Member
***


Posts: 146
Reputation: 5
32 / Male / Flag
Joined: Aug 2006
Status: Away
RE: correction please
Not quite, you see, once the return statement is parsed, your function stops running. So basically, you will want to edit Plan-1130's code. This is my version with a few fixes:
code:
var Status = false;

function OnEvent_ChatWndSendMessage(ChatWnd, Message) {
   if(Message == "irritant Hè!" && !Status) {
       Status = true;
       for(var i = 0; i < 5; i++) ChatWnd.SendMessage("irritant Hè!");
       Status = false;
       return "";
   }
   else return Message;
}
My coding is not excellent (and I haven't tested this) so you may want to be careful. I just realised that ChatWnd.SendMessage will also call the function again, so the script will loop! That's why I added Status to make sure it doesn't recall it. If you make your command different, then it will be a lot easier:
code:
function OnEvent_ChatWndSendMessage(ChatWnd, Message) {
   if(Message == "!irritant") {
       for(var i = 0; i < 5; i++) ChatWnd.SendMessage("irritant Hè!");
       return "";
   }
   else return Message;
}
In the above script, you will need to type "!irritant" to activate your messages.

To change the amount of messages in the function, change the number in red to the number you want.

If anyone wants to improve on this script, be my guest.

This post was edited on 10-25-2006 at 08:03 AM by phalanxii.
10-25-2006 08:01 AM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
correction please - by DennisMartijn on 10-06-2006 at 05:52 PM
RE: correction please - by Felu on 10-06-2006 at 06:08 PM
RE: correction please - by Ezra on 10-06-2006 at 06:15 PM
RE: correction please - by matty on 10-06-2006 at 06:17 PM
RE: correction please - by DennisMartijn on 10-24-2006 at 12:25 PM
RE: correction please - by Plan-1130 on 10-24-2006 at 12:51 PM
RE: correction please - by markee on 10-24-2006 at 03:41 PM
RE: correction please - by phalanxii on 10-25-2006 at 07:01 AM
RE: correction please - by DennisMartijn on 10-25-2006 at 07:40 AM
RE: correction please - by phalanxii on 10-25-2006 at 08:01 AM
RE: correction please - by DennisMartijn on 10-25-2006 at 08:05 AM
RE: correction please - by phalanxii on 10-25-2006 at 08:10 AM
RE: correction please - by DennisMartijn on 10-25-2006 at 08:11 AM
RE: correction please - by markee on 10-25-2006 at 08:27 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