Not a member of Pastebin yet?
                        Sign Up,
                        it unlocks many cool features!                    
                - local currSlot = 1
 - local movefail = 0
 - local startfail = 1
 - local function refuel()
 - if turtle.getFuelLevel() < 10 then
 - print("I ran out of fuel.")
 - error()
 - end
 - end
 - local function material()
 - turtle.select(currSlot)
 - if turtle.compareTo(16) then
 - else
 - turtle.drop()
 - end
 - while turtle.getItemCount() == 0 do
 - if currSlot == 16 then
 - print("I ran out of material.")
 - error()
 - end
 - currSlot = currSlot+1
 - return material()
 - end
 - end
 - local function advDig()
 - if turtle.detect() then
 - print("I ran into something.")
 - print("Please note that I need")
 - print("one block of space around the hole")
 - print("to move.")
 - print(.)
 - print("If I were a mining turtle,")
 - print("I would take care of that myself.")
 - error()
 - end
 - end
 - while true do
 - advDig()
 - refuel()
 - material()
 - turtle.select(currSlot)
 - if turtle.detectDown() and startfail == 1 then
 - print("I think I started in the wrong spot, ")
 - print("please place me in a")
 - print("valid starting position.")
 - error()
 - end
 - if startfail == 1 then
 - startfail = 0
 - end
 - if turtle.detectDown() then
 - movefail = movefail+1
 - if movefail > 1 then
 - print("I think I am done.")
 - error()
 - else turtle.back()
 - turtle.turnRight()
 - end
 - else
 - movefail = 0
 - turtle.placeDown()
 - end
 - end
 
Advertisement
 
                    Add Comment                
                
                        Please, Sign In to add comment