Posted 27 February 2012 - 10:31 PM
This is my code for an 3+3 Tunnel digger!
(more later, currently its "Beta"
you have to rename the file, just delete the .txt (You aren't permitted to upload this kind of file)[attachment=51:tunnel.txt]
(more later, currently its "Beta"
you have to rename the file, just delete the .txt (You aren't permitted to upload this kind of file)[attachment=51:tunnel.txt]
print("Insert 16 Cobble in slot 1!")
print("Press Enter if ready")
slot1 = turtle.getItemCount(1)
if slot1 > 15 then
io.read()
turtle.forward()
turtle.forward()
turtle.digDown() --OOTOO
turtle.select(1) --O O
turtle.placeDown() --O O
--O O
--OOOOO
turtle.turnRight()
turtle.forward()
turtle.digDown() --OOXTO
turtle.placeDown() --O O
--O O
--O O
--OOOOO
turtle.forward()
turtle.digDown() --OOXXT
turtle.placeDown() --O O
--O O
--O O
x1 = 0 --OOOOO
while x1 < 4 do
turtle.turnRight()
turtle.forward()
turtle.digDown()
turtle.placeDown()
x2 = 1
while x2 < 4 do
turtle.forward()
turtle.digDown() --OOXXX
turtle.placeDown() --O T
x2 = (x2+1) --O O
print(x2) --O O
end --OOOOO
x1 = (x1+1)
print(x1)
end
turtle.back()
turtle.turnRight()
turtle.forward()
print("Is this Position ok?")
i = io.read()
if i == yes or y or 1 or ja or yay then
while true do -- digging down
turtle.digDown()
turtle.forward()
turtle.digDown()
turtle.forward()
turtle.digDown()
turtle.turnRight()
turtle.forward()
turtle.turnRight()
turtle.digDown()
turtle.forward()
turtle.digDown()
turtle.forward()
turtle.digDown()
turtle.turnLeft()
turtle.forward()
turtle.turnLeft()
turtle.digDown()
turtle.forward()
turtle.digDown()
turtle.forward()
turtle.digDown()
turtle.turnRight()
turtle.turnRight()
turtle.down()
end
end
end