Shoutbox

2 things... - 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: 2 things... (/showthread.php?tid=72256)

2 things... by color680 on 03-02-2007 at 08:18 PM

I need some help with my script.

I know the code for changing a message sent before its sent.
But how do i make it like a list? Like this,

sent---changed

hello        hi
bye         gtg

It might not be like that but i hope you know what i mean :)

2nd thing is how do i make a / command for my script to turn on/off like this,

/on
/off

I hope you know what i meen...

Thanks (y)


RE: 2 things... by CookieRevised on 03-02-2007 at 09:28 PM

First problem:
Look up things in the Windows JScript 5.6 documentation and look at the source of (many) scripts and also search the forums. Look up Replace, indexOf, and other related string functions.

Second Problem:
Look up things in the Plus! scripting documentation and look at the source of (almost all) scripts and also search the forums. Look up GetScriptCommands and OnEvent_ChatWndSendMessage.


Note: the reason why I don't give a straight answer is so you can learn to look things up and learn from there. This is way more effecient and you will learn much more than just copy/pasting something ;)

Both are extremely basic though.











EDIT: so I don't revive this thread after so long:

quote:
Originally posted by Supersonicdarky
this one is better because the other one had conflicting variables
There are no conflicting variables in his code. you can perfectly reuse a variable like that. In fact, it will use less memory (and will run a tick faster since the script parser doesn't need to create and allocate a new variable).
RE: 2 things... by color680 on 03-02-2007 at 09:44 PM

Ok i got this

quote:
Originally posted by NanaFreak
no...

to make a script do what you want it is very simple

code:
function OnEvent_ChatWndSendMessage(ChatWnd, Message){
  Message = 'stuff you want before the massage'+Message+'stuff after the message';
  return Message;
}


I understand it :)
Do i just copy it 12 times and edit the varibles?
RE: 2 things... by Supersonicdarky on 03-02-2007 at 09:49 PM

code:
function OnEvent_ChatWndSendMessage(ChatWnd, Message){
  nMessage = 'stuff you want before the message'+Message+'stuff after the message';
  return nMessage;
}

this one is better because the other one had conflicting variables

RE: 2 things... by color680 on 03-02-2007 at 09:56 PM

quote:
Originally posted by Supersonicdarky
code:
function OnEvent_ChatWndSendMessage(ChatWnd, Message){
  nMessage = 'stuff you want before the message'+Message+'stuff after the message';
  return nMessage;
}

this one is better because the other one had conflicting variables

So do i?