Simba Code:
(*
WaitDTM~~~~~~~~~~
.. code-block:: pascal
function WaitDTM(DTM,x,y,x1,y1,x2,y2,HowLong):Boolean;
Waits for the specified DTM to arrive in the specified time and stores values in variables for later use.
.. note::
x1,y1,x2,y2 are MSX1,MSY1, etc.
Author: Sin
Example:
.. code-block:: pascal
Result := FindDTM(DTM,x,y,x1,y1,x2,y2);
*)
function WaitDTM(DTM,x,y,x1,y1,x2,y2,HowLong:Integer):Boolean;
var
t:Integer;
begin
MarkTime(t);
repeat
wait(100);
until(FindDTM(DTM,x,y,x1,y1,x2,y2) or (TimeFromMark(t) > HowLong));
Result := FindDTM(DTM,x,y,x1,y1,x2,y2);
GetMousePos(x,y);
end;