Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Protocol = "0000"
- local ServerId = 0
- local M_Lights = false
- local E_Lights = false
- local D_Effects = false
- local N_Effects = false
- local FireWorks = false
- peripheral.find("modem",rednet.open)
- function Update()
- local Port1 = peripheral.wrap("redstoneIntegrator_0")
- local Port2 = peripheral.wrap("redstoneIntegrator_1")
- local Port3 = peripheral.wrap("redstoneIntegrator_3")
- local Port4 = peripheral.wrap("redstoneIntegrator_4")
- Port1.setOutput("top",M_Lights)
- Port2.setOutput("top",E_Lights)
- Port3.setOutput("top",D_Effects)
- Port4.setOutput("top",N_Effects)
- end
- while true do
- local id, message, protocol = rednet.receive(Protocol)
- local Dir = textutils.unserialize(message)
- if Dir[1] == "M_Lights" then
- M_Lights = Dir[2]
- elseif Dir[1] == "E_Lights" then
- E_Lights = Dir[2]
- elseif Dir[1] == "D_Effects" then
- D_Effects = Dir[2]
- elseif Dir[1] == "N_Effects" then
- N_Effects = Dir[2]
- elseif Dir[1] == "Off" then
- M_Lights = false
- E_Lights = false
- D_Effects = false
- N_Effects = false
- end
- Update()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement