Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Refueling
- function refuel()
- turtle.select(2)
- turtle.refuel(10)
- end
- --Restocking of Wood/Stone
- function restock()
- turtle.back()
- turtle.select(1)
- turtle.suckDown()
- turtle.forward()
- end
- --For the making of the circle
- function plant()
- for i=1,2 do
- turtle.forward()
- turtle.placeDown()
- end
- end
- --mining the rock/wood
- function mine()
- turtle.digDown()
- for i=1,4 do
- turtle.forward()
- turtle.digDown()
- turtle.forward()
- turtle.digDown()
- turtle.turnRight()
- end
- end
- --The circle itself
- function circle()
- if turtle.getItemCount(1) > 8 then
- turtle.placeDown()
- for i=1,4 do
- plant()
- turtle.turnRight()
- end
- else
- restock()
- circle()
- end
- end
- --Checking if the rock/wood has become living
- function check()
- turtle.select(16)
- if turtle.compareDown() then
- os.sleep(15)
- mine()
- else
- os.sleep(1)
- check()
- end
- turtle.select(1)
- end
- --The Actual program
- restock()
- circle()
- while true do
- if turtle.getFuelLevel() > 100 then
- check()
- circle()
- else
- refuel()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment