Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local modem = peripheral.wrap("top")
- modem.open(1)
- event = os.pullEvent()
- while true do
- local event, modemSide, senderChannel,
- replyChannel, message, senderDistance = os.pullEvent("modem_message")
- if event == "modem_message" then
- if message:find("Pozar") then
- rs.setOutput("left", true)
- else
- if message:find("TR1") then
- if redstone.getInput("left") == true then
- rs.setOutput("left", false)
- else
- rs.setOutput("left", true)
- end
- end
- end
- if redstone.getInput("left") == true then
- modem.transmit(3, 1, "TR1_OFF")
- else
- modem.transmit(3, 1, "TR1_ON")
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement