diff --git a/scripts/ai/merchant.lua b/scripts/ai/merchant.lua index 681f74a..3f45a4e 100644 --- a/scripts/ai/merchant.lua +++ b/scripts/ai/merchant.lua @@ -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)