Nice script, but i have found some glitches
1.) Game crashes when you buy more items, than your DEFAULT_ITEM_STACK for that item.
2.) Game crashes, when you get more items by event (change items: [potion], +999), than your DEFAULT_ITEM_STACK for that item. (fixed it by adding desired item one by one: change items: [potion], +1, change items: [potion], +1, ...)
3.) When you use item from stack, the number indicating amount of items you have in this stack will be broken (it will look like white blob).
4.) You can duplicate your items. equip your character with weapon and fill your inventory with two more diferent weapons your character can equip. Than equip your character (using equip window) with diferent weapon and all your weapons will be duplicatet.
This is all i have found so far.