You need 4 states. Bank, WalkToBank, Chop, and WalkToTrees. They should be as follows
if(inventory.isFull()&&!BANKAREA.contains(myPlayer())
return State.WALKTOBANK;
if(inventory.isFull()&&BANKAREA.CONTAINS(myPlayer())
return State.BANK;
if(!inventory.isFull()&&TREEAREA.contains(myPlayer())
return State.CHOP;
if(!inventory.isFull()&&!TREEAREA.conntains(myPlayer())
return State.WALKTOTREES;
So you're going to need to make paths for walking to the bank, walking to tthe trees, and areas for the bank and the area you want to cut oaks.
Then for banking, it should look something like this
if(bank.isOpenn())
{
Entity bankBooth = objects.closest("Bank booth")
bankBooth.interact("Bank");
bank.depositAll("Oak logs");
sleep(random(500,1000));
bank.close;
}
else
bankBooth.interact("Bank");
sleep(random(500,1000));