use this
function OpenAKBank: Boolean;
var
P: TPoint;
arP: TPointArray;
ar2P: T2DPointArray;
c, tmpCTS, i: Integer;
begin
//WaitFunc(@Inverted_Ismoving, 50, 3000);
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(1);
FindColorsSpiralTolerance(MSCX, MSCY, arP, 10340332, MSX1, MSY1, MSX2, MSY2, 23);
ar2P := TPAtoATPAEx(arP, 40, 40);
SortATPAFrom(ar2P, Point(MSCX - 50, MSCY - 40));
for i := 0 to high(ar2P) do
begin
P := MiddleTPA(ar2P[I]);
//usually around 250 the "Inrange" can be lowered.
C := CountColorTolerance(4409678, P.X - 30, P.Y - 30, P.X + 30, P.Y + 30, 16);
If ( InRange(C, 200, 350))Then
Begin
MMouse(P.x, P.y, 8, 8);
if WaitUpTextMulti(['Bank', 'ank', 'booth', 'ooth'], 500)then
Begin
//Writeln('boothcount '+inttostr(C));
GetMousePos(P.x, P.y);
Mouse(p.x, P.y, 0, 0, true);
if not DidRedClick then break;
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 Break;
End else
writeln(inttostr(I)+' = '+inttostr(c));
End;
end;
If(Result)Then
Writeln('Bank open');
ColorToleranceSpeed(tmpCTS);
end;
try this instead of the SRL bank opener