rexas 12 Posted December 20, 2016 Having trouble getting unnoted items amount in my inventory, is there a method for this, because i can't find it. I tried a workaround, but it throws null pointer exception. private int getAmount() { int amount = 0; List<Item> items = script.getInventory().all(); if(items != null && items.size() != 0) { for (Item item : items) { if (item.getName().equals("Supercompost")) { amount++; } } } return amount; }
Xephy 237 Posted December 21, 2016 getInventory().count("Rune kiteshield"); Does that not pull the count for all Rune kiteshields in your inventory (Both noted and unnoted)?
rokaHakor 171 Posted December 21, 2016 Does that not pull the count for all Rune kiteshields in your inventory (Both noted and unnoted)? It returns how many inventory spaces items, with the specified name or item ID, are taking.
Hashtag 9079 Posted December 21, 2016 Does that not pull the count for all Rune kiteshields in your inventory (Both noted and unnoted)? Filter can be used to specify it.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.