Jump to content

Why doesn't it click on continue?


Sebastian

Recommended Posts

Are you using dialogues.clickContinue() ? This doesn't actually click continue anymore, but just does typeString(" "). So if pressing space doesn't cause it to continue, it's not going to work and you would have to implement it yourself using widgets.getWidgetContainingText("Click to continue") then interacting or something similar.

  • Like 1
Link to comment
Share on other sites

Are you using dialogues.clickContinue() ? This doesn't actually click continue anymore, but just does typeString(" "). So if pressing space doesn't cause it to continue, it's not going to work and you would have to implement it yourself using widgets.getWidgetContainingText("Click to continue") then interacting or something similar.

 

Yea, i'm using this line of code.. Thanks for the reply tho!

			if (getWidgets().getWidgetContainingText("You retrieve a bar of bronze") != null) {
					// Closing dialogue
					if (getDialogues().isPendingContinuation()){
					    getDialogues().clickContinue();
					//sleep
					}
			}
Link to comment
Share on other sites

What happens when you put some log statements in there? Is the clickContinue part executed? IsPendingContinuation() checks for the "Please wait..." message as far as I know, so I doubt it even gets executed tongue.png

Edit, try this ^^

 

RS2Widget w = getWidgets().getWidgetContainingText(162, "Click to continue");
        if (w != null && w.isVisible()) {
            log("a");
            if (!getDialogues().isPendingContinuation()){
                log("b");
                w.interact();
            }
        }
Edited by Flamezzz
Link to comment
Share on other sites

 

What happens when you put some log statements in there? Is the clickContinue part executed? IsPendingContinuation() checks for the "Please wait..." message as far as I know, so I doubt it even gets executed tongue.png

Edit, try this ^^

 

RS2Widget w = getWidgets().getWidgetContainingText(162, "Click to continue");
        if (w != null && w.isVisible()) {
            log("a");
            if (!getDialogues().isPendingContinuation()){
                log("b");
                w.interact();
            }
        }

 

 

I don't think

getDialogues().isPendingContinuation()

Works too well on Tutorial Island iirc.

 

Use widgets

 

Will try this tomorrow! Thanks for the reply!

Link to comment
Share on other sites

I don't think

getDialogues().isPendingContinuation()

Works too well on Tutorial Island iirc.

 

Use widgets

 

