summaryrefslogtreecommitdiff
path: root/npc/002-2/hetchel.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/002-2/hetchel.txt')
-rw-r--r--npc/002-2/hetchel.txt417
1 files changed, 417 insertions, 0 deletions
diff --git a/npc/002-2/hetchel.txt b/npc/002-2/hetchel.txt
new file mode 100644
index 00000000..82e8f02d
--- /dev/null
+++ b/npc/002-2/hetchel.txt
@@ -0,0 +1,417 @@
+
+002-2,76,92,0 script Hetchel NPC376,{
+ @wg_state = ((QUEST_WG_state & BYTE_0_MASK) >> BYTE_0_SHIFT);
+ @spants_state = ((QUEST_WG_state & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT);
+ @SHEET_COCOONS_NR = 25;
+ @SHEET_ZENY = 500;
+ @spants_minlvl = 45;
+ setarray @spants_req_hmn$, "Silk Cocoons", "Pieces of Cotton Cloth", "Silk Headbands";
+ setarray @spants_req$, "SilkCocoon", "CottonCloth", "SilkHeadband";
+ setarray @spants_req_amt, 154, 14, 2;
+ @spants_reward = 45000;
+ @spants_job_reward = 10000;
+ @SheetCount = 0;
+
+ if (@wg_state < 11)
+ goto L_WG_quest_not_done;
+ if ( BaseLevel > @spants_minlvl && @spants_state < 1 ) goto L_Spants_Cry;
+ if ( @spants_state == 1 ) goto L_Spants_Cry_2;
+ if ( @spants_state == 2 ) goto L_Spants_Start;
+ if ( @spants_state > 2 && @spants_state < 8 ) goto L_Spants_Steal;
+ if ( @spants_state == 8 ) goto L_Spants_Make;
+
+ mes "[Hetchel the weaver]";
+ mes "";
+ mes "\"Hello I am Hetchel, I weave fine textiles, what can I do for you?\"";
+ menu
+ "Sorry to bother, I'm just visiting.", L_close,
+ "I am looking for silk sheets, Lora Tay told me that I could find some in this market. Can you help?", L_Main_menu;
+
+L_WG_quest_not_done:
+ mes "[Hetchel the weaver]";
+ mes "";
+ 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_close,
+ "What are you selling?", L_Main_menu;
+
+L_Spants_Cry:
+ mes "[Hetchel the weaver]";
+ mes "";
+ mes "\"Hello I am Hetchel, I weave fine textiles, what can I do for you?\"";
+ menu
+ "Sorry to bother, I'm just visiting.", L_close,
+ "I am looking for silk sheets, Lora Tay told me that I could find some in this market. Can you help?", L_Spants_Cry_Cont_1;
+
+L_Spants_Cry_2:
+ mes "[Hetchel the weaver]";
+ mes "";
+ mes "\"Hello I am Hetchel, I weave fine textiles, what can I do for you?\"";
+ menu
+ "Sorry to bother, I'm just visiting.", L_close,
+ "I am looking for silk sheets, Lora Tay told me that I could find some in this market. Can you help?", L_Main_menu,
+ "Hey you have been crying so badly, can I help you somehow?", L_Spants_Reply_Cry,
+ "Give Hetchel something to dry her tears", L_Spants_Tears;
+
+L_Spants_Start:
+ mes "[Hetchel the weaver]";
+ mes "";
+ mes "\"Hello I am Hetchel, I weave fine textiles, what can I do for you?\"";
+ menu
+ "Sorry to bother, I'm just visiting.", L_close,
+ "I am looking for silk sheets, Lora Tay told me that I could find some in this market. Can you help?", L_Main_menu,
+ "So you are looking for new goals in your life?", L_Spants_No_Cry;
+
+L_Spants_Steal:
+ mes "[Hetchel the weaver]";
+ mes "";
+ mes "\"Hello I am Hetchel, I weave fine textiles, what can I do for you?\"";
+ menu
+ "Sorry to bother, I'm just visiting.", L_close,
+ "I am looking for silk sheets, Lora Tay told me that I could find some in this market. Can you help?", L_Main_menu,
+ "About the Pants...", L_Spants_Steal_Cont;
+
+L_Spants_Make:
+ mes "[Hetchel the weaver]";
+ mes "";
+ mes "\"Hello I am Hetchel, I weave fine textiles, what can I do for you?\"";
+ menu
+ "Sorry to bother, I'm just visiting.", L_close,
+ "I am looking for silk sheets, Lora Tay told me that I could find some in this market. Can you help?", L_Main_menu,
+ "Hey what about the Pants you were planning to make?", L_Spants_Make_Cont;
+
+L_Spants_Cry_Cont_1:
+ mes "You notice how the tiny woman blushes, she suddenly bursts into tears.";
+ next;
+ mes "[Hetchel the weaver]";
+ mes "";
+ mes "\"Hello\"";
+ mes "Hetchel hides her face in her hands";
+ mes "";
+ mes "";
+ menu
+ "\"Hey, what is the problem?\"", L_Spants_Reply_Cry,
+ "Give Hetchel something to dry her tears", L_Spants_Tears,
+ "\"Oh really? Just sell me some Silk Sheets if you have them\"", L_Main_menu;
+
+L_Spants_Tears:
+ mes "Choose the item you want to give her.";
+ next;
+ cleararray @items$, "", getarraysize(@items$);
+ cleararray @item_names$, "", getarraysize(@item_names$);
+ setarray @items$, "RedCottonCloth", "GreenCottonCloth", "DarkBlueCottonCloth", "YellowCottonCloth", "LightBlueCottonCloth", "PinkCottonCloth", "BlackCottonCloth", "OrangeCottonCloth", "PurpleCottonCloth", "DarkGreenCottonCloth", "HitchhikersTowel", "WhiteHitchhikersTowel", "RedHitchhikersTowel", "GreenHitchhikersTowel", "BlueHitchhikersTowel", "YellowHitchhikersTowel", "PurpleHitchhikersTowel", "OrangeHitchhikersTowel", "PinkHitchhikersTowel", "TealHitchhikersTowel", "LimeHitchhikersTowel", "SnakeSkin", "LeatherPatch", "SnakeTongue", "MountainSnakeTongue", "GrassSnakeTongue", "CaveSnakeTongue", "BatWing", "RottenRags", "BrokenDoll", "RedDottedWrap", "BlueDottedWrap", "PurpleStripedWrap", "RedGoldenStripedWrap", "GreenRedStripedWrap", "YellowWrap", "WhiteWrap", "BlueWrap", "PurpleWrap", "GreenWrap", "Doll", "BookPage";
+ setarray @item_names$, "Red Cotton Cloth", "Green Cotton Cloth", "Dark Blue Cotton Cloth", "Yellow Cotton Cloth", "Light Blue Cotton Cloth", "Pink Cotton Cloth", "Black Cotton Cloth", "Orange Cotton Cloth", "Purple Cotton Cloth", "Dark Green Cotton Cloth", "Hitchhiker's Towel", "White Hitchhiker's Towel", "Red Hitchhiker's Towel", "Green Hitchhiker's Towel", "Blue Hitchhiker's Towel", "Yellow Hitchhiker's Towel", "Purple Hitchhiker's Towel", "Orange Hitchhiker's Towel", "Pink Hitchhiker's Towel", "Teal Hitchhiker's Towel", "Lime Hitchhiker's Towel", "Snake Skin", "Leather Patch", "Snake Tongue", "Mountain Snake Tongue", "Grass Snake Tongue", "Cave Snake Tongue", "Bat Wing", "Rotten Rags", "Broken Doll", "Red Dotted Wrap", "Blue Dotted Wrap", "Purple Striped Wrap", "Red Golden Striped Wrap", "Green Red Striped Wrap", "Yellow Wrap", "White Wrap", "Blue Wrap", "Purple Wrap", "Green Wrap", "Doll", "Book Page";
+ callfunc "DynamicItemMenu$";
+ @spants_wipe_thingy$ = @item$;
+ if (@spants_wipe_thingy$ == "") goto L_close;
+ if (countitem(@spants_wipe_thingy$) < 1) goto L_Spants_No_Item;
+ if (@spants_wipe_thingy$ == "RedCottonCloth") goto L_Spants_Tears_Cont;
+ if (@spants_wipe_thingy$ == "RedHitchhikersTowel") goto L_Spants_Tears_Towel;
+ mes "Hetchel looks at you, then looks at the" + @spants_wipe_thingy$ + ".";
+ mes "She hangs her head and weeps more";
+ mes "Red is the only color I have ever loved, bring me something red to dry my tears";
+ goto L_close;
+
+L_Spants_Tears_Towel:
+ mes "[Hetchel the weaver]";
+ mes "";
+ mes "\"No, I recognize this towel, it is one of those warping towels, are you trying to mess with me?\"";
+ goto L_close;
+
+L_Spants_No_Item:
+ mes "Oh you do not have it.";
+ goto L_close;
+
+L_Spants_Tears_Cont:
+ mes "Hetchel dries her tears with the Red Piece of Cloth you gave her.";
+ mes "This seems to have consoled her.";
+ delitem "RedCottonCloth", 1;
+ @spants_state = 2;
+ callsub S_Update_Spants;
+ goto L_Spants_No_Cry;
+
+L_Spants_No_Cry:
+ mes "[Hetchel the weaver]";
+ mes "";
+ mes "\"Oh thank you my dear friend.";
+ mes "Yes, to some extent.";
+ next;
+ mes "I am just so sad because I realized that this is going to be the thing I will be doing for the rest of my life\"";
+ menu
+ "\"You are still young, Hetchel, You can still accomplish things\"", L_Spants_Cry_Cont_2,
+ "\"Yes, you are probably correct.\"", L_close;
+
+L_Spants_Cry_Cont_2:
+ mes "[Hetchel the weaver]";
+ mes "";
+ mes "Hetchel thinks for a while";
+ mes "";
+ mes "\"Oh my friend, I have been dreaming of making a garment of my own.";
+ mes "It always bothered me to see all those wizards and witches here being naked under their cloaks\"";
+ mes "\"They must be so embarrassed - they are true heroes to give up their dignity to be able to fight the perils of this world\"";
+ mes "Hetchel sobs";
+ menu
+ "\"So you want to make pants for mages?\"", L_Spants_Cry_Cont_3,
+ "\"This sounds ridiculous. Good Bye.\"", L_close;
+
+L_Spants_Cry_Cont_3:
+ mes "[Hetchel the weaver]";
+ mes "";
+ mes "\"Ok, so I figured I could make some trousers like Lora Tay makes but from the much finer Material the Silk Worms are making for us\"";
+ mes "\"But I really need the base plans for the trousers, otherwise I do not know how to attempt this.";
+ mes "Can you get me those plans from her?\"";
+ menu
+ "\"No, sorry I am too busy for that\"", L_close,
+ "\"Of course!\"", L_Spants_Cry_Cont_4;
+
+L_Spants_Cry_Cont_4:
+ @spants_state = 3;
+ callsub S_Update_Spants;
+ mes "[Hetchel the weaver]";
+ mes "";
+ mes "\"Oh wait! I am not sure if it is such a good idea to ask her about that, I think she would not give the plans to you anyway.";
+ mes "Maybe you can find a way to get those plans on a different way?";
+ mes "I think there are some people in Hurnscald who have their means of getting you every possible item there is\"";
+ next;
+ mes "[Hetchel the weaver]";
+ mes "";
+ mes "Please please please - I need those plans";
+ goto L_close;
+
+L_Spants_Reply_Cry:
+ mes "[Hetchel the weaver]";
+ mes "";
+ mes "\"...\"";
+ @spants_state = 1;
+ callsub S_Update_Spants;
+ goto L_close;
+
+
+L_Spants_Steal_Cont:
+ mes "[Hetchel the weaver]";
+ mes "";
+ mes "\"Have you gotten hold of the plans?\"";
+ menu
+ "Yes I have them somewhere here", L_Spants_Steal_Cont2,
+ "No, not yet", L_close;
+
+L_Spants_Steal_Cont2:
+ if(@spants_state < 7) goto L_Spants_No_Item;
+ @spants_state = 8;
+ callsub S_Update_Spants;
+ mes "[Hetchel the weaver]";
+ mes "";
+ mes "\"Oh this is miraculous\"";
+ mes "";
+ mes "Hetchel sheds some tears of joy";
+ next;
+ mes "You hand her the crumpled plans Crastur the Ugly gave you.";
+ next;
+ mes "[Hetchel the weaver]";
+ mes "";
+ mes "\"I need to figure out how to do this now... \"";
+ next;
+ mes "Hetchel adjusts her glasses and reads carefully";
+ next;
+ mes "She seems to be very busy, maybe you should come back later.";
+ goto L_close;
+
+L_Spants_Make_Cont:
+ mes "[Hetchel the weaver]";
+ mes "";
+ mes "\"Yes, I already made a prototype but it cost me a lot of time and effort.";
+ mes "I can give it to you if you are willing to pay for my expenses though.\"";
+ menu
+ "What do you want for those silken pants?", L_Spants_Make_Cont_2,
+ "No, I am not particularly interested.", L_close;
+
+L_Spants_Make_Cont_2:
+ if(getarraysize(@spants_req_amt) < 3 || getarraysize(@spants_req$) < 3 || getarraysize(@spants_req_hmn$) < 3)
+ goto L_Spants_Error;
+ mes "[Hetchel the weaver]";
+ mes "";
+ mes "\"I need you to bring me " + @spants_req_amt[0] +" "+ @spants_req_hmn$[0] + ", " + @spants_req_amt[1] +" "+ @spants_req_hmn$[1] + " and " + @spants_req_amt[2] +" "+ @spants_req_hmn$[2];
+ next;
+ mes "You will not have to pay for my time, I am so proud to have accomplished this on my own!\"";
+ menu
+ "\"I have those items with me\"", L_Spants_Pay,
+ "\"I am still looking for them\"", L_close,
+ "\"What do you need again?\"", L_Spants_Make_Cont_2;
+
+L_Spants_Pay:
+ if (countitem(@spants_req$[0]) < @spants_req_amt[0] || countitem(@spants_req$[1]) < @spants_req_amt[1] || countitem(@spants_req$[2]) < @spants_req_amt[2])
+ goto L_Spants_No_Item;
+ getinventorylist;
+ if (@inventorylist_count == 100) goto L_TooMany;
+ mes "Hetchel takes your items.";
+ delitem @spants_req$[0], @spants_req_amt[0];
+ delitem @spants_req$[1], @spants_req_amt[1];
+ delitem @spants_req$[2], @spants_req_amt[2];
+ getitem "SilkPants", 1;
+ @spants_state = 9;
+ callsub S_Update_Spants;
+ next;
+ mes "[Hetchel the weaver]";
+ mes "";
+ mes "\"Here are your pants my dear.";
+ mes "Keep them safe I do not know if I will ever try this again.\"";
+ getexp @spants_reward, @spants_job_reward;
+ goto L_close;
+
+L_Spants_Error:
+ mes "Something went wrong in the script, please inform a developer about that";
+ close;
+
+L_Main_menu:
+ mes "[Hetchel]";
+ mes "\"I have some silk sheets: double-elbow squares.\"";
+ menu
+ "I'm not interested at the moment, maybe later; thanks anyway.", L_close,
+ "Can I buy some?", L_Next;
+
+L_Next:
+ mes "[Hetchel]";
+ mes "";
+ mes "\"Sure but you need to provide raw materials.";
+ 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)
+ goto L_sheet_no_cocoon;
+ goto L_sheet_menu;
+
+L_sheet_menu:
+ menu
+ "I have what you asked for.", L_Next1,
+ "Sorry I didn't pay attention enough, what do you need?", L_how_many_cocoons,
+ "Oops! Sorry, I'll come back soon with them.", L_close;
+
+L_Next1:
+ mes "[Hetchel]";
+ mes "";
+ 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 < @SheetCount * @SHEET_ZENY)
+ goto L_sheet_missing_Zeny;
+ getinventorylist;
+ if (@inventorylist_count == 100 && countitem("SilkSheet") < 1 && countitem("SilkCocoon") > @SheetCount * @SHEET_COCOONS_NR)
+ goto L_TooMany;
+ Zeny = Zeny - @SheetCount * @SHEET_ZENY;
+ delitem "SilkCocoon", @SheetCount * @SHEET_COCOONS_NR;
+ getitem "SilkSheet", @SheetCount;
+ mes "[Hetchel]";
+ mes "";
+ mes "\"Thank you, I hope the sheets will fit your needs.";
+ mes "Please greet Lora for me when you see her.\"";
+ emotion EMOTE_HAPPY, strcharinfo(0);
+ goto L_close;
+
+L_sheet_missing_cocoons:
+ mes "[Hetchel]";
+ mes "";
+ mes "\"I'm sorry, but I need " + @SheetCount * @SHEET_COCOONS_NR + ", not " + countitem("SilkCocoon") + ".\"";
+ goto L_close;
+
+L_sheet_missing_Zeny:
+ mes "[Hetchel]";
+ mes "";
+ 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 " + (@SheetCount * @SHEET_ZENY - Zeny) + " GP short, so come back when you can afford the sheets you asked for!\"";
+ goto L_close;
+
+L_how_many_cocoons:
+ mes "[Hetchel]";
+ mes "";
+ mes "\"I need an average of " + @SHEET_COCOONS_NR + " cocoons per sheet";
+ mes "and also " + @SHEET_ZENY + " GP per sheet for my work.\"";
+ next;
+ goto L_sheet_menu;
+
+L_sheet_no_cocoon:
+ mes "[Hetchel]";
+ mes "";
+ mes "\"You don't have any cocoon? I'm sorry I can't do anything for you.\"";
+ menu
+ "I'll seek for them.", L_close,
+ "Where can I get cocoons?", L_Next2;
+
+L_Next2:
+ mes "[Hetchel]";
+ mes "\"Silk cocoons come from Silkworms. Silkworms live in the woodland area around Hurnscald.";
+ mes "Silkworms like especially woods and dark areas. You can go there by ferry.\"";
+ goto L_close;
+
+
+L_zero_sheet:
+ mes "[Hetchel]";
+ mes "";
+ mes "\"It's the best way to get quickly served!\"";
+ goto L_close;
+
+L_TooMany:
+ mes "[Hetchel]";
+ mes "";
+ mes "\"Your bag hasn't room enough. Store some things and come back.\"";
+ goto L_close;
+
+S_Update_Spants:
+ QUEST_WG_state = (QUEST_WG_state & ~(NIBBLE_2_MASK) | (@spants_state << NIBBLE_2_SHIFT));
+ return;
+
+L_close:
+ QUEST_WG_state = (QUEST_WG_state & ~(NIBBLE_2_MASK) | (@spants_state << NIBBLE_2_SHIFT));
+ @wg_state = 0;
+ @spants_state = 0;
+ @spants_minlvl = 0;
+ @spants_reward = 0;
+ @spants_job_reward = 0;
+ @spants_wipe_thingy = "";
+ @SHEET_COCOONS_NR = 0;
+ @SHEET_ZENY = 0;
+ @SheetCount = 0;
+ @wg_state = 0;
+ cleararray @items$, "", getarraysize(@items$);
+ cleararray @item_names$, "", getarraysize(@item_names$);
+ close;
+}
+
+002-2,73,95,0 script HetchelDebug NPC376,{
+set @wg_state, ((QUEST_WG_state & BYTE_0_MASK) >> BYTE_0_SHIFT);
+set @spants_state, ((QUEST_WG_state & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT);
+
+mes "Lora Tay Quest State: "+ @wg_state;
+mes "Silk Pants Quest State: "+ @spants_state;
+
+menu
+ "Set Lora Tay Quest State", L_Lora_Tay,
+ "Set Silk Pants Quest State", L_Spants,
+ "Close", L_close;
+
+L_Lora_Tay:
+ mes "Set Lora Tay Visited State (0 - reset , 11 - enough for SilkPants Quest)";
+ input @wg_state;
+ goto L_close;
+
+L_Spants:
+ mes "Set SilkPants Quest State (0 - reset)";
+ input @spants_state;
+ goto L_close;
+
+L_close:
+ QUEST_WG_state = (QUEST_WG_state & ~(BYTE_0_MASK) | (@wg_state << BYTE_0_SHIFT));
+ @wg_state = 0;
+ QUEST_WG_state = (QUEST_WG_state & ~(NIBBLE_2_MASK) | (@spants_state << NIBBLE_2_SHIFT));
+ @spants_state = 0;
+ close;
+
+OnInit:
+ if (!debug)
+ disablenpc "HetchelDebug";
+ end;
+}