summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
Diffstat (limited to 'npc')
-rw-r--r--npc/025-1/commander.txt131
-rw-r--r--npc/025-1/ctrl.c2
-rw-r--r--npc/functions/mobpoint.txt1
-rw-r--r--npc/functions/util.txt8
4 files changed, 140 insertions, 2 deletions
diff --git a/npc/025-1/commander.txt b/npc/025-1/commander.txt
index 06df58db3..366d986ec 100644
--- a/npc/025-1/commander.txt
+++ b/npc/025-1/commander.txt
@@ -20,3 +20,134 @@ OnInit:
end;
}
+/////////////////////////////////////////////////////////////////////////////////
+025-1,59,86,0 script Commander Cadis NPC_BRGUARD_SWORD,{
+ mesn;
+ mesq l("Greetings %s, I am %s, I am in charge of monster extermination.", (strcharinfo(0) == $MOST_HEROIC$ ? lg("Hero") : lg("Adventurer")), .name$);
+ next;
+ // Check for ongoing quests
+ if (getq(FortressQuest_SlimeHunter) == 1)
+ goto L_SlimeHunter;
+ mesn;
+ mesq l("I have extremely difficult quests for you; They are more painful than a Grand Hunter Quest, because I don't admit wimps fighting with me.");
+ next;
+ mesn;
+ mesq l("You will be rewarded by me shall you succeed in any of the tasks.");
+ next;
+ do
+ {
+ select
+ l("I'm not interested."),
+ rif(!getq(FortressQuest_SlimeHunter), l("The Great Slime Hunt"));
+ mes "";
+ switch (@menu) {
+ case 1:
+ close;
+ case 2:
+ mesn;
+ mesq l("You'll have to slay %s slimes for me! I don't care which ones, just SLAY THEM!", fnum(.million));
+ next;
+ select
+ l("Accept"),
+ l("Reject");
+ mes "";
+ if (@menu == 1) {
+ setq1 FortressQuest_SlimeHunter, 1;
+ mesn;
+ mesq l("Then get to work already!");
+ close;
+ }
+ break;
+ }
+ }
+ close;
+
+L_SlimeHunter:
+ .@kill=getq2(FortressQuest_SlimeHunter);
+ .@rewa=getq3(FortressQuest_SlimeHunter);
+ mesn;
+ mesq l("Thus far you've slain %s/%s %s for me!", fnum(.@kill), fnum(.million), b(l("Slimes")));
+ inventoryplace NPCEyes, 4, Iten, 2;
+
+ // ***** ***** ***** Rewards ***** ***** *****
+ if (.@kill >= .tier1 && .@rewa < 1) {
+ mesc l("Milestone reached: %s kills", fnum(.tier1));
+ setq3 FortressQuest_SlimeHunter, 1;
+ getitem MercenaryBoxsetDD, 3;
+ getitem SacredImmortalityPotion, 2;
+ getitem MercenaryBoxsetE, 1;
+ }
+
+ if (.@kill >= .tier2 && .@rewa < 2) {
+ mesc l("Milestone reached: %s kills", fnum(.tier2));
+ setq3 FortressQuest_SlimeHunter, 2;
+ getitem MercenaryBoxsetEE, 1;
+ getitem MagicApple, 1;
+ getitem EquipmentBlueprintE, 1;
+ getitem IridiumOre, 2;
+ }
+
+ if (.@kill >= .tier3 && .@rewa < 3) {
+ mesc l("Milestone reached: %s kills", fnum(.tier3));
+ setq3 FortressQuest_SlimeHunter, 3;
+ getitem MercenaryBoxsetEE, 2;
+ getitem StrangeCoin, 50;
+ getitem EarthPowder, 2;
+ getitem PlatinumOre, 1;
+ }
+
+ if (.@kill >= .tier4 && .@rewa < 4) {
+ mesc l("Milestone reached: %s kills", fnum(.tier4));
+ setq3 FortressQuest_SlimeHunter, 4;
+ getitem MercenaryBoxsetEE, 3;
+ getitem ElixirOfLife, 5;
+ getitem EarthPowder, 2;
+ getitem PlatinumOre, 1;
+ }
+
+
+ // Quest complete
+ if (.@kill >= .million) {
+ mesc b(l("Quest complete: Congratulations!")), 3;
+ setq1 FortressQuest_SlimeHunter, 2;
+ setq3 FortressQuest_SlimeHunter, 5;
+ getitem MercenaryBoxsetEE, 5;
+ getitem StrangeCoin, 100;
+ getitem EarthPowder, 3;
+ getitem any(LuckFruit, DexterityFruit, IntelligenceFruit, VitalityFruit, AgilityFruit, StrengthFruit), 1;
+ getitem MysteriousFruit, 1;
+ //getitem PrismGift, 1;
+ }
+ close;
+
+OnInit:
+ .sex = G_MALE;
+ .distance = 5;
+ .million = 1000000;
+
+ .tier1 = 10000;
+ .tier2 = 50000;
+ .tier3 = 250000;
+ .tier4 = 500000;
+ end;
+}
+
+// Commander Cadis Questcheck
+function script CadisQuestCheck {
+ if (!playerattached())
+ return;
+
+ .@mobId=getarg(0, killedrid);
+
+ if (getq(FortressQuest_SlimeHunter) == 1) {
+ // Register the kill
+ if (compare("slime", strtolower(strmobinfo(1, .@mobId))))
+ setq2 FortressQuest_SlimeHunter, getq2(FortressQuest_SlimeHunter)+1;
+ // Report every 1000 kills
+ if (getq2(FortressQuest_SlimeHunter) % 1000 == 0)
+ dispbottom l("Cadis : You have slain %s slimes out of a million.", fnum(getq2(FortressQuest_SlimeHunter)));
+ }
+
+ return;
+}
+
diff --git a/npc/025-1/ctrl.c b/npc/025-1/ctrl.c
index f8f197ae4..ace7b64ff 100644
--- a/npc/025-1/ctrl.c
+++ b/npc/025-1/ctrl.c
@@ -52,6 +52,7 @@ function script FTCleanup {
enablenpc "Drahcir";
enablenpc "Selim";
enablenpc "Commander Povo";
+ enablenpc "Commander Cadis";
enablenpc "Phoenix Rebirth";
enablenpc "Anin The Traveler";
donpcevent "#025-1_99_112::OnDisable";
@@ -63,6 +64,7 @@ function script FTCleanup {
disablenpc "Drahcir";
disablenpc "Selim";
disablenpc "Commander Povo";
+ disablenpc "Commander Cadis";
disablenpc "Phoenix Rebirth";
disablenpc "Anin The Traveler";
donpcevent "#025-1_99_112::OnEnable";
diff --git a/npc/functions/mobpoint.txt b/npc/functions/mobpoint.txt
index 339e3026c..2ac276f43 100644
--- a/npc/functions/mobpoint.txt
+++ b/npc/functions/mobpoint.txt
@@ -78,6 +78,7 @@ OnNPCKillEvent:
callfunc "ChocolateDay";
callfunc "CoffeeDay";
callfunc "FSFDay";
+ callfunc "CadisQuestCheck";
// Unset killedrid. This affects multiple calls of this function
// But it is in overall more reliable imao
diff --git a/npc/functions/util.txt b/npc/functions/util.txt
index 183ca5781..704c84805 100644
--- a/npc/functions/util.txt
+++ b/npc/functions/util.txt
@@ -539,12 +539,16 @@ function script reputation {
// Fortress Town Quests (1 point/special)
} else if (getarg(0) == "Fortress") {
- // Who am I? (+1 rep)
+ // Who am I? (+2 rep)
if (getq(General_Narrator) >= 22)
+ .@nr=.@nr+2;
+
+ // Cadis: Great Slime Hunt (+1 rep)
+ if (getq(FortressQuest_SlimeHunter) >= 2)
.@nr=.@nr+1;
// FORTRESS TOWN Magical Forumula
- .@nr=.@nr*100/1;
+ .@nr=.@nr*100/3;
// Final