SHOW:
|
|
- or go back to the newest paste.
| 1 | turtle.refuel() | |
| 2 | local x, y, z = 1, 1, 1 | |
| 3 | - | |
| 3 | + | |
| 4 | - | while true do |
| 4 | + | |
| 5 | - | if not turtle.forward() then |
| 5 | + | |
| 6 | - | turtle.dig() |
| 6 | + | |
| 7 | turtle.forward() | |
| 8 | - | os.sleep(0.1) |
| 8 | + | |
| 9 | turtle.digDown() | |
| 10 | - | |
| 10 | + | |
| 11 | - | |
| 11 | + | |
| 12 | turtle.forward() | |
| 13 | x = x - 1 | |
| 14 | turtle.digDown() | |
| 15 | end | |
| 16 | if direction == "right" then turtle.turnLeft() elseif direction == "left" then turtle.turnRight() end | |
| 17 | while z < newZ do | |
| 18 | turtle.forward() | |
| 19 | z = z + 1 | |
| 20 | end | |
| 21 | while z > newZ do | |
| 22 | turtle.back() | |
| 23 | z = z - 1 | |
| 24 | end | |
| 25 | while y < newY do | |
| 26 | turtle.up() | |
| 27 | y = y + 1 | |
| 28 | end | |
| 29 | while y > newY do | |
| 30 | turtle.down() | |
| 31 | y = y - 1 | |
| 32 | end | |
| 33 | - | turtle.digUp() |
| 33 | + | |
| 34 | -- for lookups: | |
| 35 | local chests = {}
| |
| 36 | local function parkC(chest) | |
| 37 | local coords = chests[chest] | |
| 38 | gotoChest(coords[1], coords[2],coords[3]) | |
| 39 | end | |
| 40 | for y = 1, 9 do | |
| 41 | for x = 1, 9 do | |
| 42 | - | while x == 9 and z == 9 do |
| 42 | + | |
| 43 | - | turtle.digDown() |
| 43 | + | |
| 44 | - | turtle.down() |
| 44 | + | |
| 45 | - | y = y - 1 |
| 45 | + | |
| 46 | - | gotoChest(1, y, 1) |
| 46 | + | |
| 47 | for i=1,81*3 do | |
| 48 | parkC(i) | |
| 49 | turtle.digDown() | |
| 50 | - | -- local chests = {
|
| 50 | + |