Stew Posted March 30, 2014 Posted March 30, 2014 Ive added client.getInventory().dropAllExcept(1351, 1355, 1357, 1359, 6739); to my script but it still seems to drop the axes? Any ideas? Thanks in advance !
snaes Posted March 30, 2014 Posted March 30, 2014 Not a java guru, not even a programming guru, but could you not do this with if logic?
Joseph Posted March 30, 2014 Posted March 30, 2014 You need to create your own method because that method is broken Here you go i made you a quick one public boolean dropAllExcept(int... ids) throws InterruptedException { for(Item item: client.getInventory().getItems()) { for (int id: ids) { if (item != null && ids.length > 0) if (item.getId() != id) client.getInventory().dropAll(item.getId()); } } return client.getInventory().isEmptyExcept(ids); }
Wiz Khalifa Posted March 30, 2014 Posted March 30, 2014 You need to create your own method because that method is broken Here you go i made you a quick one public boolean dropAllExcept(int... ids) throws InterruptedException { for(Item item: client.getInventory().getItems()) { for (int id: ids) { if (item != null && ids.length > 0) if (item.getId() != id) client.getInventory().dropAll(item.getId()); } } return client.getInventory().isEmptyExcept(ids); } It seems to be working for me.
Joseph Posted March 30, 2014 Posted March 30, 2014 It seems to be working for me. oh well i havent used it so i dont know. So i just decided to create my own. It only took me like a min to type it up.
Wiz Khalifa Posted March 30, 2014 Posted March 30, 2014 oh well i havent used it so i dont know. So i just decided to create my own. It only took me like a min to type it up. Yeah, True I prefer want to avoid the osbot's api as most I can xD.