SRL Archive - OSR Help

Any way to prevent FindObjCustom moving the mouse until the correct object is found?


Fishh

2013-02-28 19:39:15

Hey, I have a 95% working fishing guild script now. Just working on more AntiBan features and it can get stuck every now and then.

One of the main problems I have with it is that it will move the mouse between different fishing spots that aren't the correct one's until it finds the correct one, and then clicks it, this is a super bot like movement. Seeing as fishing spots are the same colour as each other, I can't change the colours so that it will just find the correct one.

I don't mind it searching through all of the fishing spots, but is there anyway to prevent it from moving the mouse until it has found the right one? I can't think of one seeing as the search is based off UpText and it has to move the cursor over the spots to display the UpText. If there isn't a method, is there one to reduce the bot like movement of zipping between spots with perfect accuracy? Apart from lowering the mouse speed.

My Fishing spot procedure:

procedure FishingSpotClick;
var
x, y: integer;

begin

x := MSCX;
y := MSCY;

if (P07_InvFull) then
begin
WalkToBank;
end
else
if not (FishingAnimation) then
begin
WriteLn('Looking for fishing spot.');
If P07_FindObjCustom(x, y, ['Cag', 'age', 'ge F', 'C'], [14597535, 14597268, 15123625, 14398100, 15058085], 5) then
begin
GetMousePos(x, y);
WaitHumanClick;
Mouse(RandomRange(x + 3, x + 4), RandomRange(y - 2, y - 3), random(3), random(3), false);
WaitHumanClick
P07_ChooseOptionMulti(['Cage']);
WaitHumanClick;
end;
end;
end;

Cheers!

Flight

2013-02-28 19:46:33

Well the mouse speed & movement can be adjusted, but finding a specific fishing spot among all the fishing spots… that's something you'll have to deal with. When you yourself are looking for a spot how do you check if it contains the right fish? Visually you cannot tell the difference either, you'll also hover your mouse and either check the uptext or right-click and read the options menu. This is normal, even for humans. The only other way is to find each fishing spot and, depending on camera angle, monitor the other players nearby to that fishing spot and check what equipment they're using. This is risky of being inaccurate but it's another possible way.

Other than I don't know what to tell you. If you cannot visually tell spots apart, how do you expect Simba to? :/

Fishh

2013-02-28 19:49:55

From: Flight
Well the mouse speed & movement can be adjusted, but finding a specific fishing spot among all the fishing spots… that's something you'll have to deal with. When you yourself are looking for a spot how do you check if it contains the right fish? Visually you cannot tell the difference either, you'll also hover your mouse and either check the uptext or right-click and read the options menu. This is normal, even for humans. The only other way is to find each fishing spot and, depending on camera angle, monitor the other players nearby to that fishing spot and check what equipment they're using. This is risky of being inaccurate but it's another possible way.

Other than I don't know what to tell you. If you cannot visually tell spots apart, how do you expect Simba to? :/


I understand that part. :) It can't distinguish between them apart from the UpText, I was just wondering whether there is anyway to slow down or randomise the mouse movements in between checking each fishing spot. I have the mouse speed set to 12 but when it's looking for objects it seems to go a lot faster.

Flight

2013-02-28 19:55:18

From: Fishh
I understand that part. :) It can't distinguish between them apart from the UpText, I was just wondering whether there is anyway to slow down or randomise the mouse movements in between checking each fishing spot. I have the mouse speed set to 12 but when it's looking for objects it seems to go a lot faster.


You might talk with the makers of that P07 include then and raise the issue that the function "P07_FindObjCustom" moves the mouse way too fast. Perhaps they could adjust it or, if you can, you could slow down the speed yourself. And if you've learned about TPAs & ATPAs you could make a much more accurate object-finding function. There's plenty of tutorials for doing just that. ;)

Fishh

2013-02-28 20:03:44

From: Flight
You might talk with the makers of that P07 include then and raise the issue that the function "P07_FindObjCustom" moves the mouse way too fast. Perhaps they could adjust it or, if you can, you could slow down the speed yourself. And if you've learned about TPAs & ATPAs you could make a much more accurate object-finding function. There's plenty of tutorials for doing just that. ;)


Ok, thanks very much. I'd rather have a go at making my own or adjusting it myself. Loving learning at the moment, been making this script for the past 3 days and I'm pretty proud of it so far. Thanks for all your help, I'll give it a go :P

EDIT: I changed the MouseSpeed in the P07_Include, it's looking a ton better. Thanks for the tip, I should've thought of that earlier. :) I'll look into making a custom one tomorrow. My goal is to make a script good enough to get into SRL members. Long way off yet, but hopefully I'll get there. ^^