SRL Archive - Help

Need help for staying on the same fishing spot!!! HELP


Cerealkillr

2012-02-25 02:29:36

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


Brandon

2012-02-25 02:36:11

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

2012-02-25 02:45:41

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

2012-02-25 03:25:44

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

2012-02-25 03:52:04

Would the start coords be x,y? (Pointer). Not really sure how to save the coords clicked.

WT-Fakawi

2012-02-25 03:54:20

From: Cerealkillr
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

2012-02-25 04:07:49

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

2012-02-25 05:24:11

From: Cerealkillr
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.