Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- refill = function()
- turtle.select(1)
- if turtle.getFuelLevel() < 50 then
- repeat
- sleep(3)
- turtle.digUp()
- turtle.placeUp()
- turtle.suckUp()
- turtle.refuel(64)
- turtle.dropUp()
- turtle.digUp()
- until turtle.getFuelLevel() > 50
- end
- end
- lastempty = function()
- turtle.digUp()
- turtle.select(2)
- turtle.placeUp()
- for i = 3, 15, 1
- do
- turtle.select(i)
- turtle.dropUp(64)
- end
- turtle.select(2)
- turtle.digUp()
- turtle.select(1)
- end
- empty = function()
- if turtle.getItemCount(15) >= 1 then
- turtle.digUp()
- turtle.select(2)
- turtle.placeUp()
- for i = 3, 15, 1
- do
- turtle.select(i)
- turtle.dropUp(64)
- end
- turtle.select(2)
- turtle.digUp()
- turtle.select(1)
- end
- end
- destroy = function()
- empty()
- turtle.digDown()
- turtle.digUp()
- while turtle.detect() == true do
- turtle.dig()
- end
- end
- staircasedown = function(start, fin)
- refill()
- for i = fin, start, 1
- do
- destroy()
- refill()
- turtle.forward()
- destroy()
- refill()
- turtle.down()
- end
- turtle.dig()
- lastempty()
- end
- staircaseup = function(start, fin)
- refill()
- for i = fin, start, 1
- do
- destroy()
- refill()
- turtle.forward()
- destroy()
- refill()
- turtle.up()
- end
- turtle.dig()
- lastempty()
- end
- term.write("Select Starting Y Coord: ")
- local Start = read()
- term.write("Select Ending Y Coord: ")
- local Fin = read()
- if Start > Fin then
- staircasedown(Start, Fin)
- elseif Fin > Start
- staircaseup(Start, Fin)
- end
- print("Mining Complete")
Add Comment
Please, Sign In to add comment