Advertisement
WarPie90

Farm game fisher

Oct 13th, 2023
1,560
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 1.35 KB | None | 0 0
  1. program InfiniteFishing;
  2.  
  3. {$I SRL/osr.simba}
  4. var
  5.   TPA,bar, fish, blue: TPointArray;
  6.   B: TBox;
  7.  
  8. const
  9.   COLOR_SMALL_POND  := CTS2(10261612, 9, 0.43, 1.29);
  10.   COLOR_FOREST_POND := CTS2(6715733, 9, 0.94, 1.46);
  11.  
  12. begin
  13.   while True do
  14.   begin
  15.     if IsKeyDown(VK_ESCAPE) then TerminateScript;
  16.  
  17.     srl.FindColors(TPA, COLOR_FOREST_POND, GetClientBounds());
  18.  
  19.  
  20.     TPA := TPA.Cluster(4).Biggest().Grow(5).Erode(5);
  21.     Fish := srl.GetPixelShiftTPA(TPA.Bounds(), 100);
  22.     if Length(Fish) > 100 then
  23.     begin
  24.       Mouse.Teleport(Fish.Mean());
  25.       Sleep(50);
  26.       for 0 to 3 do // idk.. bad game
  27.       begin
  28.         Mouse.Click(MOUSE_LEFT);
  29.         Sleep(10);
  30.       end;
  31.  
  32.       B := TPA.Bounds();
  33.       B.y2 := GetClientBounds().Y2;
  34.       if not WaitUntil((srl.FindColors(bar, CTS2(3355443,5), B) > 80*200) and (bar.Bounds.Height > 100), 30, 800) then
  35.         continue;
  36.  
  37.       B.x1 := bar.Mean().x-160;
  38.       B.x2 := B.x1 + 320;
  39.  
  40.       if WaitUntil(srl.FindColors(blue, CTS1($FF0000, 5), B) > 200, 50, 900) then
  41.       begin
  42.         for 0 to 30 do
  43.           if srl.FindColors(blue, CTS1($FF0000, 20), B) > 200 then
  44.           begin
  45.             Mouse.Teleport(blue.Cluster(2).Biggest().Mean());
  46.             Mouse.Hold(MOUSE_LEFT);
  47.             Wait(20);
  48.             Mouse.Release(MOUSE_LEFT);
  49.           end;
  50.       end;
  51.     end;
  52.   end;
  53. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement