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
  • Try asking for help in the chatbox
  • Menu interaction listener


    Succulent
     Share

    Recommended Posts

    Is there a way to listen for menu interaction events? The event could include the action ("Use", "Eat", "Attack"), the target (name of the item, object, npc), and the targeted interactable (an Item, GameObject, GroundItem, Npc, etc.) and some other information such as mouse/canvas position and opcode. If there is no such listener/event it could be a nice addition to the API.

    I would prefer to rely on menu interaction events as confirmation of an interaction rather than the boolean return of various interact() methods. For example, If I wanted to perform a sequence of actions in quick succession, I could flag certain actions as being 'done' if the appropriate menu interaction event gets triggered, and the bot would know it's time to perform the next action in the sequence.

    Here is what I mean:

    Spoiler

     

    Note: There is a chance that the interact() methods' returns are based on menu events already. If that is the case then a listener this isn't that important since we can rely on the method returns!

    Edited by Succulent
    Link to comment
    Share on other sites

    1 minute ago, Neffarion said:

    You have to make your own listener, there isn't one for what you want already available

    Could you point me in the right direction for figuring that out?

    Link to comment
    Share on other sites

    10 minutes ago, Neffarion said:

    I could write a listener tutorial, shouldnt take long

    Would also be interested in this :)

    Link to comment
    Share on other sites

    13 minutes ago, Neffarion said:

    I could write a listener tutorial, shouldnt take long

    That would be greatly appreciated

    Link to comment
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
     Share

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