Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Program to get accounts. SO SEXY RIGHT?
- while true do
- accfileexists=fs.exists(".accounts")
- herp = true
- lines = {}
- temp = {}
- accounts = {}
- tempcolors = {}
- if accfileexists == true then
- fs.delete(".accounts")
- end
- receive = http.post("http://ccpost.esy.es/nessazon/post.php", "WE GOT DA HELLA ACCOUNTS")
- print("connected")
- sleep(1)
- while herp == true do
- message = receive.readLine()
- if message ~= nil then
- table.insert(lines, message)
- else
- herp = false
- end
- print("Checking for nil")
- sleep(0.1)
- end
- handle = assert(fs.open("accounts", "w"), "Failed to open accounts file")
- for k, v in pairs(lines) do
- print("got to for")
- sleep(2)
- print(v)
- temp = {}
- tempcolors = {}
- for word in v:gmatch('%S+') do
- print("got to second for")
- sleep(2)
- table.insert(temp, word)
- print(word)
- end
- table.insert(accounts, temp[1])
- table.insert(accounts, temp[2])
- table.insert(accounts, temp[3])
- end
- output = textutils.serialize(accounts)
- handle.write(output)
- handle.close()
- handle = assert(fs.open("accounts", "r"), "Couldn't load vars")
- input = handle.readAll()
- accounts = textutils.unserialize(input)
- print(accounts[1])
- sleep(5)
- term.clear()
- term.setCursorPos(1,1)
- for i = 1,120 do
- sleep(1)
- term.clear()
- term.setCursorPos(1,1)
- term.write("Refreshing in "..120-i.." more seconds")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement