Untitled diff

Created Diff never expires
56 removals
86 lines
8 additions
78 lines
procedure BankCustom;
procedure BankCustom;
var
var
TPAA: T2DPointArray;
TPAA: T2DPointArray;
CTS, L, I, X, Y, Tries, BankFound: Integer;
CTS, L, I, X, Y, Tries, BankFound: Integer;
TPA: TPointArray;
TPA: TPointArray;
begin
begin
repeat
repeat
PlayerProtection;
PlayerProtection;
CTS := GetColorToleranceSpeed;
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.11, 2.93);
SetColorSpeed2Modifiers(0.11, 2.93);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 2051676, MSX1, MSY1, MSX2, MSY2, 4);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 2051676, MSX1, MSY1, MSX2, MSY2, 4);
TPAA := TPAToATPAEx(TPA, 200, 100);
TPAA := TPAToATPAEx(TPA, 200, 100);
DebugATPA(TPAA,'');
DebugATPA(TPAA, '');
L := High(TPAA);
L := High(TPAA);
ColorToleranceSpeed(CTS);
ColorToleranceSpeed(CTS);
for I := 0 to L do
for I := 0 to L do
begin
begin
MiddleTPAEx(TPAA[i], X, Y);
MiddleTPAEx(TPAA[i], X, Y);
MMouse(X, Y, 3, 3);
MMouse(X, Y, 3, 3);
if WaitUptext('th', 300) then
if WaitUptext('th', 300) then
begin
begin
GetMousePos(X, Y);
GetMousePos(X, Y);
Mouse(X, Y, 0, 0, True);
Mouse(X, Y, 0, 0, True);
Wait(2500 + Random(500));
Wait(2500 + Random(500));
BankFound := 1;
BankFound := 1;
Break;
Break;
end;
end;
end;
end;
if not BankScreen then
if not BankScreen then
begin
begin
if not WaitUptext('th', 300) then
if not WaitUptext('th', 300) then
begin
begin
MakeCompass(randomrange(-20, 20));
MakeCompass(randomrange( - 20, 20));
blindwalk(Point(3254 + random(1), 3420 + random(1)));
blindwalk(Point(3254 + random(1), 3420 + random(1)));
PlayerProtection;
PlayerProtection;
inc(Tries)
inc(Tries);
WriteLn('Attempt number: ' + IntToStr(Tries));
WriteLn('Attempt number: ' + IntToStr(Tries));
end;
end;
end;
end;
if Tries > 5 then
if Tries > 5 then
begin
begin
WriteLn('Failed finding the bank too many times. Exiting Script.');
WriteLn('Failed finding the bank too many times. Exiting Script.');
Logout;
Logout;
TerminateScript;
TerminateScript;
end;
end;
until (BankFound = 1);
until(BankFound = 1);
if PinScreen then
if PinScreen then
begin
begin
InPin(BANKPIN);
InPin(BANKPIN);
end;
end;
repeat
repeat
if BankScreen then
if BankScreen then
begin
begin
if finddtm(EssDTM, X, Y, MSX1, MSY1, MSX2, MSY2) then
if finddtm(EssDTM, X, Y, MSX1, MSY1, MSX2, MSY2) then
begin
begin
QuickDeposit('inv');
QuickDeposit('inv');
WriteLn('Commencing Banking');
WriteLn('Commencing Banking');
MMouse(X, Y, 3, 3);
MMouse(X, Y, 3, 3);
wait(randomrange(10, 30));
wait(randomrange(10, 30));
GetMousePos(X, Y);
GetMousePos(X, Y);
Mouse(X, Y, 0, 0, mouse_right);
Mouse(X, Y, 0, 0, mouse_right);
wait(randomrange(10, 30));
wait(randomrange(10, 30));
ChooseOption('Withdraw-All')
ChooseOption('Withdraw-All');
wait(randomrange(10, 30));
wait(randomrange(10, 30));
CloseBank;
CloseBank;
Writeln('Banking Complete');
Writeln('Banking Complete');
PlayerProtection;
PlayerProtection;
Exit;
Exit;
end else
end else
begin
begin
WriteLn('Could not find the Essence DTM. Consider making another one.');
WriteLn('Could not find the Essence DTM. Consider making another one.');
Logout;
Logout;
TerminateScript;
TerminateScript;
end;
end;
end;
end;
until (False);
until not (LoggedIn);
end;
end;