xXm0dzXx

Untitled

May 25th, 2012
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. local status = "Please login first."
  2. local x,y = term.getSize()
  3.  
  4. function connect()
  5. while true do
  6. term.clear()
  7. term.setCursorPos(1,1)
  8. print(status.. "\n")
  9. print("Minecraft Username: ")
  10. print("Minecraft Password: ")
  11. test = string.len("Minecraft Password: *")
  12.  
  13. term.setCursorPos(test, 3)
  14. term.setCursorPos(test, 4)
  15. user = read()
  16. pass = read()
  17. response = http.get("http://login.minecraft.net/?user=" ..user.. "&password=" ..pass.. "&version=12")
  18. if response then
  19. if string.find(response.readAll(), "deprecated") then
  20. term.setCursorPos(1, y-1)
  21. textutils.slowPrint("Logging in...")
  22. sleep(0.5)
  23. break
  24. else
  25. status = (response.readAll())
  26. end
  27. else
  28. status = ("Unable to connect to minecraft.net")
  29. end
  30. end
  31. end
  32.  
  33. connect()
Advertisement
Add Comment
Please, Sign In to add comment