What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » I need some help

I need some help
Author: Message:
TYL3R
Junior Member
**

Avatar
MP!L Scripter =]

Posts: 24
Reputation: -4
31 / Male / Flag
Joined: Oct 2006
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
- Youtube Info
     Thread

- MsgPlus! Jukebox
     Thread
12-25-2006 11:01 PM
Profile E-Mail PM Web Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
35 / Male / Flag
Joined: Aug 2006
RE: I need some help
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

This post was edited on 12-25-2006 at 11:04 PM by Spunky.
<Eljay> "Problems encountered: shit blew up" :zippy:
12-25-2006 11:02 PM
Profile PM Find Quote Report
TYL3R
Junior Member
**

Avatar
MP!L Scripter =]

Posts: 24
Reputation: -4
31 / Male / Flag
Joined: Oct 2006
O.P. RE: I need some help
what? :S
- Youtube Info
     Thread

- MsgPlus! Jukebox
     Thread
12-25-2006 11:03 PM
Profile E-Mail PM Web Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
35 / Male / Flag
Joined: Aug 2006
RE: I need some help
Updated previous post
<Eljay> "Problems encountered: shit blew up" :zippy:
12-25-2006 11:04 PM
Profile PM Find Quote Report
TYL3R
Junior Member
**

Avatar
MP!L Scripter =]

Posts: 24
Reputation: -4
31 / Male / Flag
Joined: Oct 2006
O.P. RE: I need some help
thanks a lot!!!!!!!!!!!!! it works :D:D:D:D:D
- Youtube Info
     Thread

- MsgPlus! Jukebox
     Thread
12-25-2006 11:05 PM
Profile E-Mail PM Web Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
35 / Male / Flag
Joined: Aug 2006
RE: I need some help
Anytime :p Actually looks like a cool script ;)
<Eljay> "Problems encountered: shit blew up" :zippy:
12-25-2006 11:07 PM
Profile PM Find Quote Report
Jarrod
Veteran Member
*****

Avatar
woot simpson

Posts: 1304
Reputation: 20
– / Male / Flag
Joined: Sep 2006
RE: I need some help
has it been finished?

[Image: 5344.png]
[Image: sig.png]

A.k.a. The Glad Falconer














02-07-2007 08:40 PM
Profile E-Mail PM Find Quote Report
TYL3R
Junior Member
**

Avatar
MP!L Scripter =]

Posts: 24
Reputation: -4
31 / Male / Flag
Joined: Oct 2006
O.P. RE: RE: I need some help
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
    }
}
   
- Youtube Info
     Thread

- MsgPlus! Jukebox
     Thread
02-07-2007 08:44 PM
Profile E-Mail PM Web Find Quote Report
Jarrod
Veteran Member
*****

Avatar
woot simpson

Posts: 1304
Reputation: 20
– / Male / Flag
Joined: Sep 2006
RE: I need some help
oh right thanx

[Image: 5344.png]
[Image: sig.png]

A.k.a. The Glad Falconer














02-07-2007 08:46 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »


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