1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Banking

Discussion in 'Developer Support' started by Exile, Aug 2, 2014.

  1. Exile

    Joined:
    Jul 24, 2014
    Messages:
    188
    Likes Received:
    23
    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):
    1. if(Bank.open()) {
    2. System.out.println("opened");
    3. } else {
    4. System.out.println("failed");
    5. }
     
  2. Viewer

    Viewer Discretion is advised

    Joined:
    Jan 2, 2014
    Messages:
    306
    Likes Received:
    77
    Did you try the banking method that I gave you?
     
  3. Exile

    Joined:
    Jul 24, 2014
    Messages:
    188
    Likes Received:
    23
    Yep, mouse not moving either :(

    Your method is also simply Bank.open() but then a little bit more extended to support bankers, chests, ...
     
  4. Viewer

    Viewer Discretion is advised

    Joined:
    Jan 2, 2014
    Messages:
    306
    Likes Received:
    77
    Try manually interacting with the booth then, banking is working fine for me here o_O
     
  5. Exile

    Joined:
    Jul 24, 2014
    Messages:
    188
    Likes Received:
    23
    Manually interacting also doesn't do anything, mouse stays in the position it was when script bot was started..
     
  6. Cloud

    Cloud Engineer

    Joined:
    Jul 28, 2013
    Messages:
    2,777
    Likes Received:
    1,124
    draw the entity that Banks.getLoaded().nearest is returning so that I can know it's going for the right bank.
     
  7. Exile

    Joined:
    Jul 24, 2014
    Messages:
    188
    Likes Received:
    23
    I got it fixed a minute ago by switching from the getLoaded().nearest() to newQuery().names("Banker").nearest(), this seems to work quite well :)
     
  8. Aidden

    Aidden Author of MaxiBots

    Joined:
    Dec 3, 2013
    Messages:
    6,600
    Likes Received:
    990
    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.
     
    Exile likes this.
  9. Cloud

    Cloud Engineer

    Joined:
    Jul 28, 2013
    Messages:
    2,777
    Likes Received:
    1,124
    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...
     
  10. Exile

    Joined:
    Jul 24, 2014
    Messages:
    188
    Likes Received:
    23
    Well thanks anyways, it can be closed :p
     

Share This Page

Loading...