Advertisement
geremy44

Bouton_Re

Feb 9th, 2022
785
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.46 KB | None | 0 0
  1. -- ID : 5
  2. rednet.open("left")
  3. redstone.setOutput("right", false)
  4. while true do
  5.   local event, side, sCh, rCh, msg, dist = os.pullEvent()
  6.   if event == "modem_message" then
  7.     local ID, Message, Protocole = rednet.receive()
  8.     if (ID == 4) and (Message == "On") then
  9.       redstone.setOutput("right", true)
  10.       --print("on")
  11.     elseif (ID == 4) and (Message == "Off") then
  12.       redstone.setOutput("right", false)
  13.       --print("off")
  14.     end
  15.   end
  16. end
  17.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement