sacred brids 1 Share Posted September 12, 2017 (edited) 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 September 12, 2017 by sacred brids Link to comment Share on other sites More sharing options...
Roma 2214 Share Posted September 12, 2017 (edited) 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 September 12, 2017 by Roma Sociopath 1 Link to comment Share on other sites More sharing options...
sacred brids 1 Author Share Posted September 12, 2017 (edited) 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 September 12, 2017 by sacred brids Link to comment Share on other sites More sharing options...
Roma 2214 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 (edited) 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 September 12, 2017 by ozeki6 Link to comment Share on other sites More sharing options...
RetroBot 33 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 33 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
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 accountSign in
Already have an account? Sign in here.
Sign In Now