Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local rows, cols, height
- term.clear()
- print("Please ensure the Turtle is located in the bottom left corner.")
- textutils.slowPrint(" ")
- print("How many rows?")
- rows = tonumber(io.read())
- print("How many columns?")
- cols = tonumber(io.read())
- print("How tall?")
- height = tonumber(io.read())
- turtle.refuel()
- for h = 1, height do
- for c = 1, cols do
- for r =1, rows do
- if turtle.detectFoward() then
- turtle.dig()
- end
- turtle.forward()
- end
- turtle.turnLeft()
- if r ~= rows then
- if turtle.detectForward() then
- turtle.dig()
- end
- turtle.forward()
- end
- turtle.turnLeft()
- end
- if turtle.detectUp() then
- turtle.digUp()
- end
- turtle.up()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement