SCAR Code:
function FindBanker: boolean;
var
Colors: TIntegerArray;
X, Y, I, A, M, curCTS: Integer;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
Result := False;
if not LoggedIn then exit;
curCTS := GetColorToleranceSpeed;
Colors := [6570832, 5322305, 5125182, 5519427];
for I := 0 to 3 do
begin
ColorToleranceSpeed(3);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, Colors[I], MSX1, MSY1, MSX2, MSY2, 7);
if Length(TPA) = 0 then exit;
ColorToleranceSpeed(1);
ATPA := TPAtoATPAEx(TPA, 4, 4);
M := High(ATPA);
for A := 0 to M do
if MiddleTPAEx(ATPA[A], X, Y) then
begin
MMouse(X, Y, 6, 6);
Wait(100 + Random(50));
if Pos('Banker', RS_GetUpText) > 0 then
begin
GetMousePos(X, Y);
Mouse(X, Y, 0, 0, False);
waitoption('Bank', 100);
Result := True;
ColorToleranceSpeed(curCTS);
Exit;
end;
end;
end;
ColorToleranceSpeed(curCTS);
end;
procedure Bank_U;
var x, y: integer;
label back;
begin
if findubow(x, y, mix1, miy1, mix2, miy2) or
not finddtm(getdtm('knife'), x, y, mix1, miy1, mix2, miy2) or
not finddtm(GetDTM('log'), x, y, mix1, miy1, mix2, miy2) then
if not FindBanker then
exit;
writeln('found banker');
repeat
wait(100);
until Pinscreen or BankScreen;
writeln('Got Screen');
if (Players[CurrentPlayer].Pin <> '') then
InPin(Players[CurrentPlayer].Pin);
if not bankscreen then wait(500 + random(500));
writeln('In Teh Bank');
back:
if findubow(x, y, mix1, miy1, mix2, miy2) then
begin
writeln('Depositing bows');
mmouse(x, y, 4, 4);
if isuptext ('longbow (u)') then
begin
getmousepos(x, y);
mouse(x, y, 0, 0, false);
waitoption('All', 100);
end else deposit(2, 28, 27);
end else writeln('No bows in inv');
if not finddtm(getdtm('knife'), x, y, mix1, miy1, mix2, miy2) then
begin
Withdraw(0, 1, 1);
while not finddtm(getdtm('knife'), x, y, mix1, miy1, mix2, miy2) do wait(100 + random(10));
end;
wait(10 + random(10));
if not finddtm(GetDTM('log'), x, y, mix1, miy1, mix2, miy2) then
Withdraw(0, 0, 27);
if not finddtm(GetDTM('log'), x, y, mix1, miy1, mix2, miy2) or
finddtm(GetDTM('knife'), x, y, mix1, miy1, mix2, miy2) then
goto back;
freedtm(getdtm('knife'));
freedtm(getdtm('log'));
closebank;
inc(players[currentplayer].banked);
end;