pirga

ферма дереваа на роботах 3

Aug 7th, 2019 (edited)
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 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.1
  6. local timeSl = 0.5
  7. local maxH = 5
  8. local countTik = 0
  9.  
  10. print("начало")
  11.  
  12. while true do
  13. ---
  14. robot.suckUp()
  15. robot.select(1)
  16. robot.place()
  17. --os.sleep(timeSl)
  18. for i=1,20 do
  19. robot.use()
  20. end
  21. --os.sleep(timeSl)
  22. robot.select(2)
  23. --os.sleep(timeSl)
  24. inv.equip()
  25. --os.sleep(timeSl)
  26. robot.swing()
  27. robot.swing()
  28. robot.swing()
  29. robot.swing()
  30. --os.sleep(timeSl)
  31. robot.select(3)
  32. --os.sleep(timeSl)
  33. inv.equip()
  34. --os.sleep(timeSl)
  35. for i=1,maxH do
  36. robot.up()
  37. robot.swingUp()
  38. os.sleep(timeSleep)
  39. end
  40.  
  41. for i=1,maxH do
  42. robot.down()
  43. os.sleep(timeSleep)
  44. end
  45. --os.sleep(timeSl)
  46. robot.select(3)
  47. inv.equip()
  48. robot.select(2)
  49. inv.equip()
  50. robot.suckUp()
  51. os.sleep(4)
  52. ---
  53. end
  54.  
  55. print("работа выполнена")
Add Comment
Please, Sign In to add comment