Posted 30 March 2013 - 06:36 PM
Alright so I wrote this progam here to make me a 3X3 tunnel the way i would want the turtle to mine It.
It works perfectly fine and deals with gravel except…if there a block missing? so if there no block for it to dig it will go an extra forward and the tunnel will be all messed up any idea why?
Code:
Thanks, Mike :lol:/>
It works perfectly fine and deals with gravel except…if there a block missing? so if there no block for it to dig it will go an extra forward and the tunnel will be all messed up any idea why?
Code:
function Gravel()
sleep(.6)
if turtle.forward() == false then
repeat turtle.dig() until
turtle.forward() == true
else
turtle.forward()
end
end
function First()
turtle.dig()
Gravel()
turtle.turnRight()
turtle.digUp()
turtle.up()
turtle.digUp()
end
function Seconed()
turtle.dig()
Gravel()
turtle.digUp()
turtle.digDown()
end
function Left()
turtle.turnLeft()
Gravel()
turtle.turnLeft()
turtle.digUp()
turtle.digDown()
end
function LayerOne()
First()
Seconed()
Seconed()
end
function LayerTwo()
firstSecond()
Seconed()
Seconed()
end
function firstSecond()
turtle.dig()
Gravel()
turtle.turnRight()
turtle.digUp()
turtle.digDown()
end
function Final()
LayerOne()
Left()
Seconed()
Seconed()
turtle.turnRight()
end
function FinalTwo()
LayerTwo()
Left()
Seconed()
Seconed()
turtle.turnRight()
end
Final()
for i = 1,32 do
FinalTwo()
end
Thanks, Mike :lol:/>