Advertisement
SirBaconBitz

Untitled

Mar 3rd, 2014
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. --Program to get accounts. SO SEXY RIGHT?
  2. while true do
  3. accfileexists=fs.exists(".accounts")
  4. herp = true
  5. lines = {}
  6. temp = {}
  7. accounts = {}
  8. tempcolors = {}
  9. if accfileexists == true then
  10. fs.delete(".accounts")
  11. end
  12.  
  13. receive = http.post("http://ccpost.esy.es/nessazon/post.php", "WE GOT DA HELLA ACCOUNTS")
  14. print("connected")
  15. sleep(1)
  16. while herp == true do
  17. message = receive.readLine()
  18. if message ~= nil then
  19. table.insert(lines, message)
  20. else
  21. herp = false
  22. end
  23. print("Checking for nil")
  24. sleep(0.1)
  25. end
  26. handle = assert(fs.open("accounts", "w"), "Failed to open accounts file")
  27. for k, v in pairs(lines) do
  28. print("got to for")
  29. sleep(2)
  30. print(v)
  31. temp = {}
  32. tempcolors = {}
  33. for word in v:gmatch('%S+') do
  34. print("got to second for")
  35. sleep(2)
  36. table.insert(temp, word)
  37. print(word)
  38. end
  39. table.insert(accounts, temp[1])
  40. table.insert(accounts, temp[2])
  41. table.insert(accounts, temp[3])
  42. end
  43. output = textutils.serialize(accounts)
  44. handle.write(output)
  45. handle.close()
  46. handle = assert(fs.open("accounts", "r"), "Couldn't load vars")
  47. input = handle.readAll()
  48. accounts = textutils.unserialize(input)
  49. print(accounts[1])
  50. sleep(5)
  51. term.clear()
  52. term.setCursorPos(1,1)
  53. for i = 1,120 do
  54. sleep(1)
  55. term.clear()
  56. term.setCursorPos(1,1)
  57. term.write("Refreshing in "..120-i.." more seconds")
  58. end
  59. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement