Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- querer schaft
- local sides
- local oneDepth
- -- MOVEMENT
- function UBackDown()
- if turtle.detectUp() then
- turtle.digUp()
- turtle.up()
- if turtle.detectUp() then
- turtle.digUp()
- end
- turtle.down()
- end
- end
- function FDigWalk()
- repeat
- turtle.dig()
- os.sleep(0.5)
- until turtle.detect() == false
- turtle.forward()
- UBackDown()
- end
- function FDDigWalk()
- repeat
- turtle.dig()
- os.sleep(0.5)
- until turtle.detect() == false
- turtle.forward()
- UBackDown()
- if turtle.detectDown() then
- turtle.digDown()
- end
- turtle.down()
- UBackDown()
- end
- -- dig miningshaft SIDES
- function Three()
- local threeDepth = sides
- local backSteps = threeDepth * 3
- repeat
- threeDepth = threeDepth - 1
- FDigWalk()
- FDigWalk()
- FDigWalk()
- turtle.turnLeft()
- FDigWalk()
- FDigWalk()
- turtle.back()
- turtle.back()
- turtle.turnRight()
- turtle.turnRight()
- FDigWalk()
- FDigWalk()
- turtle.back()
- turtle.back()
- turtle.turnLeft()
- until threeDepth == 0
- repeat
- backSteps = backSteps - 1
- turtle.back()
- until backSteps == 0
- end
- -- dig down
- function One()
- local oneDepth = 2
- repeat
- oneDepth = oneDepth - 1
- FDigWalk()
- turtle.turnRight()
- FDigWalk()
- turtle.turnLeft()
- FDDigWalk()
- turtle.turnLeft()
- FDigWalk()
- turtle.turnRight()
- until oneDepth == 0
- end
- function Start()
- repeat
- Totaltimes = Totaltimes - 1
- One()
- turtle.turnLeft()
- Three()
- turtle.turnRight()
- turtle.turnRight()
- Three()
- turtle.turnLeft()
- until Totaltimes == 0
- end
- print("How Far Will Turtle Go?")
- input2 = io.read()
- Totaltimes = tonumber(input2)
- print("How deep will the sides be?")
- input = io.read()
- sides = tonumber(input)
- Start()
Add Comment
Please, Sign In to add comment