Advertisement
jimisdam

ComputerCraft General Wireless Commander [ORIGINAL]

Nov 1st, 2014
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.33 KB | None | 0 0
  1. for i,v in pairs(rs.getSides()) do
  2.   if peripheral.getType(v) == "modem" then
  3.     if not rednet.isOpen(v) then rednet.open(v) end
  4.   end
  5. end
  6.  
  7. while true do
  8.     term.clear()
  9.     term.setCursorPos(1,1)
  10.     print("Protocol: ")
  11.     protocol = read()
  12.     print("Command: ")
  13.     cmd = read()
  14.     rednet.broadcast(cmd, protocol)
  15. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement