pharaoh 131 Share Posted March 1, 2022 when trying to make dyes at Aggie, the script can't progress through the dialogue. please notice the paint for dialogue options; when on this bottom screen, the Continue option is there (dialogues.cancontinue() and indialogue()) my code: the dialoguecontinue is the widget containing 'click here to continue', which does not work either if (Dialogues.getNPCDialogue().contains("Okay make me some blue dye please.")) { Dialogues.clickContinue(); } else if (dialogueContinue != null && dialogueContinue.isVisible()) { dialogueContinue.interact(); } really not sure what the issue is because it says we are in Dialogue and we can continue but no option for continuing or clicking works to progress through Link to comment Share on other sites More sharing options...
Calle 17 Share Posted March 1, 2022 you can always go old fashion, find the widget and interact with child WidgetChild w = Widgets.getWidgetChild(ParentWidgetID, ChildWidgetID); if (w != null && w.isVisible()) { if (w.interact()) MethodProvider.sleepUntil(() -> (w == null && !w.isVisible()), 1000); } Link to comment Share on other sites More sharing options...
pharaoh 131 Author Share Posted March 1, 2022 13 minutes ago, Calle said: you can always go old fashion, find the widget and interact with child WidgetChild w = Widgets.getWidgetChild(ParentWidgetID, ChildWidgetID); if (w != null && w.isVisible()) { if (w.interact()) MethodProvider.sleepUntil(() -> (w == null && !w.isVisible()), 1000); } yep ive tried that as well, its been confusing haha (i am positive that 217 is the correct interface as ive checked it within the widget explorer) private Widget dialogueBox = Widgets.getWidget(217); private WidgetChild dialogueContinue = Widgets.getChildWidget(217, 5); private WidgetChild dialogueBoxText = Widgets.getChildWidget(217, 6); @Override public int execute() { if (dialogueBox != null && dialogueBox.isVisible()) { log("[ aggie ] " + dialogueBoxText.getText()); } if (dialogueBoxText != null && dialogueBoxText.isVisible()) { log("[ aggie ] " + dialogueBoxText.getText().toString()); } if (Dialogues.getNPCDialogue().contains("Okay make me some blue dye please.") || Dialogues.getNPCDialogue().contains("Please wait")) { Widgets.getWidget(217).getChild(5).interact(); Widgets.getWidget(217).getChild(5).interact("Continue"); } /* if (!Dialogues.inDialogue() && Inventory.interact("Woad leaf", "Use")) { if (AGGIE != null && Inventory.get("Woad leaf").useOn(AGGIE)) { sleepUntil(Dialogues::inDialogue, 800); } else if (Dialogues.getNPCDialogue().contains("Okay make me some blue dye please.")) { Dialogues.clickContinue(); settings.setDyesMade(+1); } else if (dialogueContinue != null && dialogueContinue.isVisible()) { dialogueContinue.interact(); } */ /*else if (dialogueBox != null && dialogueBox.isVisible()) { if (dialogueBoxText.getText().contains("Okay make me some blue dye please.")) { log("[ aggie interact ] okay blue dye text is visible"); Dialogues.clickContinue(); } }*/ return Calculations.random(800, 1200); } Link to comment Share on other sites More sharing options...
Calle 17 Share Posted March 1, 2022 29 minutes ago, pharaoh said: yep ive tried that as well, its been confusing haha (i am positive that 217 is the correct interface as ive checked it within the widget explorer) private Widget dialogueBox = Widgets.getWidget(217); private WidgetChild dialogueContinue = Widgets.getChildWidget(217, 5); private WidgetChild dialogueBoxText = Widgets.getChildWidget(217, 6); @Override public int execute() { if (dialogueBox != null && dialogueBox.isVisible()) { log("[ aggie ] " + dialogueBoxText.getText()); } if (dialogueBoxText != null && dialogueBoxText.isVisible()) { log("[ aggie ] " + dialogueBoxText.getText().toString()); } if (Dialogues.getNPCDialogue().contains("Okay make me some blue dye please.") || Dialogues.getNPCDialogue().contains("Please wait")) { Widgets.getWidget(217).getChild(5).interact(); Widgets.getWidget(217).getChild(5).interact("Continue"); } /* if (!Dialogues.inDialogue() && Inventory.interact("Woad leaf", "Use")) { if (AGGIE != null && Inventory.get("Woad leaf").useOn(AGGIE)) { sleepUntil(Dialogues::inDialogue, 800); } else if (Dialogues.getNPCDialogue().contains("Okay make me some blue dye please.")) { Dialogues.clickContinue(); settings.setDyesMade(+1); } else if (dialogueContinue != null && dialogueContinue.isVisible()) { dialogueContinue.interact(); } */ /*else if (dialogueBox != null && dialogueBox.isVisible()) { if (dialogueBoxText.getText().contains("Okay make me some blue dye please.")) { log("[ aggie interact ] okay blue dye text is visible"); Dialogues.clickContinue(); } }*/ return Calculations.random(800, 1200); } hmm I've recently gotten back to coding so I am not sure, try plugging in the code i sent you straight up, as I am using it myself for a fletching script i made. As in your code you're trying to use Dialogue class and it isn't really working WidgetChild w = Widgets.getWidgetChild(217, 5); if (w != null && w.isVisible()) { if (w.interact()) MethodProvider.log("Interacted with ui"); } it's pretty late here, if problem still persists until tomorrow, add me on discord Nulled#1068 Link to comment Share on other sites More sharing options...
pharaoh 131 Author Share Posted March 1, 2022 33 minutes ago, Calle said: hmm I've recently gotten back to coding so I am not sure, try plugging in the code i sent you straight up, as I am using it myself for a fletching script i made. As in your code you're trying to use Dialogue class and it isn't really working WidgetChild w = Widgets.getWidgetChild(217, 5); if (w != null && w.isVisible()) { if (w.interact()) MethodProvider.log("Interacted with ui"); } it's pretty late here, if problem still persists until tomorrow, add me on discord Nulled#1068 i will add you on discord shortly- still no interaction, we are in dialogue ill add you on discord shortly. i added a log to see if the widget was visible or not and it logs "not visible". the same thing happens for the next dialogue step as well WidgetChild w = Widgets.getWidgetChild(217, 5); WidgetChild textWidget = Widgets.getWidgetChild(193,2); if (w != null) { if (w.interact()) log("Interacted with ui"); } else { log("not visible"); Dialogues.clickContinue(); } if (textWidget != null) { if (textWidget.interact()) { Dialogues.clickContinue(); log("continue clicked 1"); } } if (Dialogues.getNPCDialogue().contains("You hand the woad leaves")) { Dialogues.clickContinue(); log("continue clicked 2"); } Link to comment Share on other sites More sharing options...
Pandemic 2803 Share Posted March 2, 2022 You might want to add more logging at each step to see if your code is actually being ran, and if so where it's not working as expected. I'd check the npc dialogue contains check, and probably what the npc dialogue actually is when that is shown. Link to comment Share on other sites More sharing options...
camelCase 271 Share Posted March 2, 2022 2 hours ago, pharaoh said: if (Dialogues.getNPCDialogue().contains("Okay make me some blue dye please.")) { Dialogues.clickContinue(); } else if (dialogueContinue != null && dialogueContinue.isVisible()) { dialogueContinue.interact(); } i just tested this it works fine. idk why you have a custom widget instead of using Dialogues#canContinue just let dreambot handle it you have !Dialogues.inDialogue in your accept method. get rid of that and all this custom widget stuff & it should work fine. Link to comment Share on other sites More sharing options...
pharaoh 131 Author Share Posted March 3, 2022 On 3/1/2022 at 6:28 PM, Pandemic said: You might want to add more logging at each step to see if your code is actually being ran, and if so where it's not working as expected. I'd check the npc dialogue contains check, and probably what the npc dialogue actually is when that is shown. Did that and fixed the problem, thanks for the advice! On 3/1/2022 at 7:25 PM, camalCase said: i just tested this it works fine. idk why you have a custom widget instead of using Dialogues#canContinue just let dreambot handle it you have !Dialogues.inDialogue in your accept method. get rid of that and all this custom widget stuff & it should work fine. I had added the custom widget because it was not advancing through the dialogue! I realized the !Dialogues check in accept was redundant because I also created a separate interaction task but now I've just added it into one since it is not a lot of interaction/dialogue and managed to fix the problem. Thanks for the all the help, it's appreciated! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.