"Reset" argument for AI functions
This is vanilla but AFAIK not documented anywhere. I've tested it with AiTravel and assume it applies similarly with eg AiActivate, AiFollow, AiFollowCell, AiEscort, AiEscortCell...
GetAiPackageDone normally only returns 1 for one frame, when the Ai function has been executed (AiTravel: once the NPC reaches its destination). The last argument of Ai functions (AiTravel: 4th argument) is optional. If it is given (0 or 1 doesn't matter), once the package is executed, GetAiPackageDone will NOT reset to 0 until a new Ai command is called on that NPC.
The point of this is that scripted Ai sequences won't break if the "package done" frame is skipped for any reason - in vanilla it's skipped if the PC waits/rests during the execution of AiTravel. Somewhat related: https://bugs.openmw.org/issues/1464
(RM-1465 from redmine: created on 2014-06-11 by rot tor, , duplicates #2342 (closed))