Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local width = 61
- local torches = 2
- 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 checkForTorch(x)
- if (x+3) % 6 == 0 then
- turtle.placeDown()
- end
- end
- turtle.select(torches)
- turtle.turnLeft()
- turtle.turnLeft()
- for i = 1, width-1 do
- refuel()
- checkForTorch(i)
- turtle.forward()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement