Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local ids = {
- main = 19015,
- ["19015"] = 19015,
- server = 19053
- ["19053"] = 19053 -- This converts both "bedroom" and "31" to 31.
- }
- local tArgs = {...}
- if not tArgs[1] or not tArgs[2] then error("usage: progName <id> <on/off>") end
- local id = ids[tArgs[1]]
- if not id then error("Invalid name!") end
- local active = tArgs[2]:lower() == "on" and true or false
- rednet.send(id,active)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement