Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (Game.isLoggedIn()) {
- if (i != 1) { //added this because it kept double printing the log.
- if (Settings.get(22) == 33554432) {
- LogHandler.log(AutoLogin.username + ":" + AutoLogin.password + " is not banned!, but is still on tutorial island");
- i++;
- } else {
- LogHandler.log(AutoLogin.username + ":" + AutoLogin.password + " is not banned!");
- i++;
- }
- }
- finishedTutorial = true;
- Game.logout();
- Time.sleepUntil(new Condition() {
- public boolean check() {
- return !Game.isLoggedIn();
- }
- }, 6000);
- } else if (!Game.isLoggedIn() && finishedTutorial) {
- AutoLogin.readAccounts();
- AutoLogin.isTrue = true;
- i = 0;
- Main.startTime2 = System.currentTimeMillis();
- finishedTutorial = false;
- }
- public void login() {
- if (!onSecondScreen()) {
- int index = Game.getLoginMenuIndex();
- switch (index) {
- case 0:
- Main.state = "Clicking Existing User";
- clickExistingUser();
- break;
- case 1:
- hopWorlds(WorldType.P2P);
- Main.state = "Clicking Canceling";
- clickCancel();
- break;
- case 2:
- if (isAccountDisabled()) {
- //LogHandler.log(username + " is disabled");
- readAccounts();
- isTrue = true;
- Main.startTime2 = System.currentTimeMillis();
- clickCancel();
- }
- if (isNonMember()) {
- Main.state = "Account is non-member.. stopping script";
- TBot.getBot().getScriptHandler().stopScript();
- }
- if (rsUpdated()) {
- Main.state = "RS update";
- LogHandler.log("RS Update");
- TBot.getBot().getScriptHandler().stopScript();
- }
- if (!isConnecting() && !isAccountDisabled()) {
- Main.state = "Entering account details";
- enterUserName();
- enterPassword();
- }
- break;
- case 3:
- if (isPasswordWrong()) {
- Main.state = "Wrong password";
- handleWrongPassword();
- }
- break;
- case 5:
- if (forgotPasswordScreen()) {
- Main.state = "Clicked forgot password";
- clickBack();
- }
- }
- public static void readAccounts() {
- try {
- String line = Files.readAllLines(Paths.get("C:\\Users\\Littl\\Desktop\\accountChecker.txt")).get(lineNumber);
- while (line != null && isTrue) {
- String[] ar = line.split(":");
- //LogHandler.log(("# " + logLineNumber + " Account: " + ar[0] + " Password: "+ ar[1]));
- username = ar[0];
- password = ar[1];
- Main.state2 = ar[0];
- Main.state3 = ar[1];
- logLineNumber++;
- lineNumber++;
- isTrue = false;
- }
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement