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
  • Use an item in the inventory


    triblion

    Recommended Posts

    I am trying to get my script to click an item in my inventory then use it on a game object, I have tried using interact in it's different forms but it will not click it

    Link to comment
    Share on other sites

    Thanks I will try this when I get back, yeah I check for !=null

    you could check for getInventory().contains(food filter) though

    Link to comment
    Share on other sites

    you could check for getInventory().contains(food filter) though

    I used contains I just couldn't figure out how to get it to actually select the item, I will try what has been suggested when I get the chance

    Link to comment
    Share on other sites

    getInventory().get("Food").useOn(entityNamedHashtag);
    

    GameObject Tree = getGameObjects().closest(GameObject -> GameObject != null && GameObject.getID() == 2092);

    if (Tree != null) {

    getInventory().get("Knife").useOn(2092);

    getInventory().get("Knife").useOn(2091);

     

    I tried this way I also tried getInvetory inside the () and I cannot get it to click on the knife and use it on anything (the thing is a GameObject in this case)

    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.