Program DemoScript;
var a : Integer;

procedure SaveJournalToFile;
var i : Integer;
    s : String;
begin
with TStringList.Create do
   try
   for i := LowJournal to HighJournal do
	begin
	S := Journal(i);
	Add(DateTimeToStr(LineTime)+': '+S);	
	end;
   SaveToFile('temp.log');
   finally
   Free;
   end;
end;

Begin
for a := 1 to 50 do
	begin
	UseSkill('anatomy');
	WaitForTarget(5000);
	TargetToObject(Self);
	end;

wait(2000);
SaveJournalToFile;

End.
