Advertisement
Guest User

Untitled

a guest
May 27th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. turtle.select(1)
  2.  
  3. local lamp = "back"
  4. local canningMachineInventory = "right"
  5.  
  6. redstone.setOutput("right", false)
  7. redstone.setOutput("back", false)
  8.  
  9. while true do
  10.  
  11. for i=2,16 do
  12. if turtle.getItemCount(i) > 0 then
  13. turtle.select(i)
  14. turtle.transferTo(1, 64)
  15. turtle.select(1)
  16. end
  17. end
  18.  
  19. if turtle.getItemCount(1) > 3 then
  20. turtle.dropUp(4)
  21.  
  22. redstone.setOutput(canningMachineInventory, true)
  23.  
  24. for i=1,4 do
  25. redstone.setOutput(lamp, true)
  26. sleep(0.2)
  27. redstone.setOutput(lamp, false)
  28. sleep(0.3)
  29. end
  30.  
  31. redstone.setOutput(lamp, true)
  32. sleep(8)
  33.  
  34. redstone.setOutput(canningMachineInventory, false)
  35. redstone.setOutput(lamp, false)
  36. sleep(4)
  37. else
  38. if turtle.getItemCount(1) > 0 then
  39. local count = turtle.getItemCount(1)
  40. for i=1,count do
  41. redstone.setOutput(lamp, true)
  42. sleep(0.2)
  43. redstone.setOutput(lamp, false)
  44. sleep(0.3)
  45. end
  46. sleep(2.5)
  47. end
  48. end
  49.  
  50. sleep(1)
  51. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement