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
  • Try asking for help in the chatbox
  • Not depositing in deposit box


    sacred brids
     Share

    Recommended Posts

    So here is my code below. Basically it walks to the deposit box clicks on it and then it doesn't actually deposit all my inventory it just sits there.

    case BANK:
    if (BankArea.contains(getLocalPlayer().getTile())) {
    if (getDepositBox().isOpen()) {
    for (int i = 2; i <= 28; i++){
    if (getInventory().isSlotFull(i)){
    getBank().depositAll(getInventory().getNameForSlot(i));
    }
    }
    } else {
    Deposit = getGameObjects().closest("Bank deposit box");
    if (Deposit.interact("Deposit"))
    }
    sleep(Calculations.random(300, 500));
    }
    } else {
    getWalking().walk(BankArea.getRandomTile());
    }
    sleep(Calculations.random(500, 1800));
    break;
    
    Edited by sacred brids
    Link to comment
    Share on other sites

     

    So here is my code below. Basically it walks to the deposit box clicks on it and then it doesn't actually deposit all my inventory it just sits there.

    case BANK:
    if (BankArea.contains(getLocalPlayer().getTile())) {
    if (getDepositBox().isOpen()) {
    for (int i = 2; i <= 28; i++){
    if (getInventory().isSlotFull(i)){
    getBank().depositAll(getInventory().getNameForSlot(i));
    }
    }
    } else {
    Deposit = getGameObjects().closest("Bank deposit box");
    if (Deposit.interact("Deposit"))
    }
    sleep(Calculations.random(300, 500));
    }
    } else {
    getWalking().walk(BankArea.getRandomTile());
    }
    sleep(Calculations.random(500, 1800));
    break;
    

    You are calling Bank#depositAll you should be calling DepositBox#depositAll

    Edited by Roma
    Link to comment
    Share on other sites

    You are calling Bank#depositAll you should be calling DepositBox#depositAll

     

    Do you mean change this line - getBank().depositAll(getInventory().getNameForSlot(i));

     

    Changed to this - getDepositBox().depositAll(getInventory().getNameForSlot(i));

     

    Worked for me thanks so much.

     

    ​There is a long delay in between depositing and actually clicking on it. 

     

    What is a good range for this to be? - sleep(Calculations.random(300, 500));

    Edited by sacred brids
    Link to comment
    Share on other sites

    Do you mean change this line - getBank().depositAll(getInventory().getNameForSlot(i));

     

    Changed to this - getDepositBox().depositAll(getInventory().getNameForSlot(i));

     

    Worked for me thanks so much.

     

    ​There is a long delay in between depositing and actually clicking on it. 

     

    What is a good range for this to be? - sleep(Calculations.random(300, 500));

    PM me on discord/skype or IRC  :)

    Link to comment
    Share on other sites

    Delay reason : 

    for (int i = 2; i <= 28; i++){
    if (getInventory().isSlotFull(i)){
    getBank().depositAll(getInventory().getNameForSlot(i));
    }
    }

     

    It loops through every single inventory slot except the first one . If you're doing Mining or WC you could just use "deposit-all" option for the 2nd slot and drop anything else that isn't needed from inventory before doing that .

    Edited by ozeki6
    Link to comment
    Share on other sites

    Do you mean change this line - getBank().depositAll(getInventory().getNameForSlot(i));

     

    Changed to this - getDepositBox().depositAll(getInventory().getNameForSlot(i));

     

    Worked for me thanks so much.

     

    ​There is a long delay in between depositing and actually clicking on it. 

     

    What is a good range for this to be? - sleep(Calculations.random(300, 500));

    You could just do a conditional sleep. Grab the count of the items in your inventory and store it in a variable before depositing and make it sleep until the count variable is not equal to the current count of the item.

    Link to comment
    Share on other sites

    You could just do a conditional sleep. Grab the count of the items in your inventory and store it in a variable before depositing and make it sleep until the count variable is not equal to the current count of the item.

    or sleep till the count of that item is 0 ...

    Link to comment
    Share on other sites

    or sleep till the count of that item is 0 ...

    Yeah that was my bad I was half asleep when I read the post and thought he was depositing each slot one by one lol

    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
     Share

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