Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Taking a screenshot at connection lost

Featured Replies

...

@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.

 

1485705093.png

 

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.

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

  • 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

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.