Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
Sign in to follow this  
haidargubbe

Upgrade

Recommended Posts

program Gopro;

const
  ROUNDS = 500; // Before banking?

var
  normal_path, bank_path, return_path: TPointArray;
      
procedure Setup;
var
  U, D, L, R: TPoint;
begin
  U := Point(636, 586);
  D := Point(635, 669);    
  L := Point(595, 627); 
  R := Point(676, 626);
  normal_path := [L, U, R, R, R, U, L, L, L, L, L, U, R, R, R, R, R, R, R,
                  R, U, L, L, L, L, L, L, L, L, U, R, R, R, R, R, R, U, L, L,
                  L, L, L, D, L, D, D, D, D, D, R, R, D];
  bank_path := [D, D, D, L, L, D, D, D, D, D, D, D, D, D, L, L];
  return_path := [R, R, U, U, U, U, U, U, U, U, U, R, R, U, U, U];
end;  

procedure Move(coordinates: TPoint);
begin
  MoveMouse(coordinates.X, coordinates.Y);
  Wait(2000);
  ClickMouse(coordinates.X, coordinates.Y, mbLeft);
  Wait(3000);
end;

procedure RunPath(path: TPointArray);
var
  h, i: Integer;
begin
  h := High(path);
  for i := 0 to h do
  begin
    MoveMouse(path[i].X, path[i].Y);
    Wait(2000);
    ClickMouse(path[i].X, path[i].Y, mbLeft);
    Wait(3000);
  end;  
end;

procedure Detection;
var
  x, y: Integer;
begin
  while FindColor(x, y, 3489840, 94, 43, 171, 779) do
  begin
    MoveMouse(x, y);
    Wait(350);
    ClickMouse(x, y, mbLeft);
    Wait(50 + Random(35));
    ClickMouse(x, y, mbLeft);
    Wait(2000);
  end;
end;

procedure Detection1;
var
  x, y: Integer;
begin
  while FindColor(x, y, 5262417, 94, 43, 171, 779) do
  begin
    MoveMouse(x, y);
    Wait(350);
    ClickMouse(x, y, mbLeft);
    Wait(50 + Random(35));
    ClickMouse(x, y, mbLeft);
    Wait(2000);
  end;
end;

procedure Detection2;
var
  x, y: Integer;
begin
  while FindColor(x, y, 7508129, 94, 43, 171, 779) do
  begin
    MoveMouse(x, y);
    Wait(350);
    ClickMouse(x, y, mbLeft);
    Wait(50 + Random(35));
    ClickMouse(x, y, mbLeft);
    Wait(2000);
  end;
end;

procedure Put;
begin
  MoveMouse(525, 769);
  Wait(500)
  ClickMouse(525, 769, mbLeft);
  Wait(500)
  MoveMouse(775, 654);
  Wait(500)
  ClickMouse(775, 654, mbLeft);
  Wait(500)
  MoveMouse(974, 128);
  Wait(500)
  ClickMouse(974, 128, mbLeft); 
end;

procedure Play;
var
  h, i, c: Integer;
begin
  h := High(normal_path);
  repeat  
    for c := 1 to ROUNDS do           
      for i := 0 to h do
      begin  
        Detection;
        Detection1; 
        Detection2;       
        Move(normal_path[i]);  
      end; 
    RunPath(bank_path);
    Put;
    RunPath(return_path); 
  until False;
end;

begin
  case (ROUNDS > 0) of
    True: 
    begin
     Setup;
     Play;
    end;
    False: WriteLn('TERMINATING: Invalid rounds! Must be over 0...');    
  end;
end.

Hello! this seems to be working ,but now i want to upgrade it so that all commands is keydown but i cant seem to get it to work.

i want all the runpatchs to use the arrowkeys so(keydown:up, down, left, right).

 

and if possible to get the Detection; to click on bitmaps instead of colors.
if someone can help me ill be grateful.

Thank you!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×