Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("right")
- rether = peripheral.wrap("left")
- local Archi,BW,Gau = 601,611,621
- while true do
- event, ID,message, distance = os.pullEvent("rednet_message")
- if ( string.sub(message,1,4) == "rail" ) then
- value = tonumber(string.sub(message,5))
- rether.setFreq(Archi)
- if ( bit.band(value, 1) == 0 ) then rether.set(false) else rether.set(true) end
- rether.setFreq(BW)
- if ( bit.band(value, 2) == 0 ) then rether.set(false) else rether.set(true) end
- rether.setFreq(Gau)
- if ( bit.band(value, 4) == 0 ) then rether.set(false) else rether.set(true) end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement