SCAR Code:
function OpenBankQuiet(WhichBank: string): Boolean;
var
TheCounter, dx, dy, tol, Mark2, Mark3: Integer;
acc, accthres: Extended;
begin
case WhichBank of
'feb': TheCounter := BitmapFromString(1, 10, '6C583296897A948779948779736' +
'C63A59E968C7F6F9686749B8A7685663E');
// fally east
{ 'feb': TheCounter := BitmapFromString(1, 43, '252323554227644D' +
'2D6E55337B5F3A7B5F3A6E5A336E5A33968979948778928677928' +
'677756D6383786A8D7F6F9586719C8B7687683F8C6D42896E4D80' +
'68498068497D65487D65487A63467A6346776145776145755F437' +
'55F436E5533715735775C38775C387762388F6F43816A3B7E683A' +
'816A3B9276547E683A846C3D746036');
} // fally west
'fwb': TheCounter := BitmapFromString(1, 29, '98887381' +
'633B87683F7D6548836A4A7D65487D65487A63467A63467A63467' +
'76145776145755F43755F436B52316B52316E5533715735775C38' +
'A1835C9F815B8C6D428C6D428C6D428C6D427B643A7B643A74603' +
'68B866F');
// varrock west
'vwb': TheCounter := BitmapFromString(30, 1, 'z78DA333530B' +
'130B1304521413484044218DB05C6868A1A98184144CC0C4D5C8C' +
'8C9149134B6333034B9C24C24C98692011430C930DA1A48BB1235' +
'0171209001C2C2544');
// varrock east
'veb': TheCounter := BitmapFromString(30, 1, 'z78DA6DC' +
'E5D0A80300C03E02BCDD92EE9E3DCF0FE4732EC077D90908F5228' +
'9460E689AEDC0C35D13E068DCEAA6E5DDB34E7E2D6524C1D96B7E' +
'5B0D0DCCCFF1CF70945095C92CBAE56E6F1C972C4DEE046457B00' +
'D4FB2728');
// draynor and this works too for alkharid
'akb', 'db', 'eb': TheCounter := BitmapFromString(34, 1, 'z78DA658E4B0' +
'E80300844AF34FCB45DAA70FF2B89B40B12339997F0C980BA5C98' +
'06837A7AE828CE74551F77FF51CBCD1FC5D901369614282816E59' +
'683EF94207AF2BA55C9948672BFB2FB7D5A1F6E8A10D0C9274552' +
'39FD022AE92A73');
end;
MarkTime(Mark3);
tol := 1;
accthres := 0.6;
repeat
if IsUpTextMulti('ank', 'Bo', 'ot') then
begin
GetMousePos(dx, dy);
Mouse(dx, dy, 0, 0, False);
if ChooseOption(dx, dy, 'uickly') then
begin
MarkTime(Mark2);
repeat
Wait(10);
if TimeFromMark(Mark2) > 20000 then
begin
WriteLn('couldnt find the bank. Exiting');
Break;
FreeBitmap(TheCounter);
Exit;
end;
until BankScreen;
FreeBitmap(TheCounter);
Exit;
end;
end;
FindDeformedBitmapToleranceIn(TheCounter, dx, dy, MSX1 + 50, MSY1 + 50, MSX2
- 50, MSY2 - 50, tol, 4, True, acc);
if (acc >= accthres) then
begin
MMouse(dx, dy, 0, 0);
if IsUpTextMulti('ank', 'Bo', 'ot') then
begin
GetMousePos(dx, dy);
Mouse(dx, dy, 0, 0, False);
if ChooseOption(dx, dy, 'uickly') then
begin
MarkTime(Mark2);
repeat
Wait(10);
if TimeFromMark(Mark2) > 20000 then
begin
WriteLn('couldnt find the bank. Exiting');
FreeBitmap(TheCounter);
Exit;
end;
until BankScreen;
end;
Result := True;
FreeBitmap(TheCounter);
Exit;
end;
end;
Wait(100);
FindNormalRandoms;
tol := tol + 4;
if tol >= 20 then
begin
tol := 1;
accthres := accthres - 0.1;
if accthres < 0.2 then
begin
WriteLn('couldnt find the bank. Exiting');
FreeBitmap(TheCounter);
Exit;
end;
end;
until TimeFromMark(Mark3) > 60000;
FreeBitmap(TheCounter);
end;