====== ztk_fill_store.nss ====== ===== Usage ===== This script is used as [[OnOpenStore]] script of the generic merchants [[ztk_merch_*]]. Those generic merchants are used by the generic dialog script [[ztk_merch]]. For more information how to use that see the documentation of [[ztk_merch]]. ===== What it does ===== This function will do following things: - Check if the ''next_fill_time'' is already arrived (for the first time it is zero, so it is always smaller than current time. - Loop through item* variables, and check the probability. Add new items to the shop if needed (do not add duplicates). [[builders:creaturevariables#item*]], and [[builders:creaturevariables#item*prob]]. Created items have their tags set to their resrefs. - Calculate next fill time based on the [[builders:creaturevariables#fill_time]] ===== Related things ===== [[ztk_merch]]\\ [[ztk_init_store]]\\ [[_gen_openstore0]]