This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Carl's profile picture

Program searching

Started by Carl, 03 September 2012 - 06:28 PM
Carl #1
Posted 03 September 2012 - 08:28 PM
I am not entirely sure if this should be posted here, I have searched the form a few times with various keywords trying to find a program that lets me tunnel then return the turtle to starting point.

Could someone point me to a program that can do this?
sjele #2
Posted 03 September 2012 - 08:34 PM

dist = 0
repeat
  turtle.dig()
  turtle.forward()
  turtle.digUp()
  dist = dist  + 1
until turtle.getItemCount(9) > 1 --Change 9 to 16 if you have 16 block turtle slots
for back = 1, dist do
   turtle.back()
end
This would mine, in a staight line and go back when it's full
Carl #3
Posted 03 September 2012 - 08:37 PM
I was thinking more along the lines of the traditional tunnel system I wanted to pair it up with the dowsing rod in technic pack, but im sure I could tweak it to work.