From 01609ecf05f7637e114dda3d6787286d47a9407b Mon Sep 17 00:00:00 2001 From: CandyCurt Date: Tue, 28 Oct 2014 17:45:29 -0400 Subject: Squeeze WG_QUEST_state into one byte to make room for silk pants quest --- world/map/npc/068-2/hetchel.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'world/map/npc/068-2') diff --git a/world/map/npc/068-2/hetchel.txt b/world/map/npc/068-2/hetchel.txt index 87c3d5af..d5d3fe72 100644 --- a/world/map/npc/068-2/hetchel.txt +++ b/world/map/npc/068-2/hetchel.txt @@ -9,8 +9,8 @@ // // 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). +// @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 @@ -19,11 +19,12 @@ 068-2.gat,62,83,0|script|Hetchel|376, { + set @wg_state, ((QUEST_WG_state & BYTE_0_MASK) >> BYTE_0_SHIFT); set @SHEET_COCOONS_NR, 25; set @SHEET_ZENY, 500; set @SheetCount, 0; - if (QUEST_WG_state < 11) + if (@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?\""; @@ -141,6 +142,6 @@ L_end: set @SHEET_COCOONS_NR, 0; set @SHEET_ZENY, 0; set @SheetCount, 0; + set @wg_state, 0; close; } - -- cgit v1.2.3-70-g09d2 From e26f6a1016d4bf774e93f9540295d8b1066ebeab Mon Sep 17 00:00:00 2001 From: CandyCurt Date: Tue, 28 Oct 2014 17:47:06 -0400 Subject: Add Silk Pants Quest Part to Hetchel --- world/map/npc/068-2/hetchel.txt | 327 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 312 insertions(+), 15 deletions(-) (limited to 'world/map/npc/068-2') diff --git a/world/map/npc/068-2/hetchel.txt b/world/map/npc/068-2/hetchel.txt index d5d3fe72..f76f8d83 100644 --- a/world/map/npc/068-2/hetchel.txt +++ b/world/map/npc/068-2/hetchel.txt @@ -7,8 +7,6 @@ // She could also sell, dyed sheets, Silk robes from Lora Tay. // (6000 with cocoons, 40000 (?) with no cocoons). // -// Hetchel's workshop is actually under repair, Shé'll be back in 021-2 when workers have finished their job. -// // @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. @@ -16,42 +14,286 @@ // 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. 068-2.gat,62,83,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_req_zeny, BaseLevel * BaseLevel * BaseLevel * 100; + 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 < 7 ) goto L_Spants_Steal; + if ( @spants_state == 7 ) 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_end, + "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_end, + "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 heros 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; + 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; + 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 < 6 goto L_Spants_No_Item; + set @spants_state, 7; + 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, 8; + 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_end, + "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_end; +// "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.\""; @@ -64,10 +306,11 @@ 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_end; + "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) @@ -83,24 +326,28 @@ L_Next1: 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_end; + 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_end; + 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_end; + 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; @@ -108,16 +355,17 @@ L_how_many_cocoons: 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_end, + "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_end; + goto L_Close; //L_robe: // mes "[Hetchel]"; @@ -130,18 +378,67 @@ L_Next2: L_zero_sheet: mes "[Hetchel]"; + mes ""; mes "\"It's the best way to get quickly served!\""; - goto L_end; + goto L_Close; L_TooMany: mes "[Hetchel]"; + mes ""; mes "\"Your bag hasn't room enough. Store some things and come back.\""; - goto L_end; + goto L_Close; + +S_Update_Spants: + set QUEST_WG_state, (QUEST_WG_state & ~(NIBBLE_2_MASK) | (@spants_state << NIBBLE_2_SHIFT)); + return; -L_end: +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; } + +068-2.gat,60,83,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-70-g09d2 From 903a645bb61bc3544c509c915cc7d8ac92e392e5 Mon Sep 17 00:00:00 2001 From: mekolat Date: Tue, 28 Oct 2014 18:29:51 -0400 Subject: add missing spaces --- world/map/npc/068-2/hetchel.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'world/map/npc/068-2') diff --git a/world/map/npc/068-2/hetchel.txt b/world/map/npc/068-2/hetchel.txt index f76f8d83..f814616e 100644 --- a/world/map/npc/068-2/hetchel.txt +++ b/world/map/npc/068-2/hetchel.txt @@ -250,7 +250,7 @@ L_Spants_Make_Cont_2: 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]; + 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 -- cgit v1.2.3-70-g09d2 From c455bb35cece052b86f0863cb695c73ee3c4064b Mon Sep 17 00:00:00 2001 From: mekolat Date: Tue, 28 Oct 2014 20:07:09 -0400 Subject: add missing quest part --- world/map/npc/004-5/_import.txt | 1 + world/map/npc/004-5/chest.txt | 31 +++++++++++++++++++++++++++++++ world/map/npc/011-6/crastur.txt | 9 ++++----- world/map/npc/068-2/hetchel.txt | 10 +++++----- 4 files changed, 41 insertions(+), 10 deletions(-) create mode 100644 world/map/npc/004-5/chest.txt (limited to 'world/map/npc/068-2') diff --git a/world/map/npc/004-5/_import.txt b/world/map/npc/004-5/_import.txt index 4d0d3afb..a96bcd25 100644 --- a/world/map/npc/004-5/_import.txt +++ b/world/map/npc/004-5/_import.txt @@ -3,4 +3,5 @@ map: 004-5.gat npc: npc/004-5/_mobs.txt npc: npc/004-5/_warps.txt +npc: npc/004-5/chest.txt npc: npc/004-5/mapflags.txt diff --git a/world/map/npc/004-5/chest.txt b/world/map/npc/004-5/chest.txt new file mode 100644 index 00000000..823ad1ca --- /dev/null +++ b/world/map/npc/004-5/chest.txt @@ -0,0 +1,31 @@ +004-5.gat,89,67,0|script|Old Chest#crastur|111, +{ + setarray @npc_loc, 89, 67, 1; + callfunc "PCtoNPCRange"; + if(@npc_check == 1) goto L_Closer; + set @spants_state, ((QUEST_WG_state & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT); + if(@spants_state > 5) goto L_Looted; + if(@spants_state != 5) goto L_Unknown; + set @spants_state, 6; + getitem "Bandana", 1; + set Zeny, (Zeny + rand(8000,20000)); // give some random loot + mes "This must be the treasure that Crastur was talking about."; + mes "You see a pile of gold and a Bandana on top."; + set QUEST_WG_state, (QUEST_WG_state & ~(NIBBLE_2_MASK) | (@spants_state << NIBBLE_2_SHIFT)); + goto L_Close; + + L_Looted: + mes "You have already looted this chest."; + goto L_Close; + + L_Unknown: + mes "You have no idea how to open this chest."; + goto L_Close; + + L_Closer: + mes "You need to move closer to open the chest."; + goto L_Close; + + L_Close: + close; +} diff --git a/world/map/npc/011-6/crastur.txt b/world/map/npc/011-6/crastur.txt index 429a4852..ae8ca3f5 100644 --- a/world/map/npc/011-6/crastur.txt +++ b/world/map/npc/011-6/crastur.txt @@ -1,10 +1,9 @@ 011-6.gat,172,250,0|script|Crastur the Ugly|418, { set @spants_state, ((QUEST_WG_state & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT); - set @spants_chest, ((QUEST_WG_state & 4096 ) >> 12); if @spants_state < 3 goto L_Regular; if @spants_state == 3 goto L_Ask; - if (@spants_state == 4 || @spants_state == 5) goto L_Ask_Again; + if (@spants_state == 4 || @spants_state == 5 || @spants_state == 6) goto L_Ask_Again; goto L_Main; @@ -100,7 +99,7 @@ L_Pirate_Proof: L_Bandana: getinventorylist; if (countitem("Bandana") < 1) goto L_No_Item; - if (@spants_chest_open == 0) goto L_Wrong_Item; + if (@spants_state != 6) goto L_Wrong_Item; mes "Crasturs gazes at the bandana in your hand. He scratches his right arm, then he nods"; mes "[Crastur]"; mes ""; @@ -113,7 +112,7 @@ L_Bandana: mes "\"Crastur hands you a page ripped out of his Almanach that has dotted lines in green and red Ink all over it"; next; mes "You put the plans into a hidden pocket"; - set @spants_state, 6; + set @spants_state, 7; callsub S_Update_Spants; goto L_Close; @@ -127,7 +126,7 @@ L_Wrong_Item: mes "Crastur takes a look at the bandana."; next; mes "[Crastur]"; - mes "THIS IS NOT FROM THE PIRATES FROM HURNSCALD, it is a cheap scam."; + mes "THIS IS NOT FROM THE PIRATES FROM TULIMSHAR, it is a cheap scam."; emotion EMOTE_PERTURBED; mes "As far as you can tell through his mask he seems very mad"; goto L_Insult; diff --git a/world/map/npc/068-2/hetchel.txt b/world/map/npc/068-2/hetchel.txt index f814616e..0700598f 100644 --- a/world/map/npc/068-2/hetchel.txt +++ b/world/map/npc/068-2/hetchel.txt @@ -37,8 +37,8 @@ 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 < 7 ) goto L_Spants_Steal; - if ( @spants_state == 7 ) goto L_Spants_Make; + if ( @spants_state > 2 && @spants_state < 8 ) goto L_Spants_Steal; + if ( @spants_state == 8 ) goto L_Spants_Make; mes "[Hetchel the weaver]"; mes ""; @@ -216,8 +216,8 @@ L_Spants_Steal_Cont: "No, not yet", L_Close; L_Spants_Steal_Cont2: - if @spants_state < 6 goto L_Spants_No_Item; - set @spants_state, 7; + if @spants_state < 7 goto L_Spants_No_Item; + set @spants_state, 8; callsub S_Update_Spants; mes "[Hetchel the weaver]"; mes ""; @@ -268,7 +268,7 @@ L_Spants_Pay: delitem @spants_req$[1], @spants_req_amt[1]; delitem @spants_req$[2], @spants_req_amt[2]; getitem "SilkPants", 1; - set @spants_state, 8; + set @spants_state, 9; callsub S_Update_Spants; next; mes "[Hetchel the weaver]"; -- cgit v1.2.3-70-g09d2 From e29216fba24a39eaf1b0391d4770bb342335da1d Mon Sep 17 00:00:00 2001 From: mekolat Date: Wed, 29 Oct 2014 12:15:37 -0400 Subject: add missing save points --- world/map/npc/010-2/loratay.txt | 20 +++++++++++++++++--- world/map/npc/068-2/hetchel.txt | 2 ++ 2 files changed, 19 insertions(+), 3 deletions(-) (limited to 'world/map/npc/068-2') diff --git a/world/map/npc/010-2/loratay.txt b/world/map/npc/010-2/loratay.txt index 90a44ab5..9d98cdaa 100644 --- a/world/map/npc/010-2/loratay.txt +++ b/world/map/npc/010-2/loratay.txt @@ -106,8 +106,12 @@ L_agostine_1: mes "[Lora Tay the Seamstress]"; mes "Angry red spots begin to form on her cheeks."; mes "\"Get those... things out of my sight before I forget myself!\""; - if (@wg_state == 9) - set @wg_state, 10; + if (@wg_state == 9) goto L_Next13; + goto L_Close; + +L_Next13: + set @wg_state, 10; + callsub S_Update; goto L_Close; L_agostine_menu: @@ -211,6 +215,7 @@ L_give_water: goto L_no_water; delitem "BottleOfWater", 1; set @wg_state, 11; + callsub S_Update; set @xpval, 50000; @@ -297,6 +302,7 @@ L_Next2: mes "Go see Agostine, ask him what he's planning and I will think about it.\""; set @wg_state, 13; + callsub S_Update; goto L_Close; L_proposal_intro: @@ -347,6 +353,7 @@ L_proposal_search_items: L_Next5: set @wg_state, 15; + callsub S_Update; goto L_Close; L_proposal_not_enough_items: @@ -359,6 +366,7 @@ L_proposal_give_items: goto L_proposal_not_enough_items; delitem "SilkCocoon", @FINEDRESS_COCOONS; set @wg_state, 16; + callsub S_Update; mes "[Lora Tay the Seamstress]"; mes "\"Great, now I can spin the silk threading and fix this mess made of these fine materials."; @@ -388,6 +396,7 @@ L_Next6: mes "I am done with the threading but I will now need to sew these materials together into the design.\""; next; set @wg_state, 18; + callsub S_Update; goto L_proposal_wait_dress_finished; L_proposal_wait_dress_finished: @@ -403,6 +412,7 @@ L_proposal_wait_dress_finished: L_proposal_dress_finished: set @wg_state, 19; + callsub S_Update; mes "[Lora Tay the Seamstress]"; mes "\"Well it was difficult seaming with such fragile materials."; mes "But I have done it. The design is finished except for one part of it.\""; @@ -426,6 +436,7 @@ L_Next7: L_Next8: set @wg_state, 20; + callsub S_Update; goto L_Close; L_proposal_deliver_dress: @@ -1130,8 +1141,11 @@ L_CleanSorcererRobe: set @cotton_cloth_id, 0; goto L_Close; -L_Close: +S_Update: set QUEST_WG_state, (QUEST_WG_state & ~(BYTE_0_MASK) | (@wg_state << BYTE_0_SHIFT)); + return; + +L_Close: set @wg_state, 0; close; } diff --git a/world/map/npc/068-2/hetchel.txt b/world/map/npc/068-2/hetchel.txt index 0700598f..4bcf4cb4 100644 --- a/world/map/npc/068-2/hetchel.txt +++ b/world/map/npc/068-2/hetchel.txt @@ -188,6 +188,7 @@ L_Spants_Cry_Cont_3: 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."; @@ -204,6 +205,7 @@ L_Spants_Reply_Cry: mes ""; mes "\"...\""; set @spants_state, 1; + callsub S_Update_Spants; goto L_Close; -- cgit v1.2.3-70-g09d2 From f8824adb305b804542a2ef4ebcdafa12dec9dcd3 Mon Sep 17 00:00:00 2001 From: wushin Date: Fri, 31 Oct 2014 11:21:14 -0500 Subject: Removed unused variable Correct minor typo --- world/map/npc/068-2/hetchel.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'world/map/npc/068-2') diff --git a/world/map/npc/068-2/hetchel.txt b/world/map/npc/068-2/hetchel.txt index 4bcf4cb4..a14b64bd 100644 --- a/world/map/npc/068-2/hetchel.txt +++ b/world/map/npc/068-2/hetchel.txt @@ -27,7 +27,6 @@ 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_req_zeny, BaseLevel * BaseLevel * BaseLevel * 100; set @spants_reward, 45000; set @spants_job_reward, 10000; set @SheetCount, 0; @@ -127,7 +126,7 @@ L_Spants_Wipe_Tears: 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"; + 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: @@ -195,7 +194,7 @@ L_Spants_Cry_Cont_4: 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 "[Hetchel the weaver]"; mes ""; mes "Please please please - I need those plans"; goto L_Close; -- cgit v1.2.3-70-g09d2