Code:
function OpenBankFast(Location: String): Boolean;
var
bo, i, l, c, z: Integer;
Info: TVariantArray;
Booths: TPointArray;
ABooths: T2DPointArray;
UpText: TStringArray;
B: TBox;
begin
result := false;
if (not LoggedIn) then
Exit;
if BankScreen or PinScreen then
begin
Result := True;
Exit;
end;
UpText := ['ooth', 'Bo', 'ot'];
case LowerCase(Location) of { Sort X Sort Y Color Tol Hue Sat Count SplitTPA? W H }
'akb', 'al kharid': Info := [MSCX - 50, MSCY, 11196157, 20, 0.20, 1.15, 100, False, 10, 10]; // Fixed 12/7, #40
'lb', 'lumbridge': Info := [MSCX, MSCY - 50, 6780805, 10, 0.19, 0.27, 100, False, 10, 10]; // Fixed 12/7, #40
'veb', 'varrock east': Info := [MSCX, MSCY + 50, 3037545, 5, 0.41, 1.32, 100, False, 10, 10]; // Fixed 12/7, #40
'vwb', 'varrock west': Info := [MSCX, MSCY, 3037545, 5, 0.41, 1.32, 100, False, 10, 10]; // Fixed 12/7, #40
'feb', 'falador east': Info := [MSCX, MSCY + 50, 5008519, 10, 0.22, 0.67, 100, False, 10, 10]; // Fixed 12/7, #40
'fwb', 'falador west': Info := [MSCX, MSCY + 50, 5074569, 15, 0.22, 0.67, 50, False, 10, 10]; // Fixed 12/7, #40
'db', 'draynor': begin UpText := ['ount', 'unte', 'oun', 'unter'];
Info := [MSCX - 50, MSCY, 5136741, 5, 0.73, 0.49, 15, False, 10, 10]; // Fixed 12/7, #40
end;
'eb', 'edgeville bank': Info := [MSCX + 20, MSCY, 3561835, 20, 0.32, 0.61, 50, False, 10, 10]; // Fixed 12/7, #40
'ctb', 'catherby bank': Info := [MSCX, MSCY, 3239049, 8, 0.20, 0.20, 100, False, 10, 10];
'clt', 'camelot bank': Info := [MSCX, MSCY, 7636882, 5, 0.20, 0.20, 100, False, 10, 10];
'nab', 'north ardougne bank': Info := [MSCX, MSCY, 4084572, 5, 0.20, 0.20, 100, False, 10, 10];
'sab', 'south ardougne bank': Info := [MSCX, MSCY, 4084572, 5, 0.20, 0.20, 100, False, 10, 10];
'ynb', 'yanille bank': Info := [MSCX, MSCY, 3239049, 7, 0.20, 0.20, 100, False, 10, 10];
'ngb', 'north gnome bank': Info := [MSCX, MSCY, 3239049, 7, 0.20, 0.20, 100, False, 10, 10];
'sgb', 'south gnome bank': Info := [MSCX, MSCY, 3239049, 7, 0.20, 0.20, 100, False, 10, 10];
'wgb', 'warrior guild bank': Info := [MSCX, MSCY, 2578286, 7, 0.20, 0.20, 100, False, 10, 10];
'fgb', 'fishing guild bank': Info := [MSCX, MSCY, 2908796, 10, 0.20, 0.20, 100, False, 10, 10];
else
begin
srl_Warn('OpenBankFast', 'Unknown bank: '+Location, warn_AllVersions);
Exit;
end;
end;
MakeCompass('n');
z := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(Info[4], Info[5]);
FindColorsSpiralTolerance(Info[0], Info[1], Booths, Info[2], MSX1, MSY1, MSX2, MSY2, Info[3]);
ColorToleranceSpeed(z);
SetColorSpeed2Modifiers(0.2, 0.2);
{ Split to ATPA. }
if Info[7] then
ABooths := SplitTPA(Booths, 1)
else
ABooths := TPAtoATPA(Booths, 10);
Booths := [];
{ Go through ATPA. }
l := GetArrayLength(ABooths) -1;
for i := 0 to l do
begin
{ Too few pixels. }
if (Length(ABooths[i]) < Info[6]) then
Continue;
{ Too small TPA bounds. }
B := GetTPABounds(ABooths[i]);
If ((B.X2 - B.X1) < Info[8]) Or ((B.Y2 - B.Y1) < Info[9]) Then
Continue;
Inc(bo);
SetArrayLength(Booths, bo);
Booths[bo-1] := MiddleTPA(ABooths[i]);
end;
SortTPAFrom(Booths, Point(Info[0], Info[1]));
l := GetArrayLength(Booths) -1;
for i := 0 to l do
begin
MMouse(Booths[i].X, Booths[i].Y, 3, 3);
if WaitUpTextMulti(UpText, 1000) Then
begin
GetMousePos(Booths[i].X, Booths[i].Y);
Mouse(Booths[i].X, Booths[i].Y, 0, 0, mouse_right);
if WaitOptionMulti(['uickly', 'uick', 'ickly', 'ckl'], 1000) then
begin
FFLag(0);
MarkTime(c);
repeat
Wait(100);
until (BankScreen) or (PinScreen) or (TimeFromMark(c) > 10000);
Wait(Random(300));
if (HowManyPlayers > 0) then
if (Players[CurrentPlayer].Pin <> '') then
InPin(Players[CurrentPlayer].Pin);
Result := (BankScreen) or (PinScreen);
if (Result) then Exit;
end;
end;
[THIS LINE] end;[/THIS LINE]
end;
Scroll down the code to see which line is it.