Here is the trigger I am using for stacking items. It works, but the problem is after it works. Just to say, I obtained this from someone in the site, but I don't remember their name at the moment.
So, the point is that the trigger stacks an item called "Healing Salve". Okay, so it works perfectly. However, I'm having a problem of what I want to do with it. Since it is a weak healing item, I want to limit the stacking to 99. The problem is that the number it can stack to is endless. I was having fun stacking it up so high, but found the problems it would bring(endless healing, etc.). How am I to limit the item to a stack of 99?
I believe that there is another problem; even if I do limit the stacking process, what is there to say about what will happen if you already have a first stack of 97, then you obtain another Healing Salve? All potions come in threes, so: 97 + 3 = 100, but the limit is 99. Wouldn't the extra charge dissapear? This is just a speculation, though(I haven't confirmed it happening). I'm concerned, because when it comes to the potions that cost more... and I mean a LOT more, you don't want gold to go to waste.