Advertisement
Cedricator

Steuercomputer Tank Befüllung

Jun 1st, 2020
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. -- Steuercomputer Tank Befüllung
  2.  
  3. rednet.open("bottom")
  4.  
  5. while true do
  6.  
  7. id,message = rednet.receive()
  8.  
  9. if id == 258 then
  10.  
  11. --Tank 1
  12. if message == "tank1_l" then
  13. redstone.setBundledOutput("left", colors.black)
  14. sleep(3)
  15. redstone.setBundledOutput("left", 0)
  16.  
  17. elseif message == "tank1_r" then
  18. redstone.setBundledOutput("left", colors.gray)
  19. sleep(3)
  20. redstone.setBundledOutput("left", 0)
  21.  
  22. --Tank 2
  23. elseif message == "tank2_l" then
  24. redstone.setBundledOutput("left", colors.green)
  25. sleep(3)
  26. redstone.setBundledOutput("left", 0)
  27.  
  28. elseif message == "tank2_r" then
  29. redstone.setBundledOutput("left", colors.lime)
  30. sleep(3)
  31. redstone.setBundledOutput("left", 0)
  32.  
  33. --Tank 3
  34. elseif message == "tank3_l" then
  35. redstone.setBundledOutput("left", colors.red)
  36. sleep(3)
  37. redstone.setBundledOutput("left", 0)
  38.  
  39. elseif message == "tank3_r" then
  40. redstone.setBundledOutput("left", colors.orange)
  41. sleep(3)
  42. redstone.setBundledOutput("left", 0)
  43.  
  44. --Tank 4
  45. elseif message == "tank4_l" then
  46. redstone.setBundledOutput("left", colors.blue)
  47. sleep(3)
  48. redstone.setBundledOutput("left", 0)
  49.  
  50. elseif message == "tank4_r" then
  51. redstone.setBundledOutput("left", colors.lightblue)
  52. sleep(3)
  53. redstone.setBundledOutput("left", 0)
  54.  
  55.  
  56. --Tank 5
  57. elseif message == "tank5_l" then
  58. redstone.setBundledOutput("right", colors.black)
  59. sleep(3)
  60. redstone.setBundledOutput("right", 0)
  61.  
  62. elseif message == "tank5_r" then
  63. redstone.setBundledOutput("left", colors.gray)
  64. sleep(3)
  65. redstone.setBundledOutput("left", 0)
  66.  
  67. --Tank 6
  68. elseif message == "tank6_l" then
  69. redstone.setBundledOutput("right", colors.green)
  70. sleep(3)
  71. redstone.setBundledOutput("right", 0)
  72.  
  73. elseif message == "tank6_r" then
  74. redstone.setBundledOutput("right", colors.lime)
  75. sleep(3)
  76. redstone.setBundledOutput("right", 0)
  77.  
  78. --Tank 7
  79. elseif message == "tank7_l" then
  80. redstone.setBundledOutput("right", colors.red)
  81. sleep(3)
  82. redstone.setBundledOutput("right", 0)
  83.  
  84. elseif message == "tank7_r" then
  85. redstone.setBundledOutput("right", colors.orange)
  86. sleep(3)
  87. redstone.setBundledOutput("right", 0)
  88.  
  89. --Tank 8
  90. elseif message == "tank8_l" then
  91. redstone.setBundledOutput("right", colors.blue)
  92. sleep(3)
  93. redstone.setBundledOutput("right", 0)
  94.  
  95. elseif message == "tank8_r" then
  96. redstone.setBundledOutput("right", colors.lightblue)
  97. sleep(3)
  98. redstone.setBundledOutput("right", 0)
  99.  
  100.  
  101. elseif message == "spülen" then
  102. redstone.setBundledOutput("right", colors.pink)
  103. sleep(1)
  104. redstone.setBundledOutput("right", colors.magenta)
  105.  
  106. redstone.setBundledOutput("left", colors.pink)
  107. sleep(1)
  108. redstone.setBundledOutput("left", colors.magenta)
  109.  
  110. sleep(3)
  111. redstone.setBundledOutput("right", 0)
  112. redstone.setBundledOutput("left", 0)
  113.  
  114. sleep(240)
  115.  
  116. redstone.setBundledOutput("right", colors.pink)
  117. sleep(1)
  118. redstone.setBundledOutput("right", colors.magenta)
  119.  
  120. redstone.setBundledOutput("left", colors.pink)
  121. sleep(1)
  122. redstone.setBundledOutput("left", colors.magenta)
  123.  
  124. sleep(3)
  125. redstone.setBundledOutput("right", 0)
  126. redstone.setBundledOutput("left", 0)
  127.  
  128. elseif message == "reset" then
  129. redstone.setBundledOutput("right", colors.white)
  130. redstone.setBundledOutput("right", colors.white)
  131. sleep(1)
  132. redstone.setBundledOutput("right", 0)
  133. redstone.setBundledOutput("left", 0)
  134.  
  135. end
  136. end
  137. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement