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