PlagueDoctor Posted November 15, 2016 Share Posted November 15, 2016 You can write it like this - private String items[] = new String[] {"item1", "item2", "item3", }; private State getState() { if(getStore().isOpen()) { if(getStore().getAmount(items) <= 0) { return State.HOP; } } if(inventory.isFull()) { return State.BANK; } return State.SHOP; } Inside the bank script you could put an if statement ascertain whether or not your character is at the bank, such as case BANK: if(whateverbank.contains(myPlayer())) { check if bank is open, deposit stuff etc.. } else { walk to bank } Quote Link to comment Share on other sites More sharing options...
Lewis Posted November 15, 2016 Author Share Posted November 15, 2016 You can write it like this - private String items[] = new String[] {"item1", "item2", "item3", }; private State getState() { if(getStore().isOpen()) { if(getStore().getAmount(items) <= 0) { return State.HOP; } } if(inventory.isFull()) { return State.BANK; } return State.SHOP; } Inside the bank script you could put an if statement ascertain whether or not your character is at the bank, such as case BANK: if(whateverbank.contains(myPlayer())) { check if bank is open, deposit stuff etc.. } else { walk to bank } got banking, walking to and from shop to bank down private State getState() { if (Shop.contains(myPlayer()) && !inventory.isFull()) return State.BUY; if (!deposit.contains(myPlayer()) && inventory.isFull()) return State.WALK_BANK; if (deposit.contains(myPlayer()) && inventory.isFull()) return State.BANK; if (!Shop.contains(myPlayer()) && !inventory.isFull()) return State.WALK_SHOP; if (store.isOpen()) { if (store.getAmount(items) <= 0) { return State.HOP; } } return State.WAIT; } Quote Link to comment Share on other sites More sharing options...
Eagle Scripts Posted November 16, 2016 Share Posted November 16, 2016 got banking, walking to and from shop to bank down private State getState() { if (Shop.contains(myPlayer()) && !inventory.isFull()) return State.BUY; if (!deposit.contains(myPlayer()) && inventory.isFull()) return State.WALK_BANK; if (deposit.contains(myPlayer()) && inventory.isFull()) return State.BANK; if (!Shop.contains(myPlayer()) && !inventory.isFull()) return State.WALK_SHOP; if (store.isOpen()) { if (store.getAmount(items) <= 0) { return State.HOP; } } return State.WAIT; } Look on skype Quote Link to comment Share on other sites More sharing options...