Hi Vrul
Thanks further testing.
I have played with my chunk and finally got some sense out of it.
This my working code;
Lua Code:
for bag = 0, 4 do
for slot = 0, GetContainerNumSlots(bag) do
local itemID = GetContainerItemID(bag, slot)
if itemID then
local _, itemLink, itemQuality, _, _, _, _, _, _, _, itemValue = GetItemInfo(itemID)
local money, itemCount, refundSec = GetContainerItemPurchaseInfo(bag, slot, false)
print(bag, slot,itemLink, "- money:",money, "- count:",itemCount,"- time:", refundSec)
end
end
end
This is the bag and the output;
The strange outcomes are;
- It only returns for items that do have a cooldown, once the refund time runs out it will return all nils.
- The item count always returns 0, no matter how many items I have stacked.
- The loop identifies the first equipped bag but it does not count any of the other equipped bags.
All in all a real bizarre output. I would like to get some better understanding of why the returns are all over the place but for now I am getting the result I need.
Thanks to you all for your help.