December 7, 201510 yr Hey all. Been back from a crazy weekend! So yesterday i was struggling with this problem: After using the furnace in tutorial island, it says: You get some bronze bar. It needs to click continue to remove the message.. But it doesn't.. Any help?
December 7, 201510 yr 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.
December 7, 201510 yr Author 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 } }
December 7, 201510 yr Author Can't seem to find a fix for this problem... Everything i tried doesn't work.. Can someone please help?
December 7, 201510 yr 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 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 December 7, 201510 yr by Flamezzz
December 7, 201510 yr Can't seem to find a fix for this problem... Everything i tried doesn't work.. Can someone please help? I don't think getDialogues().isPendingContinuation() Works too well on Tutorial Island iirc. Use widgets
December 7, 201510 yr Author 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 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!
December 11, 201510 yr Author 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(); } }
December 11, 201510 yr 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 December 11, 201510 yr by Explv
December 11, 201510 yr Author 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;
December 11, 201510 yr 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 December 11, 201510 yr by Explv
February 10, 20169 yr ”You could always use the widget values e.g. getWidgets().get(int parent, int child);“ how use getWidgets().get(int parent, int child)
February 10, 20169 yr ”You could always use the widget values e.g. getWidgets().get(int parent, int child);“ how use getWidgets().get(int parent, int child) I swear you're one of the biggest gravediggers i've seen on this forum
February 10, 20169 yr 我发誓,你是我见过的这个论坛最大的掘墓人之一 I just will not be shipped, I need a specific expression, or examples to learn“getWidgets().get(int parent, int child);”
Create an account or sign in to comment