Jump to content


[Guide] Setting up a script to highlight profitable items

  • Please log in to reply
30 replies to this topic

#1 Fourjacks

  • 17 posts

Posted 20 August 2014 - 08:48 AM


Hello Everyone. I am a new member on these forums.

I am writing this guide to explain how you can set up a script to automatically highlight profitable items while restocking.


I am not the original author of the script, i have only made a few changes to the original script to make i useful for restocking. The original script is called MediaTriggerWords and it can be found at this website.


I am in no way experienced in programming, and found a way to make this work by trial and error. I am using Firefox with Greasemonkey to run the scripts, and I don't know if it can be used in other browsers.


What does the script do?
The script activates on refresh, searches for predefined words or "sentences" and marks those with a predefined color. Different colors can be used for different groups of predefined words or sentenced (= different colors for different profit margins).

You can make multiple scripts running in different shops.


Example of the fresh food shop, stocking 3 profitable items, each one marked in different color, which tells us which item is must profitable. (btw those items are not profit items, i just added them to my own script to make this screen shot)


Why do we want multiple scripts?
I used to only use one script which included items from 4 shops,
but as i restock 4 shops at a time, the item names from one shop could be part of the name of an item from another shop, marking the wrong items and generally making a mess. If you only want to restock in one shop only make one script.

Using multiple scripts takes a little more time to set up, but it is easier to maintain, as you can update one shop list at a time.

Setting up the script:
1. Open Firefox.
2. Install Greasemonkey. Download link.
3. Go to the shop where you wish to run your script.
3. Create a new userscript clicking the arrow next to the monkey.
3.1 Fill out the "name" and "namespace" field with what ever you like (it would make sense to use the name of the shop in which you want to restock...)
The field "include" will already have the URL of the shop. You will however need to add another URL, as shops seem to have two URLs each. Copy/paste the URL already there. You have to replace the part after the ? in the link you just added with whichever ending you don't have in the link already. (see the spoiler). You also have to change the number if you use a different shop.



Click "OK"
3.2 You will now see 7 or 8 lines of the script starting and ending with ==/UserScript==
Move down to line 10 and copy and paste the following:


This is our basic script.
Click "save" and close the script.

Now we have a script which will only run in the fresh foods shop (or whichever shop you chose).

Making the lists and reformatting the lists to use them in the script:

4. We now need to make a list (or 3 lists if you want to use different colors) with the items you want to buy from the shop.
I have been using this guide to make my lists. I have been making 3 lists for each shop I like to restock in.
One list for 100k+ profit item + items not yet valued, another for 10k-100k profit items and one for 2k-10k items. Paste the lists into a spreadsheet in column A, C and E.

The way an item have to be written in the script is:
"Item name",
For reformatting the above lists i have set up a Google Docs spreadsheet.
In the A, C and E columns i paste the lists i made above.
In the B column i use the following function: =CHAR(34)&A1&CHAR(34)&CHAR(44) (without the "")
TIP: paste the function to (1,B) and then click the bottom right corner of (1,B) (you should see a tiny blue box)
and then drag the function down as long as you need (you need to drag as far down as the list you just put in column A)
You repeat this for column D (using =CHAR(34)&C1&CHAR(34)&CHAR(44)) and column F (using =CHAR(34)&E1&CHAR(34)&CHAR(44))
If you did this correctly you will now have your lists formatted like this: "Item name", in column B, D and F.

This makes us ready for the last part of this exercise.

Finalizing the script:

5. Now we have to add the newly formatted lists to the script. (Column B, D and F)
Go to the shop you chose the script to run on.
Click the arrow next to the monkey.
In the bottom of the menu you should see the name of your script with a checkmark next to it.
Right-click the name of your script. The script should now open.
Find: "//    MSM "blue" words" in the script.
Between the lines"defwords([" and  "]," paste the list of items you want highlighted with blue by the script.
Now find:   "//    MSM "silver" words" which should be right below.
Between the lines"defwords([" and  "]," paste the list of items you want highlighted with silver by the script.
Finally find:   "//    MSM "gold" words" which should be right below.
Between the lines"defwords([" and  "]," paste the list of items you want highlighted with golden color by the script.    

