Okay I think I know what you're going for, here's how to do it.
Your custom campaign should be a full directory containing the same folder found within C:/..../Hammerwatch/editor. If not, well read this thread on how to make it so:
http://hammerwatch.com/forum/index.php?topic=2026.0So once you have that setup, the
Tweak is where most of the script for each shop is. I've attached the script they used to the gamble shop in the desert campaign. You should probably just copy that into your
Tweak folder and rename it whatever you want. Now let's at setting up the shop, it should look something like this:
<tweak>
<params>
<dictionary>
</dictionary>
</params>
<upgrades>
<dictionary id="shopid" cost="99" cat="shopcategory" shared="true"
name="shopname" desc="shopdescription" />
</upgrades>
</tweak>
Some of these are self explanatory, what's mostly important are
dictionary id and
cat.
Dictionary ID will be the global event that is fired whenever this is purchased. More on this in a moment.
Cat refers to which vendor to hold the item, which you must reference in your
Shop script within the Hammerwatch editor.
For your item to appear you will need to create a GlobalEventTrigger script with Event: set to match your Dictoinary ID. Then attach that to a SpawnObject script that will create your item.
Hopefully this is what you were looking for.