What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [HELP]match New question Solved!

[HELP]match New question Solved!
Author: Message:
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
32 / Male / Flag
Joined: Apr 2004
RE: [HELP]match New question
Well, as I said, you can do anything you want in your replacement handler! Only this time, we don't need any of the parameters passed to our handler function.
Javascript code:
var c;
string = string.replace(/!person/i, function() {
    c = Math.floor((Math.random()*(Person.length-1)));
    return Person[c];
});

From what I understand of your script now, you're working on a random sentence generator. The problem now is that you're replacing "!person" more than once and you need to find the correct conjugation of the verb for each instance of a person, which may be a tough challenge...
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
01-24-2009 12:49 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[HELP]match New question Solved! - by DaAniv on 01-24-2009 at 09:59 AM
RE: [HELP]match - by Danny22 on 01-24-2009 at 10:16 AM
RE: [HELP]match - by DaAniv on 01-24-2009 at 11:10 AM
RE: [HELP]match - by Matti on 01-24-2009 at 11:11 AM
RE: [HELP]match - by DaAniv on 01-24-2009 at 11:22 AM
RE: [HELP]match Solved - by Danny22 on 01-24-2009 at 11:38 AM
RE: [HELP]match new question - by DaAniv on 01-24-2009 at 12:19 PM
RE: [HELP]match New question - by Matti on 01-24-2009 at 12:49 PM
RE: [HELP]match New question - by DaAniv on 01-24-2009 at 01:44 PM
RE: [HELP]match Solved - by DaAniv on 01-24-2009 at 02:49 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