sacred brids 1 Share Posted September 12, 2017 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 More sharing options...
Roma 2221 Share Posted September 12, 2017 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 More sharing options...
sacred brids 1 Author Share Posted September 12, 2017 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 More sharing options...
Roma 2221 Share Posted September 12, 2017 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 More sharing options...
ozeki6 32 Share Posted September 12, 2017 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 More sharing options...
RetroBot 35 Share Posted September 12, 2017 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 More sharing options...
ozeki6 32 Share Posted September 12, 2017 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 More sharing options...
RetroBot 35 Share Posted September 13, 2017 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.