What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Whats wrong with this?

Whats wrong with this?
Author: Message:
cloudhunter
Senior Member
****


Posts: 536
Reputation: 18
37 / – / –
Joined: Dec 2005
RE: Whats wrong with this?
Simple :)

code:
var rndnumber;
function OnEvent_ChatWndSendMessage(Wnd,Msg)
{
if(Msg == "!pick")
{
rndnumber = Math.floor(Math.random()*26);
return "Pick a number between 0 and 25";
}
}


function OnEvent_ChatWndReceiveMessage(Wnd,Sender,Message,MsgKind)
{
if(Message == rndnumber)
{
Command_Win(Wnd);
}
}

function Command_Win(Wnd)
{
Wnd.SendMessage(rndnumber + " was the correct number! ");
}

This code is fully working, when you send !pick it tells you AND the contact "Pick a number between 0 and 25". When you or the contact get the number right it now says you have won :) It generates the random number each time you say !pick.

Cloudy

Edit: Beaten to it, but my alteration works correctly ;) It now picks wins from both the contact and the sender, as you don't need both send and recieve for that as any messages you send count as recieved messages aswell. It also now returns the win to the conversation window properly once someone gets it right. Before what it would have done was alter the recieved message on your end.

This post was edited on 07-23-2006 at 02:00 AM by cloudhunter.
[Image: cloudy.jpg]
Sig by pirateok/marisaok/marisa ;)
quote:
Originally posted by Moulin Rouge
The greatest thing you'll ever learn, is just to love and be loved in return

6765 days, 21 hours, 9 minutes, 57 seconds ago
07-23-2006 01:54 AM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Whats wrong with this? - by Hengy on 07-22-2006 at 08:00 PM
RE: Whats wrong with this? - by Mnjul on 07-22-2006 at 08:07 PM
RE: Whats wrong with this? - by Weyzza on 07-22-2006 at 08:07 PM
RE: Whats wrong with this? - by Hengy on 07-22-2006 at 08:24 PM
RE: Whats wrong with this? - by Weyzza on 07-22-2006 at 08:27 PM
RE: Whats wrong with this? - by Hengy on 07-22-2006 at 08:33 PM
RE: Whats wrong with this? - by Aeryn on 07-22-2006 at 08:40 PM
RE: Whats wrong with this? - by Hengy on 07-22-2006 at 08:53 PM
RE: Whats wrong with this? - by Aeryn on 07-22-2006 at 09:00 PM
RE: Whats wrong with this? - by Hengy on 07-22-2006 at 10:33 PM
RE: Whats wrong with this? - by ShawnZ on 07-22-2006 at 10:43 PM
RE: Whats wrong with this? - by Hengy on 07-22-2006 at 10:50 PM
RE: Whats wrong with this? - by ShawnZ on 07-22-2006 at 10:51 PM
RE: Whats wrong with this? - by Hengy on 07-22-2006 at 10:53 PM
RE: Whats wrong with this? - by cloudhunter on 07-23-2006 at 12:10 AM
RE: Whats wrong with this? - by Hengy on 07-23-2006 at 01:24 AM
RE: RE: Whats wrong with this? - by mickael9 on 07-23-2006 at 01:45 AM
RE: Whats wrong with this? - by cloudhunter on 07-23-2006 at 01:54 AM
RE: Whats wrong with this? - by Hengy on 07-23-2006 at 02:16 PM
RE: RE: Whats wrong with this? - by mickael9 on 07-23-2006 at 06:02 PM
RE: Whats wrong with this? - by cloudhunter on 07-23-2006 at 06:06 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