Table of Contents

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:

  1. Check if the next_fill_time is already arrived (for the first time it is zero, so it is always smaller than current time.
  2. Loop through item* variables, and check the probability. Add new items to the shop if needed (do not add duplicates). item*, and item*prob. Created items have their tags set to their resrefs.
  3. Calculate next fill time based on the fill_time

ztk_merch
ztk_init_store
_gen_openstore0