clvl - character level
qlvl - quality level (of items and suffix)
ilvl - item level (pintermediary step used in calculations)
When determining when the item will be dropped, there are two parts that need to be considered - The base item, and the affixes.
The qlvl of base items generated is always in the range ilvl/4 to ilvl. [Formula A]
The value for the ilvl variable is determined by what number on Griswold's list of goods the item is (as follows):
NOTE: For Both base items, and affixes, the maximum ilvl that can be generated is 30.
The qlvl of the affixes generated is always in the range ilvl/2 to ilvl. [Formula B]. Ilvls for affixes are generated using the same rules as with base items.
CALCULATING, WHEN AN ITEM WILL BE SOLD.
As an example, I will use a King's [bastard] Sword of Haste.
Bastard Sword qlvl: 10
King's qlvl: 28
Haste qlvl: 27
To calculate when you can purchase a 'Bastard Sword', we use the inverse of [A]. This gives ilvl = qlvl to qlvl*4. With Bastard Sword's qlvl of 10, this gives us ilvl = 10 to 40. We then put these values into the table above to calculate the clvls.
The earliest it can be generated then is when clvl + 2 = 10, which is at clvl 8. At the other end, the upper limit would be when clvl -1 = 40, or clvl 41. HOWEVER, due to the ilvl limitation of 30, any character over 30 generates an ilvl of 30, which is within the range we want (10 - 40).
For each affix, we use the inverse of [B], which is ilvl = qlvl to qlvl * 2. Though again, this must be calculated for each slot in the list of goods Griswold will sell.For King's, ilvl = 28 to 56, where ilvl can range from clvl - 1 to clvl + 2. At the lower end, we have 28 = (clvl + 2) to (clvl - 1) or clvl = 26 to 29. This means that the affix is available from clvl 26. At the higher end, we have 56 = (clvl + 2) to (clvl -1) or clvl = 54 to 57. Again however, due to the ilvl limit, we bring this value down to 30. Any character over clvl 30 can then generate this affix.
Following the same process for Haste, we find that it is available from clvl 25 through to clvl 55 (clvl 50).We now have three ranges of clvls, one for the base item, and one for each affix. The final step is to see where the three ranges overlap - This is when the item can be purchased.
Bastard Sword: 10 - 50
King's: 26 - 50
Haste: 25 - 50
So, A King's [bastard] sword of Haste can be purchased from clvls 26 to 50.