-- This program digs a 5 x 5 stairwell down to bedrock -- Functions function cut(blocks) -- this function is used to cut the initial run of five steps for z = 1, blocks do turtle.dig() turtle.forward() end end function cutStep() -- this function cuts a 4 block high step for y = 1, (size - 1) do turtle.dig() turtle.forward() turtle.digDown() turtle.digUp() turtle.up() turtle.digUp() turtle.down() turtle.down() end end -- Main program control section size = 5 for a = 1, size do -- Cut the initial steps turtle.digDown() turtle.down() cut(size - a) if (size - (a + 1)) > 0 then for b = 1, (size - (a + 1)) do turtle.back() end end end for c = 2, 17 do -- Cut subsequent courses of steps turtle.turnRight() cutStep() end
Comments