[Add] If you don't kill the merchant so soon, It will attempt to jump hyperspace when running away.

This commit is contained in:
Allanis 2013-02-24 15:53:36 +00:00
parent 6667fbc4e7
commit 9fc0c72e71

View File

@ -6,6 +6,10 @@ function control()
task = ai.taskname()
if task == "hyperspace" then
ai.hyperspace() -- Try to go to hyperspace.
elseif task == "runaway" then
if ai.dist(is.pos(ai.targetid())) > 300 then
ai.hyperspace()
end
elseif task == "none" then
planet = ai.rndplanet()
ai.pushtask(0, "go", planet)