====== ztk_init_store.nss ====== ===== Usage ===== This script is used in 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: - Set the [[customtokens#3820|custom tokens]] 3820-3822 needed by dialog. [[builders:creaturevariables#text_greetings]], [[builders:creaturevariables#text_open_shop]], and [[builders:creaturevariables#text_no_shopping]] - See if the shop is already created and if so, exit. [[builders:creaturevariables#shop_tag]] - Create shop, and set the shop parameters [[builders:creaturevariables#shop_resref]], [[builders:creaturevariables#shop_gold]], [[builders:creaturevariables#shop_max_buy_price]], [[builders:creaturevariables#shop_identify_cost]]. - Copy some variables from shopkeeper to created shop. [[builders:creaturevariables#fill_time]] - Copy item* variables from the shopkeeper to the created shop. [[builders:creaturevariables#item*]], and [[builders:creaturevariables#item*prob]] - Set the [[builders:creaturevariables#Store0]] variable to have the tag of shop ([[ztk_merch]] uses [[_gen_openstore0]]). ===== Related things ===== [[ztk_merch]]\\ [[ztk_fill_store]]\\ [[_gen_openstore0]]