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.

Get Widget Hover Text

Featured Replies

Is it possible to get the hover text for a widget like so:

rCwZjJa.png

I've tried getting the tooltip value however this isn't correct.

Thanks!

Not sure. Try entering that particular widget into the widget debugger in the options menu to see what RS2Widget methods might help you

That is a hidden widget, its not hover text even though it looks like it is, if you were to just play around with the widget debugfer youd find the correct root and child ids.

  • Author
1 minute ago, Apaec said:

Not sure. Try entering that particular widget into the widget debugger in the options menu to see what RS2Widget methods might help you

There's nothing inside the widget debugger that contains this information either that I could find so I'm assuming I can't get it, thought I'd see if any of the guru's here know a secret method :boge:

Edited by harrypotter

  • Author
4 minutes ago, Vilius said:

That is a hidden widget, its not hover text even though it looks like it is, if you were to just play around with the widget debugfer youd find the correct root and child ids.

Thanks, I'll see what I can find :)

  • Author

So I am able to find the widget by text as long as it's visible. So I have to hover the attack style first so that the widget becomes visible before looking.

Edited by harrypotter

  • Author
8 minutes ago, Tom said:

What do you actually want it for

I want to know what skill the attack style will train. For example the OP image shows that this style will gain Attack XP

Edited by harrypotter

41 minutes ago, harrypotter said:

I want to know what skill the attack style will train. For example the OP image shows that this style will gain Attack XP

I wrote something similar for someone before, you need to hover the widgets:

//Credits to Explv
//Main class
  private Skill currentAttStyle;

  private void setAttackStyle(final Skill attackStyle) {
        Event attStyleEvent = new AttackStyle(attackStyle.toString());
        execute(attStyleEvent);
        if (attStyleEvent.hasFinished()) {
            currentAttStyle = attackStyle;
        }
    }
//AttackStyle class
public class AttackStyle extends Event {

    private final int attackStyleParent = 593;
    private final int[] attackStyleChildren = {3, 7, 11, 15};
    private final String xpType;
    private int attackStyleToCheck = 0;

    public AttackStyle(final String xpType) {
        this.xpType = xpType;
    }


    @Override
    public int execute() throws InterruptedException {
        if (getTabs().getOpen() != Tab.ATTACK) {
            getTabs().open(Tab.ATTACK);
            return 0;
        }

        RS2Widget attackStyleWidget = getWidgets().get(attackStyleParent, attackStyleChildren[attackStyleToCheck]);

        if (attackStyleWidget == null) {
            setFailed();
            return 0;
        }

        if (!attackStyleWidget.hover()) {
            return 0;
        }

        sleep(random(500, 600));

        if (getWidgets().singleFilter(attackStyleParent, widget -> widget.getMessage().matches(".*\\(" + xpType + " XP\\)$")) == null) {
            attackStyleToCheck++;
            if (attackStyleToCheck >= attackStyleChildren.length) {
                setFailed();
            }
            return 0;
        }

        Rectangle widgetBounds = attackStyleWidget.getBounds();

        double colorX = widgetBounds.getMinX() + 5;
        double colorY = widgetBounds.getMinY() + 5;

        if (getColorPicker().colorAt((int) colorX, (int) colorY).getRed() > 100) {
            log("Already selected");
            setFinished();
            return 0;
        }

        if (attackStyleWidget.interact()) {
            setFinished();
        }
        return 0;
    }
}

 

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.