From 86a78089586fecbbb6127a270d6a7382c8d3a81d Mon Sep 17 00:00:00 2001 From: Danial Date: Thu, 7 Oct 2021 12:37:46 +1300 Subject: [PATCH] Update HandleLogin.java --- .../ParaScript/strategies/HandleLogin.java | 55 ++++++++++--------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/src/main/java/ParaScript/strategies/HandleLogin.java b/src/main/java/ParaScript/strategies/HandleLogin.java index e6c2b30..4317b64 100644 --- a/src/main/java/ParaScript/strategies/HandleLogin.java +++ b/src/main/java/ParaScript/strategies/HandleLogin.java @@ -31,37 +31,38 @@ public class HandleLogin implements Strategy { } if (!Game.isLoggedIn()) { if(Variables.getAccountPassword() != null && Variables.getAccountUsername() != null) { - if(!typed) { - Mouse.getInstance().click(point); - Time.sleep(1000); - clearInput(); - Keyboard.getInstance().sendKeys(Variables.getAccountUsername()); - Time.sleep(2000); + Game.login(Variables.getAccountUsername(), Variables.getAccountPassword()); + // if(!typed) { + // Mouse.getInstance().click(point); + // Time.sleep(1000); + // clearInput(); + // Keyboard.getInstance().sendKeys(Variables.getAccountUsername()); + // Time.sleep(2000); - clearInput(); - // Checking again so people don't type their passwords ingame. - if(!Game.isLoggedIn()) { - Keyboard.getInstance().sendKeys(Variables.getAccountPassword()); - } + // clearInput(); + // // Checking again so people don't type their passwords ingame. + // if(!Game.isLoggedIn()) { + // Keyboard.getInstance().sendKeys(Variables.getAccountPassword()); + // } - typed = true; - } + // typed = true; + // } } - if(typed) { - Time.sleep(new SleepCondition() { - @Override - public boolean isValid() { - return Game.isLoggedIn(); - } - }, 5000); - Mouse.getInstance().click(point); - Time.sleep(1000); - Keyboard.getInstance().clickKey(KeyEvent.VK_ENTER); - Time.sleep(1000); - Keyboard.getInstance().clickKey(KeyEvent.VK_ENTER); - Variables.setStatus("none"); - } + // if(typed) { + // Time.sleep(new SleepCondition() { + // @Override + // public boolean isValid() { + // return Game.isLoggedIn(); + // } + // }, 5000); + // Mouse.getInstance().click(point); + // Time.sleep(1000); + // Keyboard.getInstance().clickKey(KeyEvent.VK_ENTER); + // Time.sleep(1000); + // Keyboard.getInstance().clickKey(KeyEvent.VK_ENTER); + // Variables.setStatus("none"); + // } } }