This dialog is the generic dynamic merchant dialog, that will dynamically create the shop based on the variables listed on the shopkeeper creature. This is used as a conversation for the shopkeeper, and it will automatically do all things needed. The shop will be filled with items and every time the shop is opened it is checked whether refills to the shop are needed.
ztk_merch_100_1
ztk_merch_200_1
or ztk_merch_400_1
.item1
to have the resref of first item to be added to the shop. Then add item1prob
to have the probability in promils (i.e 1/10th of procent), i.e 500 means 50% change the item will be added to the shop inventory. Then set item2
and item2prob
and so on. If probability is missing then it is assumed to be 1000. All items added to the shop MUST have identical resref and tag, as otherwise the script will add duplicate items to the shop (unless of course the fill_time is not set, which means the shop is not refilled).Internally this uses the ztk_init_store script to create the shop and then when the shop is openeded the OnShopOpen script ztk_fill_store is run. This also uses custom tokens 3820-3822 for the greetings, open shop selection and no shopping selection. The actual shop is stored to the Store0 and this uses _gen_openstore0 script.