Well I'm using this code to open the bank, but the mouse isn't doing anything. The message "failed" is getting printed to the console about 80 times, then my pc hangs because memory usage has risen up to 2GB. Doing this at the Varrock West Bank, I'm facing the bank booth. What am I doing wrong? Code (Text): if(Bank.open()) { System.out.println("opened"); } else { System.out.println("failed"); }
Yep, mouse not moving either Your method is also simply Bank.open() but then a little bit more extended to support bankers, chests, ...
Manually interacting also doesn't do anything, mouse stays in the position it was when script bot was started..
draw the entity that Banks.getLoaded().nearest is returning so that I can know it's going for the right bank.
I got it fixed a minute ago by switching from the getLoaded().nearest() to newQuery().names("Banker").nearest(), this seems to work quite well
Just a word of warning so you don't make the same mistake i did. Don't use the reachable query for GameObjects/NPCs whose tile you can't actually stand on because even though you can interact with that object on the tile, you can't actually get to the tile itself so reachable returns false. Had this problem with my banking and also tree interaction lol.
Well the reason I asked you to do that was so that if there was a problem I could fix it so you didn't have to work around it...