Rich
2009-10-02 19:57:40
I know DropAllEx has been posted many times before, but I thought I might as well post it as well, since the Devs may see that we want it in :p
Anyway:
Richard.
Anyway:
{*******************************************************************************
procedure DropAllExRan(DontDrop : TIntegerArray);
By: R1ch
Description: Drops everything except the spots in DontDrop in a random pattern
*******************************************************************************}
procedure DropAllExRan(DontDrop : TIntegerArray);
var
I : Integer;
begin
repeat
I:= Random(28) + 1;
if not InIntArray(DontDrop, I) then
DropItem(I);
until(InvEmpty);
end;
{*******************************************************************************
procedure DropAllEx(DontDrop : TIntegerArray);
By: R1ch
Description: Drops everything except the spots in DontDrop
*******************************************************************************}
procedure DropAllEx(DontDrop : TIntegerArray);
var
I : Integer;
begin
for I:= 1 to 28 do
if not InIntArray(DontDrop, I) then
DropItem(I);
end;
{*******************************************************************************
procedure DropAllRandom;
By: R1ch
Description: Drops everything in a random pattern
*******************************************************************************}
procedure DropAllRandom;
begin
DropAllExRan([]);
end;{*******************************************************************************
function WaitLoggedIn(MaxTime : Integer) : Boolean;
By: R1ch, edited by marpis
Description: Waits max of MaxTime in MS to become logged in if the account is not
*******************************************************************************}
function WaitLoggedIn(MaxTime: Integer): Boolean;
begin
Result := WaitFunc(@LoggedIn, 100, MaxTime + Random(100));
end;Richard.