Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("bottom")
- local outport = 0
- print(os.getComputerID())
- function setVal(mask,val)
- local maskVal = mask * val
- local maskedCurrent = bit.band(bit.bnot(mask),outport)
- outport = maskVal + maskedCurrent
- end
- while true do
- local event, dist, message = os.pullEvent("rednet_message")
- setVal(bit.band(message,65535),bit.band(message,65536)/65536)
- print(string.format("msg : %d b16 1: %d b16 1 + 1: %d",message,bit.band(message,65535),bit.band(message,65536)/65536))
- redstone.setBundledOutput("top",outport)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement