Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function forward()
- while not turtle.forward() do
- print("Blocked or out of fuel")
- end
- end
- local slot = 1
- turtle.select(1)
- local function checkSlot()
- local loopCount = 0
- while turtle.getItemCount(slot) == 0 do
- loopCount = loopCount + 1
- slot = slot + 1
- if slot > 16 then
- slot = 1
- end
- turtle.select(slot)
- if loopCount > 15 then
- print("Waiting for more building materials.")
- sleep(10)
- end
- end
- end
- while true do
- turtle.placeUp()
- checkSlot()
- if turtle.detect() then
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.down()
- else
- forward()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement