Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function dropAndPlant()
- local graine = turtle.getItemCount(2)
- if graine > 0 then
- turtle.select(2)
- turtle.place()
- if graine > 10 then
- turtle.dropUp(graine-10)
- end
- end
- turtle.select(1)
- turtle.dropUp()
- end
- while true do
- for i=1,4 do
- local success, ble = turtle.inspect()
- if (success == true) and (ble.state.age == 7) then
- turtle.select(1)
- turtle.dig()
- dropAndPlant()
- elseif (success == false) then
- dropAndPlant()
- end
- turtle.turnRight()
- i = i+1
- sleep(0.1)
- end
- sleep(300)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement