From eeeb6bf662bbc65556d9149ac73fb511b19b6acd Mon Sep 17 00:00:00 2001 From: The Kandiman Date: Sun, 28 Aug 2011 12:32:15 -0400 Subject: Second batch of tab conversion. Maps 001-2 through 002-4 complete. --- world/map/npc/001-2/omar.txt | 528 ++++++++++++++++++++----------------------- 1 file changed, 240 insertions(+), 288 deletions(-) (limited to 'world/map/npc/001-2/omar.txt') diff --git a/world/map/npc/001-2/omar.txt b/world/map/npc/001-2/omar.txt index 4f75574e..37bd3307 100644 --- a/world/map/npc/001-2/omar.txt +++ b/world/map/npc/001-2/omar.txt @@ -1,348 +1,300 @@ // -function script KadiyaSubquestConsts { - set @Q_kadiya_status, (QUEST_MAGIC2 & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT; - - set @Q_STATUS_NONE, 0; - set @Q_STATUS_KNOWS_MOPOX, 1; - set @Q_STATUS_MADE_MOPOX, 2; - set @Q_STATUS_DIDNT_DRINK, 3; - set @Q_STATUS_WANTS_CHOCOCAKE, 4; - set @Q_STATUS_WANTS_ORANGECUPCAKE, 5; - set @Q_STATUS_COMPLETED, 6; - set @Q_STATUS_COMPLETED_ELANORE, 7; - set @Q_STATUS_COMPLETED_NOELANORE, 8; - set @Q_STATUS_COMPLETED_POST_ELANORE, 9; - - if (((QUEST_MAGIC2 & NIBBLE_1_MASK) >> NIBBLE_1_SHIFT) < 4) - set @Q_kadiya_status, @Q_STATUS_NONE; - - if (((QUEST_MAGIC2 & NIBBLE_1_MASK) >> NIBBLE_1_SHIFT) > 4) - set @Q_kadiya_status, @Q_STATUS_COMPLETED_POST_ELANORE; - - return; -} +function|script|KadiyaSubquestConsts|{ + set @Q_kadiya_status, (QUEST_MAGIC2 & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT; + + set @Q_STATUS_NONE, 0; + set @Q_STATUS_KNOWS_MOPOX, 1; + set @Q_STATUS_MADE_MOPOX, 2; + set @Q_STATUS_DIDNT_DRINK, 3; + set @Q_STATUS_WANTS_CHOCOCAKE, 4; + set @Q_STATUS_WANTS_ORANGECUPCAKE, 5; + set @Q_STATUS_COMPLETED, 6; + set @Q_STATUS_COMPLETED_ELANORE, 7; + set @Q_STATUS_COMPLETED_NOELANORE, 8; + set @Q_STATUS_COMPLETED_POST_ELANORE, 9; + if (((QUEST_MAGIC2 & NIBBLE_1_MASK) >> NIBBLE_1_SHIFT) < 4) set @Q_kadiya_status, @Q_STATUS_NONE; -001-2.gat,70,60,0 script Omar 162,{ - callfunc "ElanoreFix"; - callfunc "KadiyaSubquestConsts"; + if (((QUEST_MAGIC2 & NIBBLE_1_MASK) >> NIBBLE_1_SHIFT) > 4) set @Q_kadiya_status, @Q_STATUS_COMPLETED_POST_ELANORE; - set @Q_status, @Q_kadiya_status; + return; +} - if (@Q_status >= @Q_STATUS_COMPLETED) - goto L_cured; +001-2.gat,70,60,0|script|Omar|162,{ + callfunc "ElanoreFix"; + callfunc "KadiyaSubquestConsts"; - if (@Q_status == @Q_STATUS_DIDNT_DRINK) - goto L_didnt_drink; + set @Q_status, @Q_kadiya_status; - if (@Q_status > @Q_STATUS_DIDNT_DRINK) - goto L_make_food; + if (@Q_status >= @Q_STATUS_COMPLETED) goto L_cured; - mes "[Omar]"; - mes "\"Welcome to my humble abode.\""; - next; + if (@Q_status == @Q_STATUS_DIDNT_DRINK) goto L_didnt_drink; - menu - "Well met! May I ask who you are?", L_omar, - "What's wrong with your daughter?", L_kadiya_sick, - "Thank you!", -; - close; + if (@Q_status > @Q_STATUS_DIDNT_DRINK) goto L_make_food; + + mes "[Omar]"; + mes "\"Welcome to my humble abode.\""; + next; + menu + "Well met! May I ask who you are?", L_omar, + "What's wrong with your daughter?", L_kadiya_sick, + "Thank you!", -; + close; L_omar: - mes "[Omar]"; - mes "\"My name is Omar; I am a trader of oils and spices.\""; - close; + mes "[Omar]"; + mes "\"My name is Omar; I am a trader of oils and spices.\""; + close; L_kadiya_sick: - mes "[Omar]"; - mes "\"Kadiya has caught Ponderpox, I fear.\""; - mes "He sighs."; - mes "\"She's has been feverish for many days now. I wish there were something I could do.\""; - next; - - menu - "Have you asked Elanore the healer?", L_sick_elanore, - "How about the Hurnscald hospital?", L_sick_hospital, - "Can I help?", L_sick_self, - "I'm sorry to hear that.", -; - - mes "[Omar]"; - mes "\"Well, she is a strong girl. I am sure that she will get over it eventually.\""; - mes "He smiles, but you see doubt in his eyes."; - close; + mes "[Omar]"; + mes "\"Kadiya has caught Ponderpox, I fear.\""; + mes "He sighs."; + mes "\"She's has been feverish for many days now. I wish there were something I could do.\""; + next; + menu + "Have you asked Elanore the healer?", L_sick_elanore, + "How about the Hurnscald hospital?", L_sick_hospital, + "Can I help?", L_sick_self, + "I'm sorry to hear that.", -; + + mes "[Omar]"; + mes "\"Well, she is a strong girl. I am sure that she will get over it eventually.\""; + mes "He smiles, but you see doubt in his eyes."; + close; L_sick_elanore: - mes "[Omar]"; - mes "\"Elanore?\""; - mes "He frowns."; - mes "\"She knows nothing. I see no point in talking to her.\""; - close; + mes "[Omar]"; + mes "\"Elanore?\""; + mes "He frowns."; + mes "\"She knows nothing. I see no point in talking to her.\""; + close; L_sick_hospital: - mes "[Omar]"; - mes "\"Hurnscald is too far away. I don't think that it would be good for her to go on such a long trip.\""; - close; + mes "[Omar]"; + mes "\"Hurnscald is too far away. I don't think that it would be good for her to go on such a long trip.\""; + close; L_sick_self: - mes "[Omar]"; - mes "\"You are very kind, but I don't think there is anything you can do.\""; - close; + mes "[Omar]"; + mes "\"You are very kind, but I don't think there is anything you can do.\""; + close; L_didnt_drink: - mes "[Omar]"; - mes "\"So she has Mopox, not Ponderpox, you say? Hmm. That is much harder to cure, I think.\""; - mes "\"I am grateful for the effort you put into brewing a potion for her. But it does smell vile...\""; - next; - - mes "[Omar]"; - mes "\"I promised my dear wife that I would never make Kadiya eat or drink anything she doesn't like. So I won't force her to drink this.\""; - next; - - mes "[Omar]"; - set @Q_status, (@Q_STATUS_WANTS_CHOCOCAKE + rand(2)); - callsub S_update_var; - - if (@Q_status == @Q_STATUS_WANTS_ORANGECUPCAKE) - mes "\"If only we could make it smell and taste like orange cupcakes... she really loves those cupcakes.\""; - if (@Q_status == @Q_STATUS_WANTS_CHOCOCAKE) - mes "\"If only this were a chocolate cake and not a potion... she really loves chocolate cakes.\""; - close; + mes "[Omar]"; + mes "\"So she has Mopox, not Ponderpox, you say? Hmm. That is much harder to cure, I think.\""; + mes "\"I am grateful for the effort you put into brewing a potion for her. But it does smell vile...\""; + next; + mes "[Omar]"; + mes "\"I promised my dear wife that I would never make Kadiya eat or drink anything she doesn't like. So I won't force her to drink this.\""; + next; + mes "[Omar]"; + set @Q_status, (@Q_STATUS_WANTS_CHOCOCAKE + rand(2)); + callsub S_update_var; + if (@Q_status == @Q_STATUS_WANTS_ORANGECUPCAKE) + mes "\"If only we could make it smell and taste like orange cupcakes... she really loves those cupcakes.\""; + if (@Q_status == @Q_STATUS_WANTS_CHOCOCAKE) + mes "\"If only this were a chocolate cake and not a potion... she really loves chocolate cakes.\""; + close; L_make_food: - mes "[Omar]"; - mes "\"I should stay here to watch over her. I wish I could think of a way to convince her to drink the potion...\""; - if (@Q_status == @Q_STATUS_WANTS_ORANGECUPCAKE) - mes "\"Alas, it is not an orange cupcake.\""; - if (@Q_status == @Q_STATUS_WANTS_CHOCOCAKE) - mes "\"If only it were to smell and taste like her favourite chocolate cake...\""; - close; + mes "[Omar]"; + mes "\"I should stay here to watch over her. I wish I could think of a way to convince her to drink the potion...\""; + if (@Q_status == @Q_STATUS_WANTS_ORANGECUPCAKE) + mes "\"Alas, it is not an orange cupcake.\""; + if (@Q_status == @Q_STATUS_WANTS_CHOCOCAKE) + mes "\"If only it were to smell and taste like her favourite chocolate cake...\""; + close; L_cured: - if (@Q_status == @Q_STATUS_COMPLETED) - goto L_cured_choice; - mes "[Omar]"; - mes "\"She is sleeping now, but she seems to be much better. I am sure that she will be up and running around again soon.\""; - close; + if (@Q_status == @Q_STATUS_COMPLETED) goto L_cured_choice; + mes "[Omar]"; + mes "\"She is sleeping now, but she seems to be much better. I am sure that she will be up and running around again soon.\""; + close; L_cured_choice: - mes "[Omar]"; - mes "\"I am very grateful for your help. I really was sure that it was Ponderpox, not Mopox, that she had.\""; - next; - - menu - "Oh, it was nothing.", L_cured_nothing, - "I didn't do it alone; Elanore helped.", L_cured_elanore, - "That will be 5000 GP.", -; - - mes "[Omar]"; - mes "\"Ah, certainly.\""; - mes "He hands you a small bag of money."; - next; - - set @Q_status, @Q_STATUS_COMPLETED_NOELANORE; - callsub S_update_var; - - set zeny, zeny + 5000; - close; + mes "[Omar]"; + mes "\"I am very grateful for your help. I really was sure that it was Ponderpox, not Mopox, that she had.\""; + next; + menu + "Oh, it was nothing.", L_cured_nothing, + "I didn't do it alone; Elanore helped.", L_cured_elanore, + "That will be 5000 GP.", -; + mes "[Omar]"; + mes "\"Ah, certainly.\""; + mes "He hands you a small bag of money."; + next; + set @Q_status, @Q_STATUS_COMPLETED_NOELANORE; + callsub S_update_var; + set zeny, zeny + 5000; + close; L_cured_nothing: - mes "[Omar]"; - mes "\"No, this wasn't nothing. She is everything to me. Here, you deserve a reward.\""; - mes "He hands you a bag of money containing 10,000 GP and two pearls."; - mes "\"And feel free to drop by again whenever you would like!\""; - - set @Q_status, @Q_STATUS_COMPLETED_NOELANORE; - callsub S_update_var; - - getitem "Pearl", 2; - set zeny, zeny + 10000; - close; + mes "[Omar]"; + mes "\"No, this wasn't nothing. She is everything to me. Here, you deserve a reward.\""; + mes "He hands you a bag of money containing 10,000 GP and two pearls."; + mes "\"And feel free to drop by again whenever you would like!\""; + set @Q_status, @Q_STATUS_COMPLETED_NOELANORE; + callsub S_update_var; + getitem "Pearl", 2; + set zeny, zeny + 10000; + close; L_cured_elanore: - mes "[Omar]"; - mes "Omar frowns."; - mes "\"That witch? You worked with her without telling me?\""; - mes "He looks over to his daughter, concern suddenly in his eyes."; - mes "\"She is looking better, though...\""; - next; - - mes "[Omar]"; - mes "Omar shakes his head."; - mes "\"I will have to think about this. Please leave me alone.\""; - next; - - set @Q_status, @Q_STATUS_COMPLETED_ELANORE; - callsub S_update_var; - - close; + mes "[Omar]"; + mes "Omar frowns."; + mes "\"That witch? You worked with her without telling me?\""; + mes "He looks over to his daughter, concern suddenly in his eyes."; + mes "\"She is looking better, though...\""; + next; + mes "[Omar]"; + mes "Omar shakes his head."; + mes "\"I will have to think about this. Please leave me alone.\""; + next; + set @Q_status, @Q_STATUS_COMPLETED_ELANORE; + callsub S_update_var; + close; S_update_var: - set QUEST_MAGIC2, - (QUEST_MAGIC2 & ~(NIBBLE_3_MASK) - | (@Q_status << NIBBLE_3_SHIFT)); - return; + set QUEST_MAGIC2, (QUEST_MAGIC2 & ~(NIBBLE_3_MASK) | (@Q_status << NIBBLE_3_SHIFT)); + return; } - -001-2.gat,76,59,0 script _______Kadiya 174,{ - callfunc "ElanoreFix"; - set @Q_MASK, NIBBLE_3_MASK; - set @Q_SHIFT, NIBBLE_3_SHIFT; - - callfunc "KadiyaSubquestConsts"; - set @Q_status, @Q_kadiya_status; - - if (@Q_status >= @Q_STATUS_COMPLETED) - goto L_cured; - - mes "You see a young girl lying in bed. At first she doesn't seem to notice you approaching."; - mes "Finally, she turns her head towards you. Judging from the sweat on her forehead and look in her eyes, she is suffering from some kind of fever."; - next; - - mes "[Kadiya]"; - mes "\"Hello,\" she says in a tiny voice."; - next; - - set @M_NAME, 1; - set @M_CANDY, 2; - set @M_POTION, 3; - set @M_CHOCOCAKE, 4; - set @M_CUPCAKE, 5; - - setarray @choice$, "Hello! What's your name?", "Would you like some candy?", "", "", "", "", "", ""; - setarray @choice_idx, @M_NAME, @M_CANDY, 0, 0, 0, 0, 0, 0; - set @choices_nr, 2; - - if (countitem("MopoxCurePotion") == 0) - goto L_M_no_cure; - - set @choice_idx[@choices_nr], @M_POTION; - set @choice$[@choices_nr], "This potion will cure your illness!"; - set @choices_nr, @choices_nr + 1; +001-2.gat,76,59,0|script|Kadiya|174,{ + callfunc "ElanoreFix"; + set @Q_MASK, NIBBLE_3_MASK; + set @Q_SHIFT, NIBBLE_3_SHIFT; + callfunc "KadiyaSubquestConsts"; + set @Q_status, @Q_kadiya_status; + if (@Q_status >= @Q_STATUS_COMPLETED) goto L_cured; + + mes "You see a young girl lying in bed. At first she doesn't seem to notice you approaching."; + mes "Finally, she turns her head towards you. Judging from the sweat on her forehead and look in her eyes, she is suffering from some kind of fever."; + next; + mes "[Kadiya]"; + mes "\"Hello,\" she says in a tiny voice."; + next; + set @M_NAME, 1; + set @M_CANDY, 2; + set @M_POTION, 3; + set @M_CHOCOCAKE, 4; + set @M_CUPCAKE, 5; + + setarray @choice$, "Hello! What's your name?", "Would you like some candy?", "", "", "", "", "", ""; + setarray @choice_idx, @M_NAME, @M_CANDY, 0, 0, 0, 0, 0, 0; + set @choices_nr, 2; + + if (countitem("MopoxCurePotion") == 0) goto L_M_no_cure; + + set @choice_idx[@choices_nr], @M_POTION; + set @choice$[@choices_nr], "This potion will cure your illness!"; + set @choices_nr, @choices_nr + 1; L_M_no_cure: - - if ((countitem("LacedChocolateCake") == 0) || (@Q_status != @Q_STATUS_WANTS_CHOCOCAKE)) - goto L_M_no_chococake; - - set @choice_idx[@choices_nr], @M_CHOCOCAKE; - set @choice$[@choices_nr], "Would you like special chocolate cake?"; - set @choices_nr, @choices_nr + 1; + if ((countitem("LacedChocolateCake") == 0) || (@Q_status != @Q_STATUS_WANTS_CHOCOCAKE)) + goto L_M_no_chococake; + set @choice_idx[@choices_nr], @M_CHOCOCAKE; + set @choice$[@choices_nr], "Would you like special chocolate cake?"; + set @choices_nr, @choices_nr + 1; L_M_no_chococake: - - if ((countitem("LacedOrangeCupcake") == 0) || (@Q_status != @Q_STATUS_WANTS_ORANGECUPCAKE)) - goto L_M_no_cupcake; - - set @choice_idx[@choices_nr], @M_CUPCAKE; - set @choice$[@choices_nr], "Would you like special orange cupcake?"; - set @choices_nr, @choices_nr + 1; + if ((countitem("LacedOrangeCupcake") == 0) || (@Q_status != @Q_STATUS_WANTS_ORANGECUPCAKE)) + goto L_M_no_cupcake; + set @choice_idx[@choices_nr], @M_CUPCAKE; + set @choice$[@choices_nr], "Would you like special orange cupcake?"; + set @choices_nr, @choices_nr + 1; L_M_no_cupcake: - - set @choice_idx[@choices_nr], 0; - set @choice$[@choices_nr], "Goodbye."; - set @choices_nr, @choices_nr + 1; - - menu - @choice$[0], -, - @choice$[1], -, - @choice$[2], -, - @choice$[3], -, - @choice$[4], -, - @choice$[5], -; - - set @choice, @choice_idx[@menu - 1]; - - if (@choice == @M_NAME) goto L_name; - if (@choice == @M_CANDY) goto L_no_candy; - if (@choice == @M_POTION) goto L_potion; - if (@choice == @M_CHOCOCAKE) goto L_chococake; - if (@choice == @M_CUPCAKE) goto L_cupcake; - - close; + set @choice_idx[@choices_nr], 0; + set @choice$[@choices_nr], "Goodbye."; + set @choices_nr, @choices_nr + 1; + + menu + @choice$[0], -, + @choice$[1], -, + @choice$[2], -, + @choice$[3], -, + @choice$[4], -, + @choice$[5], -; + + set @choice, @choice_idx[@menu - 1]; + + if (@choice == @M_NAME) goto L_name; + if (@choice == @M_CANDY) goto L_no_candy; + if (@choice == @M_POTION) goto L_potion; + if (@choice == @M_CHOCOCAKE) goto L_chococake; + if (@choice == @M_CUPCAKE) goto L_cupcake; + close; L_name: - mes "[Kadiya]"; - mes "She smiles a faint smile."; - mes "\"My name is Kadiya.\""; - - close; + mes "[Kadiya]"; + mes "She smiles a faint smile."; + mes "\"My name is Kadiya.\""; + close; L_no_candy: - mes "[Kadiya]"; - mes "She hesitates for a moment."; - mes "\"No, thank you. I don't think I should.\""; - - close; + mes "[Kadiya]"; + mes "She hesitates for a moment."; + mes "\"No, thank you. I don't think I should.\""; + close; L_potion: - mes "[Kadiya]"; - if (@Q_status < @Q_STATUS_DIDNT_DRINK) - set @Q_status, @Q_STATUS_DIDNT_DRINK; - callsub S_update_var; - - mes "Kadiya grimaces and pushes the bottle away."; - mes "\"That smells terrible!\""; - next; - - mes "[Kadiya]"; - mes "She pulls the sheets over her head."; - mes "\"I won't drink that!\""; - next; - - close; + mes "[Kadiya]"; + if (@Q_status < @Q_STATUS_DIDNT_DRINK) set @Q_status, @Q_STATUS_DIDNT_DRINK; + callsub S_update_var; + + mes "Kadiya grimaces and pushes the bottle away."; + mes "\"That smells terrible!\""; + next; + mes "[Kadiya]"; + mes "She pulls the sheets over her head."; + mes "\"I won't drink that!\""; + next; + close; L_chococake: - delitem "LacedChocolateCake", 1; - goto L_do_cure; + delitem "LacedChocolateCake", 1; + goto L_do_cure; L_cupcake: - delitem "LacedOrangeCupcake", 1; - goto L_do_cure; + delitem "LacedOrangeCupcake", 1; + goto L_do_cure; L_do_cure: - if (@Q_status < @Q_STATUS_COMPLETED) - set @Q_status, @Q_STATUS_COMPLETED; - callsub S_update_var; - mes "[Kadiya]"; - mes "Kadiya's eyes widen."; - mes "\"Oh! Daddy, is it okay if I eat this?\""; - mes "Omar nods and smiles. \"You should eat a bit to regain your strength, sweetheart.\""; - next; - - mes "[Kadiya]"; - mes "Kadiya devours your gift in just a handful of bites."; - next; - - mes "[Kadiya]"; - mes "She smiles. \"Thank you! I feel better already!\"."; - next; - - mes "[Kadiya]"; - mes "She looks much healthier, too. Omar walks over and touches her forehead."; - mes "\"Now that is funny-- your fever has gone down quite a bit!\""; - mes "He smiles at you. \"Thank you for your help!\""; - next; - - mes "[Kadiya]"; - mes "\"You should get some sleep now, sweetheart. I'm sure that you will be better soon.\""; - close; + if (@Q_status < @Q_STATUS_COMPLETED) set @Q_status, @Q_STATUS_COMPLETED; + callsub S_update_var; + + mes "[Kadiya]"; + mes "Kadiya's eyes widen."; + mes "\"Oh! Daddy, is it okay if I eat this?\""; + mes "Omar nods and smiles. \"You should eat a bit to regain your strength, sweetheart.\""; + next; + mes "[Kadiya]"; + mes "Kadiya devours your gift in just a handful of bites."; + next; + mes "[Kadiya]"; + mes "She smiles. \"Thank you! I feel better already!\"."; + next; + mes "[Kadiya]"; + mes "She looks much healthier, too. Omar walks over and touches her forehead."; + mes "\"Now that is funny-- your fever has gone down quite a bit!\""; + mes "He smiles at you. \"Thank you for your help!\""; + next; + mes "[Kadiya]"; + mes "\"You should get some sleep now, sweetheart. I'm sure that you will be better soon.\""; + close; L_goodbye: - mes "[Kadiya]"; - mes "Goodbye!"; - - close; + mes "[Kadiya]"; + mes "Goodbye!"; + close; L_cured: - mes "[Kadiya]"; - mes "Kadiya seems to be sleeping calmly. She looks much less sweaty than earlier; unless you are very much mistaken, her fever has disappeared."; - close; + mes "[Kadiya]"; + mes "Kadiya seems to be sleeping calmly. She looks much less sweaty than earlier; unless you are very much mistaken, her fever has disappeared."; + close; S_update_var: - set QUEST_MAGIC2, - (QUEST_MAGIC2 & ~(@Q_MASK) - | (@Q_status << @Q_SHIFT)); - return; + set QUEST_MAGIC2, (QUEST_MAGIC2 & ~(@Q_MASK) | (@Q_status << @Q_SHIFT)); + return; } -- cgit v1.2.3-60-g2f50 From f8af8ad0be73b3e0044803a09eb1e6e7f063b466 Mon Sep 17 00:00:00 2001 From: coffee Date: Sun, 4 Sep 2011 22:17:43 -0300 Subject: Clear Temporary variables after you close npc window. Npcs from maps 001-2, 002-1 and 003-1. --- world/map/npc/001-2/casino.txt | 30 +++++++++++++------ world/map/npc/001-2/omar.txt | 62 ++++++++++++++++++++++++++++------------ world/map/npc/001-2/shops.txt | 2 ++ world/map/npc/002-1/rogue.txt | 8 ++++-- world/map/npc/003-1/stranger.txt | 50 ++++++++++++++++++-------------- 5 files changed, 101 insertions(+), 51 deletions(-) (limited to 'world/map/npc/001-2/omar.txt') diff --git a/world/map/npc/001-2/casino.txt b/world/map/npc/001-2/casino.txt index 9dcbf5c5..1ee4770a 100644 --- a/world/map/npc/001-2/casino.txt +++ b/world/map/npc/001-2/casino.txt @@ -22,7 +22,7 @@ } 001-2.gat,32,67,0|script|MoneyChanger|124,{ - mes "[" + @npcname$ + "]"; + mes "[Money Changer]"; mes "\"I used to exchange Casino Coins for cash, but the Wizard's Council shut me down. Now the casino only runs off Casino Coins currently in circulation.\""; next; mes "\"I heard that many a gambler wandered onto the Beach to the South West and through to the Snake Desert to the South East. If you want to find coins already in circulation, you might find some on the monsters there.\""; @@ -38,7 +38,7 @@ "Yes", L_Begin, "No", -; mes "\"As you wish.\""; - close; + goto L_Close; L_Begin: if(countitem("CasinoCoins") < 15) goto L_NoCoin; @@ -73,17 +73,17 @@ L_End: mes "I had " + @croupier + "."; mes "You get 45 casino coins.\""; getitem "CasinoCoins", 45; - close; + goto L_Close; L_NoCoin: mes "\"You need at least 15 coins.\""; - close; + goto L_Close; L_Lost: mes "\"I'm sorry but you lost."; mes "You got " + @player + " with your cards."; mes "I had " + @croupier + ".\""; - close; + goto L_Close; L_Ace: set @player, @player + 11; @@ -96,6 +96,11 @@ L_Ace: menu "Yes", L_Another, "No", L_End; + +L_Close: + set @croupier, 0; + set @player, 0; + set @tempace, 0; close; } @@ -111,7 +116,7 @@ L_Ace: "100 coins", L_b100, "Maybe I'll play later", -; mes "Come again."; - close; + goto L_Close; L_b1: set @bet, 1; @@ -146,7 +151,7 @@ L_Check: if(@color == 1) goto L_Lost; mes "You won!"; getitem "CasinoCoins", @bet * 2; - close; + goto L_Close; L_Number: menu @@ -165,13 +170,20 @@ L_Number: if (@number != @roulette) goto L_Lost; mes "\"You won!\""; getitem "CasinoCoins", @bet * 10; - close; + goto L_Close; L_NoCoin: mes "\"You don't have enough coins.\""; - close; + goto L_Close; L_Lost: mes "\"I'm sorry, you lost.\""; + goto L_Close; + +L_Close: + set @number, 0; + set @roulette, 0; + set @color, 0; + set @bet, 50; close; } diff --git a/world/map/npc/001-2/omar.txt b/world/map/npc/001-2/omar.txt index 37bd3307..5e786d83 100644 --- a/world/map/npc/001-2/omar.txt +++ b/world/map/npc/001-2/omar.txt @@ -39,12 +39,12 @@ function|script|KadiyaSubquestConsts|{ "Well met! May I ask who you are?", L_omar, "What's wrong with your daughter?", L_kadiya_sick, "Thank you!", -; - close; + goto L_Close; L_omar: mes "[Omar]"; mes "\"My name is Omar; I am a trader of oils and spices.\""; - close; + goto L_Close; L_kadiya_sick: mes "[Omar]"; @@ -61,24 +61,24 @@ L_kadiya_sick: mes "[Omar]"; mes "\"Well, she is a strong girl. I am sure that she will get over it eventually.\""; mes "He smiles, but you see doubt in his eyes."; - close; + goto L_Close; L_sick_elanore: mes "[Omar]"; mes "\"Elanore?\""; mes "He frowns."; mes "\"She knows nothing. I see no point in talking to her.\""; - close; + goto L_Close; L_sick_hospital: mes "[Omar]"; mes "\"Hurnscald is too far away. I don't think that it would be good for her to go on such a long trip.\""; - close; + goto L_Close; L_sick_self: mes "[Omar]"; mes "\"You are very kind, but I don't think there is anything you can do.\""; - close; + goto L_Close; L_didnt_drink: mes "[Omar]"; @@ -95,7 +95,7 @@ L_didnt_drink: mes "\"If only we could make it smell and taste like orange cupcakes... she really loves those cupcakes.\""; if (@Q_status == @Q_STATUS_WANTS_CHOCOCAKE) mes "\"If only this were a chocolate cake and not a potion... she really loves chocolate cakes.\""; - close; + goto L_Close; L_make_food: mes "[Omar]"; @@ -104,13 +104,13 @@ L_make_food: mes "\"Alas, it is not an orange cupcake.\""; if (@Q_status == @Q_STATUS_WANTS_CHOCOCAKE) mes "\"If only it were to smell and taste like her favourite chocolate cake...\""; - close; + goto L_Close; L_cured: if (@Q_status == @Q_STATUS_COMPLETED) goto L_cured_choice; mes "[Omar]"; mes "\"She is sleeping now, but she seems to be much better. I am sure that she will be up and running around again soon.\""; - close; + goto L_Close; L_cured_choice: mes "[Omar]"; @@ -127,7 +127,7 @@ L_cured_choice: set @Q_status, @Q_STATUS_COMPLETED_NOELANORE; callsub S_update_var; set zeny, zeny + 5000; - close; + goto L_Close; L_cured_nothing: mes "[Omar]"; @@ -138,7 +138,7 @@ L_cured_nothing: callsub S_update_var; getitem "Pearl", 2; set zeny, zeny + 10000; - close; + goto L_Close; L_cured_elanore: mes "[Omar]"; @@ -153,7 +153,7 @@ L_cured_elanore: next; set @Q_status, @Q_STATUS_COMPLETED_ELANORE; callsub S_update_var; - close; + goto L_Close; S_update_var: set QUEST_MAGIC2, (QUEST_MAGIC2 & ~(NIBBLE_3_MASK) | (@Q_status << NIBBLE_3_SHIFT)); @@ -224,19 +224,19 @@ L_M_no_cupcake: if (@choice == @M_POTION) goto L_potion; if (@choice == @M_CHOCOCAKE) goto L_chococake; if (@choice == @M_CUPCAKE) goto L_cupcake; - close; + goto L_Close; L_name: mes "[Kadiya]"; mes "She smiles a faint smile."; mes "\"My name is Kadiya.\""; - close; + goto L_Close; L_no_candy: mes "[Kadiya]"; mes "She hesitates for a moment."; mes "\"No, thank you. I don't think I should.\""; - close; + goto L_Close; L_potion: mes "[Kadiya]"; @@ -249,8 +249,7 @@ L_potion: mes "[Kadiya]"; mes "She pulls the sheets over her head."; mes "\"I won't drink that!\""; - next; - close; + goto L_Close; L_chococake: delitem "LacedChocolateCake", 1; @@ -282,16 +281,41 @@ L_do_cure: next; mes "[Kadiya]"; mes "\"You should get some sleep now, sweetheart. I'm sure that you will be better soon.\""; - close; + goto L_Close; L_goodbye: mes "[Kadiya]"; mes "Goodbye!"; - close; + goto L_Close; L_cured: mes "[Kadiya]"; mes "Kadiya seems to be sleeping calmly. She looks much less sweaty than earlier; unless you are very much mistaken, her fever has disappeared."; + goto L_Close; + +L_Close: + set @Q_STATUS_KNOWS_MOPOX, 1; + set @Q_STATUS_MADE_MOPOX, 2; + set @Q_STATUS_DIDNT_DRINK, 3; + set @Q_STATUS_WANTS_CHOCOCAKE, 4; + set @Q_STATUS_WANTS_ORANGECUPCAKE, 5; + set @Q_STATUS_COMPLETED, 6; + set @Q_STATUS_COMPLETED_ELANORE, 7; + set @Q_STATUS_COMPLETED_NOELANORE, 8; + set @Q_STATUS_COMPLETED_POST_ELANORE, 9; + set @Q_kadiya_status, 0; + set @Q_status, 0; + set @Q_MASK, 0; + set @Q_SHIFT, 0; + set @M_NAME, 1; + set @M_CANDY, 2; + set @M_POTION, 3; + set @M_CHOCOCAKE, 4; + set @M_CUPCAKE, 5; + set @choice, 0; + set @choices_nr, 0; + cleararray @choice_idx[0], 0, 7; + cleararray @choice$[0], "", 7; close; S_update_var: diff --git a/world/map/npc/001-2/shops.txt b/world/map/npc/001-2/shops.txt index d4cf178b..75753a4f 100644 --- a/world/map/npc/001-2/shops.txt +++ b/world/map/npc/001-2/shops.txt @@ -6,5 +6,7 @@ set @npcname$, "Rebecca the Inn Keeper"; set @cost, 100; callfunc "Inn"; + set @npcname$, ""; + set @cost, 0; close; } diff --git a/world/map/npc/002-1/rogue.txt b/world/map/npc/002-1/rogue.txt index 79812bee..400dec83 100644 --- a/world/map/npc/002-1/rogue.txt +++ b/world/map/npc/002-1/rogue.txt @@ -33,17 +33,21 @@ L_Reset: mes "\"There you are."; mes ""; mes "Good as new!\""; - close; + goto L_Close; L_Pass: mes "[Rogue Mage]"; mes "\"Very well then, see you.\""; - close; + goto L_Close; L_NoMoney: mes "[Rogue Mage]"; mes "\"Oh dear, the price cannot be bargained."; mes ""; mes "Perhaps you can borrow from a friend?\""; + goto L_Close; + +L_Close: + set @cost, 0; close; } diff --git a/world/map/npc/003-1/stranger.txt b/world/map/npc/003-1/stranger.txt index 09c81f36..31667b8c 100644 --- a/world/map/npc/003-1/stranger.txt +++ b/world/map/npc/003-1/stranger.txt @@ -26,7 +26,7 @@ menu "Yeah, sure.",L_Items, "No.",L_Close; - close; + goto L_Close; L_Items: if (countitem("IngotIron") < @IRONINGOT) goto L_No_Item; @@ -238,7 +238,7 @@ L_Explain: mes "\"Depending on the color it will bring you to different places. It might wear out after a while and it'll loose its color, but I can prepare it for you again.\""; next; mes "\"Since I'm not familar with this plane-, ahm, with this area, I can't tell which places you will end up in.\""; - close; + goto L_Close; L_No_Event: mes "[Stranger]"; @@ -251,7 +251,7 @@ L_No_Event: menu "Thanks for the advice.",-, "I have my towel with me too.",L_Dye; - close; + goto L_Close; L_Dye: mes "[Stranger]"; @@ -265,17 +265,17 @@ L_Dye: "Oh? Can you explain about it?",L_Explain, "I know. Could you dye it for me?",L_Dye_Towel, "It's great, isn't it? I have to go now.",-; - close; + goto L_Close; L_No_Item: mes "[Stranger]"; mes "\"Hu? It seems you haven't.\""; - close; + goto L_Close; L_Wrong_Answer: mes "[Stranger]"; mes "\"Nah, that's wrong. Come back if you want to try again.\""; - close; + goto L_Close; L_Event_Done: mes "[Stranger]"; @@ -302,7 +302,7 @@ L_Dye_Towel: // "Lime",L_Lime, // "Teal",L_Teal, "I changed my mind.", L_Close; - close; + goto L_Close; L_Red: mes "[Stranger]"; @@ -321,7 +321,7 @@ L_Red: next; mes "[Stranger]"; mes "\"Done! It'll use its color after being used, but just come back and I can dye it again for you.\""; - close; + goto L_Close; L_Yellow: mes "[Stranger]"; @@ -340,7 +340,7 @@ L_Yellow: next; mes "[Stranger]"; mes "\"Done! It'll use its color after being used, but just come back and I can dye it again for you.\""; - close; + goto L_Close; L_White: @@ -360,7 +360,7 @@ L_White: next; mes "[Stranger]"; mes "\"Done! It'll use its color after being used, but just come back and I can dye it again for you.\""; - close; + goto L_Close; L_Blue: mes "[Stranger]"; @@ -379,7 +379,7 @@ L_Blue: next; mes "[Stranger]"; mes "\"Done! It'll use its color after being used, but just come back and I can dye it again for you.\""; - close; + goto L_Close; L_Green: mes "[Stranger]"; @@ -398,7 +398,7 @@ L_Green: next; mes "[Stranger]"; mes "\"Done! It'll use its color after being used, but just come back and I can dye it again for you.\""; - close; + goto L_Close; L_Purple: mes "[Stranger]"; @@ -417,7 +417,7 @@ L_Purple: next; mes "[Stranger]"; mes "\"Done! It'll use its color after being used, but just come back and I can dye it again for you.\""; - close; + goto L_Close; L_Orange: mes "[Stranger]"; @@ -438,7 +438,7 @@ L_Orange: next; mes "[Stranger]"; mes "\"Done! It'll use its color after being used, but just come back and I can dye it again for you.\""; - close; + goto L_Close; L_Pink: mes "[Stranger]"; @@ -459,7 +459,7 @@ L_Pink: next; mes "[Stranger]"; mes "\"Done! It'll use its color after being used, but just come back and I can dye it again for you.\""; - close; + goto L_Close; L_Lime: mes "[Stranger]"; @@ -480,7 +480,7 @@ L_Lime: next; mes "[Stranger]"; mes "\"Done! It'll use its color after being used, but just come back and I can dye it again for you.\""; - close; + goto L_Close; L_Teal: mes "[Stranger]"; @@ -501,28 +501,36 @@ L_Teal: next; mes "[Stranger]"; mes "\"Done! It'll use its color after being used, but just come back and I can dye it again for you.\""; - close; + goto L_Close; L_No_Water: mes "[Stranger]"; mes "\"You don't have water.\""; - close; + goto L_Close; L_No_Powder: mes "[Stranger]"; mes "\"You need to bring me enough gem powder in that color. Maybe someone used to mining can help you with that.\""; - close; + goto L_Close; L_No_Towel: mes "[Stranger]"; mes "\"Where's your towel? It is really useful, you should always keep it with you.\""; - close; + goto L_Close; L_Full_Inv: mes "[Stranger]"; mes "\"You carry a lot of stuff with you, don't you? Maybe you should get rid of something.\""; - close; + goto L_Close; L_Close: + set @month, 0; + set @start_day, 0; + set @end_day, 0; + set @IRONINGOT, 0; + set @PINKANTENNA, 0; + set @EXP, 0; + set @random, 0; + set @quizparam$, ""; close; } -- cgit v1.2.3-60-g2f50