if
turtle.detect()
then
repeat
turtle.dig()
turtle.up()
until
not turtle.detect()
end
if
turtle.detectUp()
then
turtle.digUp()
turtle.up()
shell.run("wood")
end
if
not turtle.detect()
then
repeat
turtle.down()
until
turtle.detectDown()
end
here is what I want to do
if
turtle.detect() – I want to repace this and add function fwood see below (last script coment)
then
repeat –from repeat till not turtle.detect() I want it to be fwood function
turtle.dig()
turtle.up()
until
not turtle.detect()
end
if
turtle.detectUp()
then
turtle.digUp()
turtle.up()
shell.run("wood") –I want to remove the shell.run and replace it by "saying" to function fwood
end
if
not turtle.detect()
then
repeat
turtle.down()
until
turtle.detectDown()
end
legal:
http://en.wikipedia.org/wiki/WTFPL