procedure DropOffInventory;
begin
writeln('empting slot 1');
dragmouse(LocalLocation.x + 10,LocalLocation.y + 80,48,44,699,320,363,81);
wait(800 + random(500));
if(not IsCargoEmptied) then
begin
writeln('empting slot 2');
dragmouse(LocalLocation.x + 10 + 75,LocalLocation.y + 80,48,44,699,320,363,81);
wait(800 + random(500));
if(not IsCargoEmptied) then
begin
writeln('empting slot 3');
dragmouse(LocalLocation.x + 10 + 150,LocalLocation.y + 80,48,44,699,320,363,81);
wait(800 + random(500));
if(not IsCargoEmptied) then
begin
writeln('empting slot 4');
dragmouse(LocalLocation.x + 10,LocalLocation.y + 80 + 104,48,44,699,320,363,81);
wait(800 + random(500));
if(not IsCargoEmptied) then
begin
writeln('empting slot 5');
dragmouse(LocalLocation.x + 10 + 75,LocalLocation.y + 80 + 104,48,44,699,320,363,81);
wait(800 + random(500));
if(not IsCargoEmptied) then
begin
writeln('empting slot 6');
dragmouse(LocalLocation.x + 10 + 150,LocalLocation.y + 80 + 104,48,44,699,320,363,81);
end;
end; //608---712 = +104y
end;
end;
end;
end;
function IsCargoEmptied(): boolean; //if the blue bar is empty will return true.
var
blueBarBoxEstimate: tbox;
localBM: integer;
begin
blueBarBoxEstimate.X1 := LocalLocation.X - 8;
blueBarBoxEstimate.Y1 := LocalLocation.Y + 40;
blueBarBoxEstimate.X2 := LocalLocation.X + 6;
blueBarBoxEstimate.Y2 := LocalLocation.Y + 53;
if(not IsColorInBoxTolerance(6441984, blueBarBoxEstimate, 45)) then
begin
writeln('cargo empty');
result := true
end
else
begin
writeln('Keep dragging away!');
result := false
end;
end;
All functions using mouse are now lagging like this somewhat. the above lags the worst. Grr.
edit: removed a bunch of variables and did some cleaning up, everything is working decent but the functions above still will freeze until the mouse is moved and clicked (or like 2-5 minutes has passed).