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
  • interactForceLeft will sometimes only hover


    rulex

    Recommended Posts

    I really need force left click for my script to function correctly and interactForceLeft works well until the fishing spots spawn on top of each other. It seems that getting the closest npc will not get the top-most npc which is why interactForceLeft is hesitant to actually click on it. I've tried finding the lowest or highest index npc, it does not seem to matter and will still stack with others on the bottom. I've also tried using getMouse().click(fishingSpot); to force left click on the entity, it does left click but it left clicks THROUGH the NPC without interacting it, thus trying to walk to it and not actually fish. I don't even know how thats possible :( Are there any workarounds? Thanks.

     

    Example code I use below:

    fishingSpot = getNpcs().closest(f -> f != null && f.getName().equals("Fishing spot"));
    fishingSpot.interactForceLeft("Use-rod");
    Link to comment
    Share on other sites

    try this

    fishingSpot.interactForceLeft(null);

    omg it works, bro ur a GOD, thank you! I've tried fishingSpot.interact(null); I never knew why I haven't thought of this!

    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.