Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function startup()
- rednet.open("back")
- rs.setOutput("top",false)
- rs.setOutput("right",false)
- rs.setOutput("bottom",false)
- rs.setOutput("left",false)
- end
- function main()
- while true do
- info1,info2,info3,info4 = os.pullEvent()
- if info1 == "rednet_message" and type(info3) == "table" then
- if info3["action"] == "changeRedstone" then
- if type(info3["top"]) == "number" then
- rs.setAnalogOutput("top",info3["top"])
- end
- if type(info3["right"]) == "number" then
- rs.setAnalogOutput("right",info3["right"])
- end
- if type(info3["bottom"]) == "number" then
- rs.setAnalogOutput("bottom",info3["bottom"])
- end
- if type(info3["left"]) == "number" then
- rs.setAnalogOutput("left",info3["left"])
- end
- end
- end
- end
- end
- startup()
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement