From 61c88ec162713b980f30e6e5111c1cfbd9f23d3a Mon Sep 17 00:00:00 2001 From: wushin Date: Wed, 7 Jan 2015 21:04:38 -0600 Subject: Adjust rest of world to Match new tutorial --- world/map/npc/002-2/hetchel.txt | 445 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 445 insertions(+) create mode 100644 world/map/npc/002-2/hetchel.txt (limited to 'world/map/npc/002-2/hetchel.txt') diff --git a/world/map/npc/002-2/hetchel.txt b/world/map/npc/002-2/hetchel.txt new file mode 100644 index 00000000..b595bd88 --- /dev/null +++ b/world/map/npc/002-2/hetchel.txt @@ -0,0 +1,445 @@ +// Hetchel the Silk Weaver +// bh28 +// 2013-03, GPLv2. +// +// 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. +// (6000 with cocoons, 40000 (?) with no cocoons). +// +// @wg_state: variable indicating winter gloves status. +// Lora Tay proposes silk Robe if (@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). +// +// @silkpants_state: variable indicating silkpant quest status. + +002-2.gat,76,92,0|script|Hetchel|376 +{ + set @wg_state, ((QUEST_WG_state & BYTE_0_MASK) >> BYTE_0_SHIFT); + set @spants_state, ((QUEST_WG_state & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT); + set @SHEET_COCOONS_NR, 25; + set @SHEET_ZENY, 500; + set @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; + set @spants_reward, 45000; + set @spants_job_reward, 10000; + set @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_Wipe_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_Wipe_Tears, + "\"Oh really? Just sell me some Silk Sheets if you have them\"", L_main_menu; + +L_Spants_Wipe_Tears: + mes "Hand Hetchel a (please type the Item you want to give her)"; + next; + mes "This is case sensitive. Also do not enter whitespaces."; + input @spants_wipe_thingy$; + if (@spants_wipe_thingy$ == "") goto L_Spants_Wrong; + if (countitem(@spants_wipe_thingy$) < 1) goto L_Spants_No_Item; + if (@spants_wipe_thingy$ == "RedCottonCloth") goto L_Spants_Wipe_Tears_Cont; + if (@spants_wipe_thingy$ == "RedHitchhikersTowel") goto L_Spants_Wipe_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_Wipe_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_Wrong: + mes "It appears you forgot to type the item you want to give."; + goto L_Close; + +L_Spants_No_Item: + mes "Oh you do not have it."; + goto L_Close; + +L_Spants_Wipe_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; + set @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: + set @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 "\"...\""; + set @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; + set @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; + set @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; +// "Do you have a silk robe I could buy?", L_robe, +// "Goodbye.", L_Close; + +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; + set 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; + 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_robe: +// mes "[Hetchel]"; +// mes "\"I am not a seamstress but I have a few silk robes from Lora Tay left."; +// mes "It is not your size as Lora made them for me, but Tondar was kind enough"; +// mes "to cast a spell on it, so that it will fit to you as soon as you wear it."; +// mes "However his prices are not that low.\""; +// next; +// goto L_main_menu; + +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: + set QUEST_WG_state, (QUEST_WG_state & ~(NIBBLE_2_MASK) | (@spants_state << NIBBLE_2_SHIFT)); + return; + +L_Close: + set QUEST_WG_state, (QUEST_WG_state & ~(NIBBLE_2_MASK) | (@spants_state << NIBBLE_2_SHIFT)); + set @wg_state, 0; + set @spants_state, 0; + set @spants_minlvl, 0; + set @spants_reward, 0; + set @spants_job_reward, 0; + set @spants_wipe_thingy, ""; + set @SHEET_COCOONS_NR, 0; + set @SHEET_ZENY, 0; + set @SheetCount, 0; + set @wg_state, 0; + close; +} + +002-2.gat,73,95,0|script|HetchelDebug|376 +{ +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: + set QUEST_WG_state, (QUEST_WG_state & ~(BYTE_0_MASK) | (@wg_state << BYTE_0_SHIFT)); + set @wg_state, 0; + set QUEST_WG_state, (QUEST_WG_state & ~(NIBBLE_2_MASK) | (@spants_state << NIBBLE_2_SHIFT)); + set @spants_state, 0; + close; + +OnInit: + if (!debug) + disablenpc "HetchelDebug"; + end; +} -- cgit v1.2.3-60-g2f50