summaryrefslogtreecommitdiff
path: root/world/map/npc/002-1
diff options
context:
space:
mode:
authorwushin <pasekei@gmail.com>2015-05-19 12:35:46 -0500
committerwushin <pasekei@gmail.com>2015-09-06 13:13:30 -0500
commita5816766ed870dd55170a4b66a75a1907021e421 (patch)
tree12288e1561914b5268a2ccd6801cc4aa4f0e4dd8 /world/map/npc/002-1
parentf86e961ffbf9e1467279d3086a48c47be2a5a86f (diff)
downloadserverdata-a5816766ed870dd55170a4b66a75a1907021e421.tar.gz
serverdata-a5816766ed870dd55170a4b66a75a1907021e421.tar.bz2
serverdata-a5816766ed870dd55170a4b66a75a1907021e421.tar.xz
serverdata-a5816766ed870dd55170a4b66a75a1907021e421.zip
Some of the Tonori Area Quests
Diffstat (limited to 'world/map/npc/002-1')
-rw-r--r--world/map/npc/002-1/anwar.txt75
-rw-r--r--world/map/npc/002-1/lieutenant_dausen.txt46
-rw-r--r--world/map/npc/002-1/mine_debug.txt16
-rw-r--r--world/map/npc/002-1/nickos.txt45
-rw-r--r--world/map/npc/002-1/sarah.txt19
-rw-r--r--world/map/npc/002-1/stewen.txt17
6 files changed, 64 insertions, 154 deletions
diff --git a/world/map/npc/002-1/anwar.txt b/world/map/npc/002-1/anwar.txt
index d0c73abf..bdae05c2 100644
--- a/world/map/npc/002-1/anwar.txt
+++ b/world/map/npc/002-1/anwar.txt
@@ -1,25 +1,5 @@
-// Anwar needs a magic fertilizer for his field
-// Quest uses Nibble 3 of QUEST_NorthTulimshar
-// Author: Jenalya
-// state 1: Anwar sent to Tinris for help to get a magic fertilizer
-// state 2: Tinris asked for chocolate cake as present for his girlfriend
-// state 3: Tinris asked for ingredients for the fertilizer
-// state 4: Tinris gave you the fertilizer
-// state 5: Anwar tried it out and it doesn't work well, sent you back to Tinris
-// state 6: Tinris asked for more ingredients for a new try
-// state 7: Tinris says it's really hard, gives you the fertilizer and tells you to ask Eomie to cast a spell on it
-// state 8: Eomie sends you to get some stuff so she can interrupt her spell on the spot of grass
-// state 9: Eomie casted a spell on the fertilizer
-// state 10: Anwar used it and it worked. he asks you to help him preparing a thank-you-gift for each Tinris and Eomis
-// state 11: Anwar asked to bring present to Tinris
-// state 12: gave present to Tinris
-// state 13: Anwar asked to bring present to Eomie
-// state 14: gave present to Eomie
-// state 15: reported back to Anwar and done
002-1,95,67,0|script|Anwar|156
{
- set @state, ((QUEST_NorthTulimshar & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT);
-
set @cloth_amount, 3;
set @silk_amount, 30;
@@ -28,12 +8,12 @@
set @material_exp, 1000;
set @final_exp, 2000;
- if (@state >= 15) goto L_Done;
- if (@state >= 13) goto L_GiveEomie;
- if (@state >= 11) goto L_GiveTinris;
- if (@state == 10) goto L_GiftMaterial;
- if (@state >= 5) goto L_SecondTry;
- if (@state >= 1) goto L_FirstTry;
+ if (QL_ANWAR >= 15) goto L_Done;
+ if (QL_ANWAR >= 13) goto L_GiveEomie;
+ if (QL_ANWAR >= 11) goto L_GiveTinris;
+ if (QL_ANWAR == 10) goto L_GiftMaterial;
+ if (QL_ANWAR >= 5) goto L_SecondTry;
+ if (QL_ANWAR >= 1) goto L_FirstTry;
mes "[Anwar]";
mes "\"Hello. You look like one of those young people who come here to go on an adventure.";
@@ -49,14 +29,13 @@ L_Sure:
mes "\"I can't go there myself, since this area of the city is full of sneaky ragtags and they will rob my field if I leave here. Could you go to the magic school and ask for some magic enhancement for my field?\"";
next;
mes "\"To find the school just follow the street north back into town. The school is the castle at the north end of town.\"";
- set @state, 1;
- callsub S_Update_Mask;
+ set QL_ANWAR, 1;
goto L_Close;
-L_FirstTry: // @state >= 1 but below 5
+L_FirstTry: // QL_ANWAR >= 1 but below 5
mes "[Anwar]";
mes "\"I hope the wizards at the magic school can help me with the field. I'd really like to have more free time. I want to make clothing, but I'm not experienced enough to make a living out of that.\"";
- if (@state != 4)
+ if (QL_ANWAR != 4)
goto L_Close;
menu
"Tinris gave me a magic fertilizer for your field, but he isn't sure if it works.",L_Next;
@@ -70,14 +49,13 @@ L_Next:
mes "[Anwar]";
mes "\"Oh no! What is this? It's damaging my plants! Go back to Tinris and tell him it doesn't work!\"";
getexp @firstTry_exp, 0;
- set @state, 5;
- callsub S_Update_Mask;
+ set QL_ANWAR, 5;
goto L_Close;
-L_SecondTry: // @state >= 5 but below 10
+L_SecondTry: // QL_ANWAR >= 5 but below 10
mes "[Anwar]";
mes "\"I hope Tinris can come up with a better fertilizer. My plants are suffering from the first try.\"";
- if (@state != 9)
+ if (QL_ANWAR != 9)
goto L_Close;
menu
"Here is another one. Eomie cast a spell on it.",L_Continue;
@@ -91,12 +69,11 @@ L_Continue:
mes "[Anwar]";
mes "\"Ah, this one is better. I'll put it on the entire field.\"";
getexp @secondTry_exp, 0;
- set @state, 10;
- callsub S_Update_Mask;
+ set QL_ANWAR, 10;
next;
goto L_GiftMaterial;
-L_GiftMaterial: // @state == 10
+L_GiftMaterial: // QL_ANWAR == 10
mes "[Anwar]";
mes "\"I want to show my gratitude to Tinris and Eomie. Can you help me once again? I would like to make some clothes for them and need " + @cloth_amount + " pieces of Cotton Cloth and " + @silk_amount + " Silk Cocoons.\"";
menu
@@ -115,8 +92,7 @@ L_GiveGiftStuff:
getexp @material_exp, 0;
getitem "GreenVNeckSweater", 1;
- set @state, 11;
- callsub S_Update_Mask;
+ set QL_ANWAR, 11;
mes "[Anwar]";
mes "\"Great! I'll start right away with the present for Tinris. That shouldn't take long.\"";
mes "After a short while of cutting and sewing he holds a V-Neck Sweater in his hands. Then he dyes it green.";
@@ -133,10 +109,10 @@ L_Hint:
mes "They live in the woodland area around Hurnscald. You can get there by taking the ferry.\"";
goto L_Close;
-L_GiveTinris: // @state >= 11 but below 13
+L_GiveTinris: // QL_ANWAR >= 11 but below 13
mes "[Anwar]";
mes "\"Did you already bring the Green V-Neck Sweater to Tinris?\"";
- if (@state != 12)
+ if (QL_ANWAR != 12)
menu
"Not yet.",L_Close;
menu
@@ -149,17 +125,16 @@ L_Happy:
mes "[Anwar]";
mes "\"Wonderful! I also finished the present for Eomie. Can you bring it to her?\"";
getitem "SilkHeadband", 1;
- set @state, 13;
- callsub S_Update_Mask;
+ set QL_ANWAR, 13;
goto L_Close;
-L_GiveEomie: // @state >= 13 but below 15
+L_GiveEomie: // QL_ANWAR >= 13 but below 15
getinventorylist;
if (@inventorylist_count == 100)
goto L_Full_Inv;
mes "[Anwar]";
mes "\"Did you give the Silk Headband to Eomie?\"";
- if (@state != 14)
+ if (QL_ANWAR != 14)
menu
"Not yet.",L_Close;
menu
@@ -171,11 +146,10 @@ L_ThankYou:
mes "\"I'm so happy. Thank you so much for your help. I made this for you while you went to see Eomie.\"";
getexp @final_exp, 0;
getitem "DarkGreenCottonTrousers", 1;
- set @state, 15;
- callsub S_Update_Mask;
+ set QL_ANWAR, 15;
goto L_Close;
-L_Done: // @state == 15
+L_Done: // QL_ANWAR == 15
mes "[Anwar]";
mes "\"Thank you so much for your help. The plants are growing much better now. I don't have to spend all my time working in the field any more.";
mes "Finally I can do what I'm really interested in and work on getting better at sewing clothes.\"";
@@ -192,13 +166,8 @@ L_Full_Inv:
goto L_Close;
L_Close:
- set @state, 0;
set @cloth_amount, 0;
set @silk_amount, 0;
set @inventorylist_count, 0;
close;
-
-S_Update_Mask:
- set QUEST_NorthTulimshar, (QUEST_NorthTulimshar & ~(NIBBLE_3_MASK)) | (@state << NIBBLE_3_SHIFT);
- return;
}
diff --git a/world/map/npc/002-1/lieutenant_dausen.txt b/world/map/npc/002-1/lieutenant_dausen.txt
index 2751d49a..33e88da3 100644
--- a/world/map/npc/002-1/lieutenant_dausen.txt
+++ b/world/map/npc/002-1/lieutenant_dausen.txt
@@ -1,28 +1,22 @@
-// Lieutenant in charge of monitoring the monster threat surrounding the city.
-// Variables used: nibble 4 and 5 of QUEST_SouthTulimshar
-
002-1,63,67,0|script|Lieutenant Dausen|122
{
- set @state, ((QUEST_SouthTulimshar & BYTE_2_MASK) >> BYTE_2_SHIFT);
-
- if (@state == 21) goto L_LD_Key;
- if (@state == 7) goto L_LD_Miners;
- if (@state == 6) goto L_LD_Orders;
- if (@state == 5) goto L_LD_Nickos_Waits;
- if (@state == 4) goto L_LD_Nickos;
- if (@state == 3) goto L_LD_Waits;
- if (@state == 2) goto L_LD_Woe_Is_Me;
- if (@state == 1) goto L_LD_Drinks;
+ if (QL_MINEALL == 21) goto L_LD_Key;
+ if (QL_MINEALL == 7) goto L_LD_Miners;
+ if (QL_MINEALL == 6) goto L_LD_Orders;
+ if (QL_MINEALL == 5) goto L_LD_Nickos_Waits;
+ if (QL_MINEALL == 4) goto L_LD_Nickos;
+ if (QL_MINEALL == 3) goto L_LD_Waits;
+ if (QL_MINEALL == 2) goto L_LD_Woe_Is_Me;
+ if (QL_MINEALL == 1) goto L_LD_Drinks;
mes "[Lieutenant Dausen]";
mes "\"Hello. I am Lieutenant Dausen. I monitor the monster threat around the city to ensure the safety of its citizens.\"";
- if (@state)
+ if (QL_MINEALL)
goto L_Close;
goto L_LD_Start;
L_LD_Start:
- set @state, 1;
- callsub S_Update_Var;
+ set QL_MINEALL, 1;
next;
mes "\"Out here in the desert, it sure does get hot! My men and I get thirsty rather quickly. Cactus Drinks are our favourite; if you can get some for us, we'd surely appreciate your effort. About 10 would do.\"";
goto L_Close;
@@ -33,8 +27,7 @@ L_LD_Drinks:
getinventorylist;
if (@inventorylist_count - (countitem("CactusDrink") == 10) > 99)
goto L_LD_TooMany;
- set @state, 2;
- callsub S_Update_Var;
+ set QL_MINEALL, 2;
delitem "CactusDrink", 10;
getitem "Boots", 1;
mes "[Lieutenant Dausen]";
@@ -65,8 +58,7 @@ L_LD_Woe_Is_Me:
"Bye-bye.", L_LD_NoHelp;
L_LD_Help:
- set @state, 3;
- callsub S_Update_Var;
+ set QL_MINEALL, 3;
mes "[Lieutenant Dausen]";
mes "\"Oh! Would you? You are ever most helpful! Could you let Stewen know first? I'm the most worried about the monsters from the eastern desert and he should know first to hold his post. Come back to me after you see him. Hope to hear from you soon!\"";
goto L_Close;
@@ -82,8 +74,7 @@ L_LD_Waits:
goto L_Close;
L_LD_Nickos:
- set @state, 5;
- callsub S_Update_Var;
+ set QL_MINEALL, 5;
mes "[Lieutenant Dausen]";
mes "\"Thanks for letting Stewen know. Can you now tell Nickos to hold his post too? He guards the mine to the south, monitoring the monster threat and protecting the miners when he can.\"";
goto L_Close;
@@ -94,8 +85,7 @@ L_LD_Nickos_Waits:
goto L_Close;
L_LD_Orders:
- set @state, 7;
- callsub S_Update_Var;
+ set QL_MINEALL, 7;
set Zeny, Zeny + 500;
mes "[Lieutenant Dausen]";
mes "\"Thank you for clearing up the orders to my men! Here's some gold for your efforts.\"";
@@ -111,17 +101,11 @@ L_LD_Miners:
goto L_Close;
L_LD_Key:
- set @state, 22;
- callsub S_Update_Var;
+ set QL_MINEALL, 22;
mes "[Lieutenant Dausen]";
mes "\"Oh, Naem lost his key? Here, take this spare. It should help you get into the underground palace.\"";
goto L_Close;
L_Close:
- set @state, 0;
close;
-
-S_Update_Var:
- set QUEST_SouthTulimshar, (QUEST_SouthTulimshar & ~(BYTE_2_MASK) | (@state << BYTE_2_SHIFT));
- return;
}
diff --git a/world/map/npc/002-1/mine_debug.txt b/world/map/npc/002-1/mine_debug.txt
index eb01dc81..6ffbe49a 100644
--- a/world/map/npc/002-1/mine_debug.txt
+++ b/world/map/npc/002-1/mine_debug.txt
@@ -12,8 +12,9 @@ function|script|DesertMineDebug
"nothing.", L_Close;
L_Reset:
- set @state, 0;
- callsub S_Update_Var;
+ set QL_MINEALL, 0;
+ set FLAGS, FLAGS &~ FLAG_GOT_NAEM_GLOVES;
+ set FLAGS, FLAGS &~ FLAG_OPENED_UNDERGROUND;
goto L_Close;
L_Set:
@@ -22,21 +23,14 @@ L_Set:
mes "18 is Angry Scorpions Start";
mes "20 is Underground Palace Start";
mes "26 is Giant Cave Maggot Start";
- input @state;
- callsub S_Update_Var;
+ input QL_MINEALL;
goto L_Close;
L_Show:
- set @state, ((QUEST_SouthTulimshar & BYTE_2_MASK) >> BYTE_2_SHIFT);
- mes "Current State: " + @state;
+ mes "Current State: " + QL_MINEALL;
goto L_Close;
L_Close:
- set @state, 0;
- return;
-
-S_Update_Var:
- set QUEST_SouthTulimshar, (QUEST_SouthTulimshar & ~(BYTE_2_MASK) | (@state << BYTE_2_SHIFT));
return;
}
002-1,61,69,0|script|Mine Debug#1|122
diff --git a/world/map/npc/002-1/nickos.txt b/world/map/npc/002-1/nickos.txt
index 99f17b5c..97b1c6a7 100644
--- a/world/map/npc/002-1/nickos.txt
+++ b/world/map/npc/002-1/nickos.txt
@@ -1,20 +1,15 @@
-// Sandstorm mine guard
-// Variables used: nibble 4 and 5 of QUEST_SouthTulimshar
-
002-1,46,108,0|script|Nickos|123
{
- set @state, ((QUEST_SouthTulimshar & BYTE_2_MASK) >> BYTE_2_SHIFT);
-
- if (@state == 20) goto L_UGQ;
- if (@state == 19) goto L_AS_Done;
- if (@state == 18) goto L_AS_Start;
- if (@state >= 11) && (@state < 18) goto L_Guards;
- if (@state == 10) goto L_Check_Happy;
- if (@state > 7) && (@state < 10) goto L_Waits;
- if (@state == 7) goto L_Mine;
- if (@state == 6) goto L_Orders_Received;
- if (@state == 5) goto L_Orders;
- if (@state < 5) goto L_See_Dausen_First;
+ if (QL_MINEALL == 20) goto L_UGQ;
+ if (QL_MINEALL == 19) goto L_AS_Done;
+ if (QL_MINEALL == 18) goto L_AS_Start;
+ if (QL_MINEALL >= 11) && (QL_MINEALL < 18) goto L_Guards;
+ if (QL_MINEALL == 10) goto L_Check_Happy;
+ if (QL_MINEALL > 7) && (QL_MINEALL < 10) goto L_Waits;
+ if (QL_MINEALL == 7) goto L_Mine;
+ if (QL_MINEALL == 6) goto L_Orders_Received;
+ if (QL_MINEALL == 5) goto L_Orders;
+ if (QL_MINEALL < 5) goto L_See_Dausen_First;
mes "[Nickos]";
mes "\"I'm watching this mine to make sure the monsters don't harm the miners.\"";
@@ -29,8 +24,7 @@ L_See_Dausen_First:
goto L_Close;
L_Orders:
- set @state, 6;
- callsub S_Update_Var;
+ set QL_MINEALL, 6;
mes "[Nickos]";
mes "\"I have to hold my post longer? Argh! I was looking forward to my break. Oh well, thanks for letting me know.\"";
goto L_Close;
@@ -55,8 +49,7 @@ L_Disappoint:
goto L_Close;
L_Mine_Open:
- set @state, 8;
- callsub S_Update_Var;
+ set QL_MINEALL, 8;
mes "[Nickos]";
mes "\"Excellent! You now have my permission to enter the mine. Your assistance helps ease my worries.\"";
goto L_Close;
@@ -67,8 +60,7 @@ L_Waits:
goto L_Close;
L_Check_Happy:
- set @state, 11;
- callsub S_Update_Var;
+ set QL_MINEALL, 11;
set Zeny, Zeny + 500;
mes "[Nickos]";
mes "\"Oh, everything is okay? That's great! I think they are pretty busy and could use some help. Feel free to give them a hand. Here's some gold for your troubles.\"";
@@ -82,8 +74,7 @@ L_Guards:
goto L_Close;
L_AS_Start:
- set @state, 19;
- callsub S_Update_Var;
+ set QL_MINEALL, 19;
mes "[Nickos]";
mes "\"Oh, the angry scorpions are becoming a problem? We could thin down their numbers a bit. I can make it worth your time, but of course, I'll need something to show your work. Bring me 10 Angry Scorpion Stingers to demonstrate your effectiveness, and you will be rewarded for your efforts.\"";
goto L_Close;
@@ -94,8 +85,7 @@ L_AS_Done:
getinventorylist;
if (@inventorylist_count - (countitem("AngryScorpionStinger") == 10) > 99)
goto L_TooMany;
- set @state, 20;
- callsub S_Update_Var;
+ set QL_MINEALL, 20;
delitem "AngryScorpionStinger", 10;
getitem "LeatherShield", 1;
mes "[Nickos]";
@@ -120,10 +110,5 @@ L_UGQ:
goto L_Close;
L_Close:
- set @state, 0;
close;
-
-S_Update_Var:
- set QUEST_SouthTulimshar, (QUEST_SouthTulimshar & ~(BYTE_2_MASK) | (@state << BYTE_2_SHIFT));
- return;
}
diff --git a/world/map/npc/002-1/sarah.txt b/world/map/npc/002-1/sarah.txt
index 3b7a7232..e70f36eb 100644
--- a/world/map/npc/002-1/sarah.txt
+++ b/world/map/npc/002-1/sarah.txt
@@ -1,11 +1,7 @@
-// Variables used: nibble 1 of QUEST_SouthTulimshar
-
002-1,93,43,0|script|Sarah|106
{
- set @state, ((QUEST_SouthTulimshar & NIBBLE_1_MASK) >> NIBBLE_1_SHIFT);
-
- if (@state >= 2) goto L_Done;
- if (@state == 1) goto L_Progress;
+ if (QL_SARAH >= 2) goto L_Done;
+ if (QL_SARAH == 1) goto L_Progress;
mes "[Sarah]";
mes "\"Boy, am I hungry or what!\"";
@@ -35,8 +31,7 @@ L_Req0:
mes "[Sarah]";
mes "\"Yippee! Bring me a piece of Cherry Cake, and I'll give you a nice hat!\"";
next;
- set @state, 1;
- callsub S_Update_Var;
+ set QL_SARAH, 1;
mes "[Sarah]";
mes "\"Please bring it to me!\"";
goto L_Close;
@@ -52,8 +47,7 @@ L_Progress:
if ((@inventorylist_count - (countitem("CherryCake") == 1)) > 99) goto L_TooMany;
delitem "CherryCake", 1;
getitem "SerfHat", 1;
- set @state, 2;
- callsub S_Update_Var;
+ set QL_SARAH, 2;
close2;
emotion EMOTE_TONGUE, strcharinfo(0);
end;
@@ -72,7 +66,6 @@ L_Done:
L_Close:
set @TEMP, 0;
- set @state, 0;
close;
L_TooMany:
@@ -80,8 +73,4 @@ 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/002-1/stewen.txt b/world/map/npc/002-1/stewen.txt
index 63808935..7daca790 100644
--- a/world/map/npc/002-1/stewen.txt
+++ b/world/map/npc/002-1/stewen.txt
@@ -1,20 +1,14 @@
-// East sandstorm guard
-// Variables used: nibble 4 and 5 of QUEST_SouthTulimshar
-
002-1,116,93,0|script|Stewen|123
{
- set @state, ((QUEST_SouthTulimshar & BYTE_2_MASK) >> BYTE_2_SHIFT);
-
- if (@state == 4) goto L_TMW_Quest_Received;
- if (@state == 3) goto L_TMW_Quest;
+ if (QL_MINEALL == 4) goto L_TMW_Quest_Received;
+ if (QL_MINEALL == 3) goto L_TMW_Quest;
mes "[Stewen]";
mes "\"I'm keeping a watchful eye on the monsters to the east so they don't threaten Tulimshar's citizens. They are pretty strong.\"";
goto L_Close;
L_TMW_Quest:
- set @state, 4;
- callsub S_Update_Var;
+ set QL_MINEALL, 4;
mes "[Stewen]";
mes "\"I don't get a break?! Lieutenant Dausen needs to ask the Wizard's Council for more help out here. Either that or give me a raise! Oh well. Thanks for letting me know.\"";
goto L_Close;
@@ -25,10 +19,5 @@ L_TMW_Quest_Received:
goto L_Close;
L_Close:
- set @state, 0;
close;
-
-S_Update_Var:
- set QUEST_SouthTulimshar, (QUEST_SouthTulimshar & ~(BYTE_2_MASK) | (@state << BYTE_2_SHIFT));
- return;
}