What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [help] functions at WLM?

[help] functions at WLM?
Author: Message:
bloodcrush
New Member
*


Posts: 1
Joined: Jul 2007
O.P. [help] functions at WLM?
Hi, I'm new to JS and to messenger plus script too.
i decided to create my own game but i don't know functions in messenger.

so, how can i check if someone said, for example"!start" or "!guess 777".
and lets say, that if "!guess 777" is true so print "congrats"?


thank you all.
07-05-2007 08:38 PM
Profile E-Mail PM Find Quote Report
Chris4
Elite Member
*****

Avatar

Posts: 4461
Reputation: 84
33 / Male / Flag
Joined: Dec 2004
RE: [help] functions at WLM?
The Official Scripting Documentation and the Windows Script Documentation may come in handy. (Y)
Twitter: @ChrisLozeau
07-05-2007 08:41 PM
Profile PM Find Quote Report
MrT
Junior Member
**

Coding For Fun

Posts: 62
35 / Male / Flag
Joined: Jul 2006
RE: [help] functions at WLM?
code:
function OnEvent_ChatWndReceiveMessage(ChatWnd,Origin,Message,MessageKind) {
if(Origin != Messenger.MyName) {
    if(Message == "!start") { ChatWnd.SendMessage("Game Started");
    }
}
}

it's a good example :D
07-06-2007 08:20 AM
Profile E-Mail PM Web Find Quote Report
roflmao456
Skinning Contest Winner
****

Avatar

Posts: 955
Reputation: 24
30 / Male / Flag
Joined: Nov 2006
Status: Away
RE: [help] functions at WLM?
code:
function OnEvent_ChatWndReceiveMessage(ChatWnd,Origin,Message,MessageKind) {
var rand = Math.floor(Math.random()*1000);
if(Origin != Messenger.MyName) {
if(Message.substr(0,6) == "!guess" && Message.substr(8) == rand) { ChatWnd.SendMessage("Congrats.");
}
}
}

was too lazy so copied from MrT's code :P

it's like a Guess my number game ;)

but if you want to set it on your own, just change "var rand"'s value

This post was edited on 07-06-2007 at 09:56 PM by roflmao456.
[quote]
Ultimatess6
: What a noob mod
07-06-2007 09:55 PM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


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