dofile "flightcommander.lua" bodycount = 0; tp = 0; function simstart() Mission_setScriptControl(true); Mission_setEnemiesAreAlive(true); createship(); end function simadvance() Mission_setDebugText(bodycount .. " Kills / " .. tp .. " Points"); end function createship() x = math.random(-500,500); y = math.random(-500,500); z = math.random(-500,500); rx = math.random(0,359); ry = math.random(0,359); s = math.random(0,6); code=math.random(0,65536); id="$" .. code; if s==0 then ship = "lamprey"; sp=10; elseif s==1 then ship = "stingray"; sp=15; elseif s==2 then ship = "moray"; sp=20; elseif s==3 then ship = "squid"; sp=25; elseif s==4 then ship = "manta"; sp=30; elseif s==5 then ship = "raynode"; sp=35; elseif s==6 then ship = "devil"; sp=40; end Mission_addShip( ship, "bug1", "bug", false, "", IFF_ENEMY, x, y, z, id, "", "shipdestroyed", ""); Ship_setOrientation(id, rx, ry, 0); end function shipdestroyed(shipid) bodycount = bodycount + 1; tp = tp + sp; createship(); end