Illumi Posted August 10, 2013 Share Posted August 10, 2013 public boolean withdraw(final String name, final int amount) { if (!client.getBank().isOpen()) { return false; } return client.getBank().withdraw(getIdForName(name), amount); } public int getIdForName(final String name) { int id = 0; for (Item item : client.getBank().getItems()) { if (item != null && item.getName().equals(name)) { id = item.getId(); } } return id; } Example: withdraw("Trout", 1); Link to comment Share on other sites More sharing options...
flaxspinner Posted August 10, 2013 Share Posted August 10, 2013 Do you know how to make bot withdraw a dueling ring when one gets used up? Link to comment Share on other sites More sharing options...
Illumi Posted August 10, 2013 Author Share Posted August 10, 2013 Do you know how to make bot withdraw a dueling ring when one gets used up? That's for you to figure out. Link to comment Share on other sites More sharing options...
TheScrub Posted August 12, 2013 Share Posted August 12, 2013 http://osbot.org/forum/topic/11091-banking-with-names/ Link to comment Share on other sites More sharing options...
Illumi Posted August 12, 2013 Author Share Posted August 12, 2013 http://osbot.org/forum/topic/11091-banking-with-names/ Mine: withdraw("Salmon", 1); Yours: if (client.getBank().isOpen()) { client.getBank().withdraw1(bankItemIdByName("Salmon")); } :L Link to comment Share on other sites More sharing options...