Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local var = require "varutils"
- local save, load = var.save, var.load
- delay_top = 3
- delay_bottom = 16
- function search(a, b)
- for i = a, b do
- turtle.select(i)
- if turtle.getItemCount() > 0 then
- return true
- end
- end
- return false
- end
- lastDropped = load("lastDropped")
- while true do
- if lastDropped == "bottom" then
- if not search(1, 8) then break end
- turtle.dropDown(1)
- save("lastDropped", "top")
- sleep(delay_top)
- else
- if not search(9, 16) then break end
- turtle.dropDown(1)
- save("lastDropped", "bottom")
- sleep(delay_bottom)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement