summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--db/quest_db.conf4
-rw-r--r--npc/025-1/ctrl.c2
-rw-r--r--npc/025-3/_import.txt1
-rw-r--r--npc/025-3/_mobs.txt2
-rw-r--r--npc/025-3/ctrl.c57
5 files changed, 65 insertions, 1 deletions
diff --git a/db/quest_db.conf b/db/quest_db.conf
index fbb6f8f53..c888620ee 100644
--- a/db/quest_db.conf
+++ b/db/quest_db.conf
@@ -101,6 +101,10 @@ quest_db: (
Id: 19
Name: "General_Sagratha"
},
+{
+ Id: 20
+ Name: "General_Fortress"
+},
// ID 31 to 50: Candor Quests
{
diff --git a/npc/025-1/ctrl.c b/npc/025-1/ctrl.c
index ace7b64ff..519847734 100644
--- a/npc/025-1/ctrl.c
+++ b/npc/025-1/ctrl.c
@@ -55,6 +55,7 @@ function script FTCleanup {
enablenpc "Commander Cadis";
enablenpc "Phoenix Rebirth";
enablenpc "Anin The Traveler";
+ enablenpc "The Impregnable Fortress";
donpcevent "#025-1_99_112::OnDisable";
} else {
hideoffnpc "Gate#F";
@@ -67,6 +68,7 @@ function script FTCleanup {
disablenpc "Commander Cadis";
disablenpc "Phoenix Rebirth";
disablenpc "Anin The Traveler";
+ disablenpc "The Impregnable Fortress";
donpcevent "#025-1_99_112::OnEnable";
mapwarp("025-1", "025-2", 100, 27);
}
diff --git a/npc/025-3/_import.txt b/npc/025-3/_import.txt
index 1d4c66f24..9079e5e84 100644
--- a/npc/025-3/_import.txt
+++ b/npc/025-3/_import.txt
@@ -2,3 +2,4 @@
// This file is generated automatically. All manually added changes will be removed when running the Converter.
"npc/025-3/_mobs.txt",
"npc/025-3/_warps.txt",
+"npc/025-3/ctrl.c",
diff --git a/npc/025-3/_mobs.txt b/npc/025-3/_mobs.txt
index b86216363..c8b897243 100644
--- a/npc/025-3/_mobs.txt
+++ b/npc/025-3/_mobs.txt
@@ -1,4 +1,4 @@
// This file is generated automatically. All manually added changes will be removed when running the Converter.
// Map 025-3: The Impregnable Fortress (Outside) mobs
-025-3,99,157,75,17 monster Moubi 1038,16,60000,30000
+025-3,99,157,75,17 monster Moubi 1038,16,60000,30000,Impregnable#0F::OnMoubiKill
025-3,105,117,10,21 monster Angry Bat 1194,24,30000,30000
diff --git a/npc/025-3/ctrl.c b/npc/025-3/ctrl.c
new file mode 100644
index 000000000..0c1a3154d
--- /dev/null
+++ b/npc/025-3/ctrl.c
@@ -0,0 +1,57 @@
+// TMW2 scripts.
+// Author:
+// Jesusalva
+// Description:
+// The Impregnable Fortress Control Files
+// Quest: General_Fortress
+// (MaxFloor+1, internal, internal)
+
+025-3,105,83,0 script Impregnable#0F NPC_HIDDEN,2,0,{
+ end;
+
+OnTouch:
+ if (getq(General_Fortress)) goto L_Warp;
+ mes l(".:: The Impregnable Fortress ::.");
+ mes "";
+ mes l("The fortress goes below until the Monster King Throne is established.");
+ mes l("To descend you must finish the task on the floor. Sometimes it'll be outspoken, other times, it'll not.");
+ mes l("The tasks may vary from collecting certain items, walking in a specific order, lighting candles, killing a specific monster or all monsters in the floor, et cetera.");
+ next;
+ mes l("The tasks are individual, but help from other players is acceptable in most cases.");
+ mesc l("(Do note that there may be filters to decide when the player helped you and when the player did the quest for you. In some cases, you'll need to redo the stage.)");
+ next;
+ mes l("After finishing the task, the floor below will be liberated for your access only. Other players will need to complete their tasks.");
+ mes l("Due to the sheer amount of monsters in the army, most floors are not immediately available! The Monster Army must be weakened before accessing the deeper floors by repeatedly defeating them at Fortress Town Siege.");
+ next;
+ mesc l(".:: Impregnable Fortress, %sF ::.", "0"), 3;
+ msObjective(getq(General_Fortress) == 1, l("* Obtain the Fortress Key"));
+ msObjective($MK_TEMPVAR < MKIF_LV_B0F, l("Minimum wins: %d/%d", $MK_TEMPVAR, MKIF_LV_B0F));
+ end;
+
+L_Warp:
+ // Not unlocked
+ if ($GAME_STORYLINE >= 3 && $MK_TEMPVAR < MKIF_LV_B0F) {
+ mesc l("The gate is sealed shut."), 1;
+ mesc l("The monster army is still strong on this floor!"), 1;
+ mesc l("Minimum wins: %d/%d", $MK_TEMPVAR, MKIF_LV_B0F), 1;
+ close;
+ }
+ warp "026-0", 64, 98;
+ end;
+
+OnMoubiKill:
+ .@q=getq(General_Fortress);
+ .@q2=getq2(General_Fortress);
+ .@q3=getq3(General_Fortress);
+ if (.@q != 0) end;
+
+ setq2 General_Fortress, .@q2+1;
+ if (rand2(10000) <= .@q2) {
+ dispbottom b(l("You have found the Impregnable Fortress Key. Access to B0F granted."));
+ setq General_Fortress, 1, 0, 0;
+ getexp 0, 50000;
+ }
+ end;
+}
+
+