TomTuff
2011-03-18 02:44:22
At the start of WaitInvCount is a check to exit if it fails to go to the inventory tab. Well, if the bank screen is open, it can't go to the inventory tab, therefore it exits before counting items.
Patch:
It's 1 Line to SRL that would save me 30 lines in my own :p
Patch:
{*******************************************************************************
function WaitInvCount(Count, MaxTime: Integer; CountType: (MaxCT, MinCT, ExactCT)): boolean;
By: Rasta Magician
Description: Waits for a maximum inv count. Returns true if InvCount <= Count
*******************************************************************************}
function WaitInvCount(Count, MaxTime: Integer; CountType: (MaxCT, MinCT, ExactCT)): boolean;
var
T: integer;
begin
if not(BankScreen) then
if not GameTab(tab_Inv) then exit;
Result := false;
T := GetSystemTime + MaxTime;
while GetSystemTime < T do
begin
wait(10);
case CountType of
MaxCT : if InvCount <= Count then Result := true;
MinCT : if InvCount >= Count then Result := true;
ExactCT : if InvCount = Count then Result := true;
end;
if Result then break;
end;
end;
It's 1 Line to SRL that would save me 30 lines in my own :p