Don't know the answer.
However I do know that by using placement radius on units, probability of presence on units and placment radius on waypoints you can make seriously random patrols. Depending on what you are trying to do it may not be necessary to use a script at all.