Simba Code:
Procedure OpenandBankStuff;
Var
X, Y, T, I, Steelbar: Integer;
Label
OpenBanklbl, BankHandle;
begin
if not loggedin then exit;
//Bank_AK
T := GetSystemTime;
OpenBanklbl:
If(BankScreen)Then
Begin
I := 0;
Goto BankHandle;
End;
If(GetSystemTime - T > 120000)Then
Begin
Writeln('banking took too long');
CloseBank;
Logout;
Exit;
End;
If(I > 10)Then
Begin
Writeln('Cant find no bank');
Wait(1500);
Logout;
Exit;
End;
OpenAKBank;
Inc(I);
Goto OpenBanklbl;
//never here
BankHandle:
if(I > 2)Then
Begin
Writeln('Cant find no steelbars wtf');
Wait(1500);
CloseBank;
Logout;
Exit;
End;
DepositAll;
Steelbar := BitmapFromString(13, 11, 'meJyLjUuKxY1qahohiBg1QGRsbA' +
'pHuNSgKUNGg1kZskpkr+FSBpSqr2+Vl1eAIEz1cDXIyjDVw9UAEQC' +
'pgY0d');
If FindBitmapToleranceIn(Steelbar, x, y, MBX1, MBY1, MBX2, MBY2, 25) then
Begin
Mouse(X, Y, 9, 9, False);
if not ChooseOption('ithdraw-All')then
begin
Inc(I);
Goto BankHandle;
end else
SteelbarsDone := SteelbarsDone + 28;
End else
Begin
SearchBank('Steel bar');
Wait(350+Random(250));
Inc(I);
Goto BankHandle;
End;
FreeBitmap( Steelbar );
end;
I use this in a few Al-Kharid banking scripts i have.
this is how i open the bank
Simba Code:
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;
End;
end;
If(Result)Then
Writeln('Bank open');
ColorToleranceSpeed(tmpCTS);
end;
feel free to copy/edit but leave credits if u release