The idea I had in mind is that the turtle inspects the block below it, stores that data into two variables - firstBlock and checkBlock. As long as the IDs are the same between the two, it will dig down, move down, increment a counter by 1 and then check the block below it. As soon as that variable changes (Say if it hits the Skystone Chest or if it misses and hits Stone or Dirt), it'll stop, and then loop moving back up for as many steps as it went down.
Unfortunately I'm super rusty with Lua and I'm hitting a '"=" needed' error on line 14, not entirely sure where it's occurring, but I'm absolutely certain that's not the only thing I've done wrong.
Here's what I've got so far:
--[[This program checks the first
block it's standing on, then digs
down and checks the block below it
every time. As soon as the block
changes the loop ends, and the turtle
comes back up.
--]]
local firstBlock=turtle.inspectDown()
local checkBlock=turtle.inspectDown()
local downCounter=1
firstblock()
checkblock()
while checkBlock()=firstBlock() do
turtle.digDown()
turtle.down()
downCounter=downCounter + 1
checkBlock()
end()
for i=1,downCounter do
turtle.up()
end()
As always, thank you for checking into this! Turtles are still not my strong point, but I'm gradually figuring things out.