Posted 27 October 2012 - 08:12 PM
Hello,
I'm new in computercraft and made a program for stripmining.The turtle is digging correctly but stops after the first correct part.
please help me on this program to make it endless.
Thx Affe3397
The code:
for i=1,3 do
while turtle.detect()==true do
turtle.dig()
os.sleep(0.5)
end
turtle.forward()
while turtle.detectUp()==true do
turtle.digUp()
os.sleep(0.5)
end
end
turtle.turnRight()
for i=1,5 do
while turtle.detect()==true do
turtle.dig()
os.sleep(0.5)
end
turtle.forward()
while turtle.detectUp()==true do
turtle.digUp()
os.sleep(0.5)
end
end
turtle.turnRight()
turtle.turnRight()
for i=1,5 do
turtle.forward()
end
for i=1,5 do
while turtle.detect()==true do
turtle.dig()
os.sleep(0.5)
end
turtle.forward()
while turtle.detectUp()==true do
turtle.digUp()
os.sleep(0.5)
end
end
turtle.turnRight()
turtle.turnRight()
for i=1,5 do
turtle.forward()
end
turtle.turnLeft()
I'm new in computercraft and made a program for stripmining.The turtle is digging correctly but stops after the first correct part.
please help me on this program to make it endless.
Thx Affe3397
The code:
for i=1,3 do
while turtle.detect()==true do
turtle.dig()
os.sleep(0.5)
end
turtle.forward()
while turtle.detectUp()==true do
turtle.digUp()
os.sleep(0.5)
end
end
turtle.turnRight()
for i=1,5 do
while turtle.detect()==true do
turtle.dig()
os.sleep(0.5)
end
turtle.forward()
while turtle.detectUp()==true do
turtle.digUp()
os.sleep(0.5)
end
end
turtle.turnRight()
turtle.turnRight()
for i=1,5 do
turtle.forward()
end
for i=1,5 do
while turtle.detect()==true do
turtle.dig()
os.sleep(0.5)
end
turtle.forward()
while turtle.detectUp()==true do
turtle.digUp()
os.sleep(0.5)
end
end
turtle.turnRight()
turtle.turnRight()
for i=1,5 do
turtle.forward()
end
turtle.turnLeft()