Here's the code (I know the logic is somewhat convoluted, but that will be subject to later revision):
--Variables
print("Left?")
local left = io.read()
print("Right?")
local right = io.read()
print("Forward?")
local front = io.read()
print("Backward?")
local back = io.read()
print("Up?")
local up =io.read()
print("Down?")
local down = io.read()
--Mining
turtle.turnRight()
turtle.digUp()
for i = 0, right-1 do
turtle.dig()
while not turtle.forward() do
os.sleep(.25)
end
turtle.digUp()
end
turtle.turnleft()
for i = 0, front-1 do
turtle.dig()
while not turtle.forward() do
os.sleep(.25)
end
turtle.digUp()
end
turtle.turnLeft()
turtle.turnLeft()
for i = 0, front+back-1 do
turtle.dig()
while not turtle.forward() do
os.sleep(.25)
end
turtle.digUp()
end
turtle.turnRight()
x = 1
for j = 0, right+left-1 do
turtle.dig()
while not turtle.forward() do
os.sleep(.25)
end
turtle.digUp()
if ( x % 2 ) == 0 then
turtle.turnLeft()
else
turtle.turnRight()
end
for i = 0, front+back-1 do
turtle.dig()
while not turtle.forward() do
os.sleep(.25)
end
turtle.digUp()
end
x = x+1
if ( x % 2 ) == 0 then
turtle.turnLeft()
else
turtle.turnRight()
end
end











