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
  • Not depositing in deposit box


    sacred brids

    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;
    
    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

    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));

    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 .

    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

    Archived

    This topic is now archived and is closed to further replies.

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