Shoutbox

I need some help - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: I need some help (/showthread.php?tid=69904)

I need some help by TYL3R on 12-25-2006 at 11:01 PM

I'm trying to make a script and it looks like this:

var one = new Array();
     one[0]="smacks";
     one[1]="tickles";
     one[2]="nudges";   
     one[3]="punches";
     one[4]="pokes";
     one[5]="hits";
     one[6]="slaps";
var two = new Array();
     two[0]="a 500-pound";
     two[1]="a slippery";
     two[2]="a wet";   
     two[3]="a smelly";
     two[4]="a stinky";
     two[5]="an obnoxious";
     two[6]="a playful";
     two[7]="a burning";
     two[8]="a toxic";     
     two[9]="a purple";
     two[10]="a yellow";
     two[11]="an orange";
var three = new Array();
     three[0]="unix manual";
     three[1]="rubber chicken";
     three[2]="keyboard";   
     three[3]="mailbox";
     three[4]="ax";
     three[5]="fish";
     three[6]="walrus";
     three[7]="duffle bag";
     three[8]="iguana";
     three[9]="windshield";
     three[10]="snow cone";
     three[11]="psp";
     three[12]="shark";
     three[13]="cactus";
     three[14]="tooth brush";
     three[15]="tooth pick";
     three[16]="crocodile";

function generate()
{
   random = Math.floor(Math.random()*one.length);
   first = one[random];
   random = Math.floor(Math.random()*two.length);
   second = two[random];
   random = Math.floor(Math.random()*three.length);
   third = three[random];
}

function OnEvent_ChatWndSendMessage(ChatWnd, Message){
    if(Message.substr(0,7)=="/random"){
        generate()
        Message = Messenger.MyName + " " + first + " " + "you" + " with " + second + " " + third + "!"
        return Message
    }
}
   


I'm not sure on how to make it so that instead of "you" its the person in the chat.

Could someone give me the code to do it?

thnx


- Tyler


RE: I need some help by Spunky on 12-25-2006 at 11:02 PM

use (!N) as long as it's being sent as a message

EDIT: use this line:
Message = Messenger.MyName + " " + first + " " + "(!N)" + " with " + second + " " + third + "!"

If it was not being sent as a string or message, you would have to iterate the contacts and use Contact.Name. Luckily there is a feature in plus which can send the other contacts name for you :p


RE: I need some help by TYL3R on 12-25-2006 at 11:03 PM

what? :S


RE: I need some help by Spunky on 12-25-2006 at 11:04 PM

Updated previous post


RE: I need some help by TYL3R on 12-25-2006 at 11:05 PM

thanks a lot!!!!!!!!!!!!! it works :D:D:D:D:D


RE: I need some help by Spunky on 12-25-2006 at 11:07 PM

Anytime :p Actually looks like a cool script ;)


RE: I need some help by Jarrod on 02-07-2007 at 08:40 PM

has it been finished?


RE: RE: I need some help by TYL3R on 02-07-2007 at 08:44 PM

quote:
Originally posted by xen0h
has it been finished?


Yea

code:
var one = new Array();
     one[0]="slyly";
     one[1]="sneakingly";
     one[2]="sloppily";
     one[3]="menacingly";
     one[4]="slowly";
     one[5]="lovingly";
     one[6]="aggressively";
     one[7]="hopelessly";
     one[8]="delightfully";
     one[9]="enthusiastically";
     one[10]="accidentally";
     one[11]="boastfully";
     one[12]="cautiously";
     one[13]="cheerfully";
     one[14]="courageously";
     one[15]="fatally";
     one[16]="loudly";
     one[17]="frantically";
     one[18]="nervously";
     one[19]="obnoxiously";
     one[20]="suspiciously";
var two = new Array();
     two[0]="smacks";
     two[1]="tickles";
     two[2]="nudges";   
     two[3]="attacks";
     two[4]="pokes";
     two[5]="hits";
     two[6]="slaps";
     two[7]="mauls";
     two[8]="gnaws at";
     two[9]="mames";
     two[10]="projectile vomits at";
var three = new Array();
     three[0]="a 500-pound";
     three[1]="a slippery";
     three[2]="a wet";   
     three[3]="a smelly";
     three[4]="a stinky";
     three[5]="an obnoxious";
     three[6]="a playful";
     three[7]="a burning";
     three[8]="a toxic";
     three[9]="a purple";
     three[10]="a yellow";
     three[11]="an orange";
     three[12]="a prickly";
     three[13]="a sleepy";
     three[14]="a bloody";
     three[15]="a graceful";
     three[16]="a fancy";
     three[17]="a fragile";
     three[18]="a cautious";
     three[19]="a husky";
     three[20]="a gigantic";

     
var four = new Array();
     four[0]="unix manual";
     four[1]="rubber chicken";
     four[2]="keyboard";   
     four[3]="mailbox";
     four[4]="ax";
     four[5]="fish";
     four[6]="walrus";
     four[7]="duffle bag";
     four[8]="iguana";
     four[9]="windshield";
     four[10]="snow cone";
     four[11]="shark";
     four[12]="cactus";
     four[13]="tooth brush";
     four[14]="tooth pick";
     four[15]="crocodile";
     four[16]="sock";
     four[17]="printer";
     four[18]="hydrant";
     four[19]="bulldozer";
     four[20]="pitchfork";

     
     


function generate()
{
   random = Math.floor(Math.random()*one.length);
   first = one[random];
   random = Math.floor(Math.random()*two.length);
   second = two[random];
   random = Math.floor(Math.random()*three.length);
   third = three[random];
   random = Math.floor(Math.random()*four.length);
   fourth = four[random];
}

function OnEvent_ChatWndSendMessage(ChatWnd, Message){
    if(Message.substr(0,7)=="/random"){
        generate()
        Message = Messenger.MyName + " " + first + " " + second + " " + "(!N)" + " with " + third + " " + fourth + "!"
        return Message
    }
}
   

RE: I need some help by Jarrod on 02-07-2007 at 08:46 PM

oh right thanx