So I've been working on a script that does stuff at the Grand Exchange, and FindObj that did such a fine job on my old project (100% hit rate as far as I know) produces a huge number of false positives that end up fucking up the script.
The job is to click on the Grand Exchange clerk and the banker, and even if all the crowd might make it difficult for a script to work flawlessly FindObj makes errors that are just strange.
The colors of the clerks are fairly common on the location so no wonder it's not reliable to just use colors. Since entering two colors instead of one doesn't seem to change much (might this just say to the procedure to look for color A OR color B instead for an object that has both colors?) uptext checking should be the way to stop the script from just clicking on any spot, which is bad because it obviously tends to make the character walk to a different place.
I've tried several combinations, playing around with tolerance, different colors and different uptext combinations, for example
as well asCode:FindObjCustom(x, y, ['Exchange'], [2431260], 3)
for the bankerCode:FindObjCustom(x, y, ['Gra', 'Exc'], [4217970, 2431260], 3)
and so on.Code:FindObjCustom(x, y, ['Bank'], [3043730, 7115455, 6053472], 3)
But no matter if the uptext is only a short piece of 3 letters or an entire word, many times stuff goes wrong and I've observed the script just clicking on a spot on the floor that has the same color as the clerk (or even on the wrong clerk which is seriously fucked up). But obviously the uptext doesn't match at all at these spots!
By the way it's not always easy to replicate the problem. I've had series of runs where stuff goes wrong every time, other series were successful almost every single time.
Using failsafes and checks I should be able to get stuff running either way even if it might look very unnatural and kinda stupid to an observer, but isn't there a way to avoid these false positives? Could it be that the uptext checking is unreliable, or am I overseeing some feature of the procedure?
Removing the uptext completely made it run amok so obviously it is doing something.


Reply With Quote



Personal object finders are usually better, and you can customize them to suite your purpose for the script better

