Advertisement
Guest User

rednet

a guest
Nov 20th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.55 KB | None | 0 0
  1. rednet.open("top")
  2. x = begnis
  3.  
  4.  
  5. while x~= "exit" do
  6.  
  7.   term.clear()
  8.   term.setCursorPos(1,1)
  9.  
  10.     print("########~~~########")
  11.     print("                   ")
  12.     print("    Door Control   ")
  13.     print("                   ")
  14.     print(" 1 = open 2 = close")
  15.     print("     exit to quit  ")
  16.     print("########~~~########")
  17.    
  18.     x = io.read()
  19.    
  20.       if x == "1" then
  21.         rednet.send(15, "open")
  22.       end
  23.      
  24.       if x == "2" then
  25.         rednet.send(15, "close")
  26.       end
  27.      
  28. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement