Shoutbox

[Help] Change DP modification - 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: [Help] Change DP modification (/showthread.php?tid=78728)

[Help] Change DP modification by thahim on 11-04-2007 at 02:25 PM

Not to be triggered on !dp command i changed the following line in

ChangeDp Plugin

downloaded from http://www.msgpluslive.net/scripts/view/253-ChangeDp!/

if (Message.substr(0,3)=="!dp"&&Origin!=Messenger.MyName)

to


if (Message==Origin!=Messenger.MyName)

now dp changes on every message... but it also changes on messages that i send by my self :(

i want to to change only over messages i receive...

please tell me how to do that...


RE: [HELP]CHANGE DP MODIFICATION by Matti on 11-04-2007 at 03:48 PM

It seems like you're not very familiar with scripting, and changing a script without knowing what to do isn't a good idea. I'd like to explain what you did wrong, but I don't know if you'd understand.

Despite of that, I think you can fix this by replacing that specific line with:

code:
if(Origin!=Messenger.MyName)

Don't see this as an offense against you. But scripting isn't something which you can simply do yourself by changing what you think should be changed. It takes time to first learn the programming language (JScript) and then learn about Plus! scripts.
RE: [HELP]CHANGE DP MODIFICATION by ArkaneArkade on 11-04-2007 at 04:56 PM

Not sure I'd agree there Mattike.  I'd say the main bonus to scripting is that you can change it, without entirely knowing what you're doing.  At least to some extent.
I started out not having a clue and dissecting other peoples scripts to do what I needed, and now I'm reasonably confident, at least with the standard MsgPlus! functions (I still need help too often for more advanced things),  but I'd say it's definitely the best way to start.

thahim: I'd say if you are editing a script, and changing ifs, the best thing would be just to look for seperators.  If you're removing the "&&", it just makes sense to remove everything before it as well, or else you get a nonsense clause.  Just thing of it as a sentence, and if it doesn't make sense to you, it doesnt make sense to  the machine.

- Just thought a little more about it - why do you want to remove the "!dp" identifier?  Is this being used with more of a script, such as to randomy change your DP everytime you get a message, or is it just to stop people having to type "!dp".  If it's the latter then I think you'll just end up with issues.  If someone sends a message of "Hey man, how are you today", theres not going to be an image and your DP wont be changed properly anyway?


RE: [HELP]CHANGE DP MODIFICATION by waynewilson2 on 11-04-2007 at 08:53 PM

quote:
Originally posted by Leroux
Not sure I'd agree there Mattike.  I'd say the main bonus to scripting is that you can change it, without entirely knowing what you're doing.  At least to some extent.
I started out not h

you have a good point...
i now know 6 languages, but none of them were taught to me...i learned on my own, basicly the same way as you(disecting other scripts) and now know alot more...

JScript is a powerful language, and can be used for alot of things...
your able to delete files, create files, make viruses, all kinds of things...lol
RE: [Help] Change DP modification by ArkaneArkade on 11-04-2007 at 09:30 PM

quote:
Originally posted by waynewilson2
JScript is a powerful language, and can be used for alot of things...
your able to delete files, create files, make viruses, all kinds of things...lol

I really hope that's only an example, and even then don't think much of it.  When you really, really get down to it and know what you're doing, any language can be used for a lot of things.  But the thought of people considering MsgPlus! scripting for viruses, just doesn't sit well with me.
RE: [Help] Change DP modification by Spunky on 11-04-2007 at 09:53 PM

quote:
Originally posted by Leroux
But the thought of people considering MsgPlus! scripting for viruses, just doesn't sit well with me.

I think that was just an example, but most virii are written in .js or .vbs files.

quote:
Originally posted by waynewilson2
i now know 6 languages
You should then be aware that an if statement (a fairly standard part of any language) needs to have something to check and what to check it for. "&&" adds another condition, "||" gives an alternative.

RE: [Help] Change DP modification by ArkaneArkade on 11-04-2007 at 10:15 PM

True enough, I don't doubt that his examples were just that, although theres always the possibility of people getting ideas from that.  Granted, I was maybe a bit quick to jump to conclusions.
Although I'm sure waynewilson knows exactly what the if statements do  - doesn't really help our thread starter though. :P