Jump to content

Drop 5 of a certain item


Recommended Posts

Posted
	public boolean dropOnlyThis(String[] blackList) throws IllegalArgumentException, InterruptedException {
		if (getInventory().contains(blackList)) {
			List<Item> list = getInventory().filter(new ContainsNameFilter<Item>(blackList));
			for (Item item: list) {
				if (item != null) {
					item.interact("drop");
					sleep(gRandom(400,100));
				}
			}
		}
		return !getInventory().contains(blackList);
	}

tell me if this helps

Posted
	public boolean dropOnlyThis(String[] blackList) throws IllegalArgumentException, InterruptedException {
		if (getInventory().contains(blackList)) {
			List<Item> list = getInventory().filter(new ContainsNameFilter<Item>(blackList));
			for (Item item: list) {
				if (item != null) {
					item.interact("drop");
					sleep(gRandom(400,100));
				}
			}
		}
		return !getInventory().contains(blackList);
	}

tell me if this helps

 

 

I should have been more specific. I have 15 of a certain item in my inv and I want to only drop 5 of that item.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...