summaryrefslogtreecommitdiff
path: root/world/map/npc/010-2/loratay.txt
diff options
context:
space:
mode:
authorVincent Petithory <vincent.petithory@gmail.com>2012-12-03 14:06:25 +0100
committerVincent Petithory <vincent.petithory@gmail.com>2012-12-17 01:30:22 +0100
commit1007208357c1174fedd4530ee13eb7a5c0595510 (patch)
tree6a6d1ddefe1b71417533e51e6a6edb361a445c85 /world/map/npc/010-2/loratay.txt
parent4e683827f96f65e4a8401b3e3a645b5c68890c3b (diff)
downloadserverdata-1007208357c1174fedd4530ee13eb7a5c0595510.tar.gz
serverdata-1007208357c1174fedd4530ee13eb7a5c0595510.tar.bz2
serverdata-1007208357c1174fedd4530ee13eb7a5c0595510.tar.xz
serverdata-1007208357c1174fedd4530ee13eb7a5c0595510.zip
Add quest to craft new sorcerer robes at Lora Tay
Diffstat (limited to 'world/map/npc/010-2/loratay.txt')
-rw-r--r--world/map/npc/010-2/loratay.txt154
1 files changed, 154 insertions, 0 deletions
diff --git a/world/map/npc/010-2/loratay.txt b/world/map/npc/010-2/loratay.txt
index 4b9a629f..f3b22c63 100644
--- a/world/map/npc/010-2/loratay.txt
+++ b/world/map/npc/010-2/loratay.txt
@@ -3,7 +3,11 @@
set @ROBE_COCOONS_NR, 150; // must be multiple of ten
set @ROBE_ZENY, 10000;
set @FINEDRESS_COCOONS, 180;
+ set @SORCERER_ROBE_SEW_ZENY, 25000;
+ set @SORCERER_ROBE_NUM_COTTON_CLOTH, 2;
+ setarray @item_colors$, "red", "green", "dark blue", "yellow", "light blue", "pink", "black", "orange", "purple", "dark green", "white";
+ if (@loratay_asking_robe == 1) goto L_ExamineSorcererRobe;
if (QUEST_WG_state == 10) goto L_agostine_menu;
if (QUEST_WG_state == 11 || QUEST_WG_state == 12) goto L_regular_intro;
if (QUEST_WG_state == 13) goto L_proposal_intro;
@@ -228,6 +232,7 @@ L_main_menu:
"Can you make winter gloves me?", -,
"Can you sew a robe for me?", L_robe,
"Can you make a desert hat for me?", L_desert_hat,
+ "Can you enhance a sorcerer robe with another line color?", L_sorcerer_robe_linecolor,
"Goodbye for now.", L_end;
mes "[Lora Tay the Seamstress]";
mes "\"From what? Fluffy fur? I won't work with such lowly materials.\"";
@@ -891,4 +896,153 @@ L_TooMany:
mes "[Lora Tay the Seamstress]";
mes "\"You don't have anywhere to put this. Come back when you have more room.\"";
close;
+
+L_sorcerer_robe_linecolor:
+ mes "[Lora Tay the Seamstress]";
+ mes "\"Hmm, this has a line sewed on it already. I don't see another way than remove it and sew a new one.";
+ mes "That is quite a difficult work... for a casual tailor of course. I'll do that in a heart beat.\"";
+ next;
+ mes "\"However, you can expect this will cost you a large fee. Let's say " + @SORCERER_ROBE_SEW_ZENY + " GP.";
+ mes "Also, I will need " + @SORCERER_ROBE_NUM_COTTON_CLOTH + " sheets of Cotton Cloth of the color you want.\"";
+ next;
+ mes "\"Ok. Now please wear the robe you want me to change.\"";
+ set @loratay_asking_robe, 1;
+ close;
+
+L_ExamineSorcererRobe:
+ set @loratay_asking_robe, 0;
+ mes "[Lora Tay the Seamstress]";
+ mes "\"Let's see...\"";
+ next;
+ set @chest_equip_id, getequipid(equip_torso);
+ callsub S_Get_SorcererRobeColors;
+ mes "Lora Tay takes a closer look at what you are wearing.";
+ next;
+ mes "[Lora Tay the Seamstress]";
+ mes "\"Hmm. This " + @item_colors$[@current_linecolor] + " lined " + @item_colors$[@current_maincolor] + " sorcerer robe. I see. Is that ok?\"";
+ if (@current_maincolor == -1 || @current_linecolor == -1)
+ goto L_NotSorcererRobe;
+ menu
+ "Yes, that's fine. Take this one.", L_ChooseSorcererLineColor,
+ "No, I changed my mind.", -;
+ goto L_CleanSorcererRobe;
+
+L_NotSorcererRobe:
+ mes "\"This isn't a Sorcerer Robe dear. Stop taking me for a fool.\"";
+ goto L_CleanSorcererRobe;
+
+L_ChooseSorcererLineColor:
+ // Unequip the robe, just to simulate Lora Tay really took it
+ unequipbyid(equip_torso);
+ mes "[Lora Tay the Seamstress]";
+ mes "\"And which Cotton Cloth color will you give me?\"";
+ menu
+ "A " + @item_colors$[0] + " one.", -,
+ "A " + @item_colors$[1] + " one.", -,
+ "A " + @item_colors$[2] + " one.", -,
+ "A " + @item_colors$[3] + " one.", -,
+ "A " + @item_colors$[4] + " one.", -,
+ "A " + @item_colors$[5] + " one.", -,
+ "A " + @item_colors$[6] + " one.", -,
+ "A " + @item_colors$[7] + " one.", -,
+ "A " + @item_colors$[8] + " one.", -,
+ "A " + @item_colors$[9] + " one.", -,
+ "A " + @item_colors$[10] + " one.", -,
+ "Hum. I changed my mind. Later maybe.", L_end;
+
+ set @chosen_color, @menu - 1;
+ set @cotton_cloth_id, 2250 + @chosen_color;
+ // The White Cotton Cloth is in fact the undyed one.
+ if (@cotton_cloth_id == 2260)
+ set @cotton_cloth_id, 660;
+ if (countitem(@cotton_cloth_id) < 2)
+ goto L_NoColoredCottonCloth;
+ if (@current_linecolor == @chosen_color)
+ goto L_SorcererRobe_SameColor;
+ callsub S_Get_NewSorcererRobeId;
+ // Should not happen since it has been checked the player submitted a sorcerer robe
+ if (@new_sorcerer_robe_id == 0)
+ goto L_end;
+
+ if (Zeny < @SORCERER_ROBE_SEW_ZENY)
+ goto L_SorcererRobe_NoZeny;
+ if (countitem(@chest_equip_id) == 0)
+ goto L_SorcererRobe_Vanished;
+ delitem @cotton_cloth_id, @SORCERER_ROBE_NUM_COTTON_CLOTH;
+ // Since we delete an unstackable item, we don't need to check
+ // for an available inventory slot.
+ delitem @chest_equip_id, 1;
+ set Zeny, Zeny - @SORCERER_ROBE_SEW_ZENY;
+ getitem @new_sorcerer_robe_id, 1;
+ mes "Lora Tay adjusts her glasses and removes carefully the " + @item_colors$[@current_linecolor] + " string of the robe.";
+ mes "Then she grabs the " + @item_colors$[@chosen_color] + " cotton cloth, unfolds it and pins her needle in it.";
+ next;
+ mes "She begins to sew the new string onto the sorcerer robe.";
+ next;
+ mes "She regularly flips and flips again the robe, which starts to show her new color.";
+ next;
+ mes "After a few minutes you barely noticed, the robe seems to be ready.";
+ next;
+ mes "[Lora Tay the Seamstress]";
+ mes "\"There you are dear. I have to say I made a perfect job... As always.";
+ mes "I hope you'll enjoy your new robe.\"";
+ goto L_CleanSorcererRobe;
+
+L_SorcererRobe_SameColor:
+ mes "[Lora Tay the Seamstress]";
+ mes "\"Are you blind? Your robe is already of this color dear!\"";
+ goto L_CleanSorcererRobe;
+
+L_SorcererRobe_Vanished:
+ mes "Lora Tay adjusts her glasses and looks around, as if something was missing.";
+ next;
+ mes "[Lora Tay the Seamstress]";
+ mes "\"Uh? Where is your sorcerer robe?\"";
+ goto L_CleanSorcererRobe;
+
+S_Get_NewSorcererRobeId:
+ if (@chosen_color == 0 && @current_maincolor == 10)
+ set @new_sorcerer_robe_id, 798;
+ if (@chosen_color == 0 && @current_maincolor < 10)
+ set @new_sorcerer_robe_id, 2220 + @current_maincolor;
+ if (@chosen_color > 0)
+ set @new_sorcerer_robe_id, 5000 + @current_maincolor + (@chosen_color-1)*11;
+ return;
+
+L_NoColoredCottonCloth:
+ mes "[Lora Tay the Seamstress]";
+ mes "\"You don't seem to own enough Cotton Cloth of this color. I need " + @SORCERER_ROBE_NUM_COTTON_CLOTH + " of them. Too bad.\"";
+ goto L_CleanSorcererRobe;
+
+L_SorcererRobe_NoZeny:
+ mes "[Lora Tay the Seamstress]";
+ mes "\"You don't seem to be able to afford my services, dear.\"";
+ goto L_CleanSorcererRobe;
+
+S_Get_SorcererRobeColors:
+ set @current_maincolor, -1;
+ set @current_linecolor, -1;
+ // Line color
+ if (@chest_equip_id == 798 || (@chest_equip_id >= 2220 && @chest_equip_id <= 2229))
+ set @current_linecolor, 0;
+ if (@chest_equip_id >= 5000 && @chest_equip_id <= 5109)
+ set @current_linecolor, 1 + (@chest_equip_id-5000)/11;
+ // Main color
+ if (@chest_equip_id == 798)
+ set @current_maincolor, 10;
+ if (@chest_equip_id >= 2220 && @chest_equip_id <= 2229)
+ set @current_maincolor, @chest_equip_id - (@chest_equip_id/10)*10;
+ if (@chest_equip_id >= 5000 && @chest_equip_id <= 5109)
+ set @current_maincolor, @chest_equip_id - 5000 - (@current_linecolor-1)*11;
+ return;
+
+L_CleanSorcererRobe:
+ set @current_maincolor, 0;
+ set @current_linecolor, 0;
+ set @chest_equip_id, 0;
+ set @new_sorcerer_robe_id, 0;
+ set @chosen_color, 0;
+ set @cotton_cloth_id, 0;
+ close;
+
}