July 27, 20178 yr 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.
July 27, 20178 yr Author 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);
July 27, 20178 yr 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.
July 27, 20178 yr 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
July 27, 20178 yr Author 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!
Create an account or sign in to comment