I am attaching a text file for a set of triggers I recently wrote. The triggers prevent a mobile's shop inventory from becoming overloaded by purging out items at a number set by a zone builder. For the purposes of these triggers I arbitrarily set the item limit to 20, but it could be increased or decreased at the discretion of a zone builder. The item purging happens in a first in, first out order. Furthermore, there are two triggers for the two different scenarios which a builder might create.
The first trigger addresses a mobile shopkeeper whom spawns with items in a shop product menu which have an unlimited quantity. IE: Midgaard wizard loads a scroll of recall and we want that to always be available.
The second trigger is made for a mobile which has no unlimited item quantities such as a pawn broker type mob.
Note: The text file is part of a compendium of triggers in my personal files. It follows a format I prefer for my own personal use and as such it may or may not be intuitive for others. Even so, the triggers are present for whomever wishes to use them.
Enjoy,
Sapphire