SHARE
TWEET

stripmine.lua




Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- local depth = 20
- local placeTorch = 5
- local switch = false
- function digForward()
- while turtle.detect() == true
- do
- turtle.dig()
- end
- end
- function digDepth()
- for i = 1, depth
- do
- dig2by1()
- end
- end
- function dig2by1()
- turtle.up()
- placeTorchPlease()
- digForward()
- turtle.forward()
- turtle.digDown()
- turtle.down()
- end
- function placeTorchPlease()
- if placeTorch == 5
- then
- turtle.placeDown()
- placeTorch = 1
- else
- placeTorch = placeTorch + 1
- end
- end
- function moveNextStrip()
- turtle.turnRight()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.turnLeft()
- turtle.turnLeft()
- end
- function dig1by5()
- for i = 1, 5
- do
- digForward()
- if i == 5
- then
- print("dont move forward")
- else
- turtle.forward()
- end
- end
- for i = 1, 4
- do
- turtle.back()
- end
- end
- function mineStrip()
- turtle.turnLeft()
- dig1by5()
- turtle.turnLeft()
- turtle.turnLeft()
- dig1by5()
- end
- function mineStrips()
- for i = 1, 7
- do
- mineStrip()
- moveNextStrip()
- end
- end
- --START MAIN PROCEDURE
- digDepth()
- turtle.up()
- dig1by5()
- mineStrips()
- turtle.forward()
- --END MAIN PROCEDURE
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.