Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("bottom")
- while true do
- event, id, text = os.pullEvent()
- if event == "rednet_message" and id == 24 then
- if text == "blue-on" then
- redstone.setOutput("left", true)
- elseif text == "blue-off" then
- redstone.setOutput("left", false)
- elseif text == "orange-off" then
- redstone.setOutput("back", false)
- elseif text == "orange-on" then
- redstone.setOutput("back", true)
- end
- elseif event == "redstone" then
- if redstone.getInput("top") then
- rednet.send(24, "button-blue")
- elseif redstone.getInput("right") then
- rednet.send(24, "button-orange")
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment