Advertisement
Guest User

startup

a guest
Apr 26th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.56 KB | None | 0 0
  1. -- ID
  2. id2 = 288
  3. id3 = 294
  4. id4 = 312
  5. id5 = 313
  6. id6 = 0
  7. id7 = 0
  8. id8 = 0
  9. -- BTS'y
  10. bts1 = 297
  11. bts2 = 0
  12. bts3 = 0
  13. bts4 = 0
  14.  
  15. rednet.open("top")
  16. while true do
  17. event, id, txt, dis = os.pullEvent()
  18. if event == "rednet_message" then
  19. if id == bts1 then
  20. rednet.send(id2, txt)
  21. rednet.send(id3, txt)
  22. rednet.send(id4, txt)
  23. rednet.send(id5, txt)
  24. rednet.send(id6, txt)
  25. rednet.send(id7, txt)
  26. rednet.send(id8, txt)
  27. print(txt)
  28. rednet.send(bts2, txt)
  29. rednet.send(bts3, txt)
  30. rednet.send(bts4, txt)
  31. elseif id == bts2 then
  32. rednet.send(id2, txt)
  33. rednet.send(id3, txt)
  34. rednet.send(id4, txt)
  35. rednet.send(id5, txt)
  36. rednet.send(id6, txt)
  37. rednet.send(id7, txt)
  38. rednet.send(id8, txt)
  39. print(txt)
  40. rednet.send(bts1, txt)
  41. rednet.send(bts3, txt)
  42. rednet.send(bts4, txt)
  43. elseif id == bts3 then
  44. rednet.send(id2, txt)
  45. rednet.send(id3, txt)
  46. rednet.send(id4, txt)
  47. rednet.send(id5, txt)
  48. rednet.send(id6, txt)
  49. rednet.send(id7, txt)
  50. rednet.send(id8, txt)
  51. print(txt)
  52. rednet.send(bts2, txt)
  53. rednet.send(bts1, txt)
  54. rednet.send(bts4, txt)
  55. elseif id == bts4 then
  56. rednet.send(id2, txt)
  57. rednet.send(id3, txt)
  58. rednet.send(id4, txt)
  59. rednet.send(id5, txt)
  60. rednet.send(id6, txt)
  61. rednet.send(id7, txt)
  62. rednet.send(id8, txt)
  63. print(txt)
  64. rednet.send(bts2, txt)
  65. rednet.send(bts3, txt)
  66. rednet.send(bts1, txt)
  67. else
  68. rednet.send(id2, txt)
  69. rednet.send(id3, txt)
  70. rednet.send(id4, txt)
  71. rednet.send(id5, txt)
  72. rednet.send(id6, txt)
  73. rednet.send(id7, txt)
  74. rednet.send(id8, txt)
  75. print(txt)
  76. rednet.send(bts1, txt)
  77. rednet.send(bts2, txt)
  78. rednet.send(bts3, txt)
  79. rednet.send(bts4, txt)
  80. end
  81. end
  82. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement