traveler
2010-12-02 12:09:03
i updated some of the banking procedures to support the update of not having the Deposit-All when there is only one item in your inventory.
{*******************************************************************************
Function R_DepositAll: Boolean;
By: Camero, Updated by: Traveler
Description: Deposits the whole inventory either by
-Fast clicks the button
-Fast = false deposits each item
*******************************************************************************}
procedure R_DepositAll(Fast: Boolean);
var
I, Fs, MT: Integer;
begin
if not R_BankScreen then
Exit;
if(fast)then
DepositAll
else
for I := 1 to 28 do
begin
MarkTime(MT);
while (R_ItemExists(I) and (TimeFromMark(mt) < 6000)) do
begin
MouseItem(I, False);
Wait(40 + random(40));
if (OptionExists('All')) then
begin
R_ChooseOption('All');
end
else
begin
R_ChooseOption('Deposit');
end;
MarkTime(FS);
while (R_ItemExists(I) and (TimeFromMark(FS) < 2500)) do
Wait(44 + random(44));
end;
end;
end;
{*******************************************************************************
function R_DepositAllID(ID : Integer): Boolean;
By: Zyt3x, updated by: Traveler
Description: Deposits all the items with the specified ID
*******************************************************************************}
function R_DepositAllID(ID : Integer): Boolean;
begin
if(R_CountItemID(ID) = 1) then
Result := R_ClickItemID(ID, false, 'Deposit')
else
Result := R_ClickItemID(ID,False, 'All');
end;
{*******************************************************************************
procedure R_DepositAllButIDEx(IDs : TIntegerArray);
By: Zyt3x, updated by Traveler9559
Description: Deposits all items but the items with one of the specified IDs to
the bank.
*******************************************************************************}
procedure R_DepositAllButIDEx(IDs : TIntegerArray);
var
I, T : Integer;
Item : TInvItem;
begin
if not R_BankScreen then
Exit;
for I := 1 to 28 do
begin
Item := GetInvItemAt(I);
if(InIntArray(IDs, Item.ID))then Continue;
if(not R_ItemExists(I)) then Continue;
MouseItem(I, False);
if(OptionExists('All')) then
R_ChooseOption('All')
else
R_ChooseOption('Deposit');
T := GetSystemTime;
while(R_ItemExists(I)) and (GetSystemTime-T<6000) do
wait(100+random(100));
end;
end;