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.

Painting in onStart

Featured Replies

Bot class has a public getter for BotCanvas, which you can repaint or grab Graphics from;

However, the getter is reobfuscated with every release

 

I suppose you could grab it between compilations using reflection; Try something like this..

Field[] fields = bot.getClass().getDeclaredFields();
BotCanvas canvas = null;
for (Field field : fields) {
	if (field.getType().isAssignableFrom(BotCanvas.class)) {
		try {
                        field.setAccessible(true);
			canvas = (BotCanvas) field.get(bot);
		} catch (IllegalArgumentException | IllegalAccessException ex) {
			//Exception handling
		}
	}
}
if(canvas != null) {
	Graphics g = canvas.getGraphics(); //Grab graphics context
	canvas.repaint(); //Repaint
}

Edited by FrostBug

  • Author

 

Bot class has a public getter for BotCanvas, which you can repaint or grab Graphics from;

However, the getter is reobfuscated with every release

 

I suppose you could grab it between compilations using reflection; Try something like this..

Field[] fields = bot.getClass().getDeclaredFields();
BotCanvas canvas = null;
for (Field field : fields) {
	if (field.getType().isAssignableFrom(BotCanvas.class)) {
		try {
                        field.setAccessible(true);
			canvas = (BotCanvas) field.get(bot);
		} catch (IllegalArgumentException | IllegalAccessException ex) {
			//Exception handling
		}
	}
}
if(canvas != null) {
	Graphics g = canvas.getGraphics(); //Grab graphics context
	canvas.repaint(); //Repaint
}

Yeah I was trying to avoid doing this because of, like you said, the obfuscation. I'll try this code out and see what I can do thanks biggrin.png

 

EDIT: Tried both this code out as well as getting the canvas directly and they both just lead to an onStart error being supressed. Here's the message when I log the BotCanvas: bx[canvas0,0,0,765x503,invalid]

 

EDIT EDIT: Nevermind found the real issue. It's grabbing the canvas context fine but for some reason when I'm trying to get the bounding box of a specific object it's returning null...

Edited by Swizzbeat

Yeah I was trying to avoid doing this because of, like you said, the obfuscation. I'll try this code out and see what I can do thanks biggrin.png

 

EDIT: Tried both this code out as well as getting the canvas directly and they both just lead to an onStart error being supressed. Here's the message when I log the BotCanvas: bx[canvas0,0,0,765x503,invalid]

 

EDIT EDIT: Nevermind found the real issue. It's grabbing the canvas context fine but for some reason when I'm trying to get the bounding box of a specific object it's returning null...

 

you reobsucate the biometric sphere and replace it with botcanvas

Guest
This topic is now closed to further replies.

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.