Shoutbox

[Request] Swear Jar - 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: [Request] Swear Jar (/showthread.php?tid=68323)

[Request] Swear Jar by Eddie on 11-12-2006 at 04:02 AM

Hey all, this is only a small thing i think that i want made, and its just for a joke between me and mates, and im not sure if something similar has been made:

I want something that will count how many times i swear and add it into my personal message with like "Swear Jar: xx" Value of xx being the number of times ive sworn, i know its lame but its for me, free time project :) thanks all.

EDIT: If someone could just make it, and let me know where to change it to put the words i want it to catch, then that would be cool also :) Thanks.


RE: [Request] Swear Jar by phalanxii on 11-12-2006 at 05:33 AM

Here you go, made this in like 10 minutes. No configuration or anything, but it does exactly what you want it to.

NOTE: The instant you import the script, your swear jar will start working. I haven't put in a way to disable the swear jar, so you will lose your current personal message.

How to add your own words:

1. Open your contact list.
2. Click the Plus! menu icon.
3. Click the Preferences... menu.
4. Go to the General > Scripts tab.
5. Find and select Swear Jar.
6. Click the Edit... button.
7. In the new window, edit the following to your swear words:

code:
var Word = new Array("Word1", "Word2", "Word3");
8. You can have as many or as little as you like (all words are counted case-insensitively):
code:
var Word = new Array("doodle", "sausage", "milk", "screw", "eric cartman");
9. Click the Save All button.
8. Click the Close button.
9. You're done! Start talking!

I haven't tested this very much, but it seems to work. Enjoy!
RE: [Request] Swear Jar by Eddie on 11-12-2006 at 05:34 AM

Thanks, another thing :D is there a way to "implement" it into my personal message, for example, like nitemare's countdown does :)


RE: RE: [Request] Swear Jar by phalanxii on 11-12-2006 at 05:44 AM

quote:
Originally posted by Shadow
Thanks, another thing :D is there a way to "implement" it into my personal message, for example, like nitemare's countdown does :)

^o) Errr... as far as I know, it automatically does this...

As soon as you import it, it will set your personal message to "Swear Jar: 0", and after sending bad messages, it will increase.
RE: [Request] Swear Jar by Eddie on 11-12-2006 at 06:15 AM

No sorry you miss-understood, or i misstyped..
i meant for example....BlaBlaBla "swear jar bit" BlaBlaBla
if u know what i mean now :)


RE: [Request] Swear Jar by phalanxii on 11-12-2006 at 06:23 AM

Yes, sure, but you will have to edit it yourself. Find all sections where it says:

code:
Messenger.MyPersonalMessage = "Swear Jar: " + Count;
That is where it sets what your personal message will look like. Count is your swear jar count, and the quoted stuff is just extra wording. So for example, to get "BlaBlaBla Swear Jar: xx BlaBlaBla", change it to:
code:
Messenger.MyPersonalMessage = "BlaBlaBla Swear Jar: " + Count + " BlaBlaBla";
NOTE: There are two sections in the code that you have to change. If you don't change them both, your personal message will be inconsistent.

If you need help, just tell me. I can edit the script so you only have to edit one line.


EDIT: Here is a new version of the script so you only have to change one line.

How to change your personal message format:

1. Open your contact list.
2. Click the Plus! menu icon.
3. Click the Preferences... menu.
4. Go to the General > Scripts tab.
5. Find and select Swear Jar.
6. Click the Edit... button.
7. In the new window, edit the following to your custom personal message:
code:
var Psm = "Swear Jar: (!COUNT)";
8. Use "(!COUNT)" to show the swear jar count ("(!COUNT)" is replaced case-insensitively):
code:
var Psm = "BlaBlaBla Swear Jar: (!COUNT) BlaBlaBla";
          ... or with quotation marks:
code:
var Psm = "BlaBlaBla \"Swear Jar: (!COUNT)\" BlaBlaBla";
9. Click the Save All button.
8. Click the Close button.
9. You're done!

NOTE: If you need quotation marks (") or back-slashes (\), you will need to add a back-slash in front of them to "escape" them, ie. "\"" and "\\".
RE: [Request] Swear Jar by Eddie on 11-12-2006 at 06:29 AM

I will have a look and get back to you, thank you VERY much :)
EDIT: Works great, thanks lol :) i guess i can try implementing other features to suit my needs now :) tyvm.


RE: [Request] Swear Jar by davidpolitis on 11-12-2006 at 08:39 AM

Sorry, but how could I remove the count from the registry? :)


RE: RE: [Request] Swear Jar by phalanxii on 11-12-2006 at 09:07 AM

quote:
Originally posted by davidpolitis
Sorry, but how could I remove the count from the registry? :)

Do you want to literally remove the data from the registry or just reset the count?


1. a) If you want to remove the data from the registry, simply removing the script will automatically do this.

1. b) If you want to remove the data, but not the script (???), then you will need to run the program "regedit". Then go to the key "HKEY_CURRENT_USER\Software\Patchou\Messenger Plus! Live\GlobalSettings\Scripts\Swear Jar\Settings" and delete the settings from there.

NOTE: Be very careful editing registry settings. Your computer can stuff up if you don't do it correctly.


2. a) If you simply want to reset the count, follow the steps using "regedit" directly above while Messenger is not running.

2. b) Alternatively, add this line to the end of the script:
code:
Count = 0;
After running the script once with this line, the line can be removed.
RE: [Request] Swear Jar by davidpolitis on 11-12-2006 at 09:10 AM

Thank you! (I didn't know where the script registry was :lol:)