Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --reciever
- local networkSide = "bottom"
- local bundleSide = "top"
- local CA = colors.white
- local GA = colors.pink
- local CB = colors.blue
- local GB = colors.yellow
- local CC = colors.red
- local GC = colors.orange
- rednet.open(networkSide)
- print(string.format("Joined Rednet as %d",os.getComputerID()))
- while true do
- local event, dist, message = os.pullEvent("rednet_message")
- local redbus = 0
- print(string.format("event: %s msg: %s dist: %d",event,message,dist))
- if tonumber(message1) == 1024 then
- shell.run("OS/update.lua")
- shell.run("reboot")
- end
- if bit.band(tonumber(message),1) == 1 then
- redbus = redbus + CA
- end
- if bit.band(tonumber(message),2) == 2 then
- redbus = redbus + GA
- end
- if bit.band(tonumber(message),4) == 4 then
- redbus = redbus + CB
- end
- if bit.band(tonumber(message),8) == 8 then
- redbus = redbus + GB
- end
- if bit.band(tonumber(message),16) == 16 then
- redbus = redbus + CC
- end
- if bit.band(tonumber(message),32) == 32 then
- redbus = redbus + GC
- end
- redstone.setBundledOutput(bundleSide,redbus)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement