Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Plant
- function plant()
- if turtle.getItemCount(1) == 0 then
- turtle.select(1)
- turtle.turnLeft()
- turtle.suck()
- turtle.turnRight()
- end
- if turtle.getItemCount(2) == 0 then
- turtle.select(2)
- turtle.turnRight()
- turtle.suck()
- turtle.turnLeft()
- end
- turtle.select(1)
- turtle.place()
- turtle.select(2)
- turtle.place()
- sleep(6)
- end
- --Chop
- function chop()
- turtle.select(3)
- turtle.dig()
- turtle.forward()
- while turtle.compareUp() == true do
- turtle.digUp()
- turtle.up()
- end
- while turtle.detectDown() == false do
- turtle.down()
- end
- turtle.back()
- end
- --Refuel
- function refuel()
- turtle.select(3)
- turtle.refuel(1)
- sleep(0.5)
- end
- --Empty
- function empty()
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.select(3)
- turtle.drop()
- turtle.turnRight()
- turtle.turnRight()
- end
- while true do
- refuel()
- empty()
- plant()
- chop()
- sleep(5)
- os.queueEvent("Repeat")
- os.pullEvent()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement