Advertisement
SirBaconBitz

Setup

Apr 11th, 2014
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.74 KB | None | 0 0
  1. --[[
  2. Gets constants, like peripheral sides and username
  3. ]]--
  4. term.clear()
  5. term.setCursorPos(1,1)
  6. term.write("Congratulations!")
  7. term.setCursorPos(1,2)
  8. term.write("AE Glass has been Installed.")
  9. term.setCursorPos(1,3)
  10. term.write("What side is your terminal glasses bridge on?: ")
  11. bridge = read()
  12. term.setCursorPos(1,4)
  13. term.write("What is your username?: ")
  14. username = read()
  15. term.setCursorPos(1,5)
  16. term.write("What side is your export bus on?: ")
  17. interface = read()
  18. options = {
  19. ["bridgeside"] = bridge,
  20. ["username"] = username,
  21. ["interfaceside"] = interface
  22. }
  23. if fs.exists(".options") then
  24.   fs.delete(".options")
  25. end
  26.  
  27. handle = fs.open(".options", "w")
  28. handle.write(textutils.serialize(options))
  29. handle.close()
  30. os.reboot()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement