Jump to content
ThatGamerBlue

Bond widget ids

Recommended Posts

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...