Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local status = "Please login first."
- local x,y = term.getSize()
- function connect()
- while true do
- term.clear()
- term.setCursorPos(1,1)
- print(status.. "n")
- print("Minecraft Username: ")
- write("Minecraft Password: ")
- test = string.len("Minecraft Password: *")
- term.setCursorPos(test, 3)
- user = read()
- term.setCursorPos(test, 4)
- pass = read()
- http.request("http://login.minecraft.net/?user=" ..user.. "&password=" ..pass.. "&version=12")
- local event, url, response = os.pullEvent()
- if event == "http_success" then
- _sResponse = { response.readAll() }
- if string.find(tostring(_sResponse[1]), "deprecated") then
- term.setCursorPos(1, y-1)
- textutils.slowPrint("Logging in...")
- sleep(0.5)
- break
- else
- status = tostring(_sResponse[1])
- end
- else
- status = ("Unable to connect to minecraft.net")
- end
- response.close()
- end
- end
- connect()
Add Comment
Please, Sign In to add comment