Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MAX = 65535; -- All 16 bits turned on
- local Side = select(1, ...);
- local Invert = select(2, ...);
- Invert = Invert == "true";
- print(Side);
- print(Invert);
- rednet.open("right");
- while true do
- local sender, msg = rednet.receive();
- local num = tonumber(msg);
- if (num) then
- if (Invert) then
- num = bit.band(MAX, bit.bnot(num));
- end
- print(os.time(), ": ", num);
- rs.setBundledOutput(Side, num);
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement