summaryrefslogtreecommitdiff
path: root/world/map/npc/027-2/crying_child.txt
diff options
context:
space:
mode:
authorJessica Tölke <jtoelke@mail.upb.de>2011-10-14 15:22:43 +0200
committerJessica Tölke <jtoelke@mail.upb.de>2011-10-14 16:35:08 +0200
commita5cc84660484054451ab8c912ec6fc4652eac1a0 (patch)
treea60b55aa8bdf8b654e2d0c2889464a685c950f04 /world/map/npc/027-2/crying_child.txt
parent196973261680a938b082e195c7d62cbb33e24216 (diff)
downloadserverdata-a5cc84660484054451ab8c912ec6fc4652eac1a0.tar.gz
serverdata-a5cc84660484054451ab8c912ec6fc4652eac1a0.tar.bz2
serverdata-a5cc84660484054451ab8c912ec6fc4652eac1a0.tar.xz
serverdata-a5cc84660484054451ab8c912ec6fc4652eac1a0.zip
Some clean-up in gy inn npcs:
Setting all locally used temporary player variables to zero before closing. Replacing baselevel with BaseLevel, zeny with Zeny and hp with Hp.
Diffstat (limited to 'world/map/npc/027-2/crying_child.txt')
-rw-r--r--world/map/npc/027-2/crying_child.txt38
1 files changed, 23 insertions, 15 deletions
diff --git a/world/map/npc/027-2/crying_child.txt b/world/map/npc/027-2/crying_child.txt
index 54f70604..80cefcb3 100644
--- a/world/map/npc/027-2/crying_child.txt
+++ b/world/map/npc/027-2/crying_child.txt
@@ -1,5 +1,6 @@
// author: alastrim
// love triangle quest, involved npcs: Reid's Ghost, Hamond, Savaric, Aldred, Golbenez
+// Jenalya: some changes about variables (setting to zero if only used locally, naming)
027-2.gat,50,92,0|script|Aldred|314,{
@@ -18,6 +19,8 @@
set @state, ((QUEST_Graveyard_Inn & @Graveyard_Inn_MASK) >> @Graveyard_Inn_SHIFT);
+ set @minLevel, 80;
+
if (Sex == 0) set @madamsir$, "Madam";
if (Sex == 1) set @madamsir$, "Sir";
if (@state == 7) goto L_return5;
@@ -26,12 +29,12 @@
if (@state == 3) goto L_return2;
if (@state == 2) goto L_return1;
if (@state == 1) goto L_return;
- if (BaseLevel >= 80) goto L_intro;
+ if (BaseLevel >= @minLevel) goto L_intro;
L_cry:
mes "[Crying Child]";
mes "\"Waaahhhhh! *sniffle*\"";
- close;
+ goto L_Close;
L_intro:
mes "[Crying Child]";
@@ -42,7 +45,7 @@ L_intro:
mes "You bend your knees near the child, trying to gain his confidence and ask why he is crying. But looking closely, you are surprised to see that his skin color is an awful cadaveric grey...";
menu
"Calm down kid, what happened?",-,
- "Leave the kid alone.",L_close;
+ "Leave the kid alone.",L_Close;
mes "[Crying Child]";
mes "\"Oh, what? Who are you "+@madamsir$+", what are you doing here?\"";
next;
@@ -76,17 +79,17 @@ L_intro:
next;
menu
"Don't worry, I will look around. Maybe I can find it for you...",-,
- "Hey, you messed up, now you deal with this.",L_close;
+ "Hey, you messed up, now you deal with this.",L_Close;
mes "[Aldred]";
mes "\"Thank you " +strcharinfo(0)+"! Find it for me, pleeeease! Ohh, and don't tell my parents I lost their ring, okay?\"";
set @state, 1;
callsub S_Update_Mask;
- close;
+ goto L_Close;
L_return:
mes "[Aldred]";
mes "\"Please, help me " +@madamsir$+ ". If you find that ring I think things can be a little better between me and my parents.\"";
- close;
+ goto L_Close;
L_return1:
@@ -106,7 +109,7 @@ L_return1:
mes "\"Now I will put this thing back in its proper place... Thank you!\"";
set @state, 3;
callsub S_Update_Mask;
- close;
+ goto L_Close;
L_return2:
mes "[Aldred]";
@@ -119,7 +122,7 @@ L_return2:
next;
menu
"Sounds interesting... But who are your parents?",-,
- "Bad idea, it will only bring more problems...",L_close;
+ "Bad idea, it will only bring more problems...",L_Close;
set @state, 4;
callsub S_Update_Mask;
mes "[Aldred]";
@@ -127,12 +130,12 @@ L_return2:
next;
mes "\"Don't forget to come back with the ring after you talk to my parents.\"";
message strcharinfo(0), "Aldred hands you the ring and you keep it in a small pocket of your backpack";
- close;
+ goto L_Close;
L_return3:
mes "[Aldred]";
mes "\"I hope this ring doesn't mean a lot to my parents. This way you can keep it as a gift and I won't feel guilty about taking it.\"";
- close;
+ goto L_Close;
L_return4:
menu
@@ -160,19 +163,24 @@ L_return4:
set @state, 7;
callsub S_Update_Mask;
mes "\"I will tell my parents how great and helpful you are. Maybe they can even let you stay here at the inn for free!\"";
- close;
+ goto L_Close;
L_return5:
mes "[Aldred]";
mes "\"Thank you for all your help.\"";
- close;
+ goto L_Close;
L_full:
mes "[Aldred]";
mes "\"I dont think you can carry this ring... Your backpack is full! Throw something away and come back to get it.\"";
- close;
-
-L_close:
+ goto L_Close;
+
+L_Close:
+ set @madamsir$, "";
+ set @Graveyard_Inn_MASK, 0;
+ set @Graveyard_Inn_SHIFT, 0;
+ set @state, 0;
+ set @minLevel, 0;
close;
S_Update_Mask: