bcash8

StorageSys reciever

Feb 17th, 2021 (edited)
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.49 KB | None | 0 0
  1. hostID =1
  2. if not rednet.isOpen("front") then
  3.      rednet.open("front")
  4. end
  5.  
  6. while true do
  7.      local e = { os.pullEvent() }
  8.      if e[1] == "rednet_message" then
  9.           if e[2] == hostID then
  10.                if e[3] then
  11.                     if e[3] == "on" then
  12.                          rs.setOutput("back",true)
  13.                     elseif e[3] == "off" then
  14.                          rs.setOutput("back",false)
  15.                     end
  16.                end
  17.           end
  18.      end
  19. end
Add Comment
Please, Sign In to add comment