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

Need help with Widget (First Script)

Featured Replies

Hello, I've been looking around this community for a few days and I decided to make my first script to learn more about programming and runescape scripting more specifically.

The script should be really simple: tanning cowhides into hard leather

I've been following @Explv guide which can be found here: 

I'm stuck at one part, though.

Whenever I trade the NPC (Ellis), the following screen will pop up: 

 

ppQbFTm.png

If I right-click Hard Leather:

ckoVWRK.png

I'm not so sure how to tan all the Hard Leathers. Part of my code, which was based in an example found in the tutorial I mentioned earlier, is the following:

private boolean canMakeLeather(){
        return getInventory().contains("Cowhide");
    }

    private boolean tradeNPC(){
        return getNpcs().closest("Ellis").interact("Trade");

    }

    private boolean isTanningScreenVisible(){
        return getWidgets().getWidgetContainingText("What hides would you like tanning") != null;
    }

    private boolean tanningHides(){
        return getWidgets().getWidgetContainingText("Hard Leather").interact("Tan all");
    }

 

The example script code (smelting iron bars):

private boolean canSmeltIronBars() {
        return getInventory().contains("Iron ore");
    }

    private boolean useFurnace() {
        return getObjects().closest("Furnace").interact("Smelt");
    }

    private boolean isSmeltScreenVisible() {
        return getWidgets().getWidgetContainingText("What would you like to smelt?") != null;
    }

    private boolean smeltXIron() {
        return getWidgets().getWidgetContainingText("Iron").interact("Smelt X Iron");
    }

 

I'm just wondering if there is any mistake in the code or anything I could improve.

Obviously not the full script code, I just didn't really understand how to work with widgets.

Edited by RagBoys III

I have a guide relating to configs & widgets if you would like to take a look at it

 

@RagBoys III Looks like the widget text and interaction text are incorrect, it should be "Hard leather" not "Hard Leather", and "Tan All" not "Tan all", the case matters.

Edited by Explv

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

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.