Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Made and Coded By SythsGod
- function detect()
- local inFront = turtle.detect()
- if inFront then
- turtle.dig()
- end
- end
- function mineStartUp()
- turtle.select(1)
- detect()
- turtle.forward()
- end
- function detectUp()
- local onTop = turtle.detectUp()
- if onTop then
- turtle.digUp()
- turtle.up()
- end
- end
- function detectDown()
- local onBottom = turtle.detectDown()
- if onBottom then
- turtle.digDown()
- turtle.down()
- end
- end
- function digging()
- turtle.turnLeft()
- detect()
- turtle.turnRight()
- turtle.turnRight()
- detect()
- detectUp()
- turtle.up()
- detect()
- turtle.turnLeft()
- turtle.turnLeft()
- detect()
- turtle.down()
- detectDown()
- turtle.down()
- detect()
- turtle.turnRight()
- turtle.turnRight()
- detect()
- turtle.turnLeft()
- turtle.up()
- end
- function moveToNextGridSection()
- detect()
- turtle.forward()
- end
- function autoStore()
- print "How far?"
- local _Amount = tonumber(io.read())
- print "Should I place a torch? (Y/N)"
- local _TorchTime = io.read()
- mineStartUp()
- local _Counter = 0
- for i = 1, _Amount do
- digging()
- _Counter = _Counter + 1
- if _TorchTime == "Y" then
- _TimeForATorch = true
- else
- _TimeForATorch = false
- end
- if _Counter == 5 then
- turtle.select(16)
- turtle.placeDown()
- print "Torch Placed!"
- turtle.select(1)
- end
- local
- moveToNextGridSection()
- end
- turtle.turnLeft()
- turtle.turnLeft()
- for b = 1, _Amount do
- turtle.forward()
- end
- turtle.forward()
- turtle.turnRight()
- turtle.turnRight()
- print "Finished!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement