Code: Select all
Program New;
var
t : integer;
sTime: TDateTime;
function Scan():Integer;
begin
//AddToSystemJournal(TimeToStr(Now));
if (Now > sTime + 1.0/(24*60*3)) then
begin
t := 0;
sTime := Now;
end;
if InJournal('APM') <> -1 then // the Guild's Name
begin
inc(t);
ClearJournal();
UOSay('\'the Guild Player ' + IntToStr(t) + 'Counts.');
//AddToSystemJournal(TimeToStr(Now));
end;
end;
function autoConnect():Integer;
begin
while not Connected() do
begin
if not Connected() then
begin
Connect();
Wait(10000);
Continue;
end;
end;
end;
begin
t := 0;
sTime := Now;
autoConnect;
while Connected() do
begin
autoConnect;
scan();
end;
end.
this my simple code to scan journal, then get the info.
is there any better way to improve the scripts?