Click save and close the script.

In the spoiler below you can see the script i currently use for the fresh food shop.


Enjoy the colorshow:
Now the script should be ready and running. All that's left for you to do now is click F5 and wait for a restock.

To make scripts for other shops simply repeat the steps above.

I know it seems like a lot of work, and you could just copy/paste the script in the spoiler above,
But prices tend to change a lot, which requires the lists to be updated regularly.

Feel free to ask any questions.


Edited by Fourjacks, 21 August 2014 - 05:24 AM.

#2 Bones

  • Bar Ram Ewe

  • 2,108 posts

Users Awards

Posted 20 August 2014 - 11:25 PM

could you supply a SS so people can see how it looks once running?

#3 Fourjacks

  • 17 posts

Posted 21 August 2014 - 05:14 AM

Here is a screenshot showing how it looks with the script running. The highlighted items are not profit items, I just added them to the script to make the screenshot :-)


Thank you Bones, added the screenshot to the guide as well.



Edited by Fourjacks, 21 August 2014 - 05:25 AM.

#4 Bones

  • Bar Ram Ewe

  • 2,108 posts

Users Awards

Posted 21 August 2014 - 07:15 AM

Very nice thanks for the addition to the site good work.

#5 ayyylmao

  • 39 posts

Posted 21 September 2014 - 06:40 PM

This. Is. Amazing. You didn't get nearly enough praise for this. As someone who semi-legit restocks, this is so cool. Thanks a ton!

#6 Fourjacks

  • 17 posts

Posted 22 September 2014 - 07:37 AM

Thank you very much Ayyylmao. I am glad you like it :-)

#7 Shane

  • Sad sack.

  • 1,981 posts

Users Awards

Posted 22 September 2014 - 07:12 PM

Ignore this post, go to the second page to see a better reply.

Edited by Megazord, 04 August 2015 - 01:55 AM.

#8 Fourjacks

  • 17 posts

Posted 22 September 2014 - 10:17 PM

Yeah i actually got the inspiration for this in the guide about adblocking the images of the nonprofit items.


I never dared to actually use it, as there were some discussion about if it was safe or not. The author of the guide wrote this.


I was thinking maybe if I could find a way to alter the text instead it would be better. For example, if profit is negative then the name of the item would be red. Then have different shades of green/blue to indicate what the profit margin is. I don't know how to make a script like that though and have it check the itemdb.


This quote made me keep trying to find a way to do this, and i think i tried two other methods before i found the script and learned how to modify it.

#9 ayyylmao

  • 39 posts

Posted 24 September 2014 - 12:43 PM

Or... Adblock Plus all of the images that are junk items.


This doesn't allow me to set up different tiers, like this method, however.


Also this is impossible to detect as it is 100% client side. You could, conceivably, figure out that someone was Adblocking images if you cared enough to dig.

#10 Shane

  • Sad sack.

  • 1,981 posts

Users Awards

Posted 24 September 2014 - 02:00 PM

Ignore this post please.

Edited by Megazord, 04 August 2015 - 01:55 AM.

#11 ayyylmao

  • 39 posts

Posted 24 September 2014 - 07:05 PM

There are junk items then there are items worth NP.

If you say so. :)

#12 Swekfem

  • 67 posts

Posted 09 October 2014 - 04:33 PM

thanks a lot for this guide :lol:

this assist me so much with restocking. as i don't really use AB. AB is nice, but i just like to browse the shop.

i tweak mine to highlight junk items in black color, so i can buy the less profitable items while waiting shop restock.

#13 masxed

  • 699 posts

Users Awards

Posted 02 November 2014 - 05:15 PM

What a nice trick! Thanks :D

#14 WeirwoodTreeHugger

  • 88 posts

Posted 06 November 2014 - 08:00 PM

Nevermind got it to work hahaha. This script is AWESOME!!!!!!! Thanks alot!

Edited by cersei, 06 November 2014 - 08:03 PM.

#15 w0nderwall

  • 568 posts

Users Awards

Posted 07 November 2014 - 02:39 AM

