In the code you've posted it still shows 'Grimy harralander' rather than 'Grimy Harralander'
private void doBanking() throws InterruptedException {
if(!bank.isOpen()){
Status = "Banking: Opening Bank.";
NPC banker = npcs.closest("Banker");
if(banker != null) {
if (banker.isOnScreen()) {
Status = "Banking: Interacting Banker.";
banker.interact("Bank");
sleep(random(900, 1200));
}
}
}
else
{
Status = "Banking: Depositing.";
if (!inventory.isEmpty())
{
bank.depositAll();
}
else
{
//Contains grimy
if (bank.contains("Grimy harralander"))
{
if (getBank().getWithdrawMode().equals(BankMode.WITHDRAW_NOTE))
{
getBank().enableMode(BankMode.WITHDRAW_ITEM);
bank.withdraw("Grimy harralander", 28);
}
else
{
bank.withdraw("Grimy harralander", 28);
}
bank.close();
}
//Doesn't contain grimy avantoes
else if (!bank.contains("Grimy harralander"))
{
//Contains clean avantoes
if (bank.contains("Harralander"))
{
//Withdraw 100
if (!getBank().getWithdrawMode().equals(BankMode.WITHDRAW_NOTE)) {
getBank().enableMode(BankMode.WITHDRAW_NOTE);
bank.withdraw("Harralander", 224);
bank.withdraw("Coins", 30000);
bank.close();
}
//new GrandExchange instance with our script
}
}
}
sleep(random(250, 450));
}
}
I believe this code is causing your issue, you've written it so the withdrawing code only executes if the bank is already open. If the bank is not already open, it will open the bank and then continue on with the code in your withdraw state.
Remove the else from this and it should work as intended?