Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rst = os.clock()
- for i=2,16 do
- if turtle.getItemCount(i) > 0 then turtle.select(i);break end
- if turtle.getItemCount(i) == 0 then turtle.suckDown() end
- end
- turtle.place()
- turtle.select(1)
- time = os.clock()
- while true do
- --print(os.clock() - rst)
- if turtle.compare() then
- time = os.clock()
- turtle.dig()
- turtle.dropUp(turtle.getItemCount(1) - 1)
- for i= 2,12 do
- if turtle.getItemCount(i) > 0 then turtle.select(i);break end
- if turtle.getItemCount(i) == 0 then turtle.suckDown() end
- end
- turtle.place()
- turtle.select(1)
- end
- if os.clock() - time > 5 then
- turtle.dig()
- for i =2,16 do
- if turtle.getItemCount(i) > 0 then turtle.select(i);break end
- if turtle.getItemCount == 0 then turtle.suckDown() end
- end
- turtle.place()
- turtle.select(1)
- time = os.clock()
- end
- if os.clock() - rst > 500 then
- os.reboot()
- end
- end
Add Comment
Please, Sign In to add comment