Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function needsFuel()
- if turtle.getFuelLevel() < 10 then
- return true
- else
- return false
- end
- end
- function refuel()
- turtle.select(16)
- turtle.refuel(1)
- end
- function invCheck()
- for slot = 1, 15 do
- if turtle.getItemCount(slot) == 0 then
- slot = slot + 1
- turtle.select(slot)
- end
- end
- if turtle.getItemCount(15) == 1 then
- print("Feed Me!")
- os.pullEvent(key)
- turtle.placeDown()
- end
- end
- function blockDown()
- while turtle.detectDown() == true do
- print("Finding Hole")
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- turtle.forward()
- turtle.turnLeft()
- end
- end
- function noblockDown()
- if turtle.detectDown() == false then
- turtle.select(1)
- invCheck()
- print("Placing Block")
- turtle.placeDown()
- turtle.forward()
- else blockDown()
- end
- end
- function fill()
- if needsFuel() then
- refuel()
- else noblockDown()
- end
- end
- while true do
- fill()
- end
Advertisement
Add Comment
Please, Sign In to add comment