SHOW:
|
|
- or go back to the newest paste.
| 1 | if turtle.getFuelLevel() == 0 then | |
| 2 | turtle.select(1) | |
| 3 | turtle.refuel(4) | |
| 4 | end | |
| 5 | local fuel = turtle.getFuelLevel() | |
| 6 | print("fuel:"..tostring(fuel))
| |
| 7 | ||
| 8 | local function PutLine(wl) | |
| 9 | for i=1, tonumber(wl) do | |
| 10 | if not turtle.detectDown() then | |
| 11 | print("place")
| |
| 12 | - | print("no block")
|
| 12 | + | turtle.placeDown() |
| 13 | - | local result = turtle.placeDown() |
| 13 | + | |
| 14 | - | print(result) |
| 14 | + | print("skip")
|
| 15 | - | turtle.forward() |
| 15 | + | |
| 16 | turtle.forward() | |
| 17 | - | print("block exist")
|
| 17 | + | |
| 18 | end | |
| 19 | ||
| 20 | turtle.select(2) | |
| 21 | turtle.forward() | |
| 22 | PutLine(11) | |
| 23 | turtle.turnRight() | |
| 24 | PutLine(5) | |
| 25 | turtle.turnRight() | |
| 26 | PutLine(11) | |
| 27 | turtle.turnRight() | |
| 28 | PutLine(5) | |
| 29 | turtle.turnRight() | |
| 30 | turtle.back() | |
| 31 |