ybs 3 Posted April 28, 2023 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!
Genius 50 Posted April 30, 2023 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! ybs 1
ybs 3 Author Posted April 30, 2023 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! Genius 1
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now