January 29, 20179 yr ... @Override public void onPaint(Graphics2D g) { ... /* * If the bot loses connection (got banned?)--take a screenshot */ if (getClient().getLoginStateValue() == 40) {//40 = connection lost log("Client connection lost!"); Utilities.takeScreenshot(); } ... Detecting the last moments of your bot! I've always wondered when and where my bot would get banned. It would be nice to see the last bit of life the bot had before it got banned. This snippet does generate false positives because not all connection losts are bans. The only problem is if you run a lot of bots and are having connection issues--this could potentially generate a lot of disk space.
January 29, 20179 yr You can eliminate the real dc's by checking the login response code you will get immediately after, 4 is for banned, just delete the screenshot you took otherwise since they are in the data folder and you have access to them from within your scripts
February 2, 20179 yr Author On 1/29/2017 at 8:17 AM, Token said: You can eliminate the real dc's by checking the login response code you will get immediately after, 4 is for banned, just delete the screenshot you took otherwise since they are in the data folder and you have access to them from within your scripts Oh nice I didn't think of deleting. I'll fix it up :3
Create an account or sign in to comment