Advertisement
Guest User

startup.lua

a guest
Mar 2nd, 2015
272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.28 KB | None | 0 0
  1. local component = require("component")
  2. local term = require("term")
  3. local shell = require("shell")
  4. local gpu = component.gpu
  5. local modem = component.modem
  6. local computer = component.computer
  7. local w, h = gpu.getResolution()
  8.  
  9. function clear ()
  10.   gpu.fill(0, 0, w, h, " ")
  11.   term.setCursor(1,1)
  12. end
  13.  
  14. clear()
  15. print("Establishing network connection.")
  16. os.sleep(1)
  17. clear()
  18. print("Esatblishing network connection..")
  19. os.sleep(1)
  20. clear()
  21. print("Establishing network connection...")
  22. os.sleep(2)
  23. clear()
  24. modemopen = modem.open(113)
  25. if(modemopen) then
  26.   computer.beep()
  27.   print("Network connection established!")
  28. else
  29.   computer.beep()
  30.   print("Failed to establish network connection! Diagnosing problem now!")
  31.   os.sleep(1)
  32.   computer.beep()
  33.   os.sleep(2)
  34.   modemisopen = modem.isOpen(113)
  35.     if(modemisopen) then
  36.       print("Modem already open! Continuing to login.")
  37.       os.sleep(2)
  38.     else
  39.       print("Unable to diagnose error! Please contact your Authentication Administrator!")
  40.       os.sleep(2)
  41.       return
  42.   end
  43. end
  44.  
  45.  
  46. print("Welcome to pengo1998's RL Client!")
  47. print("In order to access this computer you must provide")
  48. print("a username and password and be manually added into")
  49. print("the system by pengo198!")
  50.  
  51. os.sleep(2)
  52. clear()
  53.  
  54. print("Please enter username.")
  55. term.write("Username: ")
  56. user = term.read()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement