PshYouLost Posted July 27, 2017 Share Posted July 27, 2017 Hey guys! I'm trying to find the code that implements getInventory().dropAll(String itemName); I looked over the forums and I found private Filter < Item > nameFilter = new NameFilter < Item > ("Iron ore"); for (int slot = 0; slot < 28; slot++) { Item itemInSlot = getInventory().getItemInSlot(slot); if (itemInSlot != null && nameFilter.match(itemInSlot)) { getInventory().interact(slot, "Drop"); sleep(random(25, 100)); } } Except this doesn't activate the shiftdrop which is what I'm looking for. Any ideas? I just want to code it so that something happens before a single drop. Quote Link to comment Share on other sites More sharing options...
PshYouLost Posted July 27, 2017 Author Share Posted July 27, 2017 I figured it out. Mine just assumes shiftdrop is enabled case DROP: getKeyboard().pressKey(VK_SHIFT); for (int slot = 0; slot < 28; slot++) { Item itemInSlot = getInventory().getItemInSlot(slot); if (itemInSlot != null && nameFilter.match(itemInSlot)) { getInventory().interact(slot); sleep(random(25, 100)); } } getKeyboard().releaseKey(VK_SHIFT); Quote Link to comment Share on other sites More sharing options...
Explv Posted July 27, 2017 Share Posted July 27, 2017 36 minutes ago, PshYouLost said: Hey guys! I'm trying to find the code that implements getInventory().dropAll(String itemName); I looked over the forums and I found private Filter < Item > nameFilter = new NameFilter < Item > ("Iron ore"); for (int slot = 0; slot < 28; slot++) { Item itemInSlot = getInventory().getItemInSlot(slot); if (itemInSlot != null && nameFilter.match(itemInSlot)) { getInventory().interact(slot, "Drop"); sleep(random(25, 100)); } } Except this doesn't activate the shiftdrop which is what I'm looking for. Any ideas? I just want to code it so that something happens before a single drop. If shift dropping is enabled in the osrs settings, the OSBot dropAll method will use shift dropping afaik. 2 Quote Link to comment Share on other sites More sharing options...
Muffins Posted July 27, 2017 Share Posted July 27, 2017 42 minutes ago, Explv said: If shift dropping is enabled in the osrs settings, the OSBot dropAll method will use shift dropping afaik. that is correct Quote Link to comment Share on other sites More sharing options...
PshYouLost Posted July 27, 2017 Author Share Posted July 27, 2017 Yeah I know that's correct :P The reason I wanted to see the actual method was because I wanted to make the code do something in the middle of each drop action. Thanks tho! Quote Link to comment Share on other sites More sharing options...