Simba Code:
procedure DepositStuff;
begin
if BankScreen then
begin
repeat
if not (LoggedIn) then
LoginPlayer;
if (ExistsItem(28) or (InvCount > 1)) then
begin
if Skiller then
DepositOther(2, 28, True) //I placed DepositOther (from bud_wis_er) at the top of my script so people don't have to update there banking.simba file to run the script.
else
DepositAll;
Wait(RandomRange(500, 75));
Writeln('Depositing inventory.')
end;
until (InvCount = 1) or (InvCount = 0)
end;
Inc(Loads);
if Random(2) = 1 then
CloseBank;
end;
Simba Code:
procedure Deposit(SlotFrom, SlotTo: Integer; vType: Variant);
var
DepositX, BScreen, DScreen, f: Boolean;
All: Variant;
I, T, x, y, c, j: Integer;
B: TBox;
Options: array of TOptions;
begin
BScreen := BankScreen;
if (not(BScreen)) then
DScreen := DepositScreen;
if not (BScreen or DScreen) then
Exit;
if vType = 2 then
srl_Warn('Deposit', '2 now means store per 2, not ''All''', 15);
DepositX := False;
if VariantIsInteger(vType) then
begin
DepositX := not InIntArray([1, 5, 10], vType);
All := vType <> 1;
end
else if VariantIsBoolean(vType) then
All := vType;
if (SlotFrom = 1) and (SlotTo = 28) and (All = true) then
if DepositAll then
exit;
for I := SlotFrom to SlotTo do
begin
if (BScreen) then
begin
If Not ExistsItem(I) Then
Continue;
if (not All) then
MouseItem(I, mouse_left)
else
MouseItem(I, mouse_right);
end else
begin
B := DepositItemBox(I);
if (not(FindColor(X, Y, srl_outline_black, B.X1, B.Y1, B.X2, B.Y2))) then
Continue;
if (not All) then
Mouse((B.X1 + B.X2) shr 1, (B.Y1 + B.Y2) shr 1, 0, 0, mouse_left)
else
Mouse((B.X1 + B.X2) shr 1, (B.Y1 + B.Y2) shr 1, 0, 0, mouse_right);
end;
if DepositX then
begin
WaitOptionMulti(['Deposit-X', 'Deposit'], 200);
T := GetSystemTime;
while (not FindColor(x, y, 8388608, MCX1, MCY1, MCX2, MCY2)) and (GetSystemTime - T < 3000) do
Wait(100);
TypeSend(vType);
end else if VariantIsInteger(vType) then
WaitOptionMulti(['Deposit-' + IntToStr(Integer(vType)), 'Deposit'], 200)
else
begin
// Starting my code
wait(2000);
Options := GetChooseOptions('All');
if (Length(Options) < 1) then
Break;
c := High(Options); ;
f := False;
for j := 0 To c do
begin
if ArrInStr(['All'], Options[j].Str) then
begin
writeln('Option all found, clicking');
ChooseOptionMulti(['Deposit-All', 'All']);
f := True;
Break;
end;
end;
if (f = False) then
ChooseOptionMulti(['Depo' , 'osit']);
end;
// Ending my code
T := GetSystemTime;
Wait(RandomRange(200, 300));
repeat
if (BScreen) then
if (not(ExistsItem(I))) then Break;
if (DScreen) then
if (not(FindColor(X, Y, srl_outline_black, B.X1, B.Y1, B.X2, B.Y2))) then Break;
Wait(50);
until(GetSystemTime - T > 2000);
end;
end;