Hello everyone
What's the best way to find a fishing spot?
It's easy to find still things, like ores etc. But fishing spots are moving, would appreciate your input/ideas
Hello everyone
What's the best way to find a fishing spot?
It's easy to find still things, like ores etc. But fishing spots are moving, would appreciate your input/ideas
Scripts
Semtex Fishing Guild
I found looking for a certain color (the white spots) and then building a small TBox around that and searching for pixel shifting within that box to be highly reliable.
Ultimately use the mouse text to make sure you have infact found the right location, otherwise search again.
I'm trying to make a fishing guild script, i got the sps walking and banking down, but the fishing is a thoughy, been looking at other peoples fishing scripts for idea's, but most of them doesn't work very well
Scripts
Semtex Fishing Guild
This is the spot snippet. Write this a while ago so it's a bit bloated but you will get the general idea
Simba Code:function findSpot(): boolean;
var
x, y, i: integer;
TPAwater, TPAspot: TPointArray;
ATPAwater, ATPAspot: T2DPointArray;
begin
if not isLoggedIn() then exit;
// look for the water colour
findColorsSpiralTolerance(x, y, TPAwater, 9064239, mainScreen.getBounds(), 6, colorSetting(2, 0.11, 0.57));
debug('Water TPA length: ' + toStr(length(TPAwater)));
if length(TPAwater) > 0 then
begin
mainScreen.filterPointsPlayer(TPAwater);
ATPAwater := TPAwater.cluster(10); // split into an ATPA and filter out small TPAs
ATPAwater.filterBetween(1, 100);
debug('Water ATPA length: ' + toStr(length(ATPAwater)));
if length(ATPAwater) > 0 then
begin
ATPAwater.sortFromMidPoint(mainScreen.playerPoint); // Sort all water TPAs from player
paintDebug('atpa', ATPAwater);
for i := 0 to high(ATPAwater) do // Looping through water TPAs (although there is probably only 1)
begin
findColorsSpiralTolerance(x, y, TPAspot, 14468515, ATPAwater[i].getBounds(), 12, colorSetting(2, 0.28, 0.25));
debug('Spot TPA length: ' + toStr(length(TPAspot))); // looking for spot colour, inside water TPA bounds
if length(TPAspot) > 0 then
begin
mainScreen.filterPointsPlayer(TPAspot);
ATPAspot := TPAspot.cluster(10); // Split into individual fishing spots
ATPAspot.filterBetween(1, 3);
debug('Spot ATPA length: ' + toStr(length(ATPAspot)));
if length(ATPAspot) > 0 then
begin
ATPAwater.sortFromMidPoint(mainScreen.playerPoint);
paintDebug('atpa', ATPAspot);
for i := 0 to high(ATPAspot) do // Loop through each potential fishing spot, check overText
begin
mouseBox(ATPAspot[i].getBounds(), MOUSE_MOVE);
if isMouseOverText(['age']) then
begin
debug('Found spot mouseOverText');
if randomClick(10, ['age']) then
begin
randomMouse(10, false, 500, 1300);
result := true;
break;
end;
end else
debug('Spot mouseOverText didn''t match');
end;
paintDebug('clear');
end else
debug('Spot ATPA length = 0 after filter');
end;
end;
end;
end;
end;
@The Mayor; Thanks i will try with the code you provided, if that's okay?
Although when i'm compiling it, it doesnt like the debug commands or the random mouse
I've out commented the lines it wont compile, the error is: Unknown declaration for all of them
Simba Code:function findSpot(): boolean;
var
x, y, i: integer;
TPAwater, TPAspot: TPointArray;
ATPAwater, ATPAspot: T2DPointArray;
begin
if not isLoggedIn() then exit;
// look for the water colour
findColorsSpiralTolerance(x, y, TPAwater, 9064239, mainScreen.getBounds(), 6, colorSetting(2, 0.11, 0.57));
//debug('Water TPA length: ' + toStr(length(TPAwater)));
if length(TPAwater) > 0 then
begin
mainScreen.filterPointsPlayer(TPAwater);
ATPAwater := TPAwater.cluster(10); // split into an ATPA and filter out small TPAs
ATPAwater.filterBetween(1, 100);
//debug('Water ATPA length: ' + toStr(length(ATPAwater)));
if length(ATPAwater) > 0 then
begin
ATPAwater.sortFromMidPoint(mainScreen.playerPoint); // Sort all water TPAs from player
//paintDebug('atpa', ATPAwater);
for i := 0 to high(ATPAwater) do // Looping through water TPAs (although there is probably only 1)
begin
findColorsSpiralTolerance(x, y, TPAspot, 14468515, ATPAwater[i].getBounds(), 12, colorSetting(2, 0.28, 0.25));
//debug('Spot TPA length: ' + toStr(length(TPAspot))); // looking for spot colour, inside water TPA bounds
if length(TPAspot) > 0 then
begin
mainScreen.filterPointsPlayer(TPAspot);
ATPAspot := TPAspot.cluster(10); // Split into individual fishing spots
ATPAspot.filterBetween(1, 3);
//debug('Spot ATPA length: ' + toStr(length(ATPAspot)));
if length(ATPAspot) > 0 then
begin
ATPAwater.sortFromMidPoint(mainScreen.playerPoint);
//paintDebug('atpa', ATPAspot);
for i := 0 to high(ATPAspot) do // Loop through each potential fishing spot, check overText
begin
mouseBox(ATPAspot[i].getBounds(), MOUSE_MOVE);
if isMouseOverText(['age']) then
begin
//debug('Found spot mouseOverText');
//if randomClick(10, ['age']) then
begin
//randomMouse(10, false, 500, 1300);
result := true;
break;
end;
end else
//debug('Spot mouseOverText didn''t match');
end;
//paintDebug('clear');
end else
//debug('Spot ATPA length = 0 after filter');
end;
end;
end;
end;
end;
Scripts
Semtex Fishing Guild
Yea, those are some other procedure I had in that script. You can just change the debug to writeLn, and the mouse stuff to soemthing like
Simba Code:for i := 0 to high(ATPAspot) do
begin
mouseBox(ATPAspot[i].getBounds(), MOUSE_MOVE);
if isMouseOverText(['age']) then
begin
fastClick(MOUSE_RIGHT)
if chooseOption.select(['age']) then
exit(true);
end;
end;
@The Mayor;
Simba Code:function findSpot(): boolean;
var
x, y, i: integer;
TPAwater, TPAspot: TPointArray;
ATPAwater, ATPAspot: T2DPointArray;
begin
if not isLoggedIn() then exit;
// look for the water colour
findColorsSpiralTolerance(x, y, TPAwater, 9064239, mainScreen.getBounds(), 6, colorSetting(2, 0.11, 0.57));
writeLn('Water TPA length: ' + toStr(length(TPAwater)));
if length(TPAwater) > 0 then
begin
mainScreen.filterPointsPlayer(TPAwater);
ATPAwater := TPAwater.cluster(10); // split into an ATPA and filter out small TPAs
ATPAwater.filterBetween(1, 100);
writeLn('Water ATPA length: ' + toStr(length(ATPAwater)));
if length(ATPAwater) > 0 then
begin
ATPAwater.sortFromMidPoint(mainScreen.playerPoint); // Sort all water TPAs from player
writeLn('atpa', ATPAwater);
for i := 0 to high(ATPAwater) do // Looping through water TPAs (although there is probably only 1)
begin
findColorsSpiralTolerance(x, y, TPAspot, 14468515, ATPAwater[i].getBounds(), 12, colorSetting(2, 0.28, 0.25));
writeLn('Spot TPA length: ' + toStr(length(TPAspot))); // looking for spot colour, inside water TPA bounds
if length(TPAspot) > 0 then
begin
mainScreen.filterPointsPlayer(TPAspot);
ATPAspot := TPAspot.cluster(10); // Split into individual fishing spots
ATPAspot.filterBetween(1, 3);
writeLn('Spot ATPA length: ' + toStr(length(ATPAspot)));
if length(ATPAspot) > 0 then
begin
ATPAwater.sortFromMidPoint(mainScreen.playerPoint);
writeLn('atpa', ATPAspot);
for i := 0 to high(ATPAspot) do // Loop through each potential fishing spot, check overText
begin
mouseBox(ATPAspot[i].getBounds(), MOUSE_MOVE);
if isMouseOverText(['net']) then
begin
writeLn('Found spot mouseOverText');
for i := 0 to high(ATPAspot) do
begin
mouseBox(ATPAspot[i].getBounds(), MOUSE_MOVE);
if isMouseOverText(['net']) then
begin
fastClick(MOUSE_RIGHT)
if chooseOption.select(['harpoon']) then
exit(true);
end;
end;
end else
writeLn('Spot mouseOverText didn''t match');
end;
writeLn('clear');
end else
writeLn('Spot ATPA length = 0 after filter');
end;
end;
end;
end;
end;
Like this?
One other thing, i followed your aio guide to scripting(really good btw), and the sps was quite simple, but when it came to finding finding colors for deposit box/banker, i had some trouble.
I chose one color at a time and pressed show color, if it marked what i wanted it to mark i let it be, if it didnt, i deleted it.
But i could never get to mark the entire banker, like you do in your guide, is there a good trick to using aca for color collecting?
Scripts
Semtex Fishing Guild
Nah, you still have half of the old loop in there. Delete all the red stuff
The simply rule with ACA is the more colours you can pick the better. Even if it matches good, pick more. Change worlds and pick more. The more colours you use to generate the best colour, the more stable your colour will be.
@The Mayor; Thanks alot
i just needed to figure out how to add colors
I'll let you know if it works or not, when i'm done collecting colors!
Last edited by Semtex; 08-17-2015 at 08:40 PM.
Scripts
Semtex Fishing Guild
@The Mayor;
Hiyo mate, the function is working perfectly!
Now i just have to make it identify that it's fishing, because it will click the spot over and over again.
You don't have to actually give the function/procedure this time just guide me in the right direction :P
Regards Semtex
Scripts
Semtex Fishing Guild
Cheers
Another question though.
Is there a way where you limit the part of the screen it's fishing for.
For example, at the fishing guild, when zoomed out so you can see all the north docks fishing spots, you can also see the south docks fishing spots, to prevent it from clicking spots there, then make it look for spots within a predefined X-Y coords on the mainscreen?
Scripts
Semtex Fishing Guild
There are currently 1 users browsing this thread. (0 members and 1 guests)