procedure Heal var StartTime TDateTime begin StartTime Now if Poisoned

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
procedure Heal;
var
StartTime:TDateTime;
begin
StartTime:=Now;
if Poisoned then begin
Cast('Cleanse by Fire');
WaitForTarget(2000);
TargetToObject(self);
end;
if (HP<>MaxHP) and (not Poisoned) then begin
cast('Close Wounds');
WaitForTarget(2000);
TargetToObject(self);
end;
if (InJournalBetweenTimes('Your concentration is disturbed, thus ruining thy spell', StartTime, Now) > 0) or Poisoned or (HP<>MaxHP) then Heal;
CancelWaitTarget;
ClearJournal;
Wait(500);
end;