Posted 09 December 2012 - 05:10 AM
I'm trying to make a program that will make my mining turtle dig 50 block long 1x2 passages, placing torches every 10 blocks,then returning to where it started. I have it working fine unless it encounters gravel, and that messes it up and the passages end up being shorter than they should be. Here's what I have so far, and I'm very sure it's messy and has all kinds of things wrong with it but it works. What would I need to change or add to make it go 50 blocks even if there's gravel in the way? Also any tips would be greatly appreciated as I have no experience whatsoever.
The torches are supposed to be in slot 1 and cobble or any other material in slot 2.
The torches are supposed to be in slot 1 and cobble or any other material in slot 2.
for i=1,5 do
for i=1,10 do
turtle.select(2)
turtle.detectDown()
if false then
turtle.placeDown()
end
turtle.detect()
if true then turtle.dig()
end
turtle.up()
turtle.detect()
if true then turtle.dig()
end
turtle.down()
turtle.forward()
end
turtle.back()
turtle.back()
turtle.select(1)
turtle.place()
turtle.up()
turtle.forward()
turtle.forward()
turtle.down()
end
turtle.up()
for i=1,50 do
turtle.back()
end
turtle.down()