4 -- planet = ai.rndplanet()
5 -- -- planet must exist
6 -- if planet == nil then
7 -- ai.pushtask(0, "hyperspace")
9 -- ai.pushtask(0, "goto", planet)
13 -- flies to the target planet
17 dist
= ai
.dist( target
)
18 bdist
= ai
.minbrakedist()
19 if dir
< 10 and dist
> bdist
then
21 elseif dir
< 10 and dist
< bdist
then
29 if ai
.isstopped() then
32 ai
.settimer(0, ai
.rnd(8000,15000))
33 ai
.pushtask(0,"landed")
42 -- Run X task (usually hyperspace
43 ai
.pushtask(0,"hyperspace")