SHOW:
|
|
- or go back to the newest paste.
| 1 | function dig() | |
| 2 | - | |
| 2 | + | while turtle.detect() do |
| 3 | - | while turtle.detect() do |
| 3 | + | turtle.dig() |
| 4 | - | turtle.dig() |
| 4 | + | os.sleep() |
| 5 | - | os.sleep() |
| 5 | + | end |
| 6 | - | end |
| 6 | + | turtle.forward() |
| 7 | - | turtle.forward() |
| 7 | + | while turtle.detectDown() or turtle.detectUp() do |
| 8 | - | while turtle.detectDown() or turtle.detectUp() do |
| 8 | + | turtle.digUp() |
| 9 | - | turtle.digUp() |
| 9 | + | turtle.digDown() |
| 10 | - | turtle.digDown() |
| 10 | + | end |
| 11 | - | end |
| 11 | + | |
| 12 | ||
| 13 | turtle.turnLeft() | |
| 14 | turtle.digUp() | |
| 15 | - | turtle.digDown() |
| 15 | + | turtle.up() |
| 16 | - | turtle.down() |
| 16 | + | turtle.digUp() |
| 17 | - | turtle.digDown() |
| 17 | + | turtle.up() |
| 18 | - | turtle.down() |
| 18 | + | turtle.digUp() |
| 19 | - | turtle.digDown() |
| 19 | + | turtle.up() |
| 20 | - | turtle.down() |
| 20 | + | turtle.digUp() |
| 21 | - | turtle.digDown() |
| 21 | + | |
| 22 | dig() | |
| 23 | turtle.turnLeft() |