SHOW:
|
|
- or go back to the newest paste.
| 1 | width = 10 | |
| 2 | length = 10 | |
| 3 | function place2(side) | |
| 4 | if turtle.getItemCount(turtle.getSelectedSlot()) == 0 then | |
| 5 | turtle.select(turtle.getSelectedSlot()+1) | |
| 6 | end | |
| 7 | if side == "f" then | |
| 8 | turtle.place() | |
| 9 | elseif side == "u" then | |
| 10 | turtle.placeUp() | |
| 11 | else | |
| 12 | turtle.placeDown() | |
| 13 | end | |
| 14 | end | |
| 15 | function forward() | |
| 16 | if turtle.getFuelLevel() == 0 then | |
| 17 | curslot = turtle.getSelectedSlot() | |
| 18 | turtle.select(15) | |
| 19 | turtle.refuel() | |
| 20 | turtle.select(curslot) | |
| 21 | end | |
| 22 | while not turtle.forward() do | |
| 23 | turtle.dig() | |
| 24 | end | |
| 25 | end | |
| 26 | i = 0 | |
| 27 | ii = 0 | |
| 28 | - | turtle.turnLeft() |
| 28 | + | |
| 29 | - | place2("f")
|
| 29 | + | |
| 30 | i = 0 | |
| 31 | while i < width do | |
| 32 | print("At gen no "..ii.." building part "..i.." with "..turtle.getFuelLevel().."/"..turtle.getFuelLimit().." fuel left")
| |
| 33 | - | while i < 11 do |
| 33 | + | |
| 34 | forward() | |
| 35 | i = i + 1 | |
| 36 | - | if i == 8 then |
| 36 | + | |
| 37 | - | curslot = turtle.getSelectedSlot() |
| 37 | + | |
| 38 | - | turtle.select(16) |
| 38 | + | |
| 39 | - | place2("u")
|
| 39 | + | |
| 40 | - | comp = peripheral.wrap("top")
|
| 40 | + | |
| 41 | - | comp.turnOn() |
| 41 | + | while i < width do |
| 42 | - | --peripheral.call("top", "shell.run('pastebin get 7jn3bJzA startup')")
|
| 42 | + | |
| 43 | - | --comp.reboot() |
| 43 | + | |
| 44 | - | turtle.select(curslot) |
| 44 | + | |
| 45 | - | end |
| 45 | + | |
| 46 | forward() | |
| 47 | ii = ii + 1 | |
| 48 | end |