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: ")
- print("Minecraft Password: ")
- test = string.len("Minecraft Password: *")
- term.setCursorPos(test, 3)
- term.setCursorPos(test, 4)
- user = read()
- pass = read()
- response = http.get("http://login.minecraft.net/?user=" ..user.. "&password=" ..pass.. "&version=12")
- if response then
- if string.find(response.readAll(), "deprecated") then
- term.setCursorPos(1, y-1)
- textutils.slowPrint("Logging in...")
- sleep(0.5)
- break
- else
- status = (response.readAll())
- end
- else
- status = ("Unable to connect to minecraft.net")
- end
- end
- end
- connect()
Advertisement
Add Comment
Please, Sign In to add comment