SHOW:
|
|
- or go back to the newest paste.
| 1 | tArgs = { ... }
| |
| 2 | todo = tonumber(tArgs[1]) | |
| 3 | -- | |
| 4 | ||
| 5 | turtle.select(1) | |
| 6 | ||
| 7 | function refill() | |
| 8 | - | if turtle.getItemCount(3) == 0 then |
| 8 | + | if turtle.getItemCount(1) == 0 then |
| 9 | - | turtle.select(5) |
| 9 | + | turtle.select(2) |
| 10 | turtle.turnRight() | |
| 11 | turtle.turnRight() | |
| 12 | turtle.place() | |
| 13 | turtle.select(1) | |
| 14 | turtle.suck() | |
| 15 | turtle.dig() | |
| 16 | turtle.turnRight() | |
| 17 | turtle.turnRight() | |
| 18 | end | |
| 19 | end | |
| 20 | ||
| 21 | - | function checkslot() |
| 21 | + | |
| 22 | - | if turtle.getItemCount(1) <=6 then |
| 22 | + | |
| 23 | - | turtle.select(2) |
| 23 | + | |
| 24 | - | turtle.transferTo(1) |
| 24 | + | |
| 25 | turtle.down() | |
| 26 | - | if turtle.getItemCount(2) <=6 then |
| 26 | + | |
| 27 | - | turtle.select(3) |
| 27 | + | |
| 28 | - | turtle.transferTo(1) |
| 28 | + | |
| 29 | os.sleep(0.1) | |
| 30 | end | |
| 31 | - | end |
| 31 | + | |
| 32 | function checkwallU() | |
| 33 | refill() | |
| 34 | turtle.turnRight() | |
| 35 | - | checkslot() |
| 35 | + | |
| 36 | turtle.placeUp() | |
| 37 | end | |
| 38 | ||
| 39 | function checkwallD() | |
| 40 | refill() | |
| 41 | turtle.place() | |
| 42 | turtle.placeDown() | |
| 43 | turtle.turnLeft() | |
| 44 | end | |
| 45 | ||
| 46 | - | checkslot() |
| 46 | + | |
| 47 | turtle.select(1) | |
| 48 | refill() | |
| 49 | turtle.dig() | |
| 50 | turtle.forward() | |
| 51 | checkwallU() | |
| 52 | turtle.digDown() | |
| 53 | - | checkslot() |
| 53 | + | |
| 54 | checkwallD() | |
| 55 | turtle.up() | |
| 56 | checkwallLU() | |
| 57 | end |