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
  • Hovering over Grand Exchange Bank NPC or GE Bank Booth


    ybs

    Recommended Posts

    Hello all,

    CONTEXT: I have a local script I built that combines items at the while standing at the GE ,  I'm trying to add a case where it'll hover over the Banker npc in the Grand Exchange or hover over the GE booth (where you can one click to open your bank).

    Basically I would like to combine items, have the mouse hover over the banker or GE bank booth and sleep until the next step in my script.

    Here's what I've tried:

    case 5:
        log("Case 5, hovering over banker");
        Mouse.move(Bank.getClosestBank(BankType.NPC));
        sleep(this.randomNum(1000, 2000));
            break;

    Any help is appreciated, thanks! :)

    Link to comment
    Share on other sites

    I think getBoundingBox is what you're after. You may be able to do 

        Mouse.move(Bank.getClosestBank(BankType.NPC).getBoundingBox());
    

    But you may need to declare the NPC or bank booth first. Going from memory here as I have been inactive for a little bit.

    NPC banker = NPCS.closest(() -> b != null && b.getName().equals("Banker");

    Mouse.move(banker.getBoundingBox());

    Hope this helps. Good luck!

    Link to comment
    Share on other sites

    3 hours ago, Genius said:

    I think getBoundingBox is what you're after. You may be able to do 

        Mouse.move(Bank.getClosestBank(BankType.NPC).getBoundingBox());
    

    But you may need to declare the NPC or bank booth first. Going from memory here as I have been inactive for a little bit.

    NPC banker = NPCS.closest(() -> b != null && b.getName().equals("Banker");

    Mouse.move(banker.getBoundingBox());

    Hope this helps. Good luck!

     

    It worked after I added Mouse.move(Bank.getClosestBank(BankType.NPC).getBoundingBox()); based on your rec, "bounding box" was the word i didn't know haha,

    Thank you for your help!

     

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