Guest User

Untitled

a guest
Dec 17th, 2018
287
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.82 KB | None | 0 0
  1. rst = os.clock()
  2. for i=2,16 do
  3.   if turtle.getItemCount(i) > 0 then turtle.select(i);break end
  4.   if turtle.getItemCount(i) == 0 then turtle.suckDown() end
  5. end
  6. turtle.place()
  7. turtle.select(1)
  8. time = os.clock()
  9. while true do
  10. --print(os.clock() - rst)
  11. if turtle.compare() then
  12. time = os.clock()
  13. turtle.dig()
  14. turtle.dropUp(turtle.getItemCount(1) - 1)
  15. for i= 2,12 do
  16.   if turtle.getItemCount(i) > 0 then turtle.select(i);break end
  17.   if turtle.getItemCount(i) == 0 then turtle.suckDown() end
  18. end
  19. turtle.place()
  20. turtle.select(1)
  21. end
  22. if os.clock() - time > 5 then
  23. turtle.dig()
  24. for i =2,16 do
  25. if turtle.getItemCount(i) > 0 then turtle.select(i);break end
  26. if turtle.getItemCount == 0 then turtle.suckDown() end
  27. end
  28. turtle.place()
  29. turtle.select(1)
  30. time = os.clock()
  31. end
  32. if os.clock() - rst > 500 then
  33. os.reboot()
  34. end
  35. end
Add Comment
Please, Sign In to add comment