Fwd Motion
2012-02-09 11:15:09
I noticed this wasn't an option and I was getting tired of the specific sleep times for the bank, so created this to wait for the bankscreen to pop up. (:
(*
WaitBankScreen
~~~~~~~~~~~~~~~
.. code-block:: pascal
function WaitBankScreen(Time:integer): Boolean;
Waits for BankScreen, returns true if found
.. note::
by Fwd Motion!
Example:
.. code-block:: pascal
if (WaitBankScreen(1000)) then
QuickDeposit(SRL_DEPOSIT_ALL)
*)
function WaitBankScreen(Time:integer): Boolean;
var
T: Integer;
begin
Result := false;
T := GetSystemTime + Time;
while (GetSystemTime < T) do
begin
if (BankScreen) then
begin
Result := True;
Exit;
end;
Wait(20+Random(20));
end;
end;