SHOW:
|
|
- or go back to the newest paste.
| 1 | ||
| 2 | --Empty | |
| 3 | function dump() | |
| 4 | turtle.select(3) | |
| 5 | for i = 4,16 do | |
| 6 | turtle.select(i) | |
| 7 | turtle.drop() | |
| 8 | end | |
| 9 | end | |
| 10 | ||
| 11 | --Need to empty? | |
| 12 | function checkFull() | |
| 13 | if turtle.getItemCount(16) > 0 then | |
| 14 | turtle.turnRight() | |
| 15 | dump() | |
| 16 | turtle.turnLeft() | |
| 17 | end | |
| 18 | end | |
| 19 | ||
| 20 | while true do | |
| 21 | checkFull() | |
| 22 | turtle.select(1) | |
| 23 | turtle.place() | |
| 24 | turtle.select(2) | |
| 25 | while turtle.compare() == false do | |
| 26 | sleep(10) | |
| 27 | end | |
| 28 | while turtle.detect() == true do | |
| 29 | turtle.dig() | |
| 30 | turtle.digUp() | |
| 31 | turtle.up() | |
| 32 | end | |
| 33 | while turtle.detectDown() == false do | |
| 34 | turtle.down() | |
| 35 | end | |
| 36 | ||
| 37 | end |