Stew Posted March 30, 2014 Share 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 ! Link to comment Share on other sites More sharing options...
snaes Posted March 30, 2014 Share Posted March 30, 2014 Not a java guru, not even a programming guru, but could you not do this with if logic? Link to comment Share on other sites More sharing options...
Joseph Posted March 30, 2014 Share 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); } Link to comment Share on other sites More sharing options...
Wiz Khalifa Posted March 30, 2014 Share 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. Link to comment Share on other sites More sharing options...
Stew Posted March 30, 2014 Author Share Posted March 30, 2014 Thanks guys! Link to comment Share on other sites More sharing options...
Joseph Posted March 30, 2014 Share 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. Link to comment Share on other sites More sharing options...
Wiz Khalifa Posted March 30, 2014 Share 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. Link to comment Share on other sites More sharing options...