Hey Explv, it doesn't do anything nor logging a and b.. 

	if (getWidgets().getWidgetContainingText("You retrieve a bar of bronze") != null) {
				// Closing dialogue
				log("Does this even work?");
				RS2Widget w = getWidgets().getWidgetContainingText(162, "Click to continue");
		        if (w != null && w.isVisible()) {
		            log("a");
		            if (!getDialogues().isPendingContinuation()){
		                log("b");
		                w.interact();
		            }
		        }
Link to comment
Share on other sites

 

Hey Explv, it doesn't do anything nor logging a and b.. 

	if (getWidgets().getWidgetContainingText("You retrieve a bar of bronze") != null) {
				// Closing dialogue
				log("Does this even work?");
				RS2Widget w = getWidgets().getWidgetContainingText(162, "Click to continue");
		        if (w != null && w.isVisible()) {
		            log("a");
		            if (!getDialogues().isPendingContinuation()){
		                log("b");
		                w.interact();
		            }
		        }

 

 

Try

RS2Widget w = getWidgets().getWidgetContainingText("Click to continue");
if (w != null && w.isVisible()) {
    log("a");
    w.interact();
}

Just put it at the start of your onLoop. You don't really need to check if you have just retrieved a bar of bronze, you should just always check if continue needs clicking, and click it if it does.

 

By the way a simpler way of determining if you have retrieved a bar of bronze would be to do:

if(getInventory().contains("Bronze bar"))
Edited by Explv
  • Like 1
Link to comment
Share on other sites

Neither of those work.. It just does nothing. This is my stage5. (Mining and Smithing area).

case STAGE5: // Mining area
			
			NPC miningInstructor = npcs.closest("Mining Instructor");
			Entity tinRocks = objects.closest(TINROCKS_ID);
			Entity copperRock = objects.closest(COPPERROCK_ID);
			Entity furnace = objects.closest(FURNACE_ID);
			
			if (getWidgets().getWidgetContainingText("Mining and Smithing") != null) {
				// Talking to Mining Instructor
				log("Talking to Mining Instructor");
				miningInstructor.interact("Talk-to");
			} else {
				dialogueGuide();
			}
			if (getWidgets().getWidgetContainingText("Try it now on one of the rocks indicated") != null) {
				// Prospecting tin ore
				log("Prospecting ore.");
				tinRocks.interact("Prospect");
				sleep(random(600,700));
			}
			if (getWidgets().getWidgetContainingText("It's tin") != null) {
				// Prospecting tin ore
				log("Prospecting ore.");
				copperRock.interact("Prospect");
				camera.toEntity(copperRock);
				sleep(random(600,700));
			}
			if (getWidgets().getWidgetContainingText("It's copper") != null) {
				// Talking to Mining Instructor
				log("Talking to Mining Instructor");
				miningInstructor.interact("Talk-to");
				sleep(random(600,700));
			} else {
				dialogueGuide();
			}
			if (getWidgets().getWidgetContainingText("It's quite simple really") != null) {
				// Mining tin ore
				log("Mining tin ore");
				tinRocks.interact("Mine");
				camera.toEntity(tinRocks);
				sleep(random(600,700));
			}
			if (getWidgets().getWidgetContainingText("Now you have some tin ore") != null) {
				// Mining copper ore
				log("Mining copper ore.");
				copperRock.interact("Mine");
				camera.toEntity(copperRock);
				sleep(random(600,700));
			}
			if (getWidgets().getWidgetContainingText("You should now have both some copper and tin ore") != null) {
				// Smelting a bronze bar
				getTabs().open(Tab.INVENTORY);
				log("Smelting bronze bar");
				getInventory().interact("Use", "Tin ore");
				furnace.interact("Use");
			}
			if (getWidgets().getWidgetContainingText("You retrieve a bar of bronze") != null) {
				// Closing dialogue
				log("Does this even work?");
				RS2Widget w = getWidgets().getWidgetContainingText("Click to continue");
				if (w != null && w.isVisible()) {
				    log("a");
				    w.interact();
				}
			}
			break;
Link to comment
Share on other sites

 

Neither of those work.. It just does nothing. This is my stage5. (Mining and Smithing area).

case STAGE5: // Mining area
			
			NPC miningInstructor = npcs.closest("Mining Instructor");
			Entity tinRocks = objects.closest(TINROCKS_ID);
			Entity copperRock = objects.closest(COPPERROCK_ID);
			Entity furnace = objects.closest(FURNACE_ID);
			
			if (getWidgets().getWidgetContainingText("Mining and Smithing") != null) {
				// Talking to Mining Instructor
				log("Talking to Mining Instructor");
				miningInstructor.interact("Talk-to");
			} else {
				dialogueGuide();
			}
			if (getWidgets().getWidgetContainingText("Try it now on one of the rocks indicated") != null) {
				// Prospecting tin ore
				log("Prospecting ore.");
				tinRocks.interact("Prospect");
				sleep(random(600,700));
			}
			if (getWidgets().getWidgetContainingText("It's tin") != null) {
				// Prospecting tin ore
				log("Prospecting ore.");
				copperRock.interact("Prospect");
				camera.toEntity(copperRock);
				sleep(random(600,700));
			}
			if (getWidgets().getWidgetContainingText("It's copper") != null) {
				// Talking to Mining Instructor
				log("Talking to Mining Instructor");
				miningInstructor.interact("Talk-to");
				sleep(random(600,700));
			} else {
				dialogueGuide();
			}
			if (getWidgets().getWidgetContainingText("It's quite simple really") != null) {
				// Mining tin ore
				log("Mining tin ore");
				tinRocks.interact("Mine");
				camera.toEntity(tinRocks);
				sleep(random(600,700));
			}
			if (getWidgets().getWidgetContainingText("Now you have some tin ore") != null) {
				// Mining copper ore
				log("Mining copper ore.");
				copperRock.interact("Mine");
				camera.toEntity(copperRock);
				sleep(random(600,700));
			}
			if (getWidgets().getWidgetContainingText("You should now have both some copper and tin ore") != null) {
				// Smelting a bronze bar
				getTabs().open(Tab.INVENTORY);
				log("Smelting bronze bar");
				getInventory().interact("Use", "Tin ore");
				furnace.interact("Use");
			}
			if (getWidgets().getWidgetContainingText("You retrieve a bar of bronze") != null) {
				// Closing dialogue
				log("Does this even work?");
				RS2Widget w = getWidgets().getWidgetContainingText("Click to continue");
				if (w != null && w.isVisible()) {
				    log("a");
				    w.interact();
				}
			}
			break;

 

That would be a whole lot simpler with configs. Using dialogs to determine progress seems like it could be very unreliable.

 

Also does the log "Does this even work?"  show up?

 

You could always use the widget values e.g. getWidgets().get(int parent, int child);

 

 

Edited by Explv
Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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