All pastes #943154 Raw Edit

Someone

public text v1 · immutable
·published 2008-03-15 00:30 UTC
rendered paste body
else
			{
				; We didnt get a path run to the next closest point and try from there
				This:Output["Greynav failure, we have stepped outside the mesh!"]
				


				POI:Clear

				RecoveryHop.X:Set[0]
				RecoveryHop.Y:Set[0]
				RecoveryHop.Z:Set[0]
				;ClickMoveToLoc ${Math.Calc[${Me.X}+1]} ${Me.Y} ${Me.Z}
				GreyNav:GetNearestValidXYZ[${Map.ID}, ${Me.X}, ${Me.Y}, ${Me.Z}, RecoveryHop]

				if ${RecoveryHop.X} == 0 && ${RecoveryHop.Y} == 0 && ${RecoveryHop.Z} == 0
				{
					This:Output["Couldn't find nearest valid point, now we're really screwed!"]
					move -stop
				;GlobalStuck:HouseOfPain
				Navigator.IPOSTUCK:Set[6]
				}
				elseif ${Math.Distance[${Me.X},${Me.Y},${Me.Z},${RecoveryHop.X},${RecoveryHop.Y},${RecoveryHop.Z}]} > 40 || ${Me.IsPathObstructed[${RecoveryHop.X},${RecoveryHop.Y},${RecoveryHop.Z}]}
				{
					This:Output["Nearest valid point is obstructed, now we're really screwed!"]
						;GlobalStuck:HouseOfPain	
						Navigator.IPOSTUCK:Set[6]

					move -stop
				}
				else
				{
					This:Output["Attempting recovery hop to location: ${RecoveryHop}"]
						GlobalStuck:HouseOfPain
					Navigator.NavDestination.X:Set[${RecoveryHop.X}]
					Navigator.NavDestination.Y:Set[${RecoveryHop.Y}]
					Navigator.NavDestination.Z:Set[${RecoveryHop.Z}]
				}