Advertisement
randalthor7

Dreambot - Login Errors 2

Sep 10th, 2015
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. public boolean logInSafety() {
  2. String b = ctx.getClient().getMessage1();
  3. if (b != null) {
  4. if(b.equals("Invalid username/email or password.")) {
  5. ctx.log("invalid password stopping script");
  6. ctx.getClient().getInstance().getScriptManager().stop();
  7. }
  8. //pause the script for 5 minutes then give a 10 seconds window for the player to log in before pausing again
  9. if(b.equals("Please wait a few minutes before trying again.") && (System.currentTimeMillis() > resumeTime + 10000)) {
  10. log("too many login attempts(13). waiting 5 minutes");
  11. resumeTime = System.currentTimeMillis() + 300000 + 10000 ;
  12. try {
  13. ctx.getClient().getInstance().getScriptManager().getCurrentThread().sleep(300000);
  14. } catch (InterruptedException e) {
  15. // TODO Auto-generated catch block
  16. e.printStackTrace();
  17. }
  18. ctx.log("resuming script");
  19. actionPerformed = true;
  20. }
  21. if(b.equals("Please check your message-centre for details.")) {
  22. ctx.log("sorry your account has probably been banned");
  23. ctx.getClient().getInstance().getScriptManager().stop();
  24. actionPerformed = true;
  25. }
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement