Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- args = {...}
- if not args[1] then
- print("Please tell me how far to go.")
- return
- end
- local len = args[1]
- local function invCheck()
- count = turtle.getItemCount(1)
- print(count)
- if count == 1 then
- print("Refilling slot 1.")
- for i=2,16 do
- if turtle.compareTo(i) then
- print("Found same block in slot " .. i .. ".")
- turtle.select(i)
- turtle.transferTo(1,63)
- turtle.select(1)
- break
- end
- end
- end
- end
- for i=1,len do
- while not turtle.forward() do
- turtle.dig()
- end
- invCheck()
- while turtle.detectDown() do
- turtle.digDown()
- end
- turtle.placeDown()
- end
- --[[
- for i=1,len do
- while not turtle.back() do
- turtle.turnRight()
- turtle.turnRight()
- while turtle.detect() do
- turtle.attack()
- turtle.dig()
- end
- turtle.turnRight()
- turtle.turnRight()
- end
- end]]--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement