Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function checkFuel(amount)
- if turtle.getFuelLevel() < amount*6 then
- return false
- else
- return true
- end
- end
- function Up()
- if not turtle.up() then
- turtle.digUp()
- Up()
- end
- end
- function Down()
- if not turtle.down() then
- turtle.digDown()
- Down()
- end
- end
- function Forward()
- if not turtle.forward() then
- turtle.dig()
- Forward()
- end
- end
- function stairDown(amount)
- for i=1,amount do
- Forward()
- Up()
- turtle.digUp()
- Down()
- Down()
- end
- end
- print("How many blocks Down:")
- local amount = read()
- if checkFuel(amount) then
- fuelStart = turtle.getFuelLevel()
- stairDown(amount)
- print("--------DONE----------")
- print(fuelStart - turtle.getFuelLevel() .." Fuel used")
- else
- print("Not enoth Fuel," ..amount*6 .." required")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement