Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tArgs = { ... }
- if #tArgs == 0 then
- print( "Usage: WRR <frequency>" )
- return
- end
- local input = tonumber(shell.resolve( tArgs[1] ))
- local lol = {"front","back","left","right","top","bottom"}
- for i = 1,6 do
- rednet.open(lol[i])
- end
- while true do
- local id, msg = rednet.receive()
- if string.sub(msg,1,10) == "WirelessRS" then
- if tonumber(string.sub(msg,11)) == input then
- for i = 1,6 do
- rs.setOutput(lol[i], true)
- end
- end
- end
- if string.sub(msg,1,11) == "WirelessRS0" then
- local hmm, hmmw = rednet.receive()
- if tonumber(string.sub(hmmw,11)) == input then
- for i = 1,6 do
- rs.setOutput(lol[i], false)
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement