O.P. I need some help
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
|