Posted 24 July 2014 - 02:49 AM
I am trying to make a mining program that tunnels down and then mines forward. My newest addition tries to place a torch every 10 blocks. Instead of placing a torch every 10 blocks it tries to place a torch in the same block 100 times.
Here's the Code:
Here's the Code:
- term.clear()
- term.setCursorPos(1,1)
- for i=1, 55 do
- turtle.digDown()
- turtle.down()
- – while not turtle.placeDown(15) do turtle.forward()
- –end
- while not turtle.forward() do turtle.dig()
- print("Gravel!")
- end
- while not turtle.placeDown(15) do turtle.digDown()
- print("No Floor!")
- end
- turtle.digUp()
- for i=1, 14 do
- turtle.select(i)
- if turtle.compareTo(16) then
- turtle.dropDown()
- end
- end
- for i=1, 12 do
- turtle.select(i)
- if turtle.compareTo(13) then
- turtle.dropDown()
- end
- end
- for i = 10, 55 do
- turtle.turnRight()
- turtle.dig()
- turtle.place(12)
- turtle.turnLeft()
- end
- end
- for i=1, 100 do
- turtle.dig()
- turtle.forward()
- turtle.digUp()
- for i=1, 15 do
- turtle.select(i)
- if turtle.compareTo(16) then
- turtle.dropDown()
- end
- end
- –Tries to Place Torch
- for i=10, 100 do
- turtle.turnRight()
- turtle.dig()
- turtle.placeRight(13)
- turtle.turnLeft()
- end
- end