What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Request] Random Number Generator

[Request] Random Number Generator
Author: Message:
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [Request] Random Number Generator
js code:
function OnEvent_ChatWndSendMessage(oChatWnd, sMessage){
    if (/^\/([^\s\/]+)\s*([\s\S]*)$/.exec(sMessage) !== null) {
        var Command = RegExp.$1.toLowerCase();
        var Param = parseFloat(RegExp.$2);
        switch (Command) {
            case 'random':
                if (Param !== 'NaN') {
                    return Math.floor((Param)*Math.random());;
                } else {
                    return '';
                }
        }
    }   
    return sMessage;
}

Something like that lol
08-05-2009 07:15 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[Request] Random Number Generator - by cerealkiller54 on 08-05-2009 at 07:25 AM
RE: [Request] Random Number Generator - by Matti on 08-05-2009 at 08:16 AM
RE: [Request] Random Number Generator - by cerealkiller54 on 08-05-2009 at 06:30 PM
RE: [Request] Random Number Generator - by matty on 08-05-2009 at 07:15 PM
RE: [Request] Random Number Generator - by Matti on 08-05-2009 at 07:32 PM
RE: [Request] Random Number Generator - by matty on 08-05-2009 at 07:55 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