Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function harvest()
- while true do
- if turtle.forward() then
- turtle.digDown()
- else
- return
- end
- end
- end
- local function home()
- while true do
- if turtle.back()==false then
- return
- end
- end
- end
- local function unload()
- local emptyslot=0
- local maxcount=0
- for i=1,16 do
- turtle.select(i)
- itemdata=turtle.getItemDetail()
- if itemdata==nil then
- emptyslot=emptyslot+1
- else
- if itemdata.count>maxcount then
- maxcount=itemdata.count
- end
- end
- end
- if emptyslot<3 and maxcount>50 then
- for i=1,16 do
- turtle.select(i)
- turtle.dropDown()
- end
- turtle.select(1)
- end
- end
- sleep(math.random(1,5))
- home()
- while true do
- harvest()
- home()
- unload()
- for i=5,1,-1 do
- print(i.." minute(s) to go")
- sleep(60)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement