Advertisement
Marlingaming

CC Tweaked Atmospheric Control

Feb 25th, 2022 (edited)
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. local Protocol = "0000"
  2. local ServerId = 0
  3. local M_Lights = false
  4. local E_Lights = false
  5. local D_Effects = false
  6. local N_Effects = false
  7. local FireWorks = false
  8. peripheral.find("modem",rednet.open)
  9.  
  10. function Update()
  11. local Port1 = peripheral.wrap("redstoneIntegrator_0")
  12. local Port2 = peripheral.wrap("redstoneIntegrator_1")
  13. local Port3 = peripheral.wrap("redstoneIntegrator_3")
  14. local Port4 = peripheral.wrap("redstoneIntegrator_4")
  15. Port1.setOutput("top",M_Lights)
  16. Port2.setOutput("top",E_Lights)
  17. Port3.setOutput("top",D_Effects)
  18. Port4.setOutput("top",N_Effects)
  19. end
  20.  
  21. while true do
  22. local id, message, protocol = rednet.receive(Protocol)
  23. local Dir = textutils.unserialize(message)
  24. if Dir[1] == "M_Lights" then
  25. M_Lights = Dir[2]
  26. elseif Dir[1] == "E_Lights" then
  27. E_Lights = Dir[2]
  28. elseif Dir[1] == "D_Effects" then
  29. D_Effects = Dir[2]
  30. elseif Dir[1] == "N_Effects" then
  31. N_Effects = Dir[2]
  32. elseif Dir[1] == "Off" then
  33. M_Lights = false
  34. E_Lights = false
  35. D_Effects = false
  36. N_Effects = false
  37. end
  38. Update()
  39. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement