summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-07-16 23:11:39 -0300
committerJesusaves <cpntb1@ymail.com>2021-07-16 23:11:39 -0300
commitb73cecf2dd621675eeb3674423450b9b5079ee63 (patch)
tree6901aed8524ad9435ddbf646149b670c0067b054
parent631b221422448bcb029780b0f2e0838c33c09c4f (diff)
downloadserverdata-b73cecf2dd621675eeb3674423450b9b5079ee63.tar.gz
serverdata-b73cecf2dd621675eeb3674423450b9b5079ee63.tar.bz2
serverdata-b73cecf2dd621675eeb3674423450b9b5079ee63.tar.xz
serverdata-b73cecf2dd621675eeb3674423450b9b5079ee63.zip
Migrate OrumQuest to the QuestSystem, and inheir skills on ported chars.
-rw-r--r--db/quest_db.conf28
-rw-r--r--npc/009-4/barriers.txt50
-rw-r--r--npc/009-4/orum.txt65
-rw-r--r--npc/009-4/orum_warps.txt8
-rw-r--r--npc/009-4/torches.txt10
-rw-r--r--npc/009-4/waric.txt6
-rw-r--r--npc/012-1/flowerpentagram2.txt8
-rw-r--r--npc/017-1/flowerpentagram1.txt8
-rw-r--r--npc/017-1/flowerpentagram5.txt6
-rw-r--r--npc/017-4/guardingspirit.txt12
-rw-r--r--npc/017-4/orum.txt99
-rw-r--r--npc/017-4/waric.txt60
-rw-r--r--npc/018-1/flowerpentagram3.txt8
-rw-r--r--npc/027-2/alacrius.txt2
-rw-r--r--npc/055-1/flowerpentagram4.txt8
-rw-r--r--npc/functions/clear_vars.txt11
16 files changed, 215 insertions, 174 deletions
diff --git a/db/quest_db.conf b/db/quest_db.conf
index a06df626..c25d635c 100644
--- a/db/quest_db.conf
+++ b/db/quest_db.conf
@@ -63,6 +63,34 @@ quest_db: (
Id: 180
Name: "MagicQuest_Healing"
},
+{
+ Id: 181
+ Name: "MagicQuest_Wyara"
+},
+{
+ Id: 182
+ Name: "MagicQuest_Kadiya"
+},
+{
+ Id: 183
+ Name: "MagicQuest_Pauline"
+},
+{
+ Id: 184
+ Name: "MagicQuest_WarMage"
+},
+{
+ Id: 185
+ Name: "MagicQuest_Auldsbel"
+},
+{
+ Id: 186
+ Name: "MagicQuest_DarkMage"
+},
+{
+ Id: 187
+ Name: "MagicQuest_WhiteMage"
+},
// Misc Quests (220~259)
{
diff --git a/npc/009-4/barriers.txt b/npc/009-4/barriers.txt
index 08998e94..26687017 100644
--- a/npc/009-4/barriers.txt
+++ b/npc/009-4/barriers.txt
@@ -44,41 +44,41 @@ L_Error2:
009-4,37,119,0 script #OrumCaveStartMessage NPC32767,0,0,{
- if (OrumQuest >= 3) end;
- if (OrumQuest == 2) goto L_Started;
+ if (getq(MagicQuest_DarkMage) >= 3) end;
+ if (getq(MagicQuest_DarkMage) == 2) goto L_Started;
mes "As you try to pass, two torches begin to flare and push you back. They seem to form some kind of barrier.";
close;
L_Started:
message strcharinfo(0), "The torches dim as you approach, granting you passage.";
- OrumQuest = 3;
+ setq(MagicQuest_DarkMage, 3);
end;
}
009-4,37,120,0 script #OrumCaveStartBarrier NPC32767,0,0,{
- if (OrumQuest >= 3) end;
+ if (getq(MagicQuest_DarkMage) >= 3) end;
warp "009-4", 37, 118;
end;
}
009-4,57,29,0 script #OrumCaveFirstBarrier NPC32767,0,0,{
- if (OrumQuest >= 5) end;
+ if (getq(MagicQuest_DarkMage) >= 5) end;
message strcharinfo(0), "Nothing seems to happen as you enter this room. The barrier must need both of its torches to function properly.";
- OrumQuest = 5;
+ setq(MagicQuest_DarkMage, 5);
end;
}
009-4,61,55,0 script #OrumCaveSecondMessage NPC32767,0,0,{
- if (OrumQuest >= 9) end;
- if (OrumQuest == 3) set OrumQuest, 4;
+ if (getq(MagicQuest_DarkMage) >= 9) end;
+ if (getq(MagicQuest_DarkMage) == 3) setq(MagicQuest_DarkMage, 4);
@Barrier = 0;
callfunc("GetBarrierColor");
@Torch = 0;
callfunc("GetTorchColor");
- if (OrumQuest > 7 && @TorchColor == @BarrierColor)
+ if (getq(MagicQuest_DarkMage) > 7 && @TorchColor == @BarrierColor)
goto L_Allow_Second_Passage;
mes "As you try to pass, the torches begin to flare and push you back. Perhaps there's a way to get past it.";
@@ -88,27 +88,27 @@ L_Started:
close;
L_Allow_Second_Passage:
- if (OrumQuest < 9) goto L_Advance_Quest;
+ if (getq(MagicQuest_DarkMage) < 9) goto L_Advance_Quest;
end;
L_Advance_Quest:
message strcharinfo(0), "The torches dim as you enter like the first. You must be on the right trail.";
- OrumQuest = 9;
+ setq(MagicQuest_DarkMage, 9);
end;
}
009-4,61,54,0 script #OrumCaveSecondBarrier NPC32767,0,0,{
- if (OrumQuest >= 9) end;
+ if (getq(MagicQuest_DarkMage) >= 9) end;
warp "009-4", 60, 56;
end;
}
009-4,24,65,0 script #OrumCaveThirdMessage NPC32767,0,0,{
- if (OrumQuest >= 10) end;
- if (OrumQuest == 3) set OrumQuest, 4;
- if (OrumQuest > 8 && @Torch1Color == @firstColor && @Torch2Color == @secondColor)
+ if (getq(MagicQuest_DarkMage) >= 10) end;
+ if (getq(MagicQuest_DarkMage) == 3) setq(MagicQuest_DarkMage, 4);
+ if (getq(MagicQuest_DarkMage) > 8 && @Torch1Color == @firstColor && @Torch2Color == @secondColor)
goto L_Allow_Third_Passage;
- if (OrumQuest > 8 && @Torch2Color == @firstColor && @Torch1Color == @secondColor)
+ if (getq(MagicQuest_DarkMage) > 8 && @Torch2Color == @firstColor && @Torch1Color == @secondColor)
goto L_Allow_Third_Passage;
@Barrier = 1;
@@ -136,28 +136,28 @@ L_Advance_Quest:
close;
L_Allow_Third_Passage:
- if (OrumQuest < 10) goto L_Advance_Quest;
+ if (getq(MagicQuest_DarkMage) < 10) goto L_Advance_Quest;
end;
L_Advance_Quest:
- OrumQuest = 10;
+ setq(MagicQuest_DarkMage, 10);
end;
}
009-4,24,66,0 script #OrumCaveThirdBarrier NPC32767,0,0,{
- if (OrumQuest >= 10) end;
+ if (getq(MagicQuest_DarkMage) >= 10) end;
warp "009-4", 23, 64;
end;
}
009-4,48,37,0 script #OrumCaveEndMessage NPC32767,0,0,{
- if (OrumQuest >= 11) end;
- if (OrumQuest == 3) set OrumQuest, 4;
+ if (getq(MagicQuest_DarkMage) >= 11) end;
+ if (getq(MagicQuest_DarkMage) == 3) setq MagicQuest_DarkMage, 4;
@Barrier = 2;
callfunc("GetBarrierColor");
- if (OrumQuest < 10)
+ if (getq(MagicQuest_DarkMage) < 10)
goto L_Deny_Final_Passage;
@Torch = 0;
@@ -252,17 +252,17 @@ L_Deny_Final_Passage:
close;
L_Allow_Final_Passage:
- if (OrumQuest < 11) goto L_Advance_Quest;
+ if (getq(MagicQuest_DarkMage) < 11) goto L_Advance_Quest;
end;
L_Advance_Quest:
message strcharinfo(0), "The torches dim as you enter. At last you finally have access!";
- OrumQuest = 11;
+ setq(MagicQuest_DarkMage, 11);
end;
}
009-4,48,38,0 script #OrumCaveEndBarrier NPC32767,0,0,{
- if (OrumQuest >= 11) end;
+ if (getq(MagicQuest_DarkMage) >= 11) end;
warp "009-4", 47, 36;
end;
}
diff --git a/npc/009-4/orum.txt b/npc/009-4/orum.txt
index 42ae60d9..e0ab8d68 100644
--- a/npc/009-4/orum.txt
+++ b/npc/009-4/orum.txt
@@ -7,22 +7,22 @@
"Display Quest", L_Display;
L_SetQuest:
- input @quest_state;
- OrumQuest = @quest_state;
- goto L_close;
+ input .@quest_state;
+ setq(MagicQuest_DarkMage, .@quest_state);
+ closeclientdialog;
+ close;
L_ResetQuest:
- OrumQuest = 0;
+ setq(MagicQuest_DarkMage, 0);
OrumQuestBarrier = 0;
OrumQuestTorch = 0;
- goto L_close;
+ closeclientdialog;
+ close;
L_Display:
- mes OrumQuest;
- goto L_close;
-
-L_close:
- end;
+ mes getq(MagicQuest_DarkMage);
+ closeclientdialog;
+ close;
OnInit:
if (!debug)
@@ -46,7 +46,7 @@ OnInit:
@Exp_BREAK_BARRIERS = 5000;
- if (OrumQuest > 0) goto L_Started;
+ if (getq(MagicQuest_DarkMage) > 0) goto L_Started;
mes "[Orum]";
mes "\"It's not wise to venture around this place! Well hmm... I guess since you're here, maybe you can lend a little help?\"";
@@ -149,19 +149,20 @@ L_Next4:
L_Start_Gathering:
mes "[Orum]";
mes "\"That's the spirit! But try not to take too long.\"";
- OrumQuest = 1;
+ setq(MagicQuest_DarkMage, 1);
goto L_close;
L_Started:
- if (OrumQuest == 1) goto L_Gathering;
- if (OrumQuest == 2) goto L_Use_First_Barrier;
- if (OrumQuest == 3) goto L_Explore;
- if (OrumQuest == 4) goto L_Found_Barriers;
- if (OrumQuest == 5) goto L_Found_Barriers;
- if (OrumQuest == 6) goto L_Found_Torches;
- if (OrumQuest == 7) goto L_Still_Gathering;
- if (OrumQuest == 8) goto L_Finish_Up;
- if (OrumQuest >= 9) goto L_Finished_Up;
+ .@q=getq(MagicQuest_DarkMage);
+ if (.@q == 1) goto L_Gathering;
+ if (.@q == 2) goto L_Use_First_Barrier;
+ if (.@q == 3) goto L_Explore;
+ if (.@q == 4) goto L_Found_Barriers;
+ if (.@q == 5) goto L_Found_Barriers;
+ if (.@q == 6) goto L_Found_Torches;
+ if (.@q == 7) goto L_Still_Gathering;
+ if (.@q == 8) goto L_Finish_Up;
+ if (.@q >= 9) goto L_Finished_Up;
goto L_close;
L_Gathering:
@@ -230,7 +231,7 @@ L_Missing_Materials:
goto L_close;
L_Setup_Lair:
- OrumQuest = 2;
+ setq(MagicQuest_DarkMage, 2);
callfunc "SetUpOrumQuest";
goto L_close;
@@ -354,7 +355,7 @@ L_Next7:
goto L_close;
L_Gathering_More:
- OrumQuest = 7;
+ setq(MagicQuest_DarkMage, 7);
mes "[Orum]";
mes "\"Wonderful! Try to make it quick, we must save Waric!\"";
goto L_close;
@@ -413,10 +414,10 @@ L_F_Gather_More:
next;
mes "\"I'm weary, I must take some time to rest. Why don't you go ahead and experiment with these powders on that torch and let me know if you figure what they have to do with it.\"";
- getitem "RedPowder", @BT_REWARDCOUNT;
- getitem "YellowPowder", @BT_REWARDCOUNT;
- getitem "BluePowder", @BT_REWARDCOUNT;
- OrumQuest = 8;
+ getitem RedPowder, @BT_REWARDCOUNT;
+ getitem YellowPowder, @BT_REWARDCOUNT;
+ getitem BluePowder, @BT_REWARDCOUNT;
+ setq(MagicQuest_DarkMage, 8);
goto L_close;
L_Missing_Mats_M:
@@ -507,7 +508,7 @@ L_Next11:
goto L_close;
L_Enter_Cavern:
- if (OrumQuest >= 10) goto L_Ready_Cavern;
+ if (getq(MagicQuest_DarkMage) >= 10) goto L_Ready_Cavern;
mes "Orum heads to the barrier then gives you a look as if he does not believe you before walking forward.";
next;
@@ -516,7 +517,7 @@ L_Enter_Cavern:
L_Ready_Cavern:
// you should not get that twice ;)
- if (OrumQuest == 12) goto L_Got_Reward;
+ if (getq(MagicQuest_DarkMage) == 12) goto L_Got_Reward;
mes "Orum heads to the barrier then gives you a look as if he does not believe you before walking forward.";
next;
@@ -526,11 +527,11 @@ L_Ready_Cavern:
mes "\"Very good work you have done! Please take this for your efforts. It has helped me in a bind.\"";
next;
getinventorylist;
- if ((checkweight("CandleHelmet", 1) == 0) || (@inventorylist_count == 100))
+ if ((checkweight(CandleHelmet, 1) == 0) || (@inventorylist_count == 100))
goto L_Inventory;
getexp @Exp_BREAK_BARRIERS, 0;
- getitem "CandleHelmet", 1;
- OrumQuest = 12;
+ getitem CandleHelmet, 1;
+ setq(MagicQuest_DarkMage, 12);
mes "You receive the Candle Helmet.";
next;
mes "\"You've done enough here to help. I will go the rest of the way alone so that your life is not endangered. You must promise me not to go any further!\"";
diff --git a/npc/009-4/orum_warps.txt b/npc/009-4/orum_warps.txt
index 8cf74919..515ba0b7 100644
--- a/npc/009-4/orum_warps.txt
+++ b/npc/009-4/orum_warps.txt
@@ -1,5 +1,5 @@
009-3,162,113,0 script #OrumQuestEnter NPC45,0,0,{
- if (OrumQuest >= 12) goto L_Second_Entrance;
+ if (getq(MagicQuest_DarkMage) >= 12) goto L_Second_Entrance;
warp "009-4", 37, 113;
close;
@@ -8,7 +8,7 @@ L_Second_Entrance:
close;
}
009-4,36,26,0 script #LairExit NPC45,0,0,{
- if (OrumQuest >= 12) goto L_Second_Entrance;
+ if (getq(MagicQuest_DarkMage) >= 12) goto L_Second_Entrance;
warp "009-4", 37, 122;
close;
@@ -18,8 +18,8 @@ L_Second_Entrance:
}
009-4,51,47,0 script #CavernEnter NPC45,0,0,{
- if (OrumQuest >= 14) goto L_Second_Cavern;
- if (OrumQuest < 12) goto L_See_Orum;
+ if (getq(MagicQuest_DarkMage) >= 14) goto L_Second_Cavern;
+ if (getq(MagicQuest_DarkMage) < 12) goto L_See_Orum;
warp "009-4", 103, 23;
close;
diff --git a/npc/009-4/torches.txt b/npc/009-4/torches.txt
index 8cf053d0..5ff12563 100644
--- a/npc/009-4/torches.txt
+++ b/npc/009-4/torches.txt
@@ -65,22 +65,22 @@ L_Error2:
}
function script DoneWithTorches {
- if (OrumQuest < 11 && OrumQuest >= 8)
+ if (getq(MagicQuest_DarkMage) < 11 && getq(MagicQuest_DarkMage) >= 8)
goto L_Return;
- if (OrumQuest < 7) goto L_Different;
+ if (getq(MagicQuest_DarkMage) < 7) goto L_Different;
- if (OrumQuest >= 11)
+ if (getq(MagicQuest_DarkMage) >= 11)
mes "The flame on the torch looks ordinary. Lowering the final barrier seems to have drained them of their magic.";
- if (OrumQuest < 8)
+ if (getq(MagicQuest_DarkMage) < 8)
mes "Without that powder the note mentions there isn't much you can do with this torch.";
close2;
goto L_Return;
L_Different:
mes "The flame on this torch looks different than the rest. You better tell Orum about it before doing anything.";
- OrumQuest = 6;
+ setq(MagicQuest_DarkMage, 6);
close2;
goto L_Return;
diff --git a/npc/009-4/waric.txt b/npc/009-4/waric.txt
index dee2787f..07dc1e66 100644
--- a/npc/009-4/waric.txt
+++ b/npc/009-4/waric.txt
@@ -20,7 +20,7 @@
009-4,118,42,0 script Waric#trap NPC153,{
@Exp_LEARNED_ALOT = 10000;
- if (OrumQuest >= 13)
+ if (getq(MagicQuest_DarkMage) >= 13)
goto L_Behave;
mes "Waric looks toward you rubbing his chin...";
next;
@@ -38,7 +38,7 @@ L_Next:
mes "\"We've got a feisty one here, Orum!\"";
next;
mes "They begin discussing plans of some sort...";
- OrumQuest = 13;
+ setq(MagicQuest_DarkMage, 13);
goto L_close;
L_Behave:
@@ -79,7 +79,7 @@ L_Explain:
next;
mes "Once more you start to lose conciousness as your surroundings begin to fade...";
next;
- OrumQuest = 14;
+ setq(MagicQuest_DarkMage, 14);
misceffect 10;
warp "008-1", 65, 90;
getexp @Exp_LEARNED_ALOT, 0;
diff --git a/npc/012-1/flowerpentagram2.txt b/npc/012-1/flowerpentagram2.txt
index b7f6f99b..41fc2950 100644
--- a/npc/012-1/flowerpentagram2.txt
+++ b/npc/012-1/flowerpentagram2.txt
@@ -1,9 +1,9 @@
012-1,143,70,0 script #FlowerPentagram2 NPC400,{
- if (OrumQuest >= 31) goto L_PlacedFifthFlower;
+ if (getq(MagicQuest_DarkMage) >= 31) goto L_PlacedFifthFlower;
- if (OrumQuest > 20) goto L_PlacedSecondFlower;
- if (OrumQuest == 20) goto L_SecondFlower;
+ if (getq(MagicQuest_DarkMage) > 20) goto L_PlacedSecondFlower;
+ if (getq(MagicQuest_DarkMage) == 20) goto L_SecondFlower;
message strcharinfo(0), "There is something odd about this place.";
end;
@@ -35,7 +35,7 @@ L_Place:
delitem "PurpleSummonFlower", 1;
mes "Remembering what happened the last time, you take a careful look around. Everything's calm. You proceed to place the second flower.";
mes "Sensing a certain tension build up around you, you can't help but feel alarmed.";
- OrumQuest = 21;
+ setq(MagicQuest_DarkMage, 21);
close2;
areamonster "012-1", 140, 64, 146, 73, "", 1105, 2, "#FlowerPentagram2::OnSquirrelDeath";
areamonster "012-1", 140, 64, 146, 73, "", 1106, 2, "#FlowerPentagram2::OnMushroomDeath";
diff --git a/npc/017-1/flowerpentagram1.txt b/npc/017-1/flowerpentagram1.txt
index c16c20c1..f5c18e8a 100644
--- a/npc/017-1/flowerpentagram1.txt
+++ b/npc/017-1/flowerpentagram1.txt
@@ -1,9 +1,9 @@
017-1,95,42,0 script #FlowerPentagram1 NPC400,{
- if (OrumQuest >= 31) goto L_PlacedFifthFlower;
+ if (getq(MagicQuest_DarkMage) >= 31) goto L_PlacedFifthFlower;
- if (OrumQuest > 17) goto L_PlacedFirstFlower;
- if (OrumQuest == 17) goto L_FirstFlower;
+ if (getq(MagicQuest_DarkMage) > 17) goto L_PlacedFirstFlower;
+ if (getq(MagicQuest_DarkMage) == 17) goto L_FirstFlower;
message strcharinfo(0), "Something is odd about this place.";
end;
@@ -32,7 +32,7 @@ L_Place:
goto L_NoFlower;
delitem "OrangeSummonFlower", 1;
mes "You carefully place the magic flower on the marked spot. You feel some tension in the air around you.";
- OrumQuest = 18;
+ setq(MagicQuest_DarkMage, 18);
close2;
areamonster "017-1", 91, 37, 101, 46, "", 1105, 2, "#FlowerPentagram1::OnSquirrelDeath";
areamonster "017-1", 91, 37, 101, 46, "", 1003, 3, "#FlowerPentagram1::OnScorpionDeath";
diff --git a/npc/017-1/flowerpentagram5.txt b/npc/017-1/flowerpentagram5.txt
index 22395d06..b72c7f53 100644
--- a/npc/017-1/flowerpentagram5.txt
+++ b/npc/017-1/flowerpentagram5.txt
@@ -1,8 +1,8 @@
017-1,176,59,0 script #FlowerPentagram5 NPC400,{
- if (OrumQuest >= 31) goto L_PlacedFifthFlower;
+ if (getq(MagicQuest_DarkMage) >= 31) goto L_PlacedFifthFlower;
- if (OrumQuest == 30) goto L_FifthFlower;
+ if (getq(MagicQuest_DarkMage) == 30) goto L_FifthFlower;
message strcharinfo(0), "Something is odd about this place.";
end;
@@ -47,7 +47,7 @@ L_Place:
delitem "RedSummonFlower", 1;
mes "The pressure builds to the point where you don't think you can endure it any longer; the fabric that binds your consciousness together seemingly unravels.";
- OrumQuest = 31;
+ setq(MagicQuest_DarkMage, 31);
close2;
areamonster "017-1", 170, 55, 190, 75, "", 1105, 3, "#FlowerPentagram5::OnSquirrelDeath";
areamonster "017-1", 170, 55, 190, 75, "", 1106, 2, "#FlowerPentagram5::OnMushroomDeath";
diff --git a/npc/017-4/guardingspirit.txt b/npc/017-4/guardingspirit.txt
index 0e5cb6b9..8a6e6293 100644
--- a/npc/017-4/guardingspirit.txt
+++ b/npc/017-4/guardingspirit.txt
@@ -3,11 +3,11 @@
goto L_Talk;
L_Talk:
- if (OrumQuest == 35)
+ if (getq(MagicQuest_DarkMage) == 35)
goto L_Block;
- if (OrumQuest < 14)
+ if (getq(MagicQuest_DarkMage) < 14)
goto L_Block;
- if (OrumQuest > 14)
+ if (getq(MagicQuest_DarkMage) > 14)
goto L_Chat;
mes "[Guarding Spirit]";
@@ -56,7 +56,7 @@ L_Pass:
mes "\"Alright, I will let you pass.\"";
next;
mes "\"Remember that when you speak with him, do so with respect for someone befitting his status.\"";
- OrumQuest = 15;
+ setq(MagicQuest_DarkMage, 15);
warp "017-4", 201, 26;
goto L_close;
@@ -86,9 +86,9 @@ L_close:
close;
OnTouch:
- if (OrumQuest < 15)
+ if (getq(MagicQuest_DarkMage) < 15)
goto L_Talk;
- if (OrumQuest == 35)
+ if (getq(MagicQuest_DarkMage) == 35)
goto L_Block;
warp "017-4", 201, 26;
end;
diff --git a/npc/017-4/orum.txt b/npc/017-4/orum.txt
index 771b3469..984076ca 100644
--- a/npc/017-4/orum.txt
+++ b/npc/017-4/orum.txt
@@ -25,30 +25,31 @@
@REWARD_MONEY = 100000;
@Reward_Exp = 100000;
- if (OrumQuest > 31) goto L_Done;
+ .@q=getq(MagicQuest_DarkMage);
+ if (.@q > 31) goto L_Done;
- if (OrumQuest == 31) goto L_PlacedFifthFlower;
- if (OrumQuest == 30) goto L_PlaceFifthFlower;
- if (OrumQuest == 29) goto L_FailedFifthFlower;
- if (OrumQuest == 28) goto L_FifthFlower;
+ if (.@q == 31) goto L_PlacedFifthFlower;
+ if (.@q == 30) goto L_PlaceFifthFlower;
+ if (.@q == 29) goto L_FailedFifthFlower;
+ if (.@q == 28) goto L_FifthFlower;
- if (OrumQuest == 27) goto L_PlacedFourthFlower;
- if (OrumQuest == 26) goto L_PlaceFourthFlower;
- if (OrumQuest == 25) goto L_FourthFlower;
+ if (.@q == 27) goto L_PlacedFourthFlower;
+ if (.@q == 26) goto L_PlaceFourthFlower;
+ if (.@q == 25) goto L_FourthFlower;
- if (OrumQuest == 24) goto L_PlacedThirdFlower;
- if (OrumQuest == 23) goto L_PlaceThirdFlower;
- if (OrumQuest == 22) goto L_ThirdFlower;
+ if (.@q == 24) goto L_PlacedThirdFlower;
+ if (.@q == 23) goto L_PlaceThirdFlower;
+ if (.@q == 22) goto L_ThirdFlower;
- if (OrumQuest == 21) goto L_PlacedSecondFlower;
- if (OrumQuest == 20) goto L_PlaceSecondFlower;
- if (OrumQuest == 19) goto L_SecondFlower;
+ if (.@q == 21) goto L_PlacedSecondFlower;
+ if (.@q == 20) goto L_PlaceSecondFlower;
+ if (.@q == 19) goto L_SecondFlower;
- if (OrumQuest == 18) goto L_PlacedFirstFlower;
- if (OrumQuest == 17) goto L_PlaceFirstFlower;
- if (OrumQuest == 16) goto L_FirstFlower;
+ if (.@q == 18) goto L_PlacedFirstFlower;
+ if (.@q == 17) goto L_PlaceFirstFlower;
+ if (.@q == 16) goto L_FirstFlower;
- if (OrumQuest == 15) goto L_InitialTalk;
+ if (.@q == 15) goto L_InitialTalk;
goto L_Banish;
@@ -84,7 +85,7 @@ L_Next1:
mes "\"Well, why not? Here is a simple enough task to prove you're serious.";
mes "Bring me " + @AMOUNT_SMALLMUSHROOM + " Small Mushrooms, " + @AMOUNT_ASH + " Piles of Ash and one Orange Tulip.\"";
- OrumQuest = 16;
+ setq(MagicQuest_DarkMage, 16);
menu
"Sure!", L_close,
"Why do you need that?", L_Next2;
@@ -113,16 +114,16 @@ L_FirstFlower: // 16: Got task to bring materials for first magical flower
"I don't have it yet.", L_close;
L_Next3:
- if ((countitem("SmallMushroom") < @AMOUNT_SMALLMUSHROOM)
- || (countitem("PileOfAsh") < @AMOUNT_ASH)
- || (countitem("OrangeTulip") < 1))
+ if ((countitem(SmallMushroom) < @AMOUNT_SMALLMUSHROOM)
+ || (countitem(PileOfAsh) < @AMOUNT_ASH)
+ || (countitem(OrangeTulip) < 1))
goto L_NoItem;
- delitem "SmallMushroom", @AMOUNT_SMALLMUSHROOM;
- delitem "PileOfAsh", @AMOUNT_SMALLMUSHROOM;
- delitem "OrangeTulip", 1;
- getitem "OrangeSummonFlower", 1;
- OrumQuest = 17;
+ delitem SmallMushroom, @AMOUNT_SMALLMUSHROOM;
+ delitem PileOfAsh, @AMOUNT_SMALLMUSHROOM;
+ delitem OrangeTulip, 1;
+ getitem OrangeSummonFlower, 1;
+ setq(MagicQuest_DarkMage, 17);
mes "Orum takes the items and starts crushing them, using a very old-looking mortar and pestle. As they turn into a fine powder, he mixes some of it together in the cauldron and finally dips the tulip into it, mumbling enchantements. The tulip changes its appearance. Then he hands it over to you.";
mes "[Orum]";
@@ -155,7 +156,7 @@ L_Next5:
if (Zeny < @RECOMPENSATION_1)
goto L_NoMoney;
Zeny = Zeny - @RECOMPENSATION_1;
- OrumQuest = 16;
+ setq(MagicQuest_DarkMage, 16);
mes "[Orum]";
mes "\"Very well. Now bring me " + @AMOUNT_SMALLMUSHROOM + " Small Mushrooms, " + @AMOUNT_ASH + " Piles of Ash and one Orange Tulip again, so we can start over.\"";
@@ -169,14 +170,14 @@ L_PlacedFirstFlower: // 18: Placed first magical flower
"Weird monsters appeared when I placed it!", L_AskMonsters;
L_Next6:
- OrumQuest = 19;
+ setq(MagicQuest_DarkMage, 19);
goto L_SecondFlower;
L_AskMonsters:
mes "[Orum]";
mes "\"Oh, right. Well, that was to be expected, some of the power seeped out when you placed it. I hope those monsters didn't harm you.";
mes "However, we should continue.\"";
- OrumQuest = 19;
+ setq(MagicQuest_DarkMage, 19);
next;
goto L_SecondFlower;
@@ -198,7 +199,7 @@ L_Next7:
delitem "ScorpionStinger", @AMOUNT_STINGER;
delitem "PinkTulip", 1;
getitem "PurpleSummonFlower", 1;
- OrumQuest = 20;
+ setq(MagicQuest_DarkMage, 20);
mes "Orum starts to work on the materials you've gathered, in the same manner he did the first time. Suddenly something from the mortar gets on his hand and it makes a nasty sizzling noise. He yells in pain, clutching his hand to his chest. After cleaning his hand he continues. In the end he gives you another magical flower while rubbing his hand.";
next;
@@ -239,7 +240,7 @@ L_Next9:
if (Zeny < @RECOMPENSATION_2)
goto L_NoMoney;
Zeny = Zeny - @RECOMPENSATION_2;
- OrumQuest = 19;
+ setq(MagicQuest_DarkMage, 19);
mes "[Orum]";
mes "\"Okay, now that this is settled, bring me " + @AMOUNT_PINKPETAL + " Pink Petals, " + @AMOUNT_STINGER + " Scorpion Stingers and one Pink Tulip again.\"";
@@ -255,13 +256,13 @@ L_PlacedSecondFlower: // 21: Placed second magical flower
"How can we build a pentagram by randomly planting flowers?", L_AskPentagram;
L_Next10:
- OrumQuest = 22;
+ setq(MagicQuest_DarkMage, 22);
goto L_ThirdFlower;
L_AskPentagram:
mes "[Orum]";
mes "\"Randomly? The spots for the flowers have been very carefully chosen! You see, it's going to be a very LARGE pentagram.\"";
- OrumQuest = 22;
+ setq(MagicQuest_DarkMage, 22);
next;
goto L_ThirdFlower;
@@ -348,8 +349,8 @@ L_EasyTooEarly:
goto L_close;
L_EasySuccess:
- getitem "WhiteSummonFlower", 1;
- OrumQuest = 23;
+ getitem WhiteSummonFlower, 1;
+ setq(MagicQuest_DarkMage, 23);
mes "As you pour the liquid into the bubbling mixture, it calms down and becomes viscous. Orum takes the tulip and dips it into the mixture.";
mes "[Orum]";
@@ -389,7 +390,7 @@ L_Next15:
if (Zeny < @RECOMPENSATION_3)
goto L_NoMoney;
Zeny = Zeny - @RECOMPENSATION_3;
- OrumQuest = 22;
+ setq(MagicQuest_DarkMage, 22);
mes "[Orum]";
mes "\"Once again we need " + @AMOUNT_WHITEFUR + " White Furs, " + @AMOUNT_REDSTINGER + " Red Scorpion Stingers and one White Tulip.\"";
@@ -404,14 +405,14 @@ L_PlacedThirdFlower: // 24: Placed third magical flower
"What are we going to summon with that pentagram?", L_AskSummon;
L_Next16:
- OrumQuest = 25;
+ setq(MagicQuest_DarkMage, 25);
goto L_FourthFlower;
L_AskSummon:
mes "[Orum]";
mes "\"Beings from the astral plane, of course. Some of them are already coming through the rift when you place the flowers.";
mes "But that is NOTHING compared to what will happen when the pentagram is complete! Hahaha!\"";
- OrumQuest = 25;
+ setq(MagicQuest_DarkMage, 25);
next;
goto L_FourthFlower;
@@ -525,8 +526,8 @@ L_HardTooExtreme:
goto L_close;
L_HardSuccess:
- getitem "YellowSummonFlower", 1;
- OrumQuest = 26;
+ getitem YellowSummonFlower, 1;
+ setq(MagicQuest_DarkMage, 26);
mes "Orum pours the rheological additive on the mixture and then dips the flower into the cauldron.";
mes "[Orum]";
@@ -575,7 +576,7 @@ L_Next21:
if (Zeny < @RECOMPENSATION_4)
goto L_NoMoney;
Zeny = Zeny - @RECOMPENSATION_4;
- OrumQuest = 25;
+ setq(MagicQuest_DarkMage, 25);
mes "[Orum]";
mes "\"Now bring " + @AMOUNT_HARDSPIKE + " Hard Spikes, " + @AMOUNT_ANGRYSTINGER + " Angry Scorpion Stingers and one Yellow Rose again.\"";
@@ -590,7 +591,7 @@ L_PlacedFourthFlower: // 27: Placed fourth magical flower
"Why do you want to summon so many beings?", L_AskReason;
L_Next22:
- OrumQuest = 28;
+ setq(MagicQuest_DarkMage, 28);
goto L_FifthFlower;
L_AskReason:
@@ -599,7 +600,7 @@ L_AskReason:
mes "I'll give you a hint: think about what's in the center of the pentagram. Or rather who is.\"";
next;
mes "\"Anyway, let's get back to business!\"";
- OrumQuest = 28;
+ setq(MagicQuest_DarkMage, 28);
next;
goto L_FifthFlower;
@@ -659,8 +660,8 @@ L_FlowerHat:
mes "\"Fool! See what you've done? It's ruined!\"";
next;
mes "\"Though, we still have enough of the materials left to start over. Here, take this garbage out and get a new Red Rose!\"";
- getitem "RedRoseHat", 1;
- OrumQuest = 29;
+ getitem RedRoseHat, 1;
+ setq(MagicQuest_DarkMage, 29);
goto L_close;
L_AskSagatha:
@@ -695,8 +696,8 @@ L_Next25:
next;
mes "You watch while Orum carefully prepares the last magic flower.";
next;
- getitem "RedSummonFlower", 1;
- OrumQuest = 30;
+ getitem RedSummonFlower, 1;
+ setq(MagicQuest_DarkMage, 30);
mes "[Orum]";
mes "\"Here it is. We're almost done. Don't mess it up!\"";
next;
@@ -770,7 +771,7 @@ L_PlacedFifthFlower: // 31: Placed fifth flower
mes "\"Well done, really. I think you've earned yourself a small reward. Here, take this.\"";
Zeny = Zeny + @REWARD_MONEY;
getexp @Reward_Exp, 0;
- OrumQuest = 32;
+ setq(MagicQuest_DarkMage, 32);
goto L_close;
L_Done:
diff --git a/npc/017-4/waric.txt b/npc/017-4/waric.txt
index eead477f..d1529aee 100644
--- a/npc/017-4/waric.txt
+++ b/npc/017-4/waric.txt
@@ -10,22 +10,23 @@
@cut_tree = 1;
@sagatha_follower = (QUEST_MAGIC & (NIBBLE_4_MASK | NIBBLE_5_MASK)) >> NIBBLE_4_SHIFT;
- if (OrumQuest > 40) goto L_MoreMagic;
- if (OrumQuest > 39) goto L_SnakesSpell;
- if (OrumQuest > 38) goto L_SnakesIngredients;
- if (OrumQuest > 37) goto L_Snakes;
- if (OrumQuest > 36) goto L_ToxicDart;
- if (OrumQuest > 35) goto L_Mushroom;
- if (OrumQuest > 34) goto L_Banished;
- if (OrumQuest > 33) goto L_LastChance;
- if (OrumQuest > 32) goto L_BackforOath;
- if (OrumQuest > 31) goto L_DarkMagic;
- if (OrumQuest > 30) goto L_Flower5;
- if (OrumQuest > 26) goto L_Flower4;
- if (OrumQuest > 23) goto L_Flower3;
- if (OrumQuest > 20) goto L_Flower2;
- if (OrumQuest > 17) goto L_Flower1;
- if (OrumQuest > 15) goto L_Mistrust;
+ .@q=getq(MagicQuest_DarkMage);
+ if (.@q > 40) goto L_MoreMagic;
+ if (.@q > 39) goto L_SnakesSpell;
+ if (.@q > 38) goto L_SnakesIngredients;
+ if (.@q > 37) goto L_Snakes;
+ if (.@q > 36) goto L_ToxicDart;
+ if (.@q > 35) goto L_Mushroom;
+ if (.@q > 34) goto L_Banished;
+ if (.@q > 33) goto L_LastChance;
+ if (.@q > 32) goto L_BackforOath;
+ if (.@q > 31) goto L_DarkMagic;
+ if (.@q > 30) goto L_Flower5;
+ if (.@q > 26) goto L_Flower4;
+ if (.@q > 23) goto L_Flower3;
+ if (.@q > 20) goto L_Flower2;
+ if (.@q > 17) goto L_Flower1;
+ if (.@q > 15) goto L_Mistrust;
mesn;
mes "\"You! You really are far too persistent to know what is good for you!\"";
@@ -110,7 +111,7 @@ L_Next1:
mesn;
mes "\"So, now that you know more about Dark Magic, are you still willing to become my apprentice?\"";
mes "\"Once you cross this line, there is no going back. Keep this in mind!\"";
- OrumQuest = 33;
+ setq(MagicQuest_DarkMage, 33);
menu
"I'll have to think about it.", L_ComeBackLater,
"Yes.", L_Oath;
@@ -197,7 +198,7 @@ L_Next3:
heal MaxHp, 0;
heal ((MaxHp/100) * -99), 0;
mes "You feel completely exhausted.";
- OrumQuest = 36;
+ setq(MagicQuest_DarkMage, 36);
goto L_close;
L_NoOath:
@@ -205,7 +206,7 @@ L_NoOath:
warp "005-3", 86 , 33;
heal MaxHp, 0;
heal ((MaxHp/100) * -50), 0;
- OrumQuest = OrumQuest + 1;
+ setq(MagicQuest_DarkMage, getq(MagicQuest_DarkMage) + 1);
goto L_close;
L_Mushroom:
@@ -216,7 +217,7 @@ L_Mushroom:
mesq l("The spell consumes a Small Mushroom and a Dark Crystal. Shove the Dark Crystal into the Small Mushroom and yell %s.");
next;
mesq l("A wicked mushroom will appear to fight for you. Usually.");
- OrumQuest = 37;
+ setq(MagicQuest_DarkMage, 37);
learnskill SKILL_HELORP;
goto L_close;
@@ -238,7 +239,7 @@ L_Next4:
learnskill SKILL_PHLEX;
next;
mes "\"If you want to learn more, come back later.\"";
- OrumQuest = 38;
+ setq(MagicQuest_DarkMage, 38);
goto L_close;
L_Snakes:
@@ -255,11 +256,11 @@ L_Next5:
mes "\"This one is so complex that I have to show it to you before explaining it further. Bring me a snake egg and a root.\"";
next;
mes "\"Off you go now. Bring me the ingredients.\"";
- OrumQuest = 39;
+ setq(MagicQuest_DarkMage, 39);
goto L_close;
L_SnakesIngredients:
- OrumQuest = 39;
+ setq(MagicQuest_DarkMage, 39);
mesn;
mes "\"Did you bring one Dark Crystal and a Snake Egg?\"";
menu
@@ -279,7 +280,7 @@ L_Next6:
next;
delitem DarkCrystal, 1;
delitem SnakeEgg, 1;
- OrumQuest = 40;
+ setq(MagicQuest_DarkMage, 40);
monster "017-4", 217,36, "Evil", Snake, 1;
mesc l("The wizard looks at you, his eyes flashing, and laughs diabolically.");
goto L_close;
@@ -295,7 +296,7 @@ L_Next7:
mesn;
mesq l("I said %s.", b("Halhiss"));
mesq l("Have fun with those spells and use them to cause hate, anger and death.");
- OrumQuest = 41;
+ setq(MagicQuest_DarkMage, 41);
learnskill SKILL_HALHISS;
goto L_close;
@@ -382,19 +383,20 @@ L_close:
"Nevermind.", L_close;
L_CandleHelmet:
- OrumQuest = 14;
+ setq(MagicQuest_DarkMage, 14);
goto L_close;
L_Var:
- input OrumQuest;
+ input .@i;
+ setq(MagicQuest_DarkMage, .@i);
goto L_close;
L_CurrentState:
- mes "The value of the quest variable OrumQuest is currently " + OrumQuest + ".";
+ mes "The value of the quest variable OrumQuest is currently " + getq(MagicQuest_DarkMage) + ".";
goto L_close;
L_Reset:
- OrumQuest = 0;
+ setq(MagicQuest_DarkMage, 0);
goto L_close;
L_close:
diff --git a/npc/018-1/flowerpentagram3.txt b/npc/018-1/flowerpentagram3.txt
index 4e5232b4..eed682c3 100644
--- a/npc/018-1/flowerpentagram3.txt
+++ b/npc/018-1/flowerpentagram3.txt
@@ -1,9 +1,9 @@
018-1,83,29,0 script #FlowerPentagram3 NPC400,{
- if (OrumQuest >= 31) goto L_PlacedFifthFlower;
+ if (getq(MagicQuest_DarkMage) >= 31) goto L_PlacedFifthFlower;
- if (OrumQuest > 23) goto L_PlacedThirdFlower;
- if (OrumQuest == 23) goto L_ThirdFlower;
+ if (getq(MagicQuest_DarkMage) > 23) goto L_PlacedThirdFlower;
+ if (getq(MagicQuest_DarkMage) == 23) goto L_ThirdFlower;
message strcharinfo(0), "Something is odd about this place.";
end;
@@ -37,7 +37,7 @@ L_Place:
delitem "WhiteSummonFlower", 1;
mes "Knowing what will happen, you prepare yourself for a fight. Then you go ahead with the ritual and place the magical flower.";
mes "You feel the now familiar tension around you. Here they come.";
- OrumQuest = 24;
+ setq(MagicQuest_DarkMage, 24);
close2;
areamonster "018-1", 73, 22, 89, 36, "", 1105, 1, "#FlowerPentagram3::OnSquirrelDeath";
areamonster "018-1", 73, 22, 89, 36, "", 1106, 2, "#FlowerPentagram3::OnMushroomDeath";
diff --git a/npc/027-2/alacrius.txt b/npc/027-2/alacrius.txt
index f1dd9a26..24d6c4ef 100644
--- a/npc/027-2/alacrius.txt
+++ b/npc/027-2/alacrius.txt
@@ -14,8 +14,8 @@ L_Quest:
// Rand() is probably not the best way to do that.
if (!#CRYPT_PASSWORD) {
#CRYPT_PASSWORD = rand2(4095);
- setq Quest_Reapercry, 1;
}
+ compareandsetq Quest_Reapercry, 0, 1;
next;
mes "##1--------- The Alacrius Riddle";
mes "";
diff --git a/npc/055-1/flowerpentagram4.txt b/npc/055-1/flowerpentagram4.txt
index 86966c15..5b41e889 100644
--- a/npc/055-1/flowerpentagram4.txt
+++ b/npc/055-1/flowerpentagram4.txt
@@ -1,9 +1,9 @@
055-1,141,89,0 script #FlowerPentagram4 NPC400,{
- if (OrumQuest >= 31) goto L_PlacedFifthFlower;
+ if (getq(MagicQuest_DarkMage) >= 31) goto L_PlacedFifthFlower;
- if (OrumQuest > 26) goto L_PlacedFourthFlower;
- if (OrumQuest == 26) goto L_FourthFlower;
+ if (getq(MagicQuest_DarkMage) > 26) goto L_PlacedFourthFlower;
+ if (getq(MagicQuest_DarkMage) == 26) goto L_FourthFlower;
message strcharinfo(0), "Something is odd about this place.";
end;
@@ -39,7 +39,7 @@ L_Place:
delitem "YellowSummonFlower", 1;
mes "Worried about what will shift from the astral plane this time, you prepare yourself and put the flower in place.";
mes "As expected, you feel the magical tension building up. They're coming.";
- OrumQuest = 27;
+ setq(MagicQuest_DarkMage, 27);
close2;
areamonster "055-1", 133, 87, 144, 99, "", 1105, 1, "#FlowerPentagram4::OnSquirrelDeath";
areamonster "055-1", 133, 87, 144, 99, "", 1106, 1, "#FlowerPentagram4::OnMushroomDeath";
diff --git a/npc/functions/clear_vars.txt b/npc/functions/clear_vars.txt
index efaa9d13..9670134b 100644
--- a/npc/functions/clear_vars.txt
+++ b/npc/functions/clear_vars.txt
@@ -12,11 +12,12 @@ function script ClearVariables {
QL_HIDENSEEK = 0;
}
if (#CRYPT_PASSWORD && !getq(Quest_Reapercry)) {
+ learnskill SKILL_REAPERCRY, 1;
setq Quest_Reapercry, 1;
}
if (#DD5_TALLY) {
setq Quest_Doomsday, 2;
- #DD5_TALLY = 0; // Whatever
+ #DD5_TALLY = 0; // Whatever, one is enough
}
if (#BankAccount) {
BankVault += #BankAccount;
@@ -56,8 +57,16 @@ function script ClearVariables {
//SAGATHA_ST = (QUEST_MAGIC & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT; // Unhappy
//Saggy - 4+5
//Alchemist - 6+7 (War Quest - Swords again?)
+ if (OrumQuest >= 37)
+ learnskill SKILL_HELORP;
+ if (OrumQuest >= 38)
+ learnskill SKILL_PHLEX;
+ if (OrumQuest >= 41)
+ learnskill SKILL_HALHISS;
+ setq(MagicQuest_DarkMage, OrumQuest);
QUEST_MAGIC = 0;
QUEST_MAGIC2 = 0;
+ OrumQuest = 0;
}
return;
}