- Joined
- Aug 23, 2015
- Messages
- 2,232
- Thread Author
- #1
In OSRS, if an Item is a placeholder the quantity should be 0, however it's returning as 1.
I'm trying to withdraw potions of any dosage...
Here's the printout...
http://i.imgur.com/GQ75vkD.png
Here's the bank interface...
http://i.imgur.com/hmyPZNU.png
@Cloud @Party
I'm trying to withdraw potions of any dosage...
Code:
SpriteItem item = Bank.newQuery().names(bot.potionType.getPotionList()).filter(i -> i.getQuantity() > 0).results().first();
if(item != null) {
UpdateUI.debug("itemName = " + item.getDefinition().getName());
UpdateUI.debug("itemQuantity = " + item.getQuantity());
UpdateUI.currentTask("Withdrawing " + bot.potionType.getPotionName() + " potion(s)", bot);
Bank.withdraw(item, bot.potionQuantity - inventoryItemSize);
}
Here's the printout...
http://i.imgur.com/GQ75vkD.png
Here's the bank interface...
http://i.imgur.com/hmyPZNU.png
@Cloud @Party