PDA

View Full Version : Need help with Money Tree Grabber...it's grabbing everything including trash!



stinkyrats
08-29-2017, 04:42 PM
Before you tell me to "uncheck the grab everything box", I have no idea where these boxes are or how to do that. When I click "settings" there are no settings like this. I'm using Tapermonkey on Opera to run this program if that helps.

j03
08-29-2017, 05:25 PM
It would help if you posted the script code here so we can take a look at it or maybe post the URL to the download.

stinkyrats
08-29-2017, 11:56 PM
Oh yes, sorry!

Link: [Only registered and activated users can see links]

Script:


// ==UserScript==
[Only registered and activated users can see links]
[Only registered and activated users can see links]
[Only registered and activated users can see links]
[Only registered and activated users can see links]
[Only registered and activated users can see links]
[Only registered and activated users can see links]
// ==/UserScript==
searches = ["morphing potion", "paint brush", "transmogrification", "generous", "codestone", "np", "map", "codestone"];


function clicklink(element)
{
var event = document.createEvent("MouseEvents");
event.initMouseEvent("click", true, true, document.defaultView, 1, 0, 0, 0, 0, false, false, false, false, 0, null);
element.dispatchEvent(event);
return;
};
document.body.innerHTML = document.getElementById('mt-content').innerHTML;

if ( ! new RegExp(searches.join("|")).test(document.body.innerHTML.toLowerCase())) {
setTimeout("location.reload()",800);

}
else{

var items = document.getElementsByClassName('donated');
for (index = 0; index < items.length; ++index) {


if (new RegExp(searches.join("|")).test(items[index].innerHTML.toLowerCase())) {


match = items[index].getElementsByTagName('a')[0];

}

}
clicklink(match);

}

Stocking Anarchy
08-30-2017, 06:45 PM
You have to edit the code to specify what items you want. The script is limited in that it grabs every item that has the same name. So if you have the word codestone then it will grab every item with the word codestone like codestone plushies.

The word generous makes the bot grab any item that is an NC item, NP the script will grab any np amount, so basically you need to edit


searches = ["morphing potion", "paint brush", "transmogrification", "generous", "codestone", "np", "map", "codestone"];

so that the words aren't so general.

stinkyrats
08-30-2017, 11:12 PM
Thanks for the response. Unfortunately my problem is that it's grabbing things like soggy boxes and rotten shoes which have none of the set terms. :S

Stocking Anarchy
08-31-2017, 02:25 AM
Thanks for the response. Unfortunately my problem is that it's grabbing things like soggy boxes and rotten shoes which have none of the set terms. :S

are there spaces between the comma and the new "? maybe try getting rid of those.

This is my script but I haven't used it in a while.

Oh and if you upgraded past firefox 54 some userscripts are starting to act funky. So try downgrading firefox as well.


// ==UserScript==
// name Money Tree Grabber
// namespace Synesthesia Labs
[Only registered and activated users can see links]
[Only registered and activated users can see links]
[Only registered and activated users can see links]
// Description Grabs stuff from money tree.
// ==/UserScript==
searches = ["draik egg","morphing potion","paint brush","transmogrification potion","secret laboratory map","icetravaganza scratchcard","dark secret background","mutating millions scratchcard","pustravaganza scratchcard","bagguss bonanza scratchcard","sandtravaganza scratchcard","brightvale job coupon","golden nerkmid","platinum nerkmid","copper nerkmid","ultimate nerkmid","super nerkmid","ultra nerkmid","average nerkmid","tcg","generous"];











function clicklink(element)
{
var event = document.createEvent("MouseEvents");
event.initMouseEvent("click", true, true, document.defaultView, 1, 0, 0, 0, 0, false, false, false, false, 0, null);
element.dispatchEvent(event);
return;
};
document.body.innerHTML = document.getElementById('mt-content').innerHTML;

if ( ! new RegExp(searches.join("|")).test(document.body.innerHTML.toLowerCase())) {
setTimeout("location.reload()",800);

}
else{

var items = document.getElementsByClassName('donated');
for (index = 0; index < items.length; ++index) {


if (new RegExp(searches.join("|")).test(items[index].innerHTML.toLowerCase())) {


match = items[index].getElementsByTagName('a')[0];

}

}
clicklink(match);

}