Banking

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

  1. Exile

    Joined:
    Jul 24, 2014
    Messages:
    189
    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 Useless

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

    Joined:
    Jul 24, 2014
    Messages:
    189
    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 Useless

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

    Joined:
    Jul 24, 2014
    Messages:
    189
    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 The Developer

    Joined:
    Jul 28, 2013
    Messages:
    2,308
    Likes Received:
    739
    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:
    189
    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 The better executive ;)

    Joined:
    Dec 3, 2013
    Messages:
    3,053
    Likes Received:
    604
    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 The Developer

    Joined:
    Jul 28, 2013
    Messages:
    2,308
    Likes Received:
    739
    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:
    189
    Likes Received:
    23
    Well thanks anyways, it can be closed :p
     

Share This Page

Loading...