From e6be64b109b0449540f01f02b81eb535d860e4ce Mon Sep 17 00:00:00 2001 From: Reid Date: Mon, 21 Mar 2016 12:59:39 +0100 Subject: Separate calypsan's shop into two shop, one for cashmere and one for cotton. --- npc/001-1/calypsan.txt | 24 ++++++++++++++++++++++-- npc/001-1/shop.txt | 27 ++++++++++++++++++++------- 2 files changed, 42 insertions(+), 9 deletions(-) (limited to 'npc/001-1') diff --git a/npc/001-1/calypsan.txt b/npc/001-1/calypsan.txt index c4086190..7d33fc66 100644 --- a/npc/001-1/calypsan.txt +++ b/npc/001-1/calypsan.txt @@ -33,6 +33,26 @@ l("If yoiis wants to see a different use for the cards he can yeye for Resa at the light armor shop for a description of the styling cards."); } + function sell_dye { + speech 5, l("For what kind of tissue?"); + .@tissue_type = select (l("Cotton"), l("Cashmere")); + + closedialog; + switch (.@shop == 1) + { + case 1: + shop "Cotton#Dye001-1"; + break; + case 2: + shop "Cashmere#Dye001-1"; + break; + default: + debugmes "Calypsan script error, tissue_type is incorrect"; + break; + } + close; + } + speech 4, l("Yoiis envies a rainbow in the sky?"), l("It is possible to yeye your cloth with my beautiful dyes."), @@ -60,9 +80,9 @@ break; case 1: - closedialog; - shop "Store#Calypsan001-1"; + sell_dye; close; + case 2: explain_dyes; break; diff --git a/npc/001-1/shop.txt b/npc/001-1/shop.txt index 2cc7e2c3..fb768780 100644 --- a/npc/001-1/shop.txt +++ b/npc/001-1/shop.txt @@ -32,14 +32,11 @@ OnClock0000: restoreshopitem PiouSlayer, 15; } -001-1,46,125,0 trader Store#Calypsan001-1 NPC_NO_SPRITE,{ +001-1,46,125,0 trader Cotton#Dye001-1 NPC_NO_SPRITE,{ OnInit: tradertype(NST_MARKET); - sellitem CrimsonCashmereDye, -1, 7; - sellitem ChocolateCashmereDye, -1, 7; - sellitem MintCashmereDye, -1, 7; sellitem BlackCottonDye, -1, 10; sellitem SilverCottonDye, -1, 10; sellitem CamelCottonDye, -1, 10; @@ -65,9 +62,6 @@ OnInit: end; OnClock0000: - restoreshopitem CrimsonCashmereDye, 7; - restoreshopitem ChocolateCashmereDye, 7; - restoreshopitem MintCashmereDye, 7; restoreshopitem BlackCottonDye, 10; restoreshopitem SilverCottonDye, 10; restoreshopitem CamelCottonDye, 10; @@ -89,6 +83,25 @@ OnClock0000: restoreshopitem YellowCottonDye, 10; } +001-1,48,125,0 trader Cashmere#Dye001-1 NPC_NO_SPRITE,{ + +OnInit: + tradertype(NST_MARKET); + + sellitem CrimsonCashmereDye, -1, 7; + sellitem ChocolateCashmereDye, -1, 7; + sellitem MintCashmereDye, -1, 7; + + .sex = G_OTHER; + .distance = 4; + end; + +OnClock0000: + restoreshopitem CrimsonCashmereDye, 7; + restoreshopitem ChocolateCashmereDye, 7; + restoreshopitem MintCashmereDye, 7; +} + 001-1,64,114,0 trader Store#Aquada001-1 NPC_NO_SPRITE,{ OnInit: -- cgit v1.2.3-60-g2f50