Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- dig a 1x2 tunnel for x number of blocks, if null default of 10
- -- Functions
- function dedif(tf)
- if turtle.detect() then
- turtle.dig()
- if turtle.detectUp() then
- turtle.digUp()
- end
- end
- if tf then
- turtle.forward()
- end
- end
- -- Main Program
- local length = 10
- print("Please enter length of tunnel. If input is 0, will default to length of 10")
- numRed = read()
- if not numRed==0 then
- length = numRed
- end
- for i=1, length do -- dig the # of blocks in length
- dedif(true)
- end
- turtle.turnRight()
- turtle.turnRight()
- for i=1, length do -- go back
- turtle.forward()
- end
- for inv=1, 16 do -- drop all items
- turtle.select(i)
- turtle.drop()
- end
Advertisement
Add Comment
Please, Sign In to add comment