Advertisement
devomaa

Colorful Lights Control Panel

Jun 5th, 2021
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. local ids = {
  2. main = 19015,
  3. ["19015"] = 19015,
  4. server = 19053
  5. ["19053"] = 19053 -- This converts both "bedroom" and "31" to 31.
  6. }
  7. local tArgs = {...}
  8. if not tArgs[1] or not tArgs[2] then error("usage: progName <id> <on/off>") end
  9. local id = ids[tArgs[1]]
  10. if not id then error("Invalid name!") end
  11. local active = tArgs[2]:lower() == "on" and true or false
  12. rednet.send(id,active)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement