Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- collector for the tree farm
- -- place facing away from the tree farm
- -- ten blocks from the center of the tree farm
- -- place fuel blocks in the last slot (16)
- -- place chest to the right of the turtle
- -- (as it is facing away)
- function fuel()
- if turtle.getFuelLevel() < 30 then
- turtle.select(16)
- if turtle.refuel(16) then
- return true
- end
- print("Refuelling failed.")
- return false
- end
- end
- function tunnel()
- for i=1,10,1 do
- turtle.dig()
- turtle.forward()
- end
- for i=1,3,1 do
- turtle.digUp()
- turtle.up()
- end
- end
- function reverseTunnel()
- for i=1,3,1 do
- turtle.digDown()
- turtle.down()
- end
- for i=1,10,1 do
- turtle.dig()
- turtle.forward()
- end
- end
- function dump()
- turtle.turnRight()
- for i=1,15,1 do
- turtle.select(i)
- turtle.drop()
- end
- end
- function collect()
- print("Fueling")
- fuel()
- print("Going back for more")
- reverseTunnel()
- turtle.select(1)
- print("Picking up stuff")
- sucked = true
- while sucked == true do
- sucked = turtle.suck()
- end
- turtle.turnRight()
- turtle.turnRight()
- print("Coming back")
- tunnel()
- print("Dumping")
- dump()
- turtle.turnRight()
- end
- while true do
- collect()
- print("Waiting 15 minutes")
- os.sleep(900)
- end
Advertisement
Add Comment
Please, Sign In to add comment