Advertisement
Reactor_Games

Untitled

Jan 6th, 2021 (edited)
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. local event = require("event")
  2. local robot = require("robot")
  3. local component = require("component")
  4. local modem = component.modem
  5. modem.open(51)
  6.  
  7. while true do
  8. local name, _, _, _, _, message = event.pull("modem_message")
  9. if name == 'modem_message' then
  10. if message == "1" then
  11. robot.select(1)
  12. robot.drop()
  13. elseif message == "2" then
  14. robot.select(2)
  15. robot.drop()
  16. elseif message == "3" then
  17. robot.select(3)
  18. robot.drop()
  19. elseif message == "4" then
  20. robot.select(4)
  21. robot.drop()
  22. elseif message == "5" then
  23. robot.select(5)
  24. robot.drop()
  25. elseif message == "6" then
  26. robot.select(6)
  27. robot.drop()
  28. elseif message == "7" then
  29. robot.select(7)
  30. robot.drop()
  31. elseif message == "8" then
  32. robot.select(8)
  33. robot.drop()
  34. elseif message == "9" then
  35. robot.select(9)
  36. robot.drop()
  37.  
  38. end
  39. end
  40. end
  41.  
  42.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement