Resolved How to deselect random selected inventory item?

Discussion in 'Developer Support' started by Rambo501, Jan 5, 2019.

  1. Rambo501

    Joined:
    Dec 24, 2018
    Messages:
    28
    Likes Received:
    2
    Runemate seems to misclick a lot while dropping inventory items. I don't normally mind, in fact I think it's a good anti-pattern measure, however sometimes it will accidently select an item and get stuck.

    How can I check if an item in my inventory is selected? And how can I deselect an item?

    EDIT: I figured I can use Inventory.getSelectedItem() to check for a selected item. I can however not interact with anything so I'm not sure how to deselect it?
     
    #1 Rambo501, Jan 5, 2019
    Last edited: Jan 5, 2019
  2. Best Answer:
    Post #2 by CuppaJava, Jan 5, 2019
  3. CuppaJava

    CuppaJava Makes a Lot of Bots

    Joined:
    Mar 13, 2018
    Messages:
    3,496
    Likes Received:
    975
    if(Inventory.getSelectedItem()!=null)
    Inventory.getSelectedItem().click();


    Something like that?
     
    Rambo501 likes this.
  4. Rambo501

    Joined:
    Dec 24, 2018
    Messages:
    28
    Likes Received:
    2
    Yep, this works. Thank you so much!
     

Share This Page

Loading...