stripmine torch distance -- Strip mining turtle program. -- Luke *********, Ryszard ********. 13/12/12 -- updated by AzrylAero 5/3/2013 --[[fuel must be placed in slot 14, mainshaft torches must be placed in slot 15 tunnel torches must be placed in slot 16.]] -- Create the function for refueling function checkFuel() if turtle.getFuelLevel() <= 10 then stripmine torch distance How to dowload it? stripmine torch distance turtle.select(14) turtle.refuel(1) turtle.select(1) end --if end --checkFuel() -- Create the turnAround function function turnAround() turtle.turnRight() turtle.turnRight() stripmine torch distance PasteShr stripmine torch distance end --turnAround() -- Go to the next tunnel function digNext(torchCounter) turtle.turnRight() turtle.dig() turtle.forward() turtle.digUp() turtle.dig() turtle.forward() stripmine torch distance How to dowload it? stripmine torch distance turtle.digUp() if torchCounter == 2 then turnAround() turtle.select(15) turtle.place() turnAround() print("Placing mainshaft torch") end turtle.turnLeft() stripmine torch distance How to use it? stripmine torch distance print("turn Right") print("Next Tunnel") end --Dig Next End -- Digs the tunnel for the given length function tunnel(givenLength) local distance = 0 stripmine torch distance PasteShr stripmine torch distance for index = 1,givenLength do turtle.dig() if turtle.forward() then distance = distance + 1 end --if turtle.digUp() turtle.select(1) turtle.placeDown() -- Places a torch every 10 blocks stripmine torch distance How to dowload it? stripmine torch distance if distance == 10 then turtle.select(16) print("Placing tunnel torch...") turnAround() turtle.place() turnAround() distance = 0 checkFuel() end --if end --for stripmine torch distance PasteShr stripmine torch distance -- Sends the turtle back to the start turtle.up() for index = 1,givenLength do turtle.back() end --for turtle.down() end --tunnel() -- Main script stripmine torch distance How to dowload it? stripmine torch distance print("Input tunnel length:") local length = read() print("Tunnel quantity") local quantity = read() local torchNext = 0 print("starting excavation...") checkFuel() -- Tunnel loop for index=1,quantity do if torchNext == 3 then stripmine torch distance How to get it? stripmine torch distance torchNext = 0 end tunnel(length) checkFuel() digNext(torchNext) torchNext = torchNext + 1 end print("The tunnel(s) has been excavated!") stripmine torch distance