Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • getDialogues().contains text?


    GreenTruck

    Recommended Posts

    why are u even trying to use it tho

     

    rly doubt u need to

    I am going to be using it in my quester. Need to hold onto data from one of the people in demon slayer.

    Link to comment
    Share on other sites

    I mean if you're already using dialogues you can just make sure you're in a dialogue via: inDialogue() and then just use getWidgets().getWidgetChildrenContainingText(textHere) (comes from MethodProvider). It will return an empty list if there's nothing containing that text.

     

    If for whatever reason there would be no way to use a String to find a reference you could do something ugly to avoid changing your widgets when the client changes, such as-  doing the above to get the "Click here to continue" WidgetChild (or extending off of Dialogues since the method if protected) and then get the WidgetChild's parent ID via getParentID() and there you have the ID the parent works off aka the proper widget of the dialogue. 

     

    It's not a very elegant solution (it's actually really nasty) but I'd need to see how the widgets are changing to come up with a better one.

    Link to comment
    Share on other sites

    I mean if you're already using dialogues you can just make sure you're in a dialogue via: inDialogue() and then just use getWidgets().getWidgetChildrenContainingText(textHere) (comes from MethodProvider). It will return an empty list if there's nothing containing that text.

     

    If for whatever reason there would be no way to use a String to find a reference you could do something ugly to avoid changing your widgets when the client changes, such as- doing the above to get the "Click here to continue" WidgetChild (or extending off of Dialogues since the method if protected) and then get the WidgetChild's parent ID via getParentID() and there you have the ID the parent works off aka the proper widget of the dialogue.

     

    It's not a very elegant solution (it's actually really nasty) but I'd need to see how the widgets are changing to come up with a better one.

    Which is what I did :P . But it'd be much nicer for there to be a simple API method. That already has access to the WidgetIDs instead of the complexity it would take otherwise.

    Link to comment
    Share on other sites

    Archived

    This topic is now archived and is closed to further replies.

    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.