Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- blocksPlaced = 0
- --Refueling
- function refuel()
- turtle.select(2)
- turtle.refuel(10)
- end
- --Restocking of Wood/Stone
- function restock()
- turtle.back()
- turtle.select(1)
- turtle.suckDown(4)
- turtle.select(2)
- turtle.suckUp(4)
- turtle.forward()
- turtle.select(1)
- end
- --For the making of the circle
- function plant()
- for i=1,2 do
- turtle.forward()
- turtle.placeDown()
- if blocksPlaced == 2 then
- turtle.select(2)
- end
- blocksPlaced = blocksPlaced + 1
- end
- end
- --mining the rock/wood
- function mine()
- turtle.select(3)
- turtle.digDown()
- for i=1,4 do
- turtle.forward()
- turtle.digDown()
- turtle.forward()
- turtle.digDown()
- turtle.turnRight()
- end
- turtle.select(1)
- end
- --The circle itself
- function plantCircle()
- turtle.placeDown()
- blocksPlaced = 0
- for i=1,4 do
- plant()
- turtle.turnRight()
- end
- blocksPlaced = 0
- turtle.select(1)
- os.sleep(70)
- 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
- function dropLoot()
- if turtle.getItemCount(3) > 40 then
- turtle.back()
- turtle.turnLeft()
- for i=3,15 do
- turtle.select(i)
- turtle.drop()
- end
- turtle.turnRight()
- turtle.forward()
- end
- turtle.select(1)
- end
- --The Actual program
- turtle.select(1)
- while true do
- dropLoot()
- restock()
- plantCircle()
- check()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement