Skip to content

setAvoid

MicroBlaster edited this page Nov 11, 2019 · 2 revisions

Purpose: Adds an Avoid to TWX's internal Avoid list.

Syntax: setAvoid {sector}

Notes: TWX's internal Avoid list is used by getCourse, getDistance, getNearestWarps, and getAllCourses. These Avoids are completely independant of the games Avoids.

Example:

# One way of showing the backdoor to Stardock
setVar $a 1
while ($a <= SECTOR.WARPCOUNT[STARDOCK])
	# Avoids warps out of StarDock
	setAvoid SECTOR.WARPS[STARDOCK][$a]
	add $a 1
end
getCourse $course 1 STARDOCK
if ($course = 0)
	echo "*No Backdoor found.*"
else
	# $course is the number of hops. Since the $course array
	# is $hops + 1, it is also the next-to-last warp
	echo "*Backdoor: " $course[$course]
end

Clone this wiki locally