New Premium Module: Tyrants of the Moonsea! Read More
Highlighting unowned items in stores
I just made up a single script that will highlight store items that are not in the inventory of selected character (or contents of opened bag). I normally use it when buying spells or potions, to check if I already have it in my Scroll/Potion Case:
function groupHasItem(item, groupItems)
for k,v in pairs(groupItems) do
if item.item.res == v.item.res then
and this needs to be added to menu with name STORE_BUYSELL
, just before
the label responsible for printing the value of item (with text lua "store.storeItems[rowNumber].value"
area 310 0 91 60
enabled "not groupHasItem(store.storeItems[rowNumber], store.groupItems)"
rectangle opacity 150
Now I don't have an experience/knowledge to "pack" this code into some sort of patch or UI-mod, so this is all I can offer. It helped me, maybe it will suit others too
Feel free to use without any restriction, in any form.