From cb20cc91188d46f5b7709bf60450f5b84abd0083 Mon Sep 17 00:00:00 2001 From: The Kandiman Date: Wed, 31 Aug 2011 12:16:25 -0400 Subject: Tab conversion project. Maps 003-1 through 006-1 complete. --- world/map/npc/006-1/pachua.txt | 486 ++++++++++++++++++++--------------------- 1 file changed, 242 insertions(+), 244 deletions(-) (limited to 'world/map/npc/006-1/pachua.txt') diff --git a/world/map/npc/006-1/pachua.txt b/world/map/npc/006-1/pachua.txt index c1bfb83f..ace4ba9a 100644 --- a/world/map/npc/006-1/pachua.txt +++ b/world/map/npc/006-1/pachua.txt @@ -1,311 +1,309 @@ -006-1.gat,23,100,0 script Pachua 143,{ +006-1.gat,23,100,0|script|Pachua|143,{ - set @LEATHER_PATCH_PRICE, 300; - set @wants_leather_patch, QUEST_Forestbow_state & NIBBLE_4_MASK; + set @LEATHER_PATCH_PRICE, 300; + set @wants_leather_patch, QUEST_Forestbow_state & NIBBLE_4_MASK; // lines belong to easter 2011: -// set @month, 4; -// set @start_day, 15; -// set @end_day, 30; +// set @month, 4; +// set @start_day, 15; +// set @end_day, 30; - if (QUEST_MIRIAM_cheat != 0) goto L_warp_cheat; - if (QUEST_MIRIAM_start != 0) goto L_smoke; + if (QUEST_MIRIAM_cheat != 0) goto L_warp_cheat; + if (QUEST_MIRIAM_start != 0) goto L_smoke; // lines belong to easter 2011: -// if (gettime(6) == @month && gettime(5) >= @start_day && gettime(5) <= @end_day && QUEST_Easter11 == 1) goto L_Basket; -// if (gettime(6) == @month && gettime(5) >= @start_day && gettime(5) <= @end_day && QUEST_Easter11 == 2) goto L_MakeBasket; -// if (gettime(6) == @month && gettime(5) >= @start_day && gettime(5) <= @end_day && QUEST_Easter11 == 3) goto L_SeeBunny; +// if (gettime(6) == @month && gettime(5) >= @start_day && gettime(5) <= @end_day && QUEST_Easter11 == 1) goto L_Basket; +// if (gettime(6) == @month && gettime(5) >= @start_day && gettime(5) <= @end_day && QUEST_Easter11 == 2) goto L_MakeBasket; +// if (gettime(6) == @month && gettime(5) >= @start_day && gettime(5) <= @end_day && QUEST_Easter11 == 3) goto L_SeeBunny; L_Begin: - mes "[Chief Pachua]"; - mes ""; - mes "\"How!\""; - next; + mes "[Chief Pachua]"; + mes ""; + mes "\"How!\""; + next; - if (getequipid(equip_head) == 643 || getequipid(equip_head) == 644) goto L_WearingCowboy; - if (getequipid(equip_legs) == 642) goto L_WearingChaps; + if (getequipid(equip_head) == 643 || getequipid(equip_head) == 644) goto L_WearingCowboy; + if (getequipid(equip_legs) == 642) goto L_WearingChaps; - mes "[Chief Pachua]"; - mes ""; - mes "\"For generations my tribe has been crafting special clothes out of different items.\""; - next; + mes "[Chief Pachua]"; + mes ""; + mes "\"For generations my tribe has been crafting special clothes out of different items.\""; + next; L_Check_Shops: - if((countitem("JeansShorts") > 0 && countitem("SnakeSkin") > 9) && (countitem("FancyHat") > 0 && countitem("SnakeSkin") > 1)) goto L_Super_store; - if(countitem("JeansShorts") > 0 && countitem("SnakeSkin") > 9) goto L_Chaps_store; - if(countitem("FancyHat") > 0 && countitem("SnakeSkin") > 1) goto L_Cowboy_store; - - mes "[Chief Pachua]"; - mes ""; - mes "\"Maybe if you bring me the right materials I can make something for you.\""; - next; - - if (@wants_leather_patch) - menu "Wait, can you make a leather patch for me?", L_leather_patch, - "OK, bye.", -; - - close; + if((countitem("JeansShorts") > 0 && countitem("SnakeSkin") > 9) && (countitem("FancyHat") > 0 && countitem("SnakeSkin") > 1)) goto L_Super_store; + if(countitem("JeansShorts") > 0 && countitem("SnakeSkin") > 9) goto L_Chaps_store; + if(countitem("FancyHat") > 0 && countitem("SnakeSkin") > 1) goto L_Cowboy_store; + + mes "[Chief Pachua]"; + mes ""; + mes "\"Maybe if you bring me the right materials I can make something for you.\""; + next; + if (@wants_leather_patch) + menu + "Wait, can you make a leather patch for me?", L_leather_patch, + "OK, bye.", -; + close; L_CheckStuff: - mes "[Chief Pachua]"; - mes ""; - mes "\"Let me see what you have there.\""; - next; - return; + mes "[Chief Pachua]"; + mes ""; + mes "\"Let me see what you have there.\""; + next; + return; L_Super_store: - callsub L_CheckStuff; - mes "[Chief Pachua]"; - mes ""; - mes "\"Ahh you have lots of good items to work with.\""; - mes ""; - mes "\"With them I can make you either"; - mes "a Cowboy hat or Snake Skin Chaps\""; - next; - if (@wants_leather_patch) - menu - "Cowboy hat, please.", L_BuyCowboy, - "Snake Skin Chaps sound good.", L_BuyChaps, - "Can you make a leather patch?", L_leather_patch, - "Not now, maybe later.", L_NoDeal; - if (!@wants_leather_patch) - menu - "Cowboy hat, please.", L_BuyCowboy, - "Snake Skin Chaps sound good.", L_BuyChaps, - "Not now, maybe later.", L_NoDeal; + callsub L_CheckStuff; + mes "[Chief Pachua]"; + mes ""; + mes "\"Ahh you have lots of good items to work with.\""; + mes ""; + mes "\"With them I can make you either"; + mes "a Cowboy hat or Snake Skin Chaps\""; + next; + if (@wants_leather_patch) + menu + "Cowboy hat, please.", L_BuyCowboy, + "Snake Skin Chaps sound good.", L_BuyChaps, + "Can you make a leather patch?", L_leather_patch, + "Not now, maybe later.", L_NoDeal; + if (!@wants_leather_patch) + menu + "Cowboy hat, please.", L_BuyCowboy, + "Snake Skin Chaps sound good.", L_BuyChaps, + "Not now, maybe later.", L_NoDeal; L_Cowboy_store: - callsub L_CheckStuff; - mes "[Chief Pachua]"; - mes ""; - mes "\"To make you a Cowboy hat I will need:"; - mes "1 Fancy hat"; - mes "2 Snake skins"; - mes "5.000 GP\""; - mes ""; - mes "\"Do we have a deal?\""; - next; - if (@wants_leather_patch) - menu - "Yes, that's fine.", L_BuyCowboy, - "Can you make a leather patch?", L_leather_patch, - "On second thought, maybe later.", L_NoDeal; - if (!@wants_leather_patch) - menu - "Yes, that's fine.", L_BuyCowboy, - "On second thought, maybe later.", L_NoDeal; + callsub L_CheckStuff; + mes "[Chief Pachua]"; + mes ""; + mes "\"To make you a Cowboy hat I will need:"; + mes "1 Fancy hat"; + mes "2 Snake skins"; + mes "5.000 GP\""; + mes ""; + mes "\"Do we have a deal?\""; + next; + if (@wants_leather_patch) + menu + "Yes, that's fine.", L_BuyCowboy, + "Can you make a leather patch?", L_leather_patch, + "On second thought, maybe later.", L_NoDeal; + if (!@wants_leather_patch) + menu + "Yes, that's fine.", L_BuyCowboy, + "On second thought, maybe later.", L_NoDeal; L_Chaps_store: - callsub L_CheckStuff; - mes "[Chief Pachua]"; - mes ""; - mes "\"To make you a pair of Snake Skin Chaps I will need:"; - mes "1 Jeans Shorts"; - mes "10 Snake skins"; - mes "10.000 GP\""; - mes ""; - mes "\"Do we have a deal?\""; - next; - if (!@wants_leather_patch) - menu - "Yes, that's fine.", L_BuyChaps, - "On second thought, maybe later.", L_NoDeal; - if (@wants_leather_patch) - menu - "Yes, that's fine.", L_BuyChaps, - "Can you make a leather patch?", L_leather_patch, - "On second thought, maybe later.", L_NoDeal; + callsub L_CheckStuff; + mes "[Chief Pachua]"; + mes ""; + mes "\"To make you a pair of Snake Skin Chaps I will need:"; + mes "1 Jeans Shorts"; + mes "10 Snake skins"; + mes "10.000 GP\""; + mes ""; + mes "\"Do we have a deal?\""; + next; + if (!@wants_leather_patch) + menu + "Yes, that's fine.", L_BuyChaps, + "On second thought, maybe later.", L_NoDeal; + if (@wants_leather_patch) + menu + "Yes, that's fine.", L_BuyChaps, + "Can you make a leather patch?", L_leather_patch, + "On second thought, maybe later.", L_NoDeal; L_BuyChaps: - if (zeny < 10000) goto L_NoMoney; - if (countitem("JeansShorts") < 1) goto L_NoJeans; - if (countitem("SnakeSkin") < 10) goto L_NoSkin; - set zeny, zeny - 10000; - delitem "SnakeSkin", 10; - delitem "JeansShorts", 1; - getitem "JeansChaps", 1; - goto L_DealDone; + if (zeny < 10000) goto L_NoMoney; + if (countitem("JeansShorts") < 1) goto L_NoJeans; + if (countitem("SnakeSkin") < 10) goto L_NoSkin; + set zeny, zeny - 10000; + delitem "SnakeSkin", 10; + delitem "JeansShorts", 1; + getitem "JeansChaps", 1; + goto L_DealDone; L_BuyCowboy: - if (zeny < 5000) goto L_NoMoney; - if (countitem("FancyHat") < 1) goto L_NoFancy; - if (countitem("SnakeSkin") < 2) goto L_NoSkin; - set zeny, zeny - 5000; - delitem "SnakeSkin", 2; - delitem "FancyHat", 1; - set @temp,rand(2); - if(@temp == 0) goto L_Cowboy_white; - goto L_Cowboy_black; + if (zeny < 5000) goto L_NoMoney; + if (countitem("FancyHat") < 1) goto L_NoFancy; + if (countitem("SnakeSkin") < 2) goto L_NoSkin; + set zeny, zeny - 5000; + delitem "SnakeSkin", 2; + delitem "FancyHat", 1; + set @temp,rand(2); + if(@temp == 0) goto L_Cowboy_white; + goto L_Cowboy_black; L_Cowboy_white: - getitem "WhiteCowboyHat", 1; - goto L_DealDone; + getitem "WhiteCowboyHat", 1; + goto L_DealDone; L_Cowboy_black: - getitem "BlackCowboyHat", 1; - goto L_DealDone; + getitem "BlackCowboyHat", 1; + goto L_DealDone; L_leather_patch: - mes "[Chief Pachua]"; - mes ""; - mes "\"If you just want a piece of leather, then yes, I can make that. Bring me a snake skin and " + @LEATHER_PATCH_PRICE + " GP.\""; - next; - - menu "Here you are.", -, - "OK, I'll be back later.", L_End, - "That's too expensive!.", L_NoDeal; - - if (countitem("SnakeSkin") < 1) goto L_NoSkins; - if (zeny < @LEATHER_PATCH_PRICE) goto L_NoMoney; - getinventorylist; - if (@inventorylist_count == 100 && countitem("SnakeSkin") > 1) goto L_TooMany; - - set zeny, zeny - @LEATHER_PATCH_PRICE; - delitem "SnakeSkin", 1; - getitem "LeatherPatch", 1; - goto L_DealDone; + mes "[Chief Pachua]"; + mes ""; + mes "\"If you just want a piece of leather, then yes, I can make that. Bring me a snake skin and " + @LEATHER_PATCH_PRICE + " GP.\""; + next; + menu + "Here you are.", -, + "OK, I'll be back later.", L_End, + "That's too expensive!.", L_NoDeal; + + if (countitem("SnakeSkin") < 1) goto L_NoSkins; + if (zeny < @LEATHER_PATCH_PRICE) goto L_NoMoney; + getinventorylist; + if (@inventorylist_count == 100 && countitem("SnakeSkin") > 1) goto L_TooMany; + + set zeny, zeny - @LEATHER_PATCH_PRICE; + delitem "SnakeSkin", 1; + getitem "LeatherPatch", 1; + goto L_DealDone; L_DealDone: - mes "[Chief Pachua]"; - mes ""; - mes "\"Here you are!\""; - mes ""; - mes "\"Come back any time.\""; - close; + mes "[Chief Pachua]"; + mes ""; + mes "\"Here you are!\""; + mes ""; + mes "\"Come back any time.\""; + close; L_NoDeal: - mes "[Chief Pachua]"; - mes ""; - mes "\"Alright, but you won't get a better deal anywhere else!\""; - close; + mes "[Chief Pachua]"; + mes ""; + mes "\"Alright, but you won't get a better deal anywhere else!\""; + close; L_NoMoney: - mes "[Chief Pachua]"; - mes ""; - mes "\"Oh dear, it seems you don't have enough money.\""; - close; + mes "[Chief Pachua]"; + mes ""; + mes "\"Oh dear, it seems you don't have enough money.\""; + close; L_NoJeans: - mes "[Chief Pachua]"; - mes ""; - mes "\"Oh dear, it seems you don't have enough jeans shorts.\""; - close; + mes "[Chief Pachua]"; + mes ""; + mes "\"Oh dear, it seems you don't have enough jeans shorts.\""; + close; L_NoFancy: - mes "[Chief Pachua]"; - mes ""; - mes "\"Oh dear, it seems you don't have enough fancy hats.\""; - close; + mes "[Chief Pachua]"; + mes ""; + mes "\"Oh dear, it seems you don't have enough fancy hats.\""; + close; L_NoSkins: - mes "[Chief Pachua]"; - mes ""; - mes "\"Oh dear, it seems you don't have enough snake skins.\""; - close; + mes "[Chief Pachua]"; + mes ""; + mes "\"Oh dear, it seems you don't have enough snake skins.\""; + close; L_WearingCowboy: - mes "[Chief Pachua]"; - mes ""; - mes "\"Ah, I see that you are wearing a hat made with the ancient methods of my tribe.\""; - next; - goto L_Check_Shops; + mes "[Chief Pachua]"; + mes ""; + mes "\"Ah, I see that you are wearing a hat made with the ancient methods of my tribe.\""; + next; + goto L_Check_Shops; L_WearingChaps: - mes "[Chief Pachua]"; - mes ""; - mes "\"Ah, I see that you are wearing pants made by my tribe.\""; - next; - goto L_Check_Shops; + mes "[Chief Pachua]"; + mes ""; + mes "\"Ah, I see that you are wearing pants made by my tribe.\""; + next; + goto L_Check_Shops; L_End: - close; + close; L_TooMany: - mes "[Chief Pachua]"; - mes ""; - mes "\"You don't have room for a leather patch. Come back later.\""; - close; + mes "[Chief Pachua]"; + mes ""; + mes "\"You don't have room for a leather patch. Come back later.\""; + close; L_smoke: - message strcharinfo(0), "Pachua quickly inhales from his pipe and releases a ring of smoke towards the sky!"; - set QUEST_MIRIAM_run, gettimetick(2) - QUEST_MIRIAM_start; - set QUEST_MIRIAM_start, 0; - end; + message strcharinfo(0), "Pachua quickly inhales from his pipe and releases a ring of smoke towards the sky!"; + set QUEST_MIRIAM_run, gettimetick(2) - QUEST_MIRIAM_start; + set QUEST_MIRIAM_start, 0; + end; L_warp_cheat: - if (@warp_cheat == 1) goto L_Begin; - message strcharinfo(0), "Pachua releases a ring of smoke towards the sky! But, by the look on his face, you can tell he is suspicious about your methods..."; - set @warp_cheat, 1; - end; + if (@warp_cheat == 1) goto L_Begin; + message strcharinfo(0), "Pachua releases a ring of smoke towards the sky! But, by the look on his face, you can tell he is suspicious about your methods..."; + set @warp_cheat, 1; + end; L_Basket: - mes "[Chief Pachua]"; - mes ""; - mes "\"For generations my tribe has been crafting special clothes out of different items.\""; - mes "\"Maybe if you bring me the right materials I can make something for you.\""; - next; - menu - "Do you work only with clothes? Because I was looking for a basket.", -; - mes "\"A basket? In our tribe, we craft baskets of all kinds using only reeds. This basket, you need it to carry your items?\""; - menu - "No. It is for the Easter Bunny. I offered to get him one.", -; - mes "\"I appreciate your attitude. Maybe I can help you with that.\""; - menu - "I would be really grateful if you could do that!", -, - "Nah, I decided not to do that stupid quest.", L_End, - "I would prefer to talk to you about other stuff.", L_Begin; //should go to pachuas's regular chat - set QUEST_Easter11, 2; + mes "[Chief Pachua]"; + mes ""; + mes "\"For generations my tribe has been crafting special clothes out of different items.\""; + mes "\"Maybe if you bring me the right materials I can make something for you.\""; + next; + menu + "Do you work only with clothes? Because I was looking for a basket.", -; + mes "\"A basket? In our tribe, we craft baskets of all kinds using only reeds. This basket, you need it to carry your items?\""; + menu + "No. It is for the Easter Bunny. I offered to get him one.", -; + mes "\"I appreciate your attitude. Maybe I can help you with that.\""; + menu + "I would be really grateful if you could do that!", -, + "Nah, I decided not to do that stupid quest.", L_End, + "I would prefer to talk to you about other stuff.", L_Begin; //should go to pachuas's regular chat + set QUEST_Easter11, 2; L_MakeBasket: - mes "[Chief Pachua]"; - mes ""; - mes "\"I will need you to gather reeds for me.\""; - mes "\"5 bundles should do it.\""; - mes "\"You should be able to get those from mouboos as they graze.\""; - menu - "I have the Reeds!", -, - "Ok, I will be back soon", L_End, - "I changed my mind, forget about it", L_End, - "Can I talk to you about another stuff?", L_Begin; //should go to pachuas's regular chat - - if(countitem("ReedBundle") < 5) goto L_EasterNotEnough; - if(countitem("ReedBundle") >= 5) goto L_EasterEnough; - close; + mes "[Chief Pachua]"; + mes ""; + mes "\"I will need you to gather reeds for me.\""; + mes "\"5 bundles should do it.\""; + mes "\"You should be able to get those from mouboos as they graze.\""; + menu + "I have the Reeds!", -, + "Ok, I will be back soon", L_End, + "I changed my mind, forget about it", L_End, + "Can I talk to you about another stuff?", L_Begin; //should go to pachuas's regular chat + + if(countitem("ReedBundle") < 5) goto L_EasterNotEnough; + if(countitem("ReedBundle") >= 5) goto L_EasterEnough; + close; L_EasterNotEnough: - mes "[Chief Pachua]"; - mes ""; - mes "\"You do not have enough Reed Bundles for me to work with.\""; - mes "\"Go gather more.\""; - close; + mes "[Chief Pachua]"; + mes ""; + mes "\"You do not have enough Reed Bundles for me to work with.\""; + mes "\"Go gather more.\""; + close; L_EasterEnough: - getinventorylist; - if (@inventorylist_count == 100 && countitem("ReedBundle") > 5) goto L_EasterTooMany; - if(countitem("ReedBundle") < 5) goto L_EasterNotEnough; - delitem "ReedBundle", 5; - getitem "EasterBasket", 1; - set QUEST_Easter11, 3; - mes "[Chief Pachua]"; - mes ""; - mes "\"You have gathered enough reeds for me to make the basket.\""; - mes "He skillfully soaks the reeds you brought him,"; - mes "then swiftly weaves them into a basket shape."; - mes "Next, he places the damp basket in the sun to dry for a minute before handing it over to you."; - mes "\"Here is your Easter Basket.\""; - close; + getinventorylist; + if (@inventorylist_count == 100 && countitem("ReedBundle") > 5) goto L_EasterTooMany; + if(countitem("ReedBundle") < 5) goto L_EasterNotEnough; + delitem "ReedBundle", 5; + getitem "EasterBasket", 1; + set QUEST_Easter11, 3; + mes "[Chief Pachua]"; + mes ""; + mes "\"You have gathered enough reeds for me to make the basket.\""; + mes "He skillfully soaks the reeds you brought him,"; + mes "then swiftly weaves them into a basket shape."; + mes "Next, he places the damp basket in the sun to dry for a minute before handing it over to you."; + mes "\"Here is your Easter Basket.\""; + close; L_EasterTooMany: - mes "[Chief Pachua]"; - mes ""; - mes "\"You don't have room for the Easter Basket. Come back later.\""; - close; + mes "[Chief Pachua]"; + mes ""; + mes "\"You don't have room for the Easter Basket. Come back later.\""; + close; L_SeeBunny: - mes "[Chief Pachua]"; - mes ""; - mes "\"You need to return to the Easter Bunny now.\""; - next; - goto L_Begin; - + mes "[Chief Pachua]"; + mes ""; + mes "\"You need to return to the Easter Bunny now.\""; + next; + goto L_Begin; } -- cgit v1.2.3-70-g09d2 From d73153db035a6527635844b2da8723d3e8759292 Mon Sep 17 00:00:00 2001 From: coffee Date: Mon, 5 Sep 2011 09:13:26 -0300 Subject: Clear temporary variables after you close npc window. Npcs from maps 005-1 and 006-1. --- world/map/npc/005-1/spirit.txt | 22 +++++++++++++++---- world/map/npc/005-1/tree.txt | 44 ++++++++++++++++++++++++++------------ world/map/npc/006-1/pachua.txt | 48 ++++++++++++++++++++++++------------------ 3 files changed, 75 insertions(+), 39 deletions(-) (limited to 'world/map/npc/006-1/pachua.txt') diff --git a/world/map/npc/005-1/spirit.txt b/world/map/npc/005-1/spirit.txt index dd0f9e65..c39a74d3 100644 --- a/world/map/npc/005-1/spirit.txt +++ b/world/map/npc/005-1/spirit.txt @@ -35,7 +35,7 @@ L_message: next; menu "Who, me?", -, - "Leave me alone!", L_close, + "Leave me alone!", L_Close, "Aaah! I'm hearing voices!", L_silly_close; mes "[Well]"; mes "\"I'm in here, in the well, talking to you! If I'm not very mistaken, you are a powerful wizard-to-be, except that nobody has showed you how to properly do magic yet!\""; @@ -43,7 +43,7 @@ L_message: menu "Who are you?", -, "Aaaah! The voices are after me!", L_silly_close, - "Whatever it is, I'm not interested.", L_close; + "Whatever it is, I'm not interested.", L_Close; mes "[Earth Spirit]"; mes "\"I'm an earth spirit; my name isn't important... all that matters is that I like you, and that I will help you become a powerful wizard if you help me. Just a fair deal, no more than that...\""; next; @@ -63,7 +63,7 @@ L_main: "Can you teach me magic and spells?", L_Q_magic, "What do you know about...", L_Q, "Goodbye!", -; - close; + goto L_Close; L_Q_trapped: mes "[Earth Spirit]"; @@ -253,7 +253,21 @@ L_silly_close: mes "[Well]"; mes "\"Silly " + @s$ + ".\""; -L_close: +L_Close: + set @Q_MASK, 0; + set @Q_SHIFT, 0; + set @Q_status, 0; + set @SUP_id, 0; + set @SUP_name$, ""; + set @SUP_xp, 0; + set @SUP_lvl, 0; + set @Q_STATUS_INITIAL, 0; + set @Q_STATUS_ONQUEST, 0; + set @Q_STATUS_STUDENT0, 0; + set @Q_STATUS_STUDENT1, 0; + set @Q_STATUS_STUDENT2, 0; + set @Q_STATUS_STUDENT3, 0; + set @s$, ""; close; S_update_var: diff --git a/world/map/npc/005-1/tree.txt b/world/map/npc/005-1/tree.txt index bd7a0a6d..859843c6 100644 --- a/world/map/npc/005-1/tree.txt +++ b/world/map/npc/005-1/tree.txt @@ -6,7 +6,7 @@ function|script|QuestTreeTrigger|{ set @Q_status_lower, @Q_status & 3; set @Q_status, (@Q_status & 12) >> 2; - if (@Q_status & @flag) close; // already did that + if (@Q_status & @flag) goto L_Close; // already did that if (@flag == 2) goto L_hug; @@ -14,22 +14,31 @@ L_cont: set @Q_status, @Q_status | @flag; callsub S_update_var; - if (@Q_status != 3) close; + if (@Q_status != 3) goto L_Close; - if (MAGIC_FLAGS & MFLAG_DID_CUTTREE) close; + if (MAGIC_FLAGS & MFLAG_DID_CUTTREE) goto L_Close; mes "Maybe it is just a trick of the light, but you can't help but think that the tree looks different... healthier, almost younger."; mes "[20000 experience points]"; getexp 20000, 0; set @value, 15; callfunc "QuestSagathaHappy"; - close; + goto L_Close; L_hug: mes "You hug the tree."; next; goto L_cont; +L_Close: + set @Q_MASK, 0; + set @Q_SHIFT, 0; + set @Q_status, 0; + set @Q_status_lower, 0; + set @Q_wr_status, 0; + set @value, 0; + close; + S_update_var: set @Q_wr_status, (@Q_status << 2) | @Q_status_lower; set QUEST_MAGIC, (QUEST_MAGIC & ~(@Q_MASK) | (@Q_wr_status << @Q_SHIFT)); @@ -54,7 +63,7 @@ function|script|QuestTreeTouch|{ mes "[Dying Tree]"; mes "You see a strange tree."; - close; + goto L_Close; L_cut: mes "[Dying Tree]"; @@ -63,7 +72,7 @@ L_cut: menu "Cut off a branch", L_do_cut, "Leave it alone", -; - close; + goto L_Close; L_water: mes "[Dying Tree]"; @@ -73,7 +82,7 @@ L_water: "Water the tree", L_givewater, "Kiss tree", L_kiss, "Leave it alone", -; - close; + goto L_Close; L_both: mes "[Dying Tree]"; @@ -84,7 +93,7 @@ L_both: "Kiss tree", L_kiss, "Cut off a branch", L_do_cut, "Leave it alone", -; - close; + goto L_Close; L_givewater: if (countitem("BottleOfWater") < 1) goto L_no_water; @@ -93,18 +102,18 @@ L_givewater: mes "[Dying Tree]"; mes "You pour a bottle of water into the sand. The water dissipates quickly, without any effect."; - close; + goto L_Close; L_no_water: mes "[Dying Tree]"; mes "You don't have any water."; - close; + goto L_Close; L_kiss: mes "[Dying Tree]"; mes "You pluck out a splinter from your lip."; mes "Somehow, you don't think that this helped."; - close; + goto L_Close; L_do_cut: if (countitem(570) < 1) goto L_no_boneknife; @@ -119,7 +128,7 @@ L_do_cut: menu "Nah... better not.", -, "Yes, let's cut!", L_really_cut; - close; + goto L_Close; L_really_cut: set MAGIC_FLAGS, MAGIC_FLAGS | MFLAG_DID_CUTTREE; @@ -127,17 +136,24 @@ L_really_cut: mes "[Dying Tree]"; mes "You cut off a branch from the tree."; mes "For an instant, you have an uneasy feeling, as if the branch were writhing in your hand..."; - close; + goto L_Close; L_no_boneknife: mes "[Dying Tree]"; mes "Try as you might, you can't seem to find a way to cut off a branch. Perhaps you need a different tool for cutting?"; - close; + goto L_Close; L_happy: mes "[Druid Tree]"; mes "The tree looks younger and healthier now."; + goto L_Close; + +L_Close: + set @Q_MASK, 0; + set @Q_SHIFT, 0; + set @Q_status, 0; close; + } 005-1.gat,79,41,0|script|#DruidTree0#_M|127,{ diff --git a/world/map/npc/006-1/pachua.txt b/world/map/npc/006-1/pachua.txt index ace4ba9a..824bc9b5 100644 --- a/world/map/npc/006-1/pachua.txt +++ b/world/map/npc/006-1/pachua.txt @@ -43,9 +43,9 @@ L_Check_Shops: menu "Wait, can you make a leather patch for me?", L_leather_patch, "OK, bye.", -; - close; + goto L_Close; -L_CheckStuff: +S_CheckStuff: mes "[Chief Pachua]"; mes ""; mes "\"Let me see what you have there.\""; @@ -53,7 +53,7 @@ L_CheckStuff: return; L_Super_store: - callsub L_CheckStuff; + callsub S_CheckStuff; mes "[Chief Pachua]"; mes ""; mes "\"Ahh you have lots of good items to work with.\""; @@ -74,7 +74,7 @@ L_Super_store: "Not now, maybe later.", L_NoDeal; L_Cowboy_store: - callsub L_CheckStuff; + callsub S_CheckStuff; mes "[Chief Pachua]"; mes ""; mes "\"To make you a Cowboy hat I will need:"; @@ -95,7 +95,7 @@ L_Cowboy_store: "On second thought, maybe later.", L_NoDeal; L_Chaps_store: - callsub L_CheckStuff; + callsub S_CheckStuff; mes "[Chief Pachua]"; mes ""; mes "\"To make you a pair of Snake Skin Chaps I will need:"; @@ -151,7 +151,7 @@ L_leather_patch: next; menu "Here you are.", -, - "OK, I'll be back later.", L_End, + "OK, I'll be back later.", L_Close, "That's too expensive!.", L_NoDeal; if (countitem("SnakeSkin") < 1) goto L_NoSkins; @@ -170,37 +170,37 @@ L_DealDone: mes "\"Here you are!\""; mes ""; mes "\"Come back any time.\""; - close; + goto L_Close; L_NoDeal: mes "[Chief Pachua]"; mes ""; mes "\"Alright, but you won't get a better deal anywhere else!\""; - close; + goto L_Close; L_NoMoney: mes "[Chief Pachua]"; mes ""; mes "\"Oh dear, it seems you don't have enough money.\""; - close; + goto L_Close; L_NoJeans: mes "[Chief Pachua]"; mes ""; mes "\"Oh dear, it seems you don't have enough jeans shorts.\""; - close; + goto L_Close; L_NoFancy: mes "[Chief Pachua]"; mes ""; mes "\"Oh dear, it seems you don't have enough fancy hats.\""; - close; + goto L_Close; L_NoSkins: mes "[Chief Pachua]"; mes ""; mes "\"Oh dear, it seems you don't have enough snake skins.\""; - close; + goto L_Close; L_WearingCowboy: mes "[Chief Pachua]"; @@ -216,14 +216,20 @@ L_WearingChaps: next; goto L_Check_Shops; -L_End: +L_Close: + set @LEATHER_PATCH_PRICE, 0; + set @wants_leather_patch, 0; + set @month, 0; + set @start_day, 0; + set @end_day, 0; + set @temp, 0; close; L_TooMany: mes "[Chief Pachua]"; mes ""; mes "\"You don't have room for a leather patch. Come back later.\""; - close; + goto L_Close; L_smoke: message strcharinfo(0), "Pachua quickly inhales from his pipe and releases a ring of smoke towards the sky!"; @@ -251,7 +257,7 @@ L_Basket: mes "\"I appreciate your attitude. Maybe I can help you with that.\""; menu "I would be really grateful if you could do that!", -, - "Nah, I decided not to do that stupid quest.", L_End, + "Nah, I decided not to do that stupid quest.", L_Close, "I would prefer to talk to you about other stuff.", L_Begin; //should go to pachuas's regular chat set QUEST_Easter11, 2; @@ -263,20 +269,20 @@ L_MakeBasket: mes "\"You should be able to get those from mouboos as they graze.\""; menu "I have the Reeds!", -, - "Ok, I will be back soon", L_End, - "I changed my mind, forget about it", L_End, + "Ok, I will be back soon", L_Close, + "I changed my mind, forget about it", L_Close, "Can I talk to you about another stuff?", L_Begin; //should go to pachuas's regular chat if(countitem("ReedBundle") < 5) goto L_EasterNotEnough; if(countitem("ReedBundle") >= 5) goto L_EasterEnough; - close; + goto L_Close; L_EasterNotEnough: mes "[Chief Pachua]"; mes ""; mes "\"You do not have enough Reed Bundles for me to work with.\""; mes "\"Go gather more.\""; - close; + goto L_Close; L_EasterEnough: getinventorylist; @@ -292,13 +298,13 @@ L_EasterEnough: mes "then swiftly weaves them into a basket shape."; mes "Next, he places the damp basket in the sun to dry for a minute before handing it over to you."; mes "\"Here is your Easter Basket.\""; - close; + goto L_Close; L_EasterTooMany: mes "[Chief Pachua]"; mes ""; mes "\"You don't have room for the Easter Basket. Come back later.\""; - close; + goto L_Close; L_SeeBunny: mes "[Chief Pachua]"; -- cgit v1.2.3-70-g09d2