Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- digHole.lua
- -- Ask for dimensions
- -- print("Enter the width of the hole:")
- -- local width = tonumber(read())
- print("Enter the length of the hole:")
- local length = tonumber(read())
- -- print("Enter the depth of the hole:")
- -- local depth = tonumber(read())
- -- Variables
- local start = 0
- local function dropDown()
- while not turtle.detectDown() do
- turtle.down()
- end
- print("Reached the bottom.")
- end
- local function digHole()
- turtle.digDown()
- start = start + 1
- print(start)
- end
- local function returnToStart()
- for i = 0, start do
- turtle.up()
- end
- end
- dropDown()
- digHole()
- returnToStart()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement