summaryrefslogtreecommitdiff
path: root/world/map/npc/005-1
diff options
context:
space:
mode:
authorcoffee <coffee@coffee-EP45-UD3L.(none)>2011-09-05 09:13:26 -0300
committercoffee <coffee@coffee-EP45-UD3L.(none)>2011-09-05 09:13:26 -0300
commitd73153db035a6527635844b2da8723d3e8759292 (patch)
tree21f6996e81a07618719484d04d3c306d14637073 /world/map/npc/005-1
parentc30af2c33f1530f38ed40ac029ef2a286b86099b (diff)
downloadserverdata-d73153db035a6527635844b2da8723d3e8759292.tar.gz
serverdata-d73153db035a6527635844b2da8723d3e8759292.tar.bz2
serverdata-d73153db035a6527635844b2da8723d3e8759292.tar.xz
serverdata-d73153db035a6527635844b2da8723d3e8759292.zip
Clear temporary variables after you close npc window. Npcs from maps 005-1 and 006-1.
Diffstat (limited to 'world/map/npc/005-1')
-rw-r--r--world/map/npc/005-1/spirit.txt22
-rw-r--r--world/map/npc/005-1/tree.txt44
2 files changed, 48 insertions, 18 deletions
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,{