Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Resolved Bank placeholder slots have a quantity of 1

s̶c̶r̶i̶p̶t̶ bot*
Joined
Aug 23, 2015
Messages
2,232
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...
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...
GQ75vkD.png

http://i.imgur.com/GQ75vkD.png


Here's the bank interface...
hmyPZNU.png

http://i.imgur.com/hmyPZNU.png

@Cloud @Party
 
Misfits
Joined
Nov 21, 2016
Messages
1,538
I ran into this issue as well, it tries to withdraw the placeholder, and gets stuck and rarely throws an NPE
 
Top