Log in

View Full Version : Need help for staying on the same fishing spot!!! HELP



Cerealkillr
02-25-2012, 07:29 AM
Hey so i'm about a week and a half into scripting and im working on a fishing bot. I've got pathing and banking down, but when i find my FishSpot tpas i click a different one every loop. Is there a way to set to fish at the same tpa till its gone??


Debug

http://img138.imageshack.us/img138/1403/tpafishspots.jpg

Brandon
02-25-2012, 07:36 AM
SPS_PosToMM(SPS_GetMyPos).. That'll give u the point at which u currently stand.. next loop, walk to that point and sort ur tpa's by distance from you.. the closest one to u will be the one u were previously at.. keep fishing at it until ur done.

Cerealkillr
02-25-2012, 07:45 AM
Ok so my scripts real sloppy, but for finding the fishspot im using this.


Var TPA : TPointArray;
ATPA : T2DPointArray;
I, X, Y : Integer;
Begin
SetupSRL;
FindColorsTolerance(TPA, 11248026, MSX1, MSY1, MSX2, MSY2, 10);
ATPA := TPAToATPAEx(TPA, 20, 20);
SortATPASize(ATPA, True);
For I := 0 To Low(ATPA) Do
Begin
If MiddleTPAEx(ATPA[I], X, Y) Then
MMouse(x, y, 0, 0);wait (20);
If IsUpText('et') Then
Mouse(x, y, 0, 0, True);

GetMousePos(x,y);
Break;
End;





DebugATPABounds(ATPA);
End.



Could you help me understand a bit better by using my script as an example? Not sure how to sort tpas from the distance from me. I know the scripts messy, i havnt thrown in any antiban yet.

WT-Fakawi
02-25-2012, 08:25 AM
Try using FindColorSpiralTolerance. It starts looking for a color given a certain coordinate. Feed it the start coords where the fish spot is. That might help.

EDIT: Tagged you script with simba tags

Cerealkillr
02-25-2012, 08:52 AM
Would the start coords be x,y? (Pointer). Not really sure how to save the coords clicked.

WT-Fakawi
02-25-2012, 08:54 AM
Would the start coords be x,y? (Pointer). Not really sure how to save the coords clicked.

GetMousePos(Fx, Fy); //(<- store coords when clicked on right spot)
FindColorSpiralTol(Fx, Fy....

Cerealkillr
02-25-2012, 09:07 AM
Thanks :D Ill try it out. One more question. Since i have 3 spots to fish from in that screenshot, and i only want the ones with the "cage" option to be clicked. Is there a way to hover the mouse over them one by one until "cage" is found?

WT-Fakawi
02-25-2012, 10:24 AM
Thanks :D Ill try it out. One more question. Since i have 3 spots to fish from in that screenshot, and i only want the ones with the "cage" option to be clicked. Is there a way to hover the mouse over them one by one until "cage" is found?

Yes there is, but I have never mastered counting objects properly. I usually just store the found object-coords and use them later to start the search from that coords.