What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » randome phrase reply script provlem

randome phrase reply script provlem
Author: Message:
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
31 / Male / Flag
Joined: Apr 2004
RE: randome phrase reply script provlem
It appears you're counting is wrong. You're retrieving the first 8 characters from Message and then you compare that to "apply" which is only 5 characters in length. Same happens for your "applyver" check.
Javascript code:
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MessageKind){
    if(Message.substr(0,5).toLowerCase()=="apply"){        var i = Math.floor((Math.random()*(sArray.length-1)));
        return "[b][i][c=red]"+sArray[i]+"[/c][/i][/b]";
    }
 
    if(Message.substr(0,8).toLowerCase()=="applyver"){        var h = Math.floor((Math.random()*(dArray.length-1)));
        return "[b][i][c=blue]"+dArray[h]+"[/c][/i][/b]";
    }
}

Fix that and see if it works better now? :)
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

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

Messages In This Thread
randome phrase reply script provlem - by asnopus on 11-01-2009 at 09:38 AM
RE: randome phrase reply script provlem - by Matti on 11-01-2009 at 10:25 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