Guest User

Master

a guest
Jul 28th, 2012
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.76 KB | None | 0 0
  1.  
  2. term.setCursorPos(1,1)
  3. -- Check if Modem is On
  4.     if rednet.open("right") == true then
  5.     print("kNet is open already!")
  6.         else
  7.             rednet.open("right")
  8.             print("kNet is Online!")
  9.     end
  10.     term.clear()
  11.     while true do
  12.     term.setCursorPos(1,1)
  13.         print("What Computer are Communicating with?\n")
  14.         print("88: Engine Controller\n90: Factory Controller\n105:Zach Eats Ass Controller")
  15.         local id = tonumber(io.read()) -- Get ID from LIST
  16.         os.sleep(.8)
  17.         term.clear()
  18.         term.setCursorPos(1,1)
  19.         print("You've Chosen Computer ", id, " Give it a Command!")
  20.         local command = tostring(io.read())
  21.         print("Sending Command!")
  22.         rednet.send(id, command)
  23.         local event, param1 = os.pullEvent("rednet_message")
  24.         if param1 == true then
  25.         print("Success!")
  26.         end
  27.     end
Advertisement
Add Comment
Please, Sign In to add comment