SRL's Deposit function:
procedure Deposit(SlotFrom, SlotTo: Integer; vType: Variant);
var
DepositX, BScreen, DScreen: Boolean;
All: Variant;
I, T, x, y: Integer;
B: TBox;
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;
case VarType(vType) of
varInteger: begin
DepositX := not InIntArray([1, 5, 10], vType);
if vType = 1 then
All := False
else
All := True;
end;
varBoolean: All := vType;
end;
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;
MouseItem(I, not All);
end else
begin
B := DepositItemBox(I);
if (not(FindColor(X, Y, srl_outline_black, B.X1, B.Y1, B.X2, B.Y2))) then
Continue;
Mouse((B.X1 + B.X2) shr 1, (B.Y1 + B.Y2) shr 1, 0, 0, not All);
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 VarType(vType) = varInteger then
WaitOptionMulti(['Deposit-' + inttostr(vType), 'Deposit'], 200)
else
WaitOptionMulti(['Deposit-All', 'Deposit'], 200);
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;
As you can see, no matter what option your looking for, 'Deposit' is always searched for and would therefor be clicked if the first option wasn't found. As long as the 'Deposit All' button on the BankScreen still exists, nothing should be broken.