Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1 Var depot As New CMyShip(979800);
- 2 Var deutfleet As New CMyFleet(55449);
- 3 Var ship As CMyShip;
- 4 Var erzfleet As New CMyFleet(55448);
- 5 Var oreTransport As New CMyShip(978631);
- 6
- 7 For (Each ship In deutfleet.Ships) {
- 8
- 9 If (ship.MapPosition <> depot.MapPosition) {
- 10 WriteLine(ship.Name & " is in the wrong place");
- 11 } Else {
- 12 While (ship.BussardCollectorHeating < ship.Definition.BussardCollectorCapacity) {
- 13 If (ship.Docked) { ship.Action.Undock(); }
- 14 ship.Action.CollectDeuterium(ship.Energy);
- 15 ship.Action.DockTo(depot.ShipID);
- 16
- 17 If (ship.Docked) {
- 18 If (ship.StockRoom.Amount(EGoodsType.Deuterium) > 0) {
- 19 ship.Action.TransferToShip(depot.ShipID, ship.StockRoom.Amount(EGoodsType.Deuterium), EBeamResource.Deuterium); //Save some Deuterium - the rest transport to the station
- 20 }
- 21 } Else {
- 22 WriteLine(ship.ShipID & "can't dock");
- 23 }
- 24 }
- 25 }
- 26 If (ship.WarpCore < 800) {
- 27 ship.Action.TransferFromShip(depot.ShipID, 800 - ship.WarpCore, EBeamResource.Warpcore)
- 28 }
- 29 }
- 30
- 31 WriteLine(depot.Name & ":" & depot.StockRoom.Amount(EGoodsType.Deuterium) & " Deuterium, " & depot.WarpCore & " Warpcore");
- 32 If (depot.WarpCore < 3000) {
- 33 WriteLine('Warning Warpcore Low ' & depot.WarpCore)
- 34 }
- 35 Var c1 As New CMyColony(89882);
- 36 Var c2 As New CMyColony(89880);
- 37 Var c3 As New CMyColony(89881);
- 38
- 39 Var colonies[] As CMyColony = { c1, c2, c3 };
- 40 Var colony As CMyColony;
- 41 Var i As Integer = colonies.Length;
- 42
- 43 For (Each ship In erzfleet.Ships) {
- 44 ship.Action.CollectOre(ship.Energy)
- 45 If (ship.StockRoom.Amount(EGoodsType.IridiumOre) > 0) {
- 46 ship.Action.TransferToShip(978631, ship.StockRoom.Amount(EGoodsType.IridiumOre), EGoodsType.IridiumOre)
- 47 }
- 48 }
- 49
- 50 If (oreTransport.StockRoom.Amount(EGoodsType.IridiumOre) > 450) {
- 51 For (Each colony In colonies) {
- 52 oreTransport.Action.FlyTo('@' & colony.Coordinates.X & '|' & colony.Coordinates.Y)
- 53 oreTransport.Action.TransferToColony(colony.SectorID, oreTransport.StockRoom.Amount(EGoodsType.IridiumOre) / i, EBeamResource.IridiumOre);
- 54 i--;
- 55 }
- 56 oreTransport.Action.FlyTo('@' & colonies[0].Coordinates.X & '|' & colonies[0].Coordinates.Y);
- 57
- 58 }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement