Advertisement
Guest User

Untitled

a guest
Jan 12th, 2017
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.71 KB | None | 0 0
  1. if (Game.isLoggedIn()) {
  2. if (i != 1) { //added this because it kept double printing the log.
  3. if (Settings.get(22) == 33554432) {
  4. LogHandler.log(AutoLogin.username + ":" + AutoLogin.password + " is not banned!, but is still on tutorial island");
  5. i++;
  6. } else {
  7. LogHandler.log(AutoLogin.username + ":" + AutoLogin.password + " is not banned!");
  8. i++;
  9. }
  10. }
  11. finishedTutorial = true;
  12. Game.logout();
  13. Time.sleepUntil(new Condition() {
  14. public boolean check() {
  15. return !Game.isLoggedIn();
  16. }
  17. }, 6000);
  18. } else if (!Game.isLoggedIn() && finishedTutorial) {
  19. AutoLogin.readAccounts();
  20. AutoLogin.isTrue = true;
  21. i = 0;
  22. Main.startTime2 = System.currentTimeMillis();
  23. finishedTutorial = false;
  24. }
  25.  
  26.  
  27.  
  28.  
  29.  
  30. public void login() {
  31.  
  32. if (!onSecondScreen()) {
  33. int index = Game.getLoginMenuIndex();
  34. switch (index) {
  35. case 0:
  36. Main.state = "Clicking Existing User";
  37. clickExistingUser();
  38. break;
  39.  
  40. case 1:
  41. hopWorlds(WorldType.P2P);
  42. Main.state = "Clicking Canceling";
  43. clickCancel();
  44. break;
  45.  
  46. case 2:
  47. if (isAccountDisabled()) {
  48. //LogHandler.log(username + " is disabled");
  49. readAccounts();
  50. isTrue = true;
  51. Main.startTime2 = System.currentTimeMillis();
  52. clickCancel();
  53. }
  54.  
  55. if (isNonMember()) {
  56. Main.state = "Account is non-member.. stopping script";
  57. TBot.getBot().getScriptHandler().stopScript();
  58. }
  59.  
  60. if (rsUpdated()) {
  61. Main.state = "RS update";
  62. LogHandler.log("RS Update");
  63. TBot.getBot().getScriptHandler().stopScript();
  64. }
  65.  
  66. if (!isConnecting() && !isAccountDisabled()) {
  67. Main.state = "Entering account details";
  68. enterUserName();
  69. enterPassword();
  70. }
  71. break;
  72. case 3:
  73. if (isPasswordWrong()) {
  74. Main.state = "Wrong password";
  75. handleWrongPassword();
  76. }
  77. break;
  78. case 5:
  79. if (forgotPasswordScreen()) {
  80. Main.state = "Clicked forgot password";
  81. clickBack();
  82. }
  83. }
  84.  
  85.  
  86.  
  87.  
  88. public static void readAccounts() {
  89.  
  90. try {
  91. String line = Files.readAllLines(Paths.get("C:\\Users\\Littl\\Desktop\\accountChecker.txt")).get(lineNumber);
  92. while (line != null && isTrue) {
  93. String[] ar = line.split(":");
  94. //LogHandler.log(("# " + logLineNumber + " Account: " + ar[0] + " Password: "+ ar[1]));
  95. username = ar[0];
  96. password = ar[1];
  97. Main.state2 = ar[0];
  98. Main.state3 = ar[1];
  99. logLineNumber++;
  100. lineNumber++;
  101. isTrue = false;
  102. }
  103. } catch (IOException e) {
  104. e.printStackTrace();
  105. }
  106. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement