Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- params = {...}
- tunnelDistance = tonumber(params[1] or 10)
- turtlePos = vector.new(0,0,0)
- function checkSlot()
- currSlot = turtle.getSelectedSlot()
- if turtle.getItemCount(currSlot) == 0 then
- for i = 1,16 do
- if turtle.getItemCount(i) > 0 then
- turtle.select(i)
- return true
- end
- end
- return false
- end
- return true
- end
- turtle.select(1)
- while turtlePos.y ~= tunnelDistance do
- turtle.dig()
- turtle.forward()
- turtle.placeDown()
- checkSlot()
- turtle.turnLeft()
- turtle.place()
- checkSlot()
- turtle.turnRight()
- turtle.turnRight()
- turtle.place()
- checkSlot()
- turtle.turnLeft()
- turtlePos.y = turtlePos.y + 1
- end
- turtle.placeDown()
- checkSlot()
- turtle.turnLeft()
- turtle.place()
- checkSlot()
- turtle.turnRight()
- turtle.turnRight()
- turtle.place()
- checkSlot()
- turtle.up()
- turtle.turnRight()
- while turtlePos.y ~= 0 do
- turtle.dig()
- turtle.forward()
- turtle.placeUp()
- checkSlot()
- turtle.turnLeft()
- turtle.place()
- checkSlot()
- turtle.turnRight()
- turtle.turnRight()
- turtle.place()
- checkSlot()
- turtle.turnLeft()
- turtlePos.y = turtlePos.y - 1
- end
Add Comment
Please, Sign In to add comment