The available_amount(it) looks at what I have in my inventory. I'm not sure what setting to change, but it's ok. I'm happy with the script the way it will come out.
The different _amount() functions can be confusing.
item_amount() is just the number of items in inventory.
available_amount() is the number available to you, including items currently equipped, items in your closet, and free pulls.