Sebastian Posted December 7, 2015 Share Posted December 7, 2015 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? Quote Link to comment Share on other sites More sharing options...
Flamezzz Posted December 7, 2015 Share Posted December 7, 2015 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. 1 Quote Link to comment Share on other sites More sharing options...
Sebastian Posted December 7, 2015 Author Share Posted December 7, 2015 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 } } Quote Link to comment Share on other sites More sharing options...
Sebastian Posted December 7, 2015 Author Share Posted December 7, 2015 Can't seem to find a fix for this problem... Everything i tried doesn't work.. Can someone please help? Quote Link to comment Share on other sites More sharing options...
Flamezzz Posted December 7, 2015 Share Posted December 7, 2015 (edited) 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, 2015 by Flamezzz Quote Link to comment Share on other sites More sharing options...
Explv Posted December 7, 2015 Share Posted December 7, 2015 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 1 Quote Link to comment Share on other sites More sharing options...
Sebastian Posted December 7, 2015 Author Share Posted December 7, 2015 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! Quote Link to comment Share on other sites More sharing options...
Sebastian Posted December 11, 2015 Author Share Posted December 11, 2015 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(); } } Quote Link to comment Share on other sites More sharing options...
Explv Posted December 11, 2015 Share Posted December 11, 2015 (edited) 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, 2015 by Explv 1 Quote Link to comment Share on other sites More sharing options...
Sebastian Posted December 11, 2015 Author Share Posted December 11, 2015 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; Quote Link to comment Share on other sites More sharing options...
KEVzilla Posted December 11, 2015 Share Posted December 11, 2015 What does the logger log Quote Link to comment Share on other sites More sharing options...
Explv Posted December 11, 2015 Share Posted December 11, 2015 (edited) 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, 2015 by Explv Quote Link to comment Share on other sites More sharing options...
Good4RsVid Posted February 10, 2016 Share Posted February 10, 2016 ”You could always use the widget values e.g. getWidgets().get(int parent, int child);“ how use getWidgets().get(int parent, int child) Quote Link to comment Share on other sites More sharing options...
Shudsy Posted February 10, 2016 Share Posted February 10, 2016 ”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 Quote Link to comment Share on other sites More sharing options...
Good4RsVid Posted February 10, 2016 Share Posted February 10, 2016 我发誓,你是我见过的这个论坛最大的掘墓人之一 I just will not be shipped, I need a specific expression, or examples to learn“getWidgets().get(int parent, int child);” Quote Link to comment Share on other sites More sharing options...