I think you should revisit the Guild Town code.
If you go with that route may I suggest maybe the idea of auto populating guild towns with NPCs if certain requirements are met.
Say if certain items are placed in a room, say an Anvil, Coal Pit, a Chest, and a Bed. After a check would spawn in a Blacksmith (weapon/armor) NPC that would be tied to the guild and the guild would receive a % of the sells. Then because there hasn't ever been a real gold sink, allow use via commands or some sort of set of items that allows for upgrading the NPC to sell higher equipment or a trade skill that corresponds with the NPC and you, through a process, make something that upgrades the NPC to allow for better equipment.
Example: Standard NPC sells copper items, you make a set of items out of iron to allow him to sell some basic Iron items (hell make it harder by making a requirement of 1 of each iron item to unlock the function)
Side note: I also like the idea of the NPC selling a certain amount of equipment before the upgrading process is possible. It may seem a little tedious but I like the idea of players getting together for a common goal to make the best town.
this sounds good, a shop space with certain requirements would fit well with a scheduled raid that destroys walls/etc, would require some degree of maintenance on the players end without being overly tedious (being required to supply xxxx items on a regular basis)
for the npc upgrade, something like "/npctrain skill x" x being a tier, a skillcheck for the player using it to increase said vendors inventory, on top of the required inventory traffic?
e.g. /npctrain blacksmith 3, with a skillcheck about 100 higher than the requirement to make iron for the npc to stock/buy iron gear (yea iron is 4th, but no point training them to stock tin)
maybe that's too complicated? idk, just a thought.