Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- args = {...}
- dist = args[1]
- run = true
- torchDistance = 0
- print("Starting mine")
- while run do
- turtle.turnRight()
- if not turtle.detect() then
- turtle.turnLeft()
- end
- turtle.dig()
- turtle.forward()
- torchDistance = torchDistance + 1
- turtle.digUp()
- turtle.digDown()
- if turtle.getItemCount(15) > 0 then
- if torchDistance >= 5 then
- print("Setting Torch")
- turtle.select(15)
- turtle.dropDown()
- turtle.select(1)
- torchDistance = 0
- end
- end
- if turtle.getItemCount(13) > 0 then
- print("nearly full, chest dumping")
- turtle.select(16)
- turtle.placeDown()
- for a = 1, 14 do
- turtle.select(a)
- turtle.dropDown()
- end
- if turtle.getItemCount(16) < 0 then
- run = false
- print("Out of chests! Stopping")
- end
- turtle.select(1)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement