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.

[Bug] Mirror mode text overlay with Colour Picker

Featured Replies

Hey

Not really sure what to do in this situation, essentially my recently written Rune Sudoku script relies very heavily on colour data and unfortunately the mirror mode text covers the upper left part of the Sudoku grid. This wouldn't be a problem if the colour picker didn't read the text, however it does so it means the script is unusable in mirror!

Running the following script:

import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.Rectangle;

import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;

@ScriptManifest(author = "Apaec", info = "", name = "Mirror text overlay test", version = 1.00, logo = "")
public class Main extends Script {

	private Rectangle MIRROR_TEXT = new Rectangle(10, 20, 250, 75);

    // Determines the number of pixels in a given rectangle which have a specified colour
	private int countPixelsOfColourInRect(Rectangle rect, Color col) {
		int amount = 0;
		for (int x = (int) Math.round(rect.getX()); x < rect.getX() + rect.getWidth(); x++)
			for (int y = (int) Math.round(rect.getY()); y < rect.getY() + rect.getHeight(); y++)
				if (getColorPicker().colorAt(x, y).equals(col)) amount++;
		return amount;
	}

	@Override
	public int onLoop() throws InterruptedException {
		return 1000;
	}

	@Override
	public void onPaint(Graphics2D g) {
		g.setColor(Color.CYAN);
		g.draw(MIRROR_TEXT);
		g.drawString("" + countPixelsOfColourInRect(MIRROR_TEXT, new Color(0, 255, 0)), 20, 110);
	}

}

Gives this:

wJvsDjX.png

As you can see, within the drawn rectangle, 1974 pixels were discovered with the exact RGB colour of (0,255,0), corresponding to the debug text

Would it be possible to either remove, or adjust the layering of this text such that it is not picked up by the colour picker, just like a normal paint wouldn't be?

Cheers!

Apa

  • 3 weeks later...

I'll bump this for you too, sounds like a small but important bug to patch

@Alek I've also faced this problem. Is it not possible to hide the text or something?

Totally true, This need to be fixed asap !

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.