Jump to content

Interacting with smelt widget


Recommended Posts

Posted

I am trying to use "Smelt X" on a bronze bar but can't get it working. Using containingtext method doesn't work, the mouse just hovers on the bronze bar. The same when using the ID (311,14). When debugging, the "Smelt X" option has a seperate widget ID (311,13), but without rightclicking 311,14 the "Smelt X" widget won't be visible. People in chatbox told me to use some sort of color code but I can't figure it out at all.

 

  • Like 1
Posted
3 minutes ago, naaiz said:

There's 3 boxes when you use the widget debugger. White, red and green. There will be 3 corresponding widget Root / child ID's. 

Look at the boxes and check what makes sense, or feel free to post a screenie. you basically want the box that's both surrounding the bar and text (I think).

Checked all widgets close to the widget of the bronze bar. 100% sure the widget for bronze bar is 311,14. 

a5cbb83d503d1e6bf481e44b19b47900.png

 

Posted
4 minutes ago, naaiz said:

Try 311,16 and 311,15 see if one of those works, looks like the boxes are stacked so you can only see 1 (not sure).

If that doesn't work, try only root ID which would be 311.

You can't interact with only the root ID, and both 15 and 16 don't work.

 

4 minutes ago, whipz said:

widgets.interact(309, 2, "Make All"); 

change to your widget from the above it should be 311, 14 and if there isnt a make all use whatever it is you need to; add another check for when the typing widget comes up and then have it type the number you want

you can pm if you need more help

Does the same thing as described in my first post.

 

Posted (edited)

I can't check your code, but try adding a conditional sleep before your interact if you haven't yet.

Something like
 

//Use bar on furnace
new ConditionalSleep(5000) {
    @Override
    public boolean condition() {
        return getWidgets().getWidgetContainingText("Smelt X").isVisible();
    }
}.sleep();
getWidgets().getWidgetContainingText("Smelt X").interact("Smelt X");

 

Edited by naaiz
Posted
4 minutes ago, Juggles said:

Widgets working fine for me 

getObjects().closest(16469).interact("Smelt");
new ConditionalSleep(5000) {
    @Override
    public boolean condition() {
        return getWidgets().getWidgets().isVisible(162,546);
    }
}.sleep();
getWidgets().interact(311,14,"Smelt X");
new ConditionalSleep(5000) {
    @Override
    public boolean condition() {
        return  getWidgets().isVisible(162, 32);
    }
}.sleep();
getKeyboard().typeString("" + random(33, 95));

This is the code I'm using. In a fresh script with only this running it does not work.

 

Posted (edited)
10 minutes ago, The Undefeated said:

getObjects().closest(16469).interact("Smelt");
new ConditionalSleep(5000) {
    @Override
    public boolean condition() {
        return getWidgets().getWidgets().isVisible(162,546);
    }
}.sleep();
getWidgets().interact(311,14,"Smelt X");
new ConditionalSleep(5000) {
    @Override
    public boolean condition() {
        return  getWidgets().isVisible(162, 32);
    }
}.sleep();
getKeyboard().typeString("" + random(33, 95));

This is the code I'm using. In a fresh script with only this running it does not work.

 

 

Shouldn't it be (sorry on phone):

getWidgets().getWidgetContainingText("Bronze").Interact("Smelt X Bronze");

I think the interaction is "Smelt X Bronze" rather than "Smelt X"

Edited by Explv
  • Like 1
Posted
		RS2Object furnace = s.objects.closest("Furnace");
		if (furnace != null && furnace.exists()) {
			if (s.inventory.getItem("Gold bar").interact("Use")) {
				if (furnace.interact("Use")) {
					new ConditionalSleep(5500, 500) {
						@Override
						public boolean condition() throws InterruptedException {
							return s.widgets
									.getWidgetContainingText("would you like to make") != null;
						}
					}.sleep();
				}

				RS2Widget goldAmmy = s.widgets.get(446, 34);
				if (goldAmmy != null && goldAmmy.isVisible()) {
					goldAmmy.interact("Make-X");
					Script.sleep(Script.random(1000, 2000));
					if (isAmountPromptVisible()) {
						if (s.getKeyboard().typeString("" + Script.random(27, 99), true)) {
							new ConditionalSleep(60000, 1000) {

								@Override
								public boolean condition() throws InterruptedException {
									return !s.inventory.contains("Gold bar") || mustContinue();
								}

							}.sleep();
						}
					}
				}
			}
		}

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...