From 9f208b6d7a1c2e15fcd32725aee2eac0c7178cd9 Mon Sep 17 00:00:00 2001 From: coffee Date: Sun, 4 Sep 2011 20:00:45 -0300 Subject: Clear temporary variables after you close npc window. Npcs from 001-1. --- world/map/npc/001-1/sarah.txt | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'world/map/npc/001-1/sarah.txt') diff --git a/world/map/npc/001-1/sarah.txt b/world/map/npc/001-1/sarah.txt index 3bd2a447..57793ec9 100644 --- a/world/map/npc/001-1/sarah.txt +++ b/world/map/npc/001-1/sarah.txt @@ -8,7 +8,7 @@ // If this is shown, something is wrong with the above case handling. mes "Sarah looks confused."; - close; + goto L_Close; L_Convince_Sarah_First: mes "[Sarah]"; @@ -17,7 +17,7 @@ L_Convince_Sarah_First: mes "\"The girl suddenly looks at you suspiciously.\""; next; mes "\"My mommy says not to talk to strangers!\""; - close; + goto L_Close; L_Start: set @TEMP, rand(2); @@ -40,7 +40,7 @@ L_Ask: mes "\"Can you bring me a piece of Cherry Cake? Pretty please?\""; menu "Yes.", L_Req0, - "No.", L_No; + "No.", L_Close; L_Req0: mes "[Sarah]"; @@ -52,7 +52,7 @@ L_Set: set TMW_Quest,7; mes "[Sarah]"; mes "\"Please bring it to me!\""; - close; + goto L_Close; L_Progress: if (countitem("CherryCake") < 1) goto L_NotEnough; @@ -66,25 +66,26 @@ L_Progress: delitem "CherryCake", 1; getitem "serfhat", 1; set TMW_Quest, 8; - close; + goto L_Close; L_NotEnough: mes "[Sarah]"; mes "\"Oh, I'm starving! Please bring me Cherry Cake!\""; - close; + goto L_Close; L_Done: mes "[Sarah]"; mes "\"It was so tasty, I can't eat anything more... Thank you!\""; emotion 9; - close; + goto L_Close; -L_No: +L_Close: + set @TEMP, 0; close; L_TooMany: next; mes "[Sarah]"; mes "\"You don't have room for my reward. I'll wait until you do.\""; - close; + goto L_Close; } -- cgit v1.2.3-70-g09d2 From 0ad99072c594ba4bae6c1477488ba8322b22ec02 Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Tue, 6 Sep 2011 22:31:42 -0700 Subject: Add EMOTE_ constants Also fix an off-by-one error in the entertainer --- world/map/db/const.txt | 17 +++++++++++++++++ world/map/npc/001-1/entertainer.txt | 3 +-- world/map/npc/001-1/sarah.txt | 4 ++-- world/map/npc/007-1/voltain.txt | 2 +- world/map/npc/021-2/bakery.txt | 2 +- world/map/npc/031-2/cindyHouse.txt | 16 ++-------------- world/map/npc/042-2/tanisha.txt | 4 ++-- 7 files changed, 26 insertions(+), 22 deletions(-) (limited to 'world/map/npc/001-1/sarah.txt') diff --git a/world/map/db/const.txt b/world/map/db/const.txt index e8ca1c31..dcabf7c6 100644 --- a/world/map/db/const.txt +++ b/world/map/db/const.txt @@ -214,6 +214,23 @@ sc_slowpoison 14 sc_raiseattackspeed0 37 sc_raiseattackstrength 185 +// emotions +// note, client-data/emote.xml uses the wrong numbers +EMOTE_DISGUST 1 +EMOTE_SURPRISE 2 +EMOTE_HAPPY 3 +EMOTE_SAD 4 +EMOTE_EVIL 5 +EMOTE_WINK 6 +EMOTE_ANGEL 7 +EMOTE_BLUSH 8 +EMOTE_TONGUE 9 +EMOTE_GRIN 10 +EMOTE_UPSET 11 +EMOTE_PERTURBED 12 +EMOTE_SPEECH 13 +EMOTE_BLAH 14 + // Marriage-related WEDDING_FEE 100 DIVORCE_FEE_PER_LEVEL 500 diff --git a/world/map/npc/001-1/entertainer.txt b/world/map/npc/001-1/entertainer.txt index b57b97f8..5fe8cbc3 100644 --- a/world/map/npc/001-1/entertainer.txt +++ b/world/map/npc/001-1/entertainer.txt @@ -38,10 +38,9 @@ L_Close: close; OnTimer3000: - emotion rand(0,11); + emotion rand(EMOTE_DISGUST, EMOTE_PERTURBED); setnpctimer 0; OnInit: initnpctimer; - } diff --git a/world/map/npc/001-1/sarah.txt b/world/map/npc/001-1/sarah.txt index 57793ec9..8a84df47 100644 --- a/world/map/npc/001-1/sarah.txt +++ b/world/map/npc/001-1/sarah.txt @@ -60,7 +60,7 @@ L_Progress: mes "\"Whee!\""; next; mes "You brought me Cherry Cake! Here is your new hat, as promised.\""; - emotion 9; + emotion EMOTE_TONGUE; getinventorylist; if ((@inventorylist_count - (countitem("CherryCake") == 1)) > 99) goto L_TooMany; delitem "CherryCake", 1; @@ -76,7 +76,7 @@ L_NotEnough: L_Done: mes "[Sarah]"; mes "\"It was so tasty, I can't eat anything more... Thank you!\""; - emotion 9; + emotion EMOTE_TONGUE; goto L_Close; L_Close: diff --git a/world/map/npc/007-1/voltain.txt b/world/map/npc/007-1/voltain.txt index 380326b2..ba2418ff 100644 --- a/world/map/npc/007-1/voltain.txt +++ b/world/map/npc/007-1/voltain.txt @@ -328,7 +328,7 @@ state13: set zeny, zeny + @CHOCOLATECAKE_REWARD_GOLD; set $state, 0; mes "\"I love chocolate cakes. I wonder, if I can use my ven- \""; - emotion 5; + emotion EMOTE_EVIL; close; L_NOHELP: diff --git a/world/map/npc/021-2/bakery.txt b/world/map/npc/021-2/bakery.txt index 8a6dbdb2..1fa60134 100644 --- a/world/map/npc/021-2/bakery.txt +++ b/world/map/npc/021-2/bakery.txt @@ -27,7 +27,7 @@ L_Begin: mes "\"Would you mind bringing me 6 acorns please? I need them to make flour for the chocolate cakes. I will be so delicious!\""; next; mes "\"Um, I mean, the cakes will be delicious...\""; - emotion 8; + emotion EMOTE_BLUSH; next; set @dq_level, 15; diff --git a/world/map/npc/031-2/cindyHouse.txt b/world/map/npc/031-2/cindyHouse.txt index d92da10b..79b8704c 100644 --- a/world/map/npc/031-2/cindyHouse.txt +++ b/world/map/npc/031-2/cindyHouse.txt @@ -31,7 +31,8 @@ L_Happy_Random: "Did you ever meet Santa? He's very kind! He always gives me some candy when we go to see him.", strcharinfo(0) + ", you are sooo strong! Amazing! But my dad is strong too!"; set @random, rand(9); - if (@random != 5) emotion 3; + if (@random != 5) + emotion EMOTE_HAPPY; set @quote$, "\"" + @quote_Cindy$[@random] + "\""; mes "[Cindy]"; mes @quote$; @@ -49,16 +50,3 @@ S_Update_Mask: | (@rescue_Cindy << @Q_Nivalis_state_SHIFT); return; } - - - - - - - - - - - - - diff --git a/world/map/npc/042-2/tanisha.txt b/world/map/npc/042-2/tanisha.txt index 45f6e027..dd4b57ac 100644 --- a/world/map/npc/042-2/tanisha.txt +++ b/world/map/npc/042-2/tanisha.txt @@ -15,7 +15,7 @@ mes "[Tanisha]"; mes "\"Hey! You're up again!\""; - emotion 3; + emotion EMOTE_HAPPY; next; mes "\"Are you feeling better?\""; next; @@ -111,7 +111,7 @@ L_Advice: next; mes "\"When you go to Tulimshar, you should see Bernard. He can make a delicious soup!"; mes "Good luck!\""; - emotion 3; + emotion EMOTE_HAPPY; if (tanisha == 3) set tanisha, 4; close; -- cgit v1.2.3-70-g09d2