Oops, I meant a strip-mine and not a mineshaft, though I might do that anyway. Could have it place ladders as well as torches.
Thank you, SirI applaud anyone trying to code something when they have next to no experience so kudos.
print("Fuel: "..turtle.getFuelLevel())
local tArgs = {...}
local move = 0
function dig()
while not turtle.forward() do
if turtle.dig() == false then
turtle.attack()
end
end
end
if #tArgs < 1 then
move = 1
else
move = tArgs[1]
end
for i = 1, move do
dig()
end
local tArgs = {...}
local move = 0
local forward = 0
function turnAround()
turtle.turnRight()
turtle.turnRight()
end
function digBack()
if forward == 0 then
if turtle.back() == false then
turnAround()
forward = 1
while not turtle.forward() do
if turtle.dig() == false then
turtle.attack()
end
end
end
else
while not turtle.forward() do
if turtle.dig() == false then
turtle.attack()
end
end
end
end
if #tArgs < 1 then
move = 1
else
move = tArgs[1]
end
for i = 1, move do
digBack()
end
if forward == 1 then
turnAround()
end
local tunnel = 0
local tArgs = {...}
function dig()
while not turtle.forward() do
turtle.dig()
end
end
function digUp()
while not turtle.up() do
turtle.digUp()
end
end
function digDown()
while not turtle.down() do
turtle.digDown()
end
end
function dig10()
for i = 1, 20 do
dig()
end
end
function digTunnel()
for i = 1, 20 do
dig()
turtle.digUp()
end
end
function dropoff()
for i = 1, 16 do
turtle.select(i)
turtle.drop()
end
turtle.select(1)
end
for i = 1, tArgs[1] do
for i = 1, tunnel do
dig()
turtle.digUp()
end
turtle.turnLeft()
digTunnel()
turtle.turnLeft()
turtle.turnLeft()
dig10()
digTunnel()
turtle.turnLeft()
turtle.turnLeft()
dig10()
turtle.turnLeft()
for i = 1, tunnel do
dig()
end
dropoff()
turtle.turnLeft()
turtle.turnLeft()
tunnel = tunnel+3
end