pirga

ферма дереваа на роботах 5 костная мука

Aug 7th, 2019 (edited)
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. local robot = require("robot")
  2. local inv = require("component").inventory_controller
  3. local comp = require("computer")
  4. local s = require("sides")
  5. local timeSleep = 0.3
  6. local timeSl = 0.5
  7. local maxH = 5
  8.  
  9. print("начало")
  10.  
  11.  
  12. while true do
  13. ---
  14. robot.suckUp()
  15.  
  16. robot.select(1)
  17. robot.place()
  18. os.sleep(timeSl)
  19. for i=1,20 do
  20. robot.use()
  21. end
  22. os.sleep(timeSl)
  23. robot.select(2)
  24. --os.sleep(timeSl)
  25. inv.equip()
  26. --os.sleep(timeSl)
  27. robot.swing()
  28. robot.swing()
  29. robot.swing()
  30. robot.swing()
  31. robot.swing()
  32. --os.sleep(timeSl)
  33. robot.select(3)
  34. --os.sleep(timeSl)
  35. inv.equip()
  36. --os.sleep(timeSl)
  37. for i=1,maxH do
  38. robot.up()
  39. robot.swingUp()
  40. os.sleep(timeSleep)
  41. end
  42.  
  43. for i=1,15 do
  44. robot.down()
  45. os.sleep(timeSleep)
  46. end
  47. --os.sleep(timeSl)
  48. robot.select(3)
  49. inv.equip()
  50. robot.select(2)
  51. inv.equip()
  52.  
  53. if robot.count(16) >= 63 then
  54.  
  55. for i = 5, 16 do
  56. robot.select(i)
  57. robot.dropDown()
  58. end
  59. end
  60.  
  61. robot.suckUp()
  62.  
  63. os.sleep(5)
  64. ---
  65. end
  66.  
  67. print("работа выполнена")
Add Comment
Please, Sign In to add comment