Jump to content

Bond widget ids


Recommended Posts

Posted
RS2Widget bondScreen = s.widgets.getWidgetContainingText("Redeem Old School Bonds");
		if (bondScreen != null && bondScreen.isVisible()) {
			RS2Widget days14 = s.widgets.getWidgetContainingText("14 days");
			RS2Widget confirmButton = s.widgets.getWidgetContainingText("___", "Confirm");
			if (confirmButton != null && confirmButton.isVisible()) {
				if (confirmButton.getMessage().equals("___")) {
					if (days14 != null) {
						WidgetDestination widgetDestinationDays14 = new WidgetDestination(s.getBot(), days14);
						if (s.getMouse().click((MouseDestination) widgetDestinationDays14)) {
							Utils.condSleep(8000, 250, () -> confirmButton.getMessage().equals("Confirm"));
						}
					}
				} else {
					if (s.getMouse().click((MouseDestination) new RectangleDestination(s.getBot(), 326, 267, 8, 8))) {
						Utils.condSleep(50000, 250,
								() -> s.getDialogues().inDialogue() && s.getDialogues().isPendingContinuation());
					}
					if (s.getDialogues().isPendingContinuation()) {
						s.getDialogues().clickContinue();
					}
					hopWorld(s.p2pWorld);
				}
			}
		}

Clean this up and enjoy

  • Like 1
Posted
5 minutes ago, nosepicker said:

RS2Widget bondScreen = s.widgets.getWidgetContainingText("Redeem Old School Bonds");
		if (bondScreen != null && bondScreen.isVisible()) {
			RS2Widget days14 = s.widgets.getWidgetContainingText("14 days");
			RS2Widget confirmButton = s.widgets.getWidgetContainingText("___", "Confirm");
			if (confirmButton != null && confirmButton.isVisible()) {
				if (confirmButton.getMessage().equals("___")) {
					if (days14 != null) {
						WidgetDestination widgetDestinationDays14 = new WidgetDestination(s.getBot(), days14);
						if (s.getMouse().click((MouseDestination) widgetDestinationDays14)) {
							Utils.condSleep(8000, 250, () -> confirmButton.getMessage().equals("Confirm"));
						}
					}
				} else {
					if (s.getMouse().click((MouseDestination) new RectangleDestination(s.getBot(), 326, 267, 8, 8))) {
						Utils.condSleep(50000, 250,
								() -> s.getDialogues().inDialogue() && s.getDialogues().isPendingContinuation());
					}
					if (s.getDialogues().isPendingContinuation()) {
						s.getDialogues().clickContinue();
					}
					hopWorld(s.p2pWorld);
				}
			}
		}

Clean this up and enjoy

Thx boss

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