Posted 09 March 2012 - 09:37 PM
I have a simple program for my mining turtle, that asks for the distance it should mine, and the number of branches. then it mines out the distance while placing torches every 10 blocks. After that it comes back to the main mine-hole-thing, goes to the next branch, and repeats the process…
I have more than once had turtles lost after sending them 100+ blocks.
They were gone, the mines were unfinished, and on further mining, I found one inside the smoothstone… So It seems while the turtles are moved themselves… The blocks they mine and place are not registered while a player is out of the current chunk.
Here's the code for my strip mine…
NO COMMENTS WERE IN THE CODE
I have more than once had turtles lost after sending them 100+ blocks.
They were gone, the mines were unfinished, and on further mining, I found one inside the smoothstone… So It seems while the turtles are moved themselves… The blocks they mine and place are not registered while a player is out of the current chunk.
Here's the code for my strip mine…
NO COMMENTS WERE IN THE CODE
--function to go to the next branch
function nbr()
if lr=="l" then
turtle.turnLeft()
elseif lr=="r" then
turtle.turnRight()
end
turtle.dig()
turtle.forward()
turtle.digUp()
turtle.dig()
turtle.forward()
turtle.digUp()
turtle.dig()
turtle.forward()
turtle.digUp()
if lr=="l" then
turtle.turnRight()
elseif lr=="r" then
turtle.turnLeft()
end
end
--ask user for distance, number of branches, and the direction the branches go in
write("distance:")
dis=io.read()
write("branches:")
bra=io.read()
repeat
print("direction? l or r")
lr=io.read()
until lr=="l" or lr=="r"
--for however many branches were specified
for x=1,bra do
torch=0
--for whatever distance given
for x=1,dis do
--while there isnt gravel falling in front of you
while turtle.detect() do
turtle.dig()
--wait for gravel
sleep(1)
end
turtle.forward()
turtle.digUp()
--if you've gone far enough place a torch on top
if torch==10 then
turtle.placeUp()
torch=0
end
torch=torch+1
end
--for distance give go back
for y=1,dis do
turtle.back()
end
-- go to the next branch
nbr()
end