Tagging this for later, awesome work. <3

#16 RedTurnip

  • 85 posts

Users Awards

Posted 07 November 2014 - 08:53 AM

Semi-legit restocking with this method is actually pretty fun. :o

#17 WeirwoodTreeHugger

  • 88 posts

Posted 07 November 2014 - 10:57 AM

It really is fun! I have yet to get anything, but it's like a nice little surprise. Ya refresh and boom there's a bunch of colored items! Haha.

This just might make me quit the ABing game for good.

#18 Fourjacks

  • 17 posts

Posted 19 November 2014 - 10:22 AM

I'm glad you all find it usefull. I am not playing Neopets anymore, so I will most likely not be around to answer questions anymore.

#19 MC10

  • 353 posts

Users Awards

Posted 28 November 2014 - 06:53 PM

This is exactly like what I was looking for a while back! That's awesome, I didn't know how to create something like this myself. The closest thing I got was the AdBlock semi-legit restocking method.

#20 Fourjacks

  • 17 posts

Posted 08 December 2014 - 12:26 PM

@MC10 It was actually your post about altering text in your addblock guide which made me look into a way to do this :-)

#21 MC10

  • 353 posts

Users Awards

Posted 08 December 2014 - 12:51 PM

@MC10 It was actually your post about altering text in your addblock guide which made me look into a way to do this :-)

Awesome! You could probably also use this to highlight the NC items in the Money Tree, although those are already really easy to spot.


I mostly AB nowadays but if I ever feel like trying my hand at restocking I'll use this.

#22 Londonn

  • 27 posts

Posted 29 March 2015 - 03:27 PM

Just started using this and I love it! Thanks much :)

#23 donovanrules1234

  • 11 posts

Posted 04 April 2015 - 08:50 PM

Great guide. Just so you know there is already an extension available online that does this.

In chrome it is called "Pearls Extension". It doesn't do different tiers but it does the whole colour thing and such. 


The only problem that I have found with scripts such as these is that it lags the loading times. I haven't tried your method yet but for example I usually have 20 shops or so open with Pearls Extension running and it will lag. Have you noticed minor lag with yours? 


EDIT: I have tried it on fresh foods (no items showed up yet), and also on the bookshop (bought one item straight away). Works well, less lag compared to pearls extension. And thanks to your excel code it just made it a HELL OF A LOT easier. Your script is far better than pearls extension, but just wanted everyone to know that a "similar" program exists. Thank you and +1 rep

Edited by donovanrules1234, 04 April 2015 - 09:39 PM.

#24 donovanrules1234

  • 11 posts

Posted 24 April 2015 - 08:35 PM

Okay for all those script makers/programmers out there. 

Let's say that I have 5 tabs open (5 different shops) and I have a script from this thread activated for those urls. 

Then I get a page refresher to refresh all 5 tabs at the same time.

Then lets say in 1 of the 5 tabs there is a matching word. 

Is it possible to then colour/highlight this tab so that I can go straight to it? Other than having to look through all 5 tabs. 

I am using Chrome and from what I have read online you cannot change the colour or highlight a tab in chrome. BUT I know that you can pin a tab so that it automatically moves to the far left. 

So would any script makers be able to make a script that I can insert into tapermonkey (almost same as scriptmonkey)  to make it so that if a matching word is found using the script from the author of this thread....then the tab containing the match will automatically pin (and thus move it to the far left)?? (And of course then un-pin if a match is not found) 

Please I know it sounds like a crazy idea, but it should be relatively easy (well...not for me since I'm too stupid with programming). 


More info:

For example there are many extensions already available that you can use to pin urls in chrome. But I was hoping someone would be able to make it kind like this:

"find word "doughnotfruit""  (using script from author of this thread)

if =true then pin tab

if false =unpin/don't pin tab


Btw I have no idea if "if" statements work in these script programs but yeah =D 

Edited by donovanrules1234, 24 April 2015 - 08:47 PM.

#25 SnowWhite

  • 43 posts

Users Awards

Posted 26 May 2015 - 05:53 PM

This is really old but I love it! Works great in chrome!

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users