Posted 28 August 2013 - 10:04 PM
This is the stair casing code I have so far it works to stair down but when it reaches a lava or water pool, it just goes right through it. I was wondering whether there was a way to at least seal off the stair from the pool as I could then remove the lava if there was not a way for it to do so. In addition, the part that places torches and chest was originally made for a strip mine and I tried to incorporate it but neither appears to work correctly. The torch section appears to be completely skipped. The chest section freezes the turtle after putting one item in the chest. I would appreciate any help I am new to ComputerCraft though I have done some basic programing before.
function dig()
turtle.dig()
turtle.digDown()
turtle.forward()
turtle.dig()
turtle.digDown()
turtle.forward()
turtle.digUp()
turtle.back()
end
local Level = 0
repeat
if turtle.down() then
Level = Level+1
end
dig()
turtle.back()
turtle.turnLeft()
turtle.forward()
turtle.turnRight()
dig()
turtle.turnRight()
turtle.dig()
turtle.dig()
turtle.forward()
if Level == 10 then
turtle.select(14)
print("Placing torch...")
turtle.place()
Level = 0
end
if turtle.getItemCount(12) ~=0 then
turtle.digDown()
print("Placing Chest...")
turtle.select(15)
turtle.placeDown()
turtle.select(1,12)
turtle.dropDown
end
if turtle.getFueLLevel() <= 10 then
turtle.select(16)
turtle.refuel()
end
turtle.turnLeft()
until not turtle.down()
turtle.select(13)
turtle.placeDown()