summaryrefslogtreecommitdiff
path: root/world/map
diff options
context:
space:
mode:
authorbh28 <bernard@bh28.net>2013-04-08 18:54:02 +0200
committerJessica Tölke <jtoelke@mail.upb.de>2013-05-27 18:57:23 +0200
commit4143369b3370271801a35363479b109610493d30 (patch)
tree072a2b7a8d719a30a465867b2d7676ee320a6297 /world/map
parent9ce2e39094a06bdb11620d10d82c9b99c7388423 (diff)
downloadserverdata-4143369b3370271801a35363479b109610493d30.tar.gz
serverdata-4143369b3370271801a35363479b109610493d30.tar.bz2
serverdata-4143369b3370271801a35363479b109610493d30.tar.xz
serverdata-4143369b3370271801a35363479b109610493d30.zip
Allowed to buy multiple sheets, Dialogs improvement.
Diffstat (limited to 'world/map')
-rw-r--r--world/map/npc/021-1/hetchel.txt62
1 files changed, 48 insertions, 14 deletions
diff --git a/world/map/npc/021-1/hetchel.txt b/world/map/npc/021-1/hetchel.txt
index 9ccc8e9f..8304153e 100644
--- a/world/map/npc/021-1/hetchel.txt
+++ b/world/map/npc/021-1/hetchel.txt
@@ -1,4 +1,6 @@
// Hetchel the Silk Weaver
+// bh28, GPLv2
+// Graphics by ChefChelios CC BY SA
// Hetchel is referred to by Lora Tay.
// She weaves and sells standard double elbow square silk sheets.
// She could also sell, dyed sheets, Silk robes from Lora Tay.
@@ -6,28 +8,50 @@
//
// Hetchel's workshop is actually under repair, Shé'll be back in 021-2 when workers have finished their job.
//
+// QUEST_WG_state: Global variable indicating winter gloves status.
+// Lora Tay proposes silk Robe if (QUEST_WG_state>= 11).
// @SHEET_COCOONS_NR : Number of cocoons required per sheet.
// Might ne calculated from @ROBE_COCOONS_NR/@ROBE_SHEETS_NR
// Actually: 150∕6 = 25
// @SHEET_ZENY : Money to pay per sheet: A sixth of 10000-2*500-6000
+// @SheetCount Number of sheets to buy (variable).
021-1.gat,120,39,0|script|Hetchel|376,{
set @SHEET_COCOONS_NR, 25;
set @SHEET_ZENY, 500;
+ set @SheetCount 0;
+
+ if (QUEST_WG_state < 11)
+ goto L_WG_quest_not_done;
mes "[Hetchel the weaver]";
- mes "\"Hello I am Hetchel, I weave fine textiles, what can I do for you?\"";
+ mes "Hello I am Hetchel, I weave fine textiles, what can I do for you?";
+ menu
+ "Sorry to bother, I'm just visting.", L_end,
+ "I am looking for silk sheets, Lora Tay told me that I could find some in this market. Can you help?", -;
next;
+ goto L_main_menu;
-L_main_menu:
+L_WG_quest_not_done:
+ mes "[Hetchel the weaver]";
+ mes "\"Hello I am Hetchel, I weave fine textiles.";
+ mes "My best client is Lora Tay, at Dimond's.";
+ mes "What can I do for you?\"";
menu
"Sorry to bother, I'm new to this country, just visting.", L_end,
- "I am looking for silk sheets, Lora Tay told me that I could find some in this market. Can you help?", -;
+ "What are you selling?", -;
+ next;
+
+L_main_menu:
+ mes "[Hetchel the weaver]";
+ mes "\"I have some silk sheets: double-elbow squares";
+ menu
+ "I'm not interested at the moment, maybe later; thanks anyway.", L_end,
+ "Can I buy some?", -;
// "Do you have any silk robe I could buy?", L_robe,
// "Goodbye.", L_end;
- next;
mes "[Hetchel the Weaver]";
mes "\"Sure but you need to provide raw materials.";
- mes "I'll need " + @SHEET_COCOONS_NR +" silk cocoons per sheet, ";
+ mes "I'll need " + @SHEET_COCOONS_NR +" silk cocoons per sheet,";
mes "and also " + @SHEET_ZENY +" GP per sheet for my work.\"";
next;
if (countitem("SilkCocoon") == 0)
@@ -41,30 +65,35 @@ L_sheet_menu:
next;
L_sheet:
- if (countitem("SilkCocoon") < @SHEET_COCOONS_NR)
+ mes "How many would you like?";
+ input @SheetCount;
+ if (@SheetCount == 0)
+ goto L_zero_sheet;
+ if (countitem("SilkCocoon") < @SheetCount * @SHEET_COCOONS_NR)
goto L_sheet_missing_cocoons;
- if (Zeny < @SHEET_ZENY)
+ if (Zeny < @SheetCount * @SHEET_ZENY)
goto L_sheet_missing_Zeny;
getinventorylist;
- if (@inventorylist_count == 100 && countitem("SilkCocoon") > @SHEET_COCOONS_NR)
+ if (@inventorylist_count == 100 && countitem("SilkCocoon") > @SheetCount * @SHEET_COCOONS_NR)
goto L_TooMany;
- set Zeny, Zeny - @SHEET_ZENY;
- delitem "SilkCocoon", @SHEET_COCOONS_NR;
- getitem "Silksheet", 1;
+ set Zeny, Zeny - @SheetCount * @SHEET_ZENY;
+ delitem "SilkCocoon", @SheetCount * @SHEET_COCOONS_NR;
+ getitem "Silksheet", @SheetCount;
mes "[Hetchel the Weaver]";
- mes "\"Thank you, I hope the sheets will fit your needs.\"";
+ mes "\"Thank you, I hope the sheets will fit your needs.";
+ mes "Please greet Lora for me when you see her.\"";
emotion EMOTE_HAPPY;
goto L_end;
L_sheet_missing_cocoons:
mes "[Hetchel the Weaver]";
- mes "\"I'm sorry, but I need " + @SHEET_COCOONS_NR + ", not " + countitem("SilkCocoon") + ".";
+ mes "I'm sorry, but I need " + @SheetCount * @SHEET_COCOONS_NR + ", not " + countitem("SilkCocoon") + ".";
goto L_end;
L_sheet_missing_Zeny:
mes "[Hetchel the Weaver]";
mes "\"No, no no. The way this works is that you give me the GP first and I give you the sheets afterwards.";
- mes "You're " + (@SHEET_ZENY - Zeny) + " GP short, so come back when you can afford the sheet!\"";
+ mes "You're " + (@SheetCount * @SHEET_ZENY - Zeny) + " GP short, so come back when you can afford the sheets you asked for!\"";
goto L_end;
L_how_many_cocoons:
@@ -97,6 +126,10 @@ L_sheet_no_cocoon:
//L_robe_menu:
// goto L_main_menu;
+L_zero_sheet;
+ mes "It's the best way to get quickly served!";
+ goto L_end;
+
L_TooMany:
mes "[Hetchel the Weaver]";
mes "\"Your bag hasn't room enough. Store some things and come back.\"";
@@ -104,6 +137,7 @@ L_TooMany:
L_end:
set @SHEET_COCOONS_NR, 0;
set @SHEET_ZENY, 0;
+ set @SheetCount 0;
close;
}