summaryrefslogtreecommitdiff
path: root/world/map/npc/027-2
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
parent196973261680a938b082e195c7d62cbb33e24216 (diff)
downloadclassic-serverdata-a5cc84660484054451ab8c912ec6fc4652eac1a0.tar.gz
classic-serverdata-a5cc84660484054451ab8c912ec6fc4652eac1a0.tar.bz2
classic-serverdata-a5cc84660484054451ab8c912ec6fc4652eac1a0.tar.xz
classic-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')
-rw-r--r--world/map/npc/027-2/cerhan.txt9
-rw-r--r--world/map/npc/027-2/crying_child.txt38
-rw-r--r--world/map/npc/027-2/diary.txt6
-rw-r--r--world/map/npc/027-2/door.txt1
-rw-r--r--world/map/npc/027-2/golbenez.txt57
-rw-r--r--world/map/npc/027-2/headless_man.txt42
-rw-r--r--world/map/npc/027-2/husband.txt59
-rw-r--r--world/map/npc/027-2/innkeeper.txt66
-rw-r--r--world/map/npc/027-2/lover.txt49
-rw-r--r--world/map/npc/027-2/testnpcs.txt10
-rw-r--r--world/map/npc/027-2/werewolf.txt44
11 files changed, 258 insertions, 123 deletions
diff --git a/world/map/npc/027-2/cerhan.txt b/world/map/npc/027-2/cerhan.txt
index 51a14dd7..83598354 100644
--- a/world/map/npc/027-2/cerhan.txt
+++ b/world/map/npc/027-2/cerhan.txt
@@ -1,3 +1,5 @@
+// Author: Jenalya
+
027-2.gat,70,77,0|script|Cerhan|311,{
mes "[Cerhan]";
mes "\"Ah, hello! It is good to see another normal human at this strange place!\"";
@@ -5,7 +7,7 @@
menu
"That's true. What are you doing here?",L_Story,
"Yes, this place is really strange. I'm going to have another look around.",-;
- close;
+ goto L_Close;
L_Story:
mes "[Cerhan]";
@@ -19,7 +21,7 @@ L_Story:
"Good luck with that.",-;
mes "[Cerhan]";
mes "\"If you are interested in weapons and armor, you may want to come back later.\"";
- close;
+ goto L_Close;
L_Mylarin:
mes "[Cerhan]";
@@ -28,5 +30,8 @@ L_Mylarin:
mes "\"I can craft you an amazing strong armor with that - uhm, well, I first need to set up my smithy here.\"";
next;
mes "\"Please come back, when I'm ready with that. Mylarin dust... amazing.\"";
+ goto L_Close;
+
+L_Close:
close;
}
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:
diff --git a/world/map/npc/027-2/diary.txt b/world/map/npc/027-2/diary.txt
index 904da80f..d3394f4a 100644
--- a/world/map/npc/027-2/diary.txt
+++ b/world/map/npc/027-2/diary.txt
@@ -1,3 +1,5 @@
+// Author: Jenalya
+
027-2.gat,26,97,0|script|#Diary|127, {
set @Graveyard_Inn_MASK, NIBBLE_0_MASK;
set @Graveyard_Inn_SHIFT, NIBBLE_0_SHIFT;
@@ -5,6 +7,7 @@
set @reid, ((QUEST_Graveyard_Inn & @Graveyard_Inn_MASK) >> @Graveyard_Inn_SHIFT);
if (@reid >= 6) goto L_Diary;
+ set @reid, 0;
end;
L_Diary:
@@ -33,7 +36,10 @@ L_Diary:
set @reid, 7;
callsub S_Update_Mask;
+ goto L_Close;
+
L_Close:
+ set @reid, 0;
close;
S_Update_Mask:
diff --git a/world/map/npc/027-2/door.txt b/world/map/npc/027-2/door.txt
index 7626cdd9..d9f0bef5 100644
--- a/world/map/npc/027-2/door.txt
+++ b/world/map/npc/027-2/door.txt
@@ -10,6 +10,7 @@
L_Warp:
warp "027-2.gat", 27, 99;
+ set @reid, 0;
end;
}
diff --git a/world/map/npc/027-2/golbenez.txt b/world/map/npc/027-2/golbenez.txt
index 6c2b56d4..f23a6f71 100644
--- a/world/map/npc/027-2/golbenez.txt
+++ b/world/map/npc/027-2/golbenez.txt
@@ -78,13 +78,13 @@
set @state, 1;
callsub S_Update_Mask;
- close;
+ goto L_Close;
L_Back:
if (@lover >= 3)
goto L_Memory;
mes "Golbenez decides to ignore your presence.";
- close;
+ goto L_Close;
L_Memory:
mes "[Golbenez]";
@@ -98,7 +98,7 @@ L_Memory:
goto L_Detective;
mes "[Golbenez]";
mes "\"I was watching you playing detective. It is amusing. Play it a little longer and I may show you some of the memories from that time.\"";
- close;
+ goto L_Close;
L_Detective:
mes "[Golbenez]";
@@ -118,7 +118,7 @@ L_Detective:
mes "\"Ok, I'll show you the birdbrained womans memories if you bring me " + @ROTTENRAGS_AMOUNT + " Rotten Rags. And an Orange Cake.\"";
set @state, 2;
callsub S_Update_Mask;
- close;
+ goto L_Close;
L_Reid:
mes "[Golbenez]";
@@ -156,7 +156,7 @@ L_Reid:
mes "\"I'll explain the deal to you. Once you have paid for a memory, you can come and see it again as often as you like. And I collect whatever memory I want to. Mortals can be very amusing.\"";
next;
mes "\"I have more memories you might want to see. Bring me "+ @UNDEADEAR_AMOUNT + " Undead Ears. And a Chocolate Cake.\"";
- close;
+ goto L_Close;
L_Hamond:
mes "[Golbenez]";
@@ -190,7 +190,7 @@ L_Hamond:
mes "\"And how predictable they are. I can see in your eyes that you want to know how this drama went on.\"";
next;
mes "\"Bring me " + @UNDEADEYE_AMOUNT + " Undead Eyes and an Apple Cake.\"";
- close;
+ goto L_Close;
L_Savaric:
mes "[Golbenez]";
@@ -228,7 +228,7 @@ L_Savaric:
mes "Golbenez smiles";
mes "[Golbenez]";
mes "\"Oh, thank you.\"";
- close;
+ goto L_Close;
L_All:
if (@lover == 6)
@@ -240,7 +240,7 @@ L_All:
"I want to see Hamonds memory again.",L_H_Again,
"I want to see Savarics memory again.",L_S_Again,
"Nevermind.",L_Close;
- close;
+ goto L_Close;
L_Negotiate:
mes "Golbenez eyes are glowing greedily";
@@ -265,7 +265,7 @@ L_Negotiate:
mes "\"Bring me a soul of at least equal power to the mage. I don't care where you get it.\"";
set @state, 6;
callsub S_Update_Mask;
- close;
+ goto L_Close;
L_Soul:
mes "[Golbenez]";
@@ -297,59 +297,78 @@ L_Soul_Success:
mes "\"So be it, mortal. I'll release Savarics soul in exchange for this one.\"";
set @state, 7;
callsub S_Update_Mask;
- close;
+ goto L_Close;
L_Done:
mes "[Golbenez]";
mes "\"I hope you enjoyed your little detective game. I certainly did.\"";
- close;
+ goto L_Close;
L_Cake:
mes "Golbenez laughs.";
mes "[Golbenez]";
mes "\"That's why I like you - also you're a human, you have a nice sense of humor.\"";
- close;
+ goto L_Close;
L_S_Again:
callsub S_Savaricsmem;
mes "[Golbenez]";
mes "\"What a fool he was, even for a human.\"";
- close;
+ goto L_Close;
L_R_Again:
callsub S_Reidsmem;
mes "\"This memory seems to be exciting to you. Interesting.\"";
- close;
+ goto L_Close;
L_H_Again:
callsub S_Hamondsmem;
mes "[Golbenez]";
mes "\"Humans can be so stupid, can't they?\"";
- close;
+ goto L_Close;
L_Horns:
mes "Golbenez bursts out with laughter.";
next;
mes "[Golbenez]";
mes "\"Mortals! They never stop surprising me.\"";
- close;
+ goto L_Close;
L_Why_Stuff:
mes "[Golbenez]";
mes "\"That is not your concern.\"";
- close;
+ goto L_Close;
L_Betray:
mes "[Golbenez]";
mes "\"I'm warning you, mortal. Don't try to betray me!\"";
- close;
+ goto L_Close;
L_No_Cake:
mes "[Golbenez]";
mes "\"Fool! You forgot my cake!\"";
- close;
+ goto L_Close;
L_Close:
+ set @Graveyard_Inn_MASK, 0;
+ set @Graveyard_Inn_SHIFT, 0;
+ set @state, 0;
+ set @Graveyard_Inn_Woman_MASK, 0;
+ set @Graveyard_Inn_Woman_SHIFT, 0;
+ set @woman, 0;
+ set @Graveyard_Inn_Lover_MASK, 0;
+ set @Graveyard_Inn_Lover_SHIFT, 0;
+ set @lover, 0;
+ set @Graveyard_Inn_Husband_MASK, 0;
+ set @Graveyard_Inn_Husband_SHIFT, 0;
+ set @husband, 0;
+ set @ROTTENRAGS_AMOUNT, 0;
+ set @ROTTENRAGS_EXP, 0;
+ set @UNDEADEAR_AMOUNT, 0;
+ set @UNDEADEAR_EXP, 0;
+ set @UNDEADEYE_AMOUNT, 0;
+ set @UNDEADEYE_EXP, 0;
+ set @soul, 0;
close;
S_Reidsmem:
diff --git a/world/map/npc/027-2/headless_man.txt b/world/map/npc/027-2/headless_man.txt
index 4f630d0d..086856cf 100644
--- a/world/map/npc/027-2/headless_man.txt
+++ b/world/map/npc/027-2/headless_man.txt
@@ -36,18 +36,18 @@
mes "You jump back a bit, startled, as the head starts talking to you!";
mes "It's a little strange watching him talk, but it's better than looking at what's left of his neck.";
next;
- if (baselevel < 85)
+ if (BaseLevel < 85)
goto L_greet;
mes "[Headless Man]";
mes "\"Hello " + @madamsir$ + ". My name is Thurstan. Could I ask your assistance with something? I seem to be in a spot of difficulty.\"";
menu
"I'll listen, just keep that thing from dripping on me.", L_Quest_ask,
- "Ack, a bloody talking head! Gross, no way!", L_Quest_close;
+ "Ack, a bloody talking head! Gross, no way!", L_Close;
L_greet:
mes "[Headless Man]";
mes "\"Greetings " + @madamsir$ + "! Do you have any duck tape?\"";
- close;
+ goto L_Close;
L_Quest_ask:
mes "[Thurstan]";
@@ -59,9 +59,6 @@ L_Quest_ask:
"Lay it on me, Mr. Noggin!", L_Quest_start,
"Sorry, I'm kinda busy with, you know, living.", L_Quest_no;
-L_Quest_close:
- close;
-
L_Quest_start:
mes "[Thurstan]";
mes "\"Great! I will need the following things.\"";
@@ -82,12 +79,12 @@ L_Quest_start:
mes "\"I know it probably doesn't seem like that much to you, but it is a really big deal for me. I will try to find something to compensate you for your efforts.\"";
set @state, 1;
callsub S_Update_Mask;
- close;
+ goto L_Close;
L_Quest_no:
mes "[Thurstan]";
mes "\"Very well. Just don't come looking to me when your own head falls off!\"";
- close;
+ goto L_Close;
L_Quest_progress:
mes "[Thurstan]";
@@ -95,7 +92,7 @@ L_Quest_progress:
menu
"Yes, here you go!", L_Quest_check,
"What was I supposed to get again?", L_Quest_items,
- "No, I'm still working on it.", L_Quest_close;
+ "No, I'm still working on it.", L_Close;
L_Quest_check:
if (countitem("WispPowder") < @Wisp_Powder
@@ -142,13 +139,13 @@ L_Quest_check:
mes "\"Thank you so much! That is such a weight on my shoulders! Now that I have some mobility back, let me see what I can do to repay you. Would you mind coming back in a few minutes?\"";
set @state, 2;
callsub S_Update_Mask;
- close;
+ goto L_Close;
L_Quest_notenough:
mes "Thurstan quickly looks through the items you've brought.";
mes "[Thurstan]";
mes "\"It seems you are missing a few things. Please come back once you have everything on the list.\"";
- close;
+ goto L_Close;
L_Quest_items:
mes "[Thurstan]";
@@ -161,7 +158,7 @@ L_Quest_items:
mes "\"" + @Yellow_Dye + " vials of Yellow Dye,\"";
mes "\"" + @LB_Dye + " vials of Light Blue Dye,\"";
mes "\"We'll also need 1 Infantry Helmet to use as a bowl for mixing everything together.\"";
- close;
+ goto L_Close;
L_Quest_finished:
mes "[Thurstan]";
@@ -178,16 +175,33 @@ L_Quest_finished:
getitem "pinkiehelmet", 1;
set @state, 3;
callsub S_Update_Mask;
- close;
+ goto L_Close;
L_Full_Inv:
mes "[Thurstan]";
mes "\"I'd like to give you something for your efforts, but you're carrying too much stuff.\"";
- close;
+ goto L_Close;
L_Final:
mes "[Thurstan]";
mes "\"I guess I will need to find another way to re-attach my cranium. If you come across any good alchemists who might be able to help, please let me know.\"";
+ goto L_Close;
+
+L_Close:
+
+ set @madamsir$, "";
+ set @Graveyard_Inn_MASK, 0;
+ set @Graveyard_Inn_SHIFT, 0;
+ set @state, 0;
+ set @Wisp_Powder, 0;
+ set @Polt_Powder, 0;
+ set @Spec_Powder, 0;
+ set @Iron_Pot, 0;
+ set @Conc_Pot, 0;
+ set @Red_Dye, 0;
+ set @Yellow_Dye, 0;
+ set @LB_Dye, 0;
+ set @Glue_Exp, 0;
close;
S_Update_Mask:
diff --git a/world/map/npc/027-2/husband.txt b/world/map/npc/027-2/husband.txt
index 333470d1..72adb3bc 100644
--- a/world/map/npc/027-2/husband.txt
+++ b/world/map/npc/027-2/husband.txt
@@ -1,6 +1,6 @@
// author: Jenalya
// love triangle quest, involved npcs: Reid's Ghost, Hamond, Savaric, Aldred, Golbenez
-// state 0: if baselevel >= 85, he asks for something to cool the drinks (ice cubes)
+// state 0: if BaseLevel >= 85, he asks for something to cool the drinks (ice cubes)
// state 1: can be asked about the ring. needs @ICE_CUBE_AMOUNT ice cubes, then asks for bones and skulls.
// state 2: wants @BONE_AMOUNT and @SKULL_AMOUNT bones and skulls
// state 3: can be asked about the ring. needs @woman > 5 to be asked about savaric, tells, if crying child quest is completed
@@ -26,6 +26,12 @@
set @kidstate, ((QUEST_Graveyard_Inn & @Graveyard_Inn_Kid_MASK) >> @Graveyard_Inn_Kid_SHIFT);
+ set @Graveyard_Inn_Golbenez_MASK, NIBBLE_4_MASK;
+ set @Graveyard_Inn_Golbenez_SHIFT, NIBBLE_4_SHIFT;
+
+ set @golbanez, ((QUEST_Graveyard_Inn & @Graveyard_Inn_Golbenez_MASK) >> @Graveyard_Inn_Golbenez_SHIFT);
+
+ set @minLevel, 85;
set @ICE_CUBE_AMOUNT, 100;
set @ICE_CUBE_EXP, 75000;
set @BONE_AMOUNT, 100;
@@ -43,7 +49,7 @@
mes "[Pale Man]";
mes "\"Hello, I hope you're enjoying your time in Reid's Inn. My name is Hamond, and I'm running this inn together with my beautiful wife Reid. If there is anything I can do for you, please let me know.\"";
- if (baselevel < 85)
+ if (BaseLevel < @minLevel)
goto L_Close;
next;
menu
@@ -74,7 +80,7 @@
set @state, 1;
callsub S_Update_Mask;
- close;
+ goto L_Close;
L_Ice_Cube:
mes "[Hamond]";
@@ -96,7 +102,7 @@ L_Ice_Cube:
"Maybe this never melting Ice Cube?", L_Check_Ice,
"I'm still searching.", L_Close;
mes "\"You didn't? Too bad.\"";
- close;
+ goto L_Close;
L_Check_Ice:
if (countitem("IceCube") < @ICE_CUBE_AMOUNT)
@@ -133,7 +139,7 @@ L_Check_Ice:
mes "\"I know, this is a bit strange - I'm still getting used to being dead. But a patron's wish is a patron's wish!\"";
next;
mes "\"Can you bring me a huge amount of bones and skulls? This way I can fulfill that peculiar wish and make another patron very happy!\"";
- close;
+ goto L_Close;
L_Check_Bones:
mes "[Hamond]";
@@ -170,7 +176,7 @@ L_Brought_Bones:
"You're welcome.",-;
mes "[Hamond]";
mes "\"Please make yourself at home.\"";
- close;
+ goto L_Close;
L_Savaric:
mes "Hamond's face turns into an ugly grimace.";
@@ -204,20 +210,20 @@ L_Jealousy:
mes "\"Ah, this is annoying.\"";
set @state, 4;
callsub S_Update_Mask;
- close;
+ goto L_Close;
L_Man:
mes "[Hamond]";
mes "\"You're a man - I think you would understand what is happening to me.\"";
mes "\"But, to be honest, I think I'd only be able to talk about such a complicated matter if I am sure I am sharing my feelings with a good, wise and understanding person. No offense, it is just that I barely know you...\"";
- close;
+ goto L_Close;
L_Woman:
mes "[Hamond]";
mes "\"Hrm - I don't think you'll understand. It is a problem between men.\"";
next;
mes "\"And, to be honest, I'd only be able to talk about such a complicated matter if I am sure I am sharing my feelings with a good, wise and understanding person. No offense, it is just that I barely know you...\"";
- close;
+ goto L_Close;
L_Ring:
mes "[Hamond]";
@@ -228,7 +234,7 @@ L_Ring:
mes "\"Anyway, I remember you could easily find one of these in a lot of small shops in town. I am pretty sure that whoever lost it won't bother coming all the way back to get it.\"";
set @kidstate, 5;
callsub S_Update_Mask_Kid;
- close;
+ goto L_Close;
L_News:
mes "[Hamond]";
@@ -262,12 +268,12 @@ L_News:
mes "\"" + strcharinfo(0) + "! Can you help me once more? Please get " + @RUBY_AMOUNT + " Rubies and bring them to her as a symbol of my love and my remorse.\"";
set @state, 5;
callsub S_Update_Mask;
- close;
+ goto L_Close;
L_Waiting:
mes "[Hamond]";
mes "\"Did you bring Reid the " + @RUBY_AMOUNT + " Rubies?\"";
- close;
+ goto L_Close;
L_Apologize:
mes "[Hamond]";
@@ -286,31 +292,50 @@ L_Apologize:
getitem "BowlerHatBrown", 1;
set @state, 7;
callsub S_Update_Mask;
- close;
+ goto L_Close;
L_Thanks:
mes "[Hamond]";
mes "\"Good to see you, my friend! The inn is running well and I'm getting used to being dead.\"";
- close;
+ goto L_Close;
L_Not_Enough_B:
if (countitem("Bone") < @BONE_AMOUNT)
mes "\"I need more Bones than you have with you right now.\"";
if (countitem("Skull") < @SKULL_AMOUNT)
mes "\"Maybe you should come back with more Skulls than you have now. I don't think it is enough.\"";
- close;
+ goto L_Close;
L_Not_Enough_Cubes:
mes "[Hamond]";
mes "\"Yes, they look good! But I think I need more of them. Maybe " + @ICE_CUBE_AMOUNT + "?\"";
- close;
+ goto L_Close;
L_Full_Inv:
mes "[Hamond]";
mes "\"You have a really full backpack, haven't you? Come back when you have some room in there.\"";
- close;
+ goto L_Close;
L_Close:
+ set @Graveyard_Inn_MASK, 0;
+ set @Graveyard_Inn_SHIFT, 0;
+ set @state, 0;
+ set @Graveyard_Inn_Woman_MASK, 0;
+ set @Graveyard_Inn_Woman_SHIFT, 0;
+ set @woman, 0;
+ set @Graveyard_Inn_Kid_MASK, 0;
+ set @Graveyard_Inn_Kid_SHIFT, 0;
+ set @Graveyard_Inn_Golbenez_MASK, 0;
+ set @Graveyard_Inn_Golbenez_SHIFT, 0;
+ set @golbanez, 0;
+ set @kidstate, 0;
+ set @minLevel, 0;
+ set @ICE_CUBE_AMOUNT, 0;
+ set @ICE_CUBE_EXP, 0;
+ set @BONE_AMOUNT, 0;
+ set @SKULL_AMOUNT, 0;
+ set @BONE_EXP, 0;
+ set @RUBY_AMOUNT, 0;
close;
S_Update_Mask_Kid:
diff --git a/world/map/npc/027-2/innkeeper.txt b/world/map/npc/027-2/innkeeper.txt
index b1732ee0..769d0dfd 100644
--- a/world/map/npc/027-2/innkeeper.txt
+++ b/world/map/npc/027-2/innkeeper.txt
@@ -1,7 +1,7 @@
// author: Jenalya
// love triangle quest, involved npcs: Reid's Ghost, Hamond, Savaric, Aldred, Golbenez
// state 0: first talk
-// state 1: if baselevel >= 85 player can ask about the inn and dead
+// state 1: if BaseLevel >= 85 player can ask about the inn and dead
// state 2: reid knows now she's dead, can be asked about the ring
// state 3: can be asked about ring, player offered help to find out what happened, she wants something to represent her sadness (frozen yeti tears)
// state 4: can be asked about ring, can be asked about her life
@@ -40,6 +40,7 @@
set @golbanez, ((QUEST_Graveyard_Inn & @Graveyard_Inn_Golbanez_MASK) >> @Graveyard_Inn_Golbanez_SHIFT);
+ set @minLevel, 85;
set @YETI_TEAR_AMOUNT, 30;
set @YETI_TEAR_EXP, 100000;
set @DIAMOND_AMOUNT, 20; // caution, this value needs to be the same as in the lovers script!
@@ -74,12 +75,12 @@
L_After_Welcome:
mes "[Reid's Ghost]";
mes "\"Please enjoy yourself!\"";
- if (baselevel < 85)
- goto L_Close;
+ if (BaseLevel < @minLevel)
+ goto L_Close;
L_Ask_Dead:
- if (baselevel < 85)
- goto L_Close;
+ if (BaseLevel < 85)
+ goto L_Close;
menu
"What happened to you?", - ,
@@ -105,7 +106,7 @@ L_Ask_Dead:
mes "She stares into space and doesn't seem to notice you anymore.";
set @state, 2;
callsub S_Update_Mask;
- close;
+ goto L_Close;
L_Offer_Help2:
mes "Reid's Ghost is still staring into space.";
@@ -128,7 +129,7 @@ L_Offer_Help1:
set @state, 3;
callsub S_Update_Mask;
- close;
+ goto L_Close;
L_Bring_Tears:
mes "[Reid's Ghost]";
@@ -150,7 +151,7 @@ L_Bring_Tears:
"I found this frozen tear to represent your sadness.", L_Check_Tears,
"I'm still searching.", L_Close;
mes "\"You didn't? It seems you're not serious with your offer to help me.\"";
- close;
+ goto L_Close;
L_Check_Tears:
if (countitem("FrozenYetiTear") < @YETI_TEAR_AMOUNT)
@@ -256,12 +257,12 @@ L_Lovestory:
set @state, 6;
callsub S_Update_Mask;
- close;
+ goto L_Close;
L_Read_Diary:
mes "[Reid's Ghost]";
mes "\"Please go into my room and read the diary. You will find my diary in the bookshelf, hidden behind a book with poems.\"";
- close;
+ goto L_Close;
L_Savaric:
mes "[Reid's Ghost]";
@@ -290,7 +291,7 @@ L_Savaric:
mes "\"I'm feeling hurt. And confused. Both Hamond and Savaric turned out not to be the persons I believed them to be.\"";
set @state, 8;
callsub S_Update_Mask;
- close;
+ goto L_Close;
L_Sorry:
mes "[Reid's Ghost]";
@@ -311,7 +312,7 @@ L_Sorry:
menu
"Hamond sent me to bring you this.",L_Ruby,
"Nevermind.",-;
- close;
+ goto L_Close;
L_Diamond:
if (countitem("GemRawWhite") < @DIAMOND_AMOUNT)
@@ -325,7 +326,7 @@ L_Diamond:
callsub S_Update_Mask_Lover;
set @state, @state + 1;
callsub S_Update_Mask;
- close;
+ goto L_Close;
L_Ruby:
if (countitem("GemRawRed") < @RUBY_AMOUNT)
@@ -339,7 +340,7 @@ L_Ruby:
callsub S_Update_Mask_Husband;
set @state, @state + 1;
callsub S_Update_Mask;
- close;
+ goto L_Close;
L_Kidding:
mes "[Reid's Ghost]";
@@ -348,7 +349,7 @@ L_Kidding:
L_Tease:
mes "[Reid's Ghost]";
mes "\"Don't be mean! I never felt like that before.\"";
- close;
+ goto L_Close;
L_Thanks:
mes "[Reid's Ghost]";
@@ -368,7 +369,7 @@ L_Mylarin:
mes "\"I'm not sure what it is used for, but I remember her saying something about some special crafting tradition which uses it to make really strong armor.\"";
next;
mes "\"Maybe you should try to find someone who can use it.\"";
- close;
+ goto L_Close;
L_Happy:
mes "[Reid's Ghost]";
@@ -376,7 +377,7 @@ L_Happy:
menu
"Can you tell me again about the powder you gave me?",L_Mylarin,
"I'm glad I could help.",-;
- close;
+ goto L_Close;
L_Not_Enough_Tears:
mes "[Reid's Ghost]";
@@ -385,19 +386,19 @@ L_Not_Enough_Tears:
mes "\"This is beautiful! But one of them isn't enough to represent my sadness.\"";
if (@tears > 1)
mes "\"This is beautiful! But " + @tears + " of them aren't enough to represent my sadness.\"";
- close;
+ goto L_Close;
L_Man:
mes "[Reid's Ghost]";
mes "\"What I have to tell is very personal. You're a man - I'm not sure if I want to tell you. I know you helped me already and showed me you are a sensitive man, but I barely know you. I am sorry, but I have to think a little bit more. Maybe later, when I know you better, I can tell you more about it. \"";
- close;
+ goto L_Close;
L_Woman:
mes "[Reid's Ghost]";
mes "\"What I have to tell you is something very personal. You are a woman like me - I'm sure you would understand.\"";
next;
mes "\"But I'm not sure if I want to tell you. I know you helped me already and showed me you are a sensitive woman, but I barely know you. I am sorry, but I have to think a little bit more. Maybe later, when I know you better, I can tell you more about it. \"";
- close;
+ goto L_Close;
L_Ring:
mes "[Reid's Ghost]";
@@ -408,14 +409,35 @@ L_Ring:
mes "\"Ah, I forgot again. It pains me not being able to wear it. Please, take it with you, I don't want it anymore. It hurts too much.\"";
set @kidstate, 6;
callsub S_Update_Mask_Kid;
- close;
+ goto L_Close;
L_Full_Inv:
mes "[Reid's Ghost]";
mes "\"Dear, you're carrying so much stuff, you can't take my present. Come back later to take it.\"";
- close;
+ goto L_Close;
L_Close:
+ set @Graveyard_Inn_MASK, 0;
+ set @Graveyard_Inn_SHIFT, 0;
+ set @state, 0;
+ set @Graveyard_Inn_Lover_MASK, 0;
+ set @Graveyard_Inn_Lover_SHIFT, 0;
+ set @lover, 0;
+ set @Graveyard_Inn_Kid_MASK, 0;
+ set @Graveyard_Inn_Kid_SHIFT, 0;
+ set @kidstate, 0;
+ set @Graveyard_Inn_Husband_MASK, 0;
+ set @Graveyard_Inn_Husband_SHIFT, 0;
+ set @husband, 0;
+ set @Graveyard_Inn_Golbanez_MASK, 0;
+ set @Graveyard_Inn_Golbanez_SHIFT, 0;
+ set @golbanez, 0;
+ set @minLevel, 0;
+ set @YETI_TEAR_AMOUNT, 0;
+ set @YETI_TEAR_EXP, 0;
+ set @DIAMOND_AMOUNT, 0;
+ set @RUBY_AMOUNT, 0;
+ set @tears, 0;
close;
S_Update_Mask_Kid:
diff --git a/world/map/npc/027-2/lover.txt b/world/map/npc/027-2/lover.txt
index 61703327..f39a4e2b 100644
--- a/world/map/npc/027-2/lover.txt
+++ b/world/map/npc/027-2/lover.txt
@@ -1,6 +1,6 @@
// author: Jenalya
// love triangle quest, involved npcs: Reid's Ghost, Hamond, Savaric, Aldred, Golbenez
-// state 0: if baselevel >= 85, tells he want dark crystals
+// state 0: if BaseLevel >= 85, tells he want dark crystals
// state 1: needs @CRYSTAL_AMOUNT dark crystals to go on, tells the player to search the inn for source of magic (Golbenez)
// state 2: if the player has talked to Golbenez, he tells you to negotiate with him to find out what happened
// state 3: when player has seen all memories (@golbanez < 5), telling Savaric what happened. he asks the player to bring reid @DIAMOND_AMOUNT diamonds
@@ -26,6 +26,7 @@
set @golbanez, ((QUEST_Graveyard_Inn & @Graveyard_Inn_Golbenez_MASK) >> @Graveyard_Inn_Golbenez_SHIFT);
+ set @minLevel, 85;
set @CRYSTAL_AMOUNT, 500;
set @CRYSTAL_EXP, 200000;
set @CRYSTAL_EXTRA_EXP, 100;
@@ -42,7 +43,7 @@
mes "You see a dead man hanging. This place is creepy!";
next;
- if (baselevel < 85) goto L_Close;
+ if (BaseLevel < @minLevel) goto L_Close;
mes "Suddenly the man opens his eyes and looks at you.";
next;
mes "[Hanged Man]";
@@ -62,7 +63,7 @@
mes "\"I'll need... well, at least " + @CRYSTAL_AMOUNT + ". But if you have more, I can use extras!\"";
set @state, 1;
callsub S_Update_Mask;
- close;
+ goto L_Close;
L_Crystals:
mes "[Hanged Man]";
@@ -104,7 +105,7 @@ L_Skip:
next;
mes "The buzzing gets louder and louder, so you can't hear a word the hanged man is saying now.";
next;
- set hp, 5;
+ set Hp, 5;
mes "The crystals explode and hit you!";
next;
mes "You fall down on the floor and blink frantically to regain your eyesight.";
@@ -129,7 +130,7 @@ L_Skip:
mes "\"If you can forgive me my behaviour, may I ask you for another favor? Can you please search for someone or something in this inn that could be the source of this dark magic?\"";
set @state, 2;
callsub S_Update_Mask;
- close;
+ goto L_Close;
L_News:
mes "[Savaric]";
@@ -164,7 +165,7 @@ L_Golbenez:
mes "\"Savaric seems to be completely absorbed in his thoughts.\"";
menu
"Hello? Are you still there?",-,
- "Excuse me, I don't want to interrupt you, but can you explain to me what's going on? I'm confused",-,
+ "Excuse me, I don't want to interrupt you, but can you explain to me what's going on? I'm confused.",-,
"Hey! I'm talking with you!",-;
mes "Savaric winces.";
next;
@@ -185,7 +186,7 @@ L_Golbenez:
mes "\"" + strcharinfo(0) + "! I need your help again! Please return to Golbenez and try to get out of him what was happening here. But be careful when negotiating.. he will demand a service in return.\"";
set @state, 3;
callsub S_Update_Mask;
- close;
+ goto L_Close;
L_Golb:
mes "[Savaric]";
@@ -210,12 +211,12 @@ L_Golb:
mes "\"But wait. It is not enough just to ask for forgiveness. Please, can you bring her " + @DIAMOND_AMOUNT + " Diamonds? They symbolize my pure feelings for her.\"";
set @state, 4;
callsub S_Update_Mask;
- close;
+ goto L_Close;
L_Waiting:
mes "[Savaric]";
mes "\"Have you already brought the Diamonds to Reid?\"";
- close;
+ goto L_Close;
L_Apologize:
mes "[Savaric]";
@@ -228,7 +229,7 @@ L_Apologize:
mes "\"Golbenez took my soul and I want it back. You were very clever with how you negotiated with him so far. Could you get my soul back for me?\"";
set @state, 6;
callsub S_Update_Mask;
- close;
+ goto L_Close;
L_Want_Soul:
if (@golbanez >= 7)
@@ -240,7 +241,7 @@ L_Want_Soul:
"Yes, but it isn't easy.",-;
mes "[Savaric]";
mes "\"Thank you so much! I'm counting on you!\"";
- close;
+ goto L_Close;
L_Soul:
mes "[Savaric]";
@@ -256,28 +257,44 @@ L_Soul:
mes "\"This is what mages and their apprentices wore when I lived. It is white because I wasn't a master yet.\"";
next;
mes "\"But I guess the old traditions have changed since then.\"";
- close;
+ goto L_Close;
L_Have_Soul:
mes "[Savaric]";
mes "\"I'll be in your debt forever. Thank you so much.\"";
- close;
+ goto L_Close;
L_Reid:
mes "[Savaric]";
mes "\"Relationship? Well, she is the innkeeper of this inn and I'm a patron. There is nothing more to say about this.\"";
- close;
+ goto L_Close;
L_Not_Enough_Crystals:
mes "It seems you managed to get some, but not enough. Can you bring me more?";
- close;
+ goto L_Close;
L_Full_Inv:
mes "[Savaric]";
mes "\"Oh, you can't carry anything more. Come back when you can take it.\"";
- close;
+ goto L_Close;
L_Close:
+ set @Graveyard_Inn_MASK, 0;
+ set @Graveyard_Inn_SHIFT, 0;
+ set @state, 0;
+ set @Graveyard_Inn_Woman_MASK, 0;
+ set @Graveyard_Inn_Woman_SHIFT, 0;
+ set @woman, 0;
+ set @Graveyard_Inn_Golbenez_MASK, 0;
+ set @Graveyard_Inn_Golbenez_SHIFT, 0;
+ set @golbanez, 0;
+ set @minLevel, 0;
+ set @CRYSTAL_AMOUNT, 0;
+ set @CRYSTAL_EXP, 0;
+ set @CRYSTAL_EXTRA_EXP, 0;
+ set @CRYSTAL_MAX, 0;
+ set @DIAMOND_AMOUNT, 0;
+ set @crystal, 0;
close;
S_Update_Mask:
diff --git a/world/map/npc/027-2/testnpcs.txt b/world/map/npc/027-2/testnpcs.txt
index 79c61b4a..48f85a95 100644
--- a/world/map/npc/027-2/testnpcs.txt
+++ b/world/map/npc/027-2/testnpcs.txt
@@ -30,18 +30,22 @@
L_0:
mes "[Darnel]";
mes "\"zzzZZZzzz...\"";
- close;
+ goto L_Close;
L_1:
mes "[Darnel]";
mes "\"Ish that a Zzombee?...\"";
- close;
+ goto L_Close;
L_2:
mes "[Darnel]";
mes "\"Auuu... Hiccup... Don't byte mee... \"";
- close;
+ goto L_Close;
L_3:
mes "[Darnel]";
mes "\"Moar Bearr...Pleash!\"";
+ goto L_Close;
+
+L_Close:
+ set @drunker, 0;
close;
}
diff --git a/world/map/npc/027-2/werewolf.txt b/world/map/npc/027-2/werewolf.txt
index 59272169..9c7c4468 100644
--- a/world/map/npc/027-2/werewolf.txt
+++ b/world/map/npc/027-2/werewolf.txt
@@ -1,3 +1,5 @@
+// author: Jenalya
+
027-2.gat,118,23,0|script|Wolfgang|305,{
set @Graveyard_Inn_MASK, NIBBLE_5_MASK;
set @Graveyard_Inn_SHIFT, NIBBLE_5_SHIFT;
@@ -7,6 +9,7 @@
set @ANIMALBONES_AMOUNT, 30;
set @ANIMALBONES_EXP, 40000;
set @money, 1000;
+ set @minLevel, 80;
if (@state > 1) goto L_Happy;
if (@state == 1) goto L_Bones;
@@ -15,7 +18,7 @@
mes "\"What a nice place here, isn't it?\"";
next;
mes "\"Just the stuff they call 'food' in here is awful, bah.\"";
- if (baselevel < 80)
+ if (BaseLevel < @minLevel)
goto L_Close;
next;
mes "\"I like bones from big animals, the best would be with some raw flesh on it. But just the bones are fine too.\"";
@@ -23,7 +26,7 @@
mes "\"Can you bring me " + @ANIMALBONES_AMOUNT + " of them?\"";
set @state, 1;
callsub S_Update_Mask;
- close;
+ goto L_Close;
L_Bones:
mes "[Wolfgang]";
@@ -45,7 +48,7 @@ L_Bones:
"Not yet.",L_Close;
menu
"Not yet.",-;
- close;
+ goto L_Close;
L_Bring:
if (countitem("AnimalBones") < @ANIMALBONES_AMOUNT)
@@ -56,19 +59,19 @@ L_Bring:
mes "\"Ah! Wonderful! Thank you.\"";
set @state, 2;
callsub S_Update_Mask;
- close;
+ goto L_Close;
L_Human:
mes "[Wolfgang]";
mes "\"What?! That's a humans bone! I don't eat humans. That brings only trouble.\"";
next;
mes "\"Besides, from that I heard, they taste bad.\"";
- close;
+ goto L_Close;
L_Not_Enough:
mes "[Wolfgang]";
mes "\"Are you trying to kid me? I can count.\"";
- close;
+ goto L_Close;
L_Happy:
mes "You see the werewolf happily crunching the bones you brought him.";
@@ -83,17 +86,17 @@ L_Happy:
menu
"Sure, why not?",L_Game,
"No, thanks.",-;
- close;
+ goto L_Close;
//The game mechanics is copied from casino.txt
L_Game:
- if (zeny < @money)
+ if (Zeny < @money)
goto L_No_Money;
mes "[Wolfgang]";
mes "\"Very nice. Let's start.\"";
mes "He shuffles the cards.";
next;
- set zeny, zeny - @money;
+ set Zeny, Zeny - @money;
set @croupier, rand(0, 4);
set @croupier, @croupier + 17;
set @player, rand(4, 21);
@@ -126,19 +129,19 @@ L_End:
if (@player <= @croupier)
goto L_Lost;
mes "\"You won! Hrm, here is your money.\"";
- set zeny, zeny + (3 * @money);
- close;
+ set Zeny, Zeny + (3 * @money);
+ goto L_Close;
L_No_Money:
mes "\"You need at least " + @money + " GP.\"";
- close;
+ goto L_Close;
L_Lost:
mes "[Wolfgang]";
mes "\"Fine! I won!";
mes "You got " + @player + " with your cards.";
mes "I had " + @croupier + ".\"";
- close;
+ goto L_Close;
L_Ace:
set @player, @player + 11;
@@ -154,9 +157,20 @@ L_Ace:
menu
"Yes", L_Another,
"No", L_End;
- close;
+ goto L_Close;
L_Close:
+ set @Graveyard_Inn_MASK, 0;
+ set @Graveyard_Inn_SHIFT, 0;
+ set @state, 0;
+ set @ANIMALBONES_AMOUNT, 0;
+ set @ANIMALBONES_EXP, 0;
+ set @money, 0;
+ set @minLevel, 0;
+
+ set @croupier, 0;
+ set @player, 0;
+ set @tempace, 0;
close;
S_Update_Mask:
@@ -164,4 +178,4 @@ S_Update_Mask:
(QUEST_Graveyard_Inn & ~(@Graveyard_Inn_MASK))
| (@state << @Graveyard_Inn_SHIFT);
return;
-} \ No newline at end of file
+}