Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local top = 51
- local bottom = 46
- local width = 63
- local function refuel()
- if turtle.getFuelLevel() == 0 then
- local prev = turtle.getSelectedSlot()
- turtle.select(1)
- if not turtle.refuel(1) then
- print('Need more fuel')
- while not turtle.refuel(1) do
- sleep(1)
- end
- end
- turtle.select(prev)
- end
- end
- local function returnToFloor()
- turtle.turnRight()
- while not turtle.forward() do
- turtle.dig()
- sleep(.5)
- end
- turtle.turnLeft()
- end
- for i = 1, width, 1 do
- turtle.dig()
- for j = bottom + 1, top - 1, 1 do
- refuel()
- if i % 2 == 1 then
- turtle.up()
- else
- turtle.down()
- end
- turtle.dig()
- end
- returnToFloor()
- end
Add Comment
Please, Sign In to add comment