Illumi Posted August 10, 2013 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);
flaxspinner Posted August 10, 2013 Posted August 10, 2013 Do you know how to make bot withdraw a dueling ring when one gets used up?
Illumi Posted August 10, 2013 Author 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.
TheScrub Posted August 12, 2013 Posted August 12, 2013 http://osbot.org/forum/topic/11091-banking-with-names/
Illumi Posted August 12, 2013 Author 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