When using the
function while walking, occasionally the flag will slide out of the view of the minimap.
I've worked my way around this on multiple occasions but this time it does not seem to be working so:
I am making a procedure to walk frm the Edgeville Yews to the bank using DTM's as the main walking, Random clicking to the northeast as secondary, and symbol-clicking as the last resort. It is also running very fast; right when it gets to the bank it opens and deposits everything.
Here is my procedure without the added Failsafe for when the flag appears outside of the minimap:
SCAR Code:
procedure DToBank;
var
X1, Y1 : integer;
DMark : integer;
begin
if DTMRotated(EdgeVilleBank, X1, Y1, MMX1, MMY1, MMX2, MMY2 - 50) then begin
Mouse(X1 - 2, Y1 - 3, 3, 3, True);
WriteLn('DTM Found'); //Used for testing purposes.
Flag;
end else begin
Mouse(658 - random(5), 38 + random(10), 8, 8, true); //Clicking to the northwest.
Flag;
wait(300 + random(500));
if DTMRotated(EdgeVilleBank, X1, Y1, MMX1, MMY1, MMX2, MMY2 - 50) then begin
Mouse(X1 - 20, Y1 - 3, 3, 3, True);
Flag;
end else begin
FindSymbol(X1, Y1, 'Bank'); //FindSymbol last resort. Will add more Failsafes later.
Mouse(X1, Y1, 5, 5, True);
Flag;
end;
end;
end;
begin
SetupSRL;
DSetupDTM; //Separate Procedure to setup all my DTMs that I will use.
DToBank; //Walk to bank procedure
OpenBankFast('eb');
Deposit(2, 28, True);
DToYews; //Walk to Yews.
end.
Sofar it has worked flawlessly. Ran it several times going back and forth from the yews to the bank. The only problem with it is when the flag goes out of the map so I tried adding a failsafe:
SCAR Code:
procedure DToBank;
var
X1, Y1, X2, Y2 : integer;
DMark : integer;
begin
if DTMRotated(EdgeVilleBank, X1, Y1, MMX1, MMY1, MMX2, MMY2 - 50) then begin
Mouse(X1 - 2, Y1 - 3, 3, 3, True);
WriteLn('DTM Found');
Flag;
if not Flag and not FindSymbol(X2, Y2, 'furnace') then begin
while not Flag do wait(5);
Flag;
end;
end else begin
Mouse(658, 38 + random(10), 8, 8, true);
Flag;
wait(300 + random(500));
if DTMRotated(EdgeVilleBank, X1, Y1, MMX1, MMY1, MMX2, MMY2 - 50) then begin
Mouse(X1 - 20, Y1 - 3, 3, 3, True);
Flag;
end else begin
FindSymbol(X1, Y1, 'Bank');
Mouse(X1, Y1, 5, 5, True);
Flag;
end;
end;
end;
I've even tried adding failsafes such as:
SCAR Code:
MarkTime(Mark);
while not FindSymbol(X2, Y2, 'furnace') do begin
wait(5);
if TimeFromMark(Mark) > (10000 + random(5000)) then begin
DTMRotated(EdgeVilleBank, X1, Y1, MMX1, MMY1, MMX2, MMY2)
Mouse(X1, Y1, 3, 3, True);
Flag;
end;
end;
And either right when the Flag disapears it starts searching for the bank booth, OR when it reaches the bank it sits there doing nothing.
Any help or ideas would be greatly appreciated. Thank you!