SHOW:
|
|
- or go back to the newest paste.
| 1 | local function checkFuel() | |
| 2 | if turtle.getFuelLevel() < 1 then | |
| 3 | turtle.select(1) | |
| 4 | turtle.refuel(1) | |
| 5 | end | |
| 6 | end | |
| 7 | ||
| 8 | local function column() | |
| 9 | while turtle.digUp() do | |
| 10 | turtle.dig() | |
| 11 | checkFuel() | |
| 12 | turtle.up() | |
| 13 | end | |
| 14 | turtle.dig() | |
| 15 | ||
| 16 | checkFuel() | |
| 17 | while turtle.down() do | |
| 18 | checkFuel() | |
| 19 | end | |
| 20 | end | |
| 21 | ||
| 22 | local function digmove() | |
| 23 | checkFuel() | |
| 24 | turtle.dig() | |
| 25 | turtle.forward() | |
| 26 | end | |
| 27 | ||
| 28 | local function plant() | |
| 29 | turtle.select(2) | |
| 30 | turtle.forward(1) | |
| 31 | turtle.place() | |
| 32 | turtle.turnRight() | |
| 33 | turtle.forward(1) | |
| 34 | turtle.turnLeft() | |
| 35 | turtle.place() | |
| 36 | turtle.turnRight() | |
| 37 | turtle.turnRight() | |
| 38 | - | column() |
| 38 | + | turlte.forward(1) |
| 39 | turtle.turnRight() | |
| 40 | turtle.place() | |
| 41 | end | |
| 42 | ||
| 43 | local function dropwood() | |
| 44 | for i=3, 16 do | |
| 45 | turtle.select( i) | |
| 46 | turtle.dropDown() | |
| 47 | end | |
| 48 | turtle.select(3) | |
| 49 | end | |
| 50 | ||
| 51 | while true do --Always loop | |
| 52 | ||
| 53 | dropwood() | |
| 54 | ||
| 55 | plant() | |
| 56 | ||
| 57 | turtle.up() | |
| 58 | local Wait, Correct = "0", "1" | |
| 59 | while Wait~=Correct do | |
| 60 | if turtle.detect()==true then | |
| 61 | Wait = "1" | |
| 62 | print("success")
| |
| 63 | end | |
| 64 | sleep(5) | |
| 65 | end | |
| 66 | turtle.down() | |
| 67 | ||
| 68 | digmove() | |
| 69 | column() | |
| 70 | turtle.turnRight() | |
| 71 | digmove() | |
| 72 | turtle.turnLeft() | |
| 73 | column() | |
| 74 | turtle.turnLeft() | |
| 75 | digmove() | |
| 76 | digmove() | |
| 77 | turtle.turnRight() | |
| 78 | column() | |
| 79 | ||
| 80 | turtle.turnRight() | |
| 81 | turtle.forward(1) | |
| 82 | turtle.turnRight() | |
| 83 | turtle.forward(1) | |
| 84 | turtle.turnRight() | |
| 85 | turtle.turnRight() | |
| 86 | ||
| 87 | end |