Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Variables 1
- a = 0
- d = 0
- print("Please enter how many tunnels you want")
- rep = io.read()
- print("\nPlease enter the length of the tunnels")
- tLength = io.read()
- print("\nPlease enter the desired spacing between the tunnels")
- Spacing = io.read()
- print("\nAre the tunnels going to be to the left(L) or right(R) of the turtle")
- Dir = io.read()
- --Prerequisites 2
- print("\nPlease place Torches in slot 1 and "..rep.. " Chests in slot 2")
- print("\nPress enter when done")
- io.read()
- --Number of tunnels 3
- for cou = 1, rep , 1 do
- --Setting out tunnel 4
- if a >= 1 then
- if Dir == "L" then
- turtle.left()
- elseif Dir == "R" then
- turtle.right()
- end
- for co = 1, Spacing + 1 , 1 do
- turtle.dig()
- turtle.forward()
- turtle.digUp()
- end
- turtle.digDown()
- turtle.select(2)
- turtle.placeDown()
- if Dir == "L" then
- turtle.right()
- elseif Dir == "R" then
- turtle.left()
- end
- else
- turtle.select(2)
- turtle.digDown()
- turtle.placeDown()
- a = a + 1
- end
- --Tunnel Digging 5
- for c = 1, tLength , 1 do
- turtle.dig()
- turtle.forward()
- turtle.digUp()
- d = d + 1
- if d == 5 then
- turtle.select(1)
- turtle.placeUp()
- end
- end
- --Going back the start
- for ba = 1, tLength , 1 do
- turtle.back()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment