Not a member of Pastebin yet?
                        Sign Up,
                        it unlocks many cool features!                    
                - function checkFuel()
 - if(turtle.getFuelLevel() < 2) then
 - turtle.select(16)
 - if(turtle.refuel(1)==false) then
 - print("Turtle needs more fuel in slot 16.")
 - print("Press enter to continue.")
 - io.read()
 - checkFuel()
 - end
 - turtle.select(15)
 - end
 - end
 - function moveUp()
 - checkFuel()
 - while(turtle.up()==false)do turtle.digUp() end
 - end
 - function moveDown()
 - checkFuel()
 - while(turtle.down()==false)do turtle.digDown() end
 - end
 - function move()
 - checkFuel()
 - while(turtle.forward()==false)do turtle.dig() end
 - end
 - function moveBack()
 - checkFuel()
 - while(turtle.back()==false)do end
 - end
 - local args = { ... }
 - function main()
 - local quarryWidth
 - if(#args == 1) then
 - quarryWidth = tonumber(args[1])
 - if(quarryWidth<2 or quarryWidth>64) then
 - print("Invalid Width")
 - return
 - end
 - else
 - print("Usage: "..shell.getRunningProgram().." <diameter>")
 - return
 - end
 - for temp2=2,1,-1 do
 - for temp=quarryWidth-1,1,-1 do
 - move()
 - end
 - turtle.select(2)
 - turtle.digDown()
 - turtle.placeDown()
 - moveBack()
 - turtle.select(1)
 - turtle.place()
 - for temp=quarryWidth-1,2,-1 do
 - moveBack()
 - end
 - turtle.turnRight()
 - end
 - end
 - main()
 
Advertisement
 
                    Add Comment                
                
                        Please, Sign In to add comment