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 | turlte.forward(1) | |
| 39 | turtle.turnRight() | |
| 40 | turtle.turnRight() | |
| 41 | turtle.turnRight() | |
| 42 | turtle.place() | |
| 43 | turtle.turnLeft() | |
| 44 | turtle.forward(1) | |
| 45 | turtle.turnRight() | |
| 46 | turtle.place() | |
| 47 | end | |
| 48 | ||
| 49 | local function dropwood() | |
| 50 | for i=3, 16 do | |
| 51 | turtle.select( i) | |
| 52 | turtle.dropDown() | |
| 53 | end | |
| 54 | turtle.select(3) | |
| 55 | end | |
| 56 | ||
| 57 | while true do --Always loop | |
| 58 | ||
| 59 | dropwood() | |
| 60 | ||
| 61 | plant() | |
| 62 | ||
| 63 | turtle.up() | |
| 64 | local Wait, Correct = "0", "1" | |
| 65 | while Wait~=Correct do | |
| 66 | if turtle.detect()==true then | |
| 67 | Wait = "1" | |
| 68 | print("success")
| |
| 69 | end | |
| 70 | sleep(5) | |
| 71 | end | |
| 72 | turtle.down() | |
| 73 | ||
| 74 | digmove() | |
| 75 | column() | |
| 76 | turtle.turnRight() | |
| 77 | digmove() | |
| 78 | turtle.turnLeft() | |
| 79 | column() | |
| 80 | turtle.turnLeft() | |
| 81 | digmove() | |
| 82 | digmove() | |
| 83 | turtle.turnRight() | |
| 84 | column() | |
| 85 | ||
| 86 | turtle.turnRight() | |
| 87 | turtle.forward(1) | |
| 88 | turtle.turnRight() | |
| 89 | turtle.forward(1) | |
| 90 | turtle.turnRight() | |
| 91 | turtle.turnRight() | |
| 92 | ||
| 93 | end |