Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- This program will tell a turtle to farm a single crop type on adjacent plots
- The turtle will replant it with whatever seed is in slot 1
- The turtle will drop everything else in it's inventory down below it
- ]]
- --[[ Functions ]]
- local function empty()
- for i = 2, 16 do
- turtle.select(i)
- turtle.dropDown()
- end
- turtle.select(1)
- local count = turtle.getItemCount()
- turtle.dropDown(count - 1)
- end
- local function farm()
- local success, data = turtle.inspect()
- if success and data["state"]["age"] == 7 then
- turtle.dig()
- turtle.select(1)
- turtle.place()
- end
- end
- --[[ Main ]]
- while true do
- farm()
- empty()
- turtle.turnRight()
- end
Advertisement
Add Comment
Please, Sign In to add comment