Scheduled Activities
version 9 by John Clemens
Section 8 - Phrases for descriptions
To schedule (E - activity on objects) at (M - time) for (C - description of objects):
repeat with T running through C begin; schedule E for T at M; end repeat;
To schedule (E - activity on objects) in (n - number) minutes for (C - description of objects):
repeat with T running through C begin; schedule E for T in n minutes; end repeat.
To schedule (E - activity on objects) now for (C - description of objects):
repeat with T running through C begin; schedule E for T at the time of day; end repeat.
To schedule (E - activity on objects) in (d - number) turns for (C - description of objects):
repeat with T running through C begin; schedule E for T in d turns; end repeat.
To cancel all scheduled events for (C - description of objects):
repeat with T running through C begin; cancel all scheduled events for T; end repeat.
To cancel all scheduled (E - activity on objects) for (C - description of objects):
repeat with T running through C begin; cancel all scheduled E for T; end repeat.
To decide if there is an event scheduled for (C - description of objects):
repeat through the Table of Scheduled Events:
if there is a SA_Target entry and the SA_Target entry matches C, decide yes;
decide no.
To decide if there is (E - activity on objects) scheduled for (C - description of objects):
repeat through the Table of Scheduled Events:
if there is a SA_Target entry and the SA_Target entry matches C and there is an SA_Event entry and the SA_Event entry is E, decide yes;
decide no.
To decide if there is an event scheduled now for (C - description of objects):
repeat through the Table of Scheduled Events:
if there is a SA_Target entry and the SA_Target entry matches C:
if (there is a SA_Moment entry and the SA_Moment entry is time of day) or (there is a SA_Turn entry and the SA_Turn entry is turn count), decide yes;
decide no.
To decide if there is (E - activity on objects) scheduled now for (C - description of objects):
repeat through the Table of Scheduled Events:
if there is an SA_Event entry and the SA_Event entry is E and there is a SA_Target entry and the SA_Target entry matches C:
if (there is a SA_Moment entry and the SA_Moment entry is time of day) or (there is a SA_Turn entry and the SA_Turn entry is turn count), decide yes;
decide no.
Scheduled Activities ends here.