Jack Shep Posted March 5, 2019 Posted March 5, 2019 Hey all, I ran into some trouble trying to use Explv's login handler: Here's my onStart(): private LoginEvent loginEvent; @Override public void onStart() { loginEvent = new LoginEvent("username/email", "password"); getBot().addLoginListener(loginEvent); } Here's how I'm attempting to use the login handler in my onLoop(): if (getClient().getLoginStateValue() == 10) { loginEvent.execute(loginEvent); } All I'm getting in the logger when the bot should be logging in is this spammed over and over again. Unsure what I'm missing, any and all help is appreciated
Chris Posted March 5, 2019 Posted March 5, 2019 ur not even executing right you should be using MethodProvider/Script.execute(Event event); 1 1
Jack Shep Posted March 7, 2019 Author Posted March 7, 2019 On 3/5/2019 at 11:09 AM, Chris said: ur not even executing right you should be using MethodProvider/Script.execute(Event event); I've tried a few things and still am getting the same results. Perhaps I don't fully understand what you're saying, either way, I don't know what else to try.
extatus Posted March 7, 2019 Posted March 7, 2019 (edited) 3 hours ago, Jack Shep said: I've tried a few things and still am getting the same results. Perhaps I don't fully understand what you're saying, either way, I don't know what else to try. hes saying u should execute from methodprovider, execute(loginEvent); will work since script extends methodprovider but NPE could be anything. the 1st thing i would make sure is that ur client is actually logged out sometimes state values change too early use like 7 second sleep after logout method, just for debugging purposes Edited March 7, 2019 by extatus
Jack Shep Posted March 9, 2019 Author Posted March 9, 2019 On 3/7/2019 at 4:25 AM, extatus said: hes saying u should execute from methodprovider, execute(loginEvent); will work since script extends methodprovider but NPE could be anything. the 1st thing i would make sure is that ur client is actually logged out sometimes state values change too early use like 7 second sleep after logout method, just for debugging purposes Still getting the NPE even though the client is logged out, going to continue trouble shooting to try and figure out the issue. Any other ideas of what it might be?
extatus Posted March 9, 2019 Posted March 9, 2019 1 hour ago, Jack Shep said: Still getting the NPE even though the client is logged out, going to continue trouble shooting to try and figure out the issue. Any other ideas of what it might be? No clue. Maybe try different login credentials?Something very basic with no special characters
Jack Shep Posted March 10, 2019 Author Posted March 10, 2019 13 hours ago, extatus said: No clue. Maybe try different login credentials?Something very basic with no special characters I messed around with it some more and ended up figuring it out, thanks for your suggestions and help
extatus Posted March 10, 2019 Posted March 10, 2019 4 hours ago, Jack Shep said: I messed around with it some more and ended up figuring it out, thanks for your suggestions and help No problem. What was it though?