rendered paste body method PlotBox()
{
variable int Degrees = 0
variable float Distance = MAX_BOX_SIZE
variable point3f Location
variable point3f CollisionPoint
do
{
Location.Z:Set[${Me.Z}]
Location.X:Set[Me.X + (MAX_BOX_SIZE / 2) * ${Math.Cos[Degrees]}]
Location.Y:Set[Me.Y - (MAX_BOX_SIZE / 2) * ${Math.Sin[Degrees]}]
CollisionPoint:Set[${ISXWoW.IsPathObstructed[${Location.X},${Location.Y},${Location.Z},${Me.X},${Me.Y},${Me.Z}]}]
if ${Math.Distance[${Me.Location},${CollisionPoint}]} < ${Distance}
{
Distance:Set[${Math.Distance[${Me.Location},${CollisionPoint}]}]
}
}
while ${Degrees:Inc[30]} <= 360
}