Posted 20 April 2013 - 09:37 AM
Hi! :)/>
Im trying to either program or find a turtle that is able to avoid mining diamonds, and then keep mining my tunnel. (Or just stops mining).
The tunnel has to be 3x3, place torches, refuel automaticly, and maybe put the stuff it got in a chest.
This is what i've got so far:
Thanks in advance! :D/>
Im trying to either program or find a turtle that is able to avoid mining diamonds, and then keep mining my tunnel. (Or just stops mining).
The tunnel has to be 3x3, place torches, refuel automaticly, and maybe put the stuff it got in a chest.
This is what i've got so far:
function digIt()
while turtle.detect() do
turtle.dig()
os.sleep(0.5)
end
turtle.forward()
while turtle.detectDown() or turtle.detectUp() do
turtle.digUp()
turtle.digDown()
end
end
function placeTorch()
turtle.select(16)
turtle.placeUp()
end
local run = 0
term.write("Tunnel length: ")
run = read()
for i = 1, run do
k = i - 1
j = k % 4
digIt()
turtle.turnLeft()
digIt()
turtle.turnRight()
turtle.turnRight()
turtle.forward()
digIt()
turtle.back()
turtle.turnLeft()
if i == 2 or j == 1 then
turtle.back()
turtle.turnRight()
turtle.forward()
placeTorch()
turtle.back()
turtle.back()
placeTorch()
turtle.forward()
turtle.turnLeft()
turtle.forward()
end
end
Thanks in advance! :D/>