summaryrefslogtreecommitdiff
path: root/world/map/npc/001-1
diff options
context:
space:
mode:
Diffstat (limited to 'world/map/npc/001-1')
-rw-r--r--world/map/npc/001-1/bernard.txt35
-rw-r--r--world/map/npc/001-1/gossip.txt43
-rw-r--r--world/map/npc/001-1/mikhail.txt54
-rw-r--r--world/map/npc/001-1/sandra.txt43
-rw-r--r--world/map/npc/001-1/sarah.txt43
-rw-r--r--world/map/npc/001-1/vincent.txt54
6 files changed, 157 insertions, 115 deletions
diff --git a/world/map/npc/001-1/bernard.txt b/world/map/npc/001-1/bernard.txt
index 23b39f5c..0d65e6d2 100644
--- a/world/map/npc/001-1/bernard.txt
+++ b/world/map/npc/001-1/bernard.txt
@@ -1,10 +1,16 @@
-//
+// Variables used: nibble 0 of QUEST_SouthTulimshar
001-1.gat,37,44,0|script|Bernard|117,{
- if(TMW_Quest >= 4) goto L_Done2;
- if(TMW_Quest == 3) goto L_Progress2;
- if(TMW_Quest == 2) goto L_Done1;
- if(TMW_Quest == 1) goto L_Progress;
+
+ // This NPC previously used the variable TMW_Quest
+ callfunc "ClearVarTMW_Quest";
+
+ set @state, ((QUEST_SouthTulimshar & NIBBLE_0_MASK) >> NIBBLE_0_SHIFT);
+
+ if(@state >= 4) goto L_Done2;
+ if(@state == 3) goto L_Progress2;
+ if(@state == 2) goto L_Done1;
+ if(@state == 1) goto L_Progress;
set @TEMP, rand(2);
if(@TEMP == 0) goto L_Opening0;
@@ -45,7 +51,8 @@ L_Req1:
goto L_Set;
L_Set:
- set TMW_Quest,1;
+ set @state, 1;
+ callsub S_Update_Var;
mes "[Bernard]";
mes "\"Please bring it to me!\"";
goto L_Close;
@@ -60,7 +67,10 @@ L_Progress:
delitem "RoastedMaggot", 1;
getexp 100, 0;
getitem "CherryCake", 5;
- set TMW_Quest, 2;
+ set @state, 2;
+ callsub S_Update_Var;
+ next;
+ mes "\"Now let's see...\"";
goto L_Close;
L_Progress2:
@@ -73,7 +83,8 @@ L_Progress2:
delitem "MaggotSlime", 3;
getexp 100, 0;
getitem "Beer", 3;
- set TMW_Quest, 4;
+ set @state, 4;
+ callsub S_Update_Var;
goto L_Close;
L_NotEnough:
@@ -93,7 +104,8 @@ L_Done1:
next;
mes "\"I need 3 Maggot Slimes for that.\"";
mes "\"Bring them to me, and I'll give you something nice.\"";
- set TMW_Quest,3;
+ set @state, 3;
+ callsub S_Update_Var;
goto L_Close;
L_Done2:
@@ -105,6 +117,7 @@ L_Done2:
L_Close:
set @TEMP, 0;
+ set @state, 0;
close;
L_TooMany:
@@ -112,4 +125,8 @@ L_TooMany:
mes "[Bernard]";
mes "\"You don't have room for my reward. I'll wait until you do.\"";
goto L_Close;
+
+S_Update_Var:
+ set QUEST_SouthTulimshar, (QUEST_SouthTulimshar & ~(NIBBLE_0_MASK) | (@state << NIBBLE_0_SHIFT));
+ return;
}
diff --git a/world/map/npc/001-1/gossip.txt b/world/map/npc/001-1/gossip.txt
index a5b43329..468b8b48 100644
--- a/world/map/npc/001-1/gossip.txt
+++ b/world/map/npc/001-1/gossip.txt
@@ -1,6 +1,16 @@
// NPC to provide hints on progression of linear quest chain in Tulimshar
001-1.gat,49,31,0|script|Gladys|154,{
+
+ // This NPC previously used the variable TMW_Quest
+ callfunc "ClearVarTMW_Quest";
+
+ set @guards, ((QUEST_SouthTulimshar & BYTE_2_MASK) >> BYTE_2_SHIFT);
+ set @bermik, ((QUEST_SouthTulimshar & NIBBLE_0_MASK) >> NIBBLE_0_SHIFT);
+ set @sarah, ((QUEST_SouthTulimshar & NIBBLE_1_MASK) >> NIBBLE_1_SHIFT);
+ set @vincent, ((QUEST_SouthTulimshar & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT);
+ set @sandra, ((QUEST_SouthTulimshar & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT);
+
mes "[Gladys, Town Gossip]";
mes "\"Hello deary! I hear some of the most fascinating rumors and bits of news. I just heard a bit more today!\"";
mes "\"Would you like me to let you in on the good stuff?\"";
@@ -9,18 +19,18 @@
"No thanks.", L_No;
L_Yes:
- if (TMW_Quest >=40) goto L_Ferry;
- if (TMW_Quest >=12) goto L_Desert;
- if (TMW_Quest >=10) goto L_Sandra;
- if (TMW_Quest >=8) goto L_Vinc;
- if (TMW_Quest >=6) goto L_Sarah;
- if (TMW_Quest >=4) goto L_Mik;
- if (TMW_Quest <1) goto L_Intro;
+ if (@bermik < 4) goto L_Intro;
+ if (@bermik < 6) goto L_Mik;
+ if (@sarah < 2) goto L_Sarah;
+ if (@vincent < 2) goto L_Vinc;
+ if (@sandra < 2) goto L_Sandra;
+ if (@guards < 28) goto L_Desert;
+ goto L_Ferry;
L_No:
mes "[Gladys, Town Gossip]";
mes "\"Very well. Come back whenever you like. I am always getting juicy bits of news!\"";
- close;
+ goto L_Close;
L_Intro:
mes "[Gladys, Town Gossip]";
@@ -30,7 +40,7 @@ L_Intro:
mes "\"I also overheard some of the children in the square talking today. I think they are having trouble with some of their chores. Kids these days...\"";
next;
mes "The old lady trails off and starts muttering to herself about hills and snow. Perhaps it's best to leave her alone for now.";
- close;
+ goto L_Close;
L_Mik:
mes "[Gladys, Town Gossip]";
@@ -38,7 +48,7 @@ L_Mik:
next;
mes "[Gladys, Town Gossip]";
mes "\"One of the ladies in my quilting club mentioned giving a task to her grandson. I have my doubts about whether he ever finished it...\"";
- close;
+ goto L_Close;
L_Sarah:
mes "[Gladys, Town Gossip]";
@@ -46,12 +56,12 @@ L_Sarah:
next;
mes "[Gladys, Town Gossip]";
mes "\"Do you believe what parents will let their kids do these days?! I heard about this girl at the far side of town who does nothing but eat sweets all day! Honestly, what is the world coming to?\"";
- close;
+ goto L_Close;
L_Vinc:
mes "[Gladys, Town Gossip]";
mes "\"I just got news of an exciting new business opportunity! There's supposed to be a new entrepreneur in town somewhere making toys. You should get in on the ground floor!\"";
- close;
+ goto L_Close;
L_Sandra:
mes "[Gladys, Town Gossip]";
@@ -59,7 +69,7 @@ L_Sandra:
next;
mes "[Gladys, Town Gossip]";
mes "\"I've been hearing reports of you all over town! I think there's only one little girl you haven't assisted, but she's a strange one...always messing about with bugs. Yuck!\"";
- close;
+ goto L_Close;
L_Desert:
if (Sex == 0) set @person$, "gal";
@@ -76,9 +86,14 @@ L_Desert:
L_Ferry:
mes "[Gladys, Town Gossip]";
mes "I heard that there is a handsome sailor in the north of town who will take people to exotic new places! I'm saving my pennies!\"";
- close;
+ goto L_Close;
L_Close:
set @person$, "";
+ set @guards, 0;
+ set @bermik, 0;
+ set @sarah, 0;
+ set @vincent, 0;
+ set @sandra, 0;
close;
}
diff --git a/world/map/npc/001-1/mikhail.txt b/world/map/npc/001-1/mikhail.txt
index ced945cf..3980ac9b 100644
--- a/world/map/npc/001-1/mikhail.txt
+++ b/world/map/npc/001-1/mikhail.txt
@@ -1,21 +1,23 @@
-//
+// Variables used: nibble 0 of QUEST_SouthTulimshar
001-1.gat,50,46,0|script|Mikhail|120,{
- if (TMW_Quest >= 6) goto L_Done;
- if (TMW_Quest == 5) goto L_Progress;
- if (TMW_Quest == 4) goto L_Start;
- if (TMW_Quest < 4) goto L_Convince_Mikhail_First;
- // If this happens, something is wrong with the above case handling.
- mes "Mikhail looks confused.";
- close;
+ // This NPC previously used the variable TMW_Quest
+ callfunc "ClearVarTMW_Quest";
+
+ set @state, ((QUEST_SouthTulimshar & NIBBLE_0_MASK) >> NIBBLE_0_SHIFT);
+
+ if (@state >= 6) goto L_Done;
+ if (@state == 5) goto L_Progress;
+ if (@state == 4) goto L_Start;
+ if (@state < 4) goto L_Convince_Mikhail_First;
L_Convince_Mikhail_First:
mes "[Mikhail]";
mes "\"Hello...\"";
mes "";
mes "It seems that the boy would like to say more, but does not dare to open up to you. Maybe you should help someone else first, so that he sees your intentions are good.";
- close;
+ goto L_Close;
L_Start:
mes "[Mikhail]";
@@ -24,16 +26,13 @@ L_Start:
mes "\"You look like a nice person. Would you go get them for me?\"";
menu
"Of course, I'll go get them for you.", L_accept,
- "I've got other things to do right now.", L_close;
- close;
-
-L_close:
- close;
+ "I've got other things to do right now.", L_Close;
L_accept:
mes "[Mikhail]";
mes "\"Thank you so much! I'll wait for you here.\"";
- set TMW_Quest, 5;
+ set @state, 5;
+ callsub S_Update_Var;
close;
L_Progress:
@@ -42,27 +41,34 @@ L_Progress:
next;
menu
"Yes, here they are, kiddo!", L_try,
- "Not yet, but I'll be back soon.", L_close;
- close;
+ "Not yet, but I'll be back soon.", L_Close;
L_try:
- if countitem("MaggotSlime") >= 5 goto L_get;
+ if (countitem("MaggotSlime") >= 5)
+ goto L_get;
mes "[Mikhail]";
mes "\"It doesn't look like you have them all...\"";
- close;
+ goto L_Close;
L_get:
delitem "MaggotSlime", 5;
- set TMW_Quest, 6;
+ getexp 100, 0;
+ set @state, 6;
+ callsub S_Update_Var;
mes "[Mikhail]";
mes "\"Ooh! Thank you so much! I can get back to my grandma now!\"";
- next;
- getexp 100, 0;
- mes "You get 100 xp.";
- close;
+ goto L_Close;
L_Done:
mes "[Mikhail]";
mes "\"Thanks again for helping me get those Maggot Slimes!\"";
+ goto L_Close;
+
+L_Close:
+ set @state, 0;
close;
+
+S_Update_Var:
+ set QUEST_SouthTulimshar, (QUEST_SouthTulimshar & ~(NIBBLE_0_MASK) | (@state << NIBBLE_0_SHIFT));
+ return;
}
diff --git a/world/map/npc/001-1/sandra.txt b/world/map/npc/001-1/sandra.txt
index 10d014dd..021f8519 100644
--- a/world/map/npc/001-1/sandra.txt
+++ b/world/map/npc/001-1/sandra.txt
@@ -1,15 +1,19 @@
-//
+// Variables used: nibble 3 of QUEST_SouthTulimshar
001-1.gat,110,71,0|script|Sandra|114,{
- if (TMW_Quest >= 12) goto L_Done;
- if (TMW_Quest == 11) goto L_Progress;
- if (TMW_Quest == 10) goto L_Start;
+
+ // This NPC previously used the variable TMW_Quest
+ callfunc "ClearVarTMW_Quest";
+
+ set @state, ((QUEST_SouthTulimshar & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT);
+
+ if (@state >= 2) goto L_Done;
+ if (@state == 1) goto L_Progress;
mes "[Sandra]";
- mes "\"Hunting monsters for potion ingredients can sometimes be a difficult task. Maybe you could help me at some point.\"";
- goto L_Close;
+ mes "\"Hunting monsters for potion ingredients can sometimes be a difficult task.\"";
+ next;
-L_Start:
set @TEMP, rand(4);
if(@TEMP == 0) goto L_Opening0;
if(@TEMP == 1) goto L_Opening1;
@@ -17,25 +21,21 @@ L_Start:
if(@TEMP == 3) goto L_Opening3;
L_Opening0:
- mes "[Sandra]";
mes "\"In the outskirts of Tulimshar, there are some scorpions... I need help! Will you help?\"";
next;
goto L_Ask;
L_Opening1:
- mes "[Sandra]";
mes "\"When you venture to the outskirts of Tulimshar, you can spot scorpions. Will you help me kill some?\"";
next;
goto L_Ask;
L_Opening2:
- mes "[Sandra]";
mes "\"The Scorpion Stinger carries many properties used in potions. Would you get some for me?\"";
next;
goto L_Ask;
L_Opening3:
- mes "[Sandra]";
mes "\"You look sturdy enough, will you help me get something?\"";
next;
goto L_Ask;
@@ -70,21 +70,25 @@ L_Req2:
goto L_Set;
L_Set:
- set TMW_Quest,11;
- mes "[Sandra]";
+ set @state, 1;
+ callsub S_Update_Var;
mes "\"Please get them for me!\"";
goto L_Close;
L_Progress:
- if (countitem("ScorpionStinger") < 5) goto L_NotEnough;
+ if (countitem("ScorpionStinger") < 5)
+ goto L_NotEnough;
mes "[Sandra]";
- mes "\"Excellent! You brought me 5 Scorpion Stingers!\"";
+ mes "\"Excellent! You brought me 5 Scorpion Stingers!";
+ mes "Here's something for you.\"";
getinventorylist;
- if (@inventorylist_count + (countitem("ScorpionStinger") == 5) - (countitem("Arrow") == 0) > 99) goto L_TooMany;
+ if (@inventorylist_count + (countitem("ScorpionStinger") == 5) - (countitem("Arrow") == 0) > 99)
+ goto L_TooMany;
delitem "ScorpionStinger", 5;
getitem "Bow", 1;
getitem "Arrow", 100;
- set TMW_Quest, 12;
+ set @state, 2;
+ callsub S_Update_Var;
goto L_Close;
L_NotEnough:
@@ -99,6 +103,7 @@ L_Done:
L_Close:
set @TEMP, 0;
+ set @state, 0;
close;
L_TooMany:
@@ -106,4 +111,8 @@ L_TooMany:
mes "[Sandra]";
mes "\"You don't have room for my reward. I'll wait until you do.\"";
goto L_Close;
+
+S_Update_Var:
+ set QUEST_SouthTulimshar, (QUEST_SouthTulimshar & ~(NIBBLE_3_MASK) | (@state << NIBBLE_3_SHIFT));
+ return;
}
diff --git a/world/map/npc/001-1/sarah.txt b/world/map/npc/001-1/sarah.txt
index 8a84df47..3d2cb806 100644
--- a/world/map/npc/001-1/sarah.txt
+++ b/world/map/npc/001-1/sarah.txt
@@ -1,37 +1,29 @@
-//
+// Variables used: nibble 1 of QUEST_SouthTulimshar
001-1.gat,137,78,0|script|Sarah|106,{
- if (TMW_Quest >= 8) goto L_Done;
- if (TMW_Quest == 7) goto L_Progress;
- if (TMW_Quest == 6) goto L_Start;
- if (TMW_Quest < 6) goto L_Convince_Sarah_First;
- // If this is shown, something is wrong with the above case handling.
- mes "Sarah looks confused.";
- goto L_Close;
+ // This NPC previously used the variable TMW_Quest
+ callfunc "ClearVarTMW_Quest";
+
+ set @state, ((QUEST_SouthTulimshar & NIBBLE_1_MASK) >> NIBBLE_1_SHIFT);
+
+ if (@state >= 2) goto L_Done;
+ if (@state == 1) goto L_Progress;
-L_Convince_Sarah_First:
mes "[Sarah]";
mes "\"Boy, am I hungry or what!\"";
next;
- mes "\"The girl suddenly looks at you suspiciously.\"";
- next;
- mes "\"My mommy says not to talk to strangers!\"";
- goto L_Close;
-L_Start:
set @TEMP, rand(2);
if(@TEMP == 0) goto L_Opening0;
if(@TEMP == 1) goto L_Opening1;
L_Opening0:
- mes "[Sarah]";
mes "\"Cherry Cake is the best!\"";
next;
goto L_Ask;
L_Opening1:
- mes "[Sarah]";
mes "\"Mmm, Cherry Cake... I love it!\"";
next;
goto L_Ask;
@@ -46,16 +38,15 @@ L_Req0:
mes "[Sarah]";
mes "\"Yippee! Bring me a piece of Cherry Cake, and I'll give you a nice hat!\"";
next;
- goto L_Set;
-
-L_Set:
- set TMW_Quest,7;
+ set @state, 1;
+ callsub S_Update_Var;
mes "[Sarah]";
mes "\"Please bring it to me!\"";
goto L_Close;
L_Progress:
- if (countitem("CherryCake") < 1) goto L_NotEnough;
+ if (countitem("CherryCake") < 1)
+ goto L_NotEnough;
mes "[Sarah]";
mes "\"Whee!\"";
next;
@@ -64,8 +55,9 @@ L_Progress:
getinventorylist;
if ((@inventorylist_count - (countitem("CherryCake") == 1)) > 99) goto L_TooMany;
delitem "CherryCake", 1;
- getitem "serfhat", 1;
- set TMW_Quest, 8;
+ getitem "SerfHat", 1;
+ set @state, 2;
+ callsub S_Update_Var;
goto L_Close;
L_NotEnough:
@@ -81,6 +73,7 @@ L_Done:
L_Close:
set @TEMP, 0;
+ set @state, 0;
close;
L_TooMany:
@@ -88,4 +81,8 @@ L_TooMany:
mes "[Sarah]";
mes "\"You don't have room for my reward. I'll wait until you do.\"";
goto L_Close;
+
+S_Update_Var:
+ set QUEST_SouthTulimshar, (QUEST_SouthTulimshar & ~(NIBBLE_1_MASK) | (@state << NIBBLE_1_SHIFT));
+ return;
}
diff --git a/world/map/npc/001-1/vincent.txt b/world/map/npc/001-1/vincent.txt
index e2a53a31..4ed4adfc 100644
--- a/world/map/npc/001-1/vincent.txt
+++ b/world/map/npc/001-1/vincent.txt
@@ -1,4 +1,4 @@
-//
+// Variables used: nibble 2 of QUEST_SouthTulimshar
001-1.gat,135,42,0|script|Vincent|113,{
set @hw2011_npc_id, $@hw2011_npc_vincent;
@@ -6,23 +6,19 @@
goto L_TrickOrTreat;
L_Begin:
- if (TMW_Quest >= 10) goto L_Done;
- if (TMW_Quest == 9) goto L_Progress;
- if (TMW_Quest == 8) goto L_Start;
- if (TMW_Quest < 8) goto L_Convince_Vincent_First;
+ // This NPC previously used the variable TMW_Quest
+ callfunc "ClearVarTMW_Quest";
- // If this happens, something is wrong with the above code.
- mes "Vincent looks confused.";
- goto L_Close;
+ set @state, ((QUEST_SouthTulimshar & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT);
+
+ if (@state >= 2) goto L_Done;
+ if (@state == 1) goto L_Progress;
L_Convince_Vincent_First:
mes "[Vincent]";
mes "\"I'm making an action figure. I'm almost done with it.\"";
- mes "";
- mes "Vincent seems distracted with his near-completed figurine for now.";
- goto L_Close;
+ next;
-L_Start:
set @TEMP, rand(4);
if(@TEMP == 0) goto L_Opening1;
if(@TEMP == 1) goto L_Opening2;
@@ -30,41 +26,36 @@ L_Start:
if(@TEMP == 3) goto L_Opening4;
L_Opening1:
- mes "[Vincent]";
mes "\"I just need 10 more Bug Legs to finish my action figure!\"";
next;
goto L_Ask;
L_Opening2:
- mes "[Vincent]";
mes "\"This maggot action figure is awesome! I just need to attach 10 Bug Legs.\"";
next;
goto L_Ask;
L_Opening3:
- mes "[Vincent]";
mes "\"This is a great action figure! A must have! All I need is a few parts...\"";
next;
goto L_Ask;
L_Opening4:
- mes "[Vincent]";
mes "\"Can you get me 10 Bug Legs? I need them to replace the action figure parts.\"";
next;
goto L_Ask;
L_Ask:
- mes "[Vincent]";
mes "\"Will you help me find 10 Bug Legs?\"";
next;
menu
- "Yes", L_Sure,
- "No", -;
- goto L_Close;
+ "Yes.", L_Sure,
+ "No.", L_Close;
L_Sure:
- set TMW_Quest, 9;
- set @TEMP,rand(4);
+ set @state, 1;
+ callsub S_Update_Var;
+ set @TEMP, rand(4);
if(@TEMP == 0) goto L_Req1;
if(@TEMP == 1) goto L_Req2;
if(@TEMP == 2) goto L_Req3;
@@ -90,29 +81,31 @@ L_Req3:
L_Req4:
mes "[Vincent]";
- mes "\"I'm sure I will give a small reward. :D\"";
+ mes "\"I'm sure I will give a small reward.\"";
next;
goto L_Wait;
L_Wait:
- mes "[Vincent]";
mes "\"Now please go get me 10 Bug Legs.\"";
goto L_Close;
L_Progress:
- if(countitem("BugLeg") >= 10) goto L_Have;
+ if(countitem("BugLeg") >= 10)
+ goto L_Have;
mes "[Vincent]";
- mes "\"Please help me collect 10 Bug Legs!\"";
+ mes "\"Please help me collect 10 Bug Legs! I need them to complete my action figure.\"";
goto L_Close;
L_Have:
mes "[Vincent]";
mes "\"Excellent! Finally I can complete the model!!\"";
next;
- if(countitem("BugLeg") < 10) goto L_Progress;
+ if(countitem("BugLeg") < 10)
+ goto L_Progress;
delitem "BugLeg", 10;
set Zeny, Zeny + 1000;
- set TMW_Quest, 10;
+ set @state, 2;
+ callsub S_Update_Var;
mes "[Vincent]";
mes "\"Here you go, a little of my appreciation!\"";
@@ -127,8 +120,13 @@ L_Done:
L_Close:
set @TEMP, 0;
+ set @state, 0;
close;
+S_Update_Var:
+ set QUEST_SouthTulimshar, (QUEST_SouthTulimshar & ~(NIBBLE_2_MASK) | (@state << NIBBLE_2_SHIFT));
+ return;
+
L_TrickOrTreat:
callfunc "TrickOrTreat2011";
goto L_Begin;