summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-07-14 23:20:32 -0300
committerJesusaves <cpntb1@ymail.com>2021-07-14 23:20:32 -0300
commit691fd800c71ac982b9f02de36acbea5532b1a4c5 (patch)
tree414779d904c940be8cf8c1444a5987afbf4f9190
parente72f29dc8b20ac2e86ce9c7c48ee7f3e51a0e095 (diff)
downloadserverdata-691fd800c71ac982b9f02de36acbea5532b1a4c5.tar.gz
serverdata-691fd800c71ac982b9f02de36acbea5532b1a4c5.tar.bz2
serverdata-691fd800c71ac982b9f02de36acbea5532b1a4c5.tar.xz
serverdata-691fd800c71ac982b9f02de36acbea5532b1a4c5.zip
Initial version of Doomsday Quest. Minimum Level 100. Temporary reward. Untested.
Also, fix the Scythe and add stats to the Halberd.
-rw-r--r--db/pre-re/item_db.conf16
-rw-r--r--db/pre-re/job_db.conf2
-rw-r--r--db/quest_db.conf4
-rw-r--r--npc/001-2/wizards.txt152
-rw-r--r--npc/099-5/boss.txt12
-rw-r--r--npc/099-7/boss.txt30
-rw-r--r--npc/functions/clear_vars.txt10
7 files changed, 207 insertions, 19 deletions
diff --git a/db/pre-re/item_db.conf b/db/pre-re/item_db.conf
index f4017060..566e1fbf 100644
--- a/db/pre-re/item_db.conf
+++ b/db/pre-re/item_db.conf
@@ -276,15 +276,15 @@ item_db: (
Buy: 20
Sell: 10
Weight: 1400
- Atk: 100
- Range: 1
+ Atk: 140
+ Range: 2
Slots: 0
- Loc: "EQP_HAND_R"
- WeaponLv: 1
+ Loc: ["EQP_HAND_L", "EQP_HAND_R"]
+ WeaponLv: 2
EquipLv: 0
Refine: false
ViewSprite: 1
- Subtype: "W_1HSPEAR"
+ Subtype: "W_2HSPEAR"
Script: <"
callfunc "UnreleasedItem", EQI_HAND_R;
">
@@ -771,14 +771,14 @@ item_db: (
Sell: 50
Weight: 1200
Atk: 75
- Range: 1
+ Range: 2
Slots: 0
Loc: ["EQP_HAND_L", "EQP_HAND_R"]
- WeaponLv: 1
+ WeaponLv: 2
EquipLv: 1
Refine: false
ViewSprite: 1
- Subtype: "W_2HSWORD"
+ Subtype: "W_2HSPEAR"
},
{
Id: 758
diff --git a/db/pre-re/job_db.conf b/db/pre-re/job_db.conf
index 85f34f26..76155630 100644
--- a/db/pre-re/job_db.conf
+++ b/db/pre-re/job_db.conf
@@ -61,7 +61,7 @@ Talpan: {
Sword: 700
Axe: 550
TwoHandAxe: 1000
- TwoHandSpear: 1200
+ TwoHandSpear: 750
Mace: 550
TwoHandMace: 550
Rod: 700
diff --git a/db/quest_db.conf b/db/quest_db.conf
index fd7e29d3..a06df626 100644
--- a/db/quest_db.conf
+++ b/db/quest_db.conf
@@ -69,6 +69,10 @@ quest_db: (
Id: 220
Name: "Quest_Reapercry"
},
+{
+ Id: 221
+ Name: "Quest_Doomsday"
+},
// Test Quests, Debug Quests, etc. (1000+)
{
diff --git a/npc/001-2/wizards.txt b/npc/001-2/wizards.txt
index 9fa5fa84..b1769266 100644
--- a/npc/001-2/wizards.txt
+++ b/npc/001-2/wizards.txt
@@ -1,4 +1,4 @@
-
+// Tulimshar Wizards (The Mana World Doomsday Quest)
- script Magic Council NPC32767,{
explode .@n, strnpcinfo(0), "#";
if (.@n[1] == 9) mes "The arch wizard seems to be busy.";
@@ -13,6 +13,154 @@ OnInit:
end;
}
+// Quest giver
+001-2,104,27,0 script Arch-Wizard#9 NPC354,{
+ function dd5Neutral;
+ function dd5Intro;
+ function dd5Words;
+ function dd5Almost;
+ function dd5Finish;
+
+ if (BaseLevel < 100) dd5Neutral();
+
+ switch (getq(Quest_Doomsday)) {
+ case 0:
+ dd5Intro(); break;
+ case 1:
+ dd5Words(); break;
+ case 2:
+ dd5Almost(); break;
+ case 3:
+ dd5Finish(); break;
+ default:
+ dd5Neutral(); break;
+ }
+ close;
+
+// Not enough level
+function dd5Neutral {
+ mes l("The arch wizard seems to be busy.");
+ next;
+ mes l("Perhaps you should come back later.");
+ close;
+}
+
+// Quest begin
+function dd5Intro {
+ mesn;
+ mesq l("Ah, %s. A good thing you came here.", strcharinfo(0));
+ next;
+ // Pre-requisite: TMW Swamps OK
+ if (getq(Quest_Reapercry) < 2) {
+ mesn;
+ mesq l("We have found a... disturbance, which we would like you to investigate, in Hurnscald's Crypt.");
+ next;
+ mesn;
+ mesq l("I'm afraid that this is all I can tell you for now.");
+ return;
+ }
+ // OK
+ mesn;
+ mesq l("I believe you have found the ruined Keshlam Swamps, didn't you?");
+ next;
+ mesn;
+ mesq l("That place have an eerie energy to it. And you know, not many things can scare an arch wizard.");
+ next;
+ mesn;
+ mesq l("Have you ever used a time traveler before?");
+ askyesno();
+ mes "";
+ mesn;
+ mesq l("What I feel from there is something which transcends time travel. Some power outside of the domain of time must be at play.");
+ next;
+ mesn;
+ mesq l("We've dispatched a wizard team to investigate. And... Well, you must see it for yourself, you guess. Let's just say... Pocket dimension.");
+ next;
+ mesn;
+ mesq l("We need someone strong to challenge something which we're not sure if it is our past, our present, our future, or even a parallel timeline for all we know. Are you up to this task?");
+ mesc l("Accepting this quest will replay \"The Mana World: Doomsday\"."), 1;
+ next;
+ if (askyesno() == ASK_NO) {
+ mes "";
+ mesn;
+ mesq l("I see. I should have sought someone more corageous, I guess. Please, stop wasting our time.");
+ return;
+ }
+ mesn;
+ mesq l("Great! There should be an engraving somewhere there. You should chant some ancient words our scholars have found.");
+ setq Quest_Doomsday, 1;
+ next;
+ dd5Words();
+ return;
+}
+
+// Quest reminder
+function dd5Words {
+ mesn;
+ mesq l("Go to the engraving and recite the following:");
+ mes b("Tutin Jande Liaise"); // In Jande Lustitiae (latin) [anagram]
+ next;
+ mesn;
+ mesq l("It means \"Jande's Justice\". Jande is the Great Dragon of Earth.");
+ next;
+ mesn;
+ mesq l("It seems to be in a time-lock, but we found a powerful entity which our wizards could not defeat. Try defeating it, and report back if you find out anything.");
+ next;
+ mesn;
+ mesq l("...Also, if you don't know what a Great Dragon is, then please, go visit a library. We the wizard council of Tulimshar have more important things to do.");
+ return;
+}
+
+// As a participant
+function dd5Almost {
+ mesn;
+ mesq l("I can see horror in your eyes. I assume you fought whatever was there.");
+ next;
+ mesn;
+ mesq l("Many of our wizards did and had the same scary expression in your eyes. But I did not ask you to fight, I asked you to win.");
+ next;
+ mesn;
+ mesq l("So please, do not bother me until you have some sort of trophy to show off. I'll repeat again the words you need to recite at the engraving:");
+ mes b("Tutin Jande Liaise"); // In Jande Lustitiae (latin) [anagram]
+ return;
+}
+
+function dd5Finish {
+ mesn;
+ // Must be wearing the Savior Armor to finish this quest
+ if (!isequipped(SaviorArmor)) {
+ mesq l("Please do not bother me until you have some sort of trophy to show off.");
+ return;
+ } else {
+ mesq l("Now, isn't this a fancy armor you're wearing...?");
+ next;
+ }
+ mesn;
+ mesq l("I can recognize it's made of Zealite. That is... the same material from which our Soul Menhirs are made.");
+ next;
+ mesn;
+ mesq l("If that was our future, how grim it is! Likely, the Soul Menhirs were destroyed on that... reality.");
+ next;
+ mesn;
+ mesq l("Keep the armor. I'll inform the other sages about this.");
+ next;
+ select
+ l("Thanks!"),
+ l("Actually, there was more...");
+ mes "";
+ mesn;
+ mesq l("Oh right, I almost forgot your reward. Here, take this gold. Don't waste it all on candies. Now shoo, shoo, begone! You're disrupting me!");
+ Zeny+=1000000; // One Million GP - FIXME
+ setq Quest_Doomsday, 4;
+ return;
+}
+
+OnInit:
+ .distance = 4;
+ end;
+}
+
+
001-2,104,19,0 duplicate(Magic Council) Desert Mana Seed#_M NPC166
001-2,99,22,0 duplicate(Magic Council) Wizard#1 NPC355
001-2,92,24,0 duplicate(Magic Council) Wizard#2 NPC356
@@ -22,5 +170,5 @@ OnInit:
001-2,117,24,0 duplicate(Magic Council) Wizard#6 NPC360
001-2,117,30,0 duplicate(Magic Council) Wizard#7 NPC361
001-2,110,32,0 duplicate(Magic Council) Wizard#8 NPC362
-001-2,104,27,0 duplicate(Magic Council) Arch-Wizard#9 NPC354
+//001-2,104,27,0 duplicate(Magic Council) Arch-Wizard#9 NPC354
diff --git a/npc/099-5/boss.txt b/npc/099-5/boss.txt
index a645351b..eed13059 100644
--- a/npc/099-5/boss.txt
+++ b/npc/099-5/boss.txt
@@ -219,8 +219,7 @@ OnMTReward52:
goto OnMTDispose;
// Tally rewards
- // FIXME TODO Use a bitwise to save space? Or a quest state.
- if (!#DD5_TALLY)
+ if (getq(Quest_Doomsday) < 3)
goto OnTally;
goto OnEpilogue1;
@@ -241,11 +240,12 @@ OnMTReward42:
// Tally rewards
// FIXME TODO Use a bitwise to save space? See above
- if (!#DD5_TALLY)
+ if (getq(Quest_Doomsday) < 3)
goto OnTally;
goto OnEpilogue1;
OnTally:
+ compareandsetq Quest_Doomsday, 1, 2;
if (@dd5_score > $@DD5_TALLY_)
goto OnTallyOK;
goto OnEpilogue1;
@@ -988,8 +988,6 @@ OnTalkNearby:
// Only react if the message is what we want to hear
if (.@message$ != "MITEYO")
end;
- if ($DOOMSDAY != 3)
- end;
if ($@DD5_HP < 1)
end;
message strcharinfo(0), "Estimated boss HP: "+($@DD5_HP+rand(-100, 100));
@@ -1446,9 +1444,9 @@ L_MissionComplete:
L_Winner:
getitem SaviorArmor, 1;
- getvaultexp(250); // This is TMW's main quest, worth 50% of the EXP bar
$@DD5_TALLY$ = "";
- #DD5_TALLY = 1;
+ setq Quest_Doomsday, 3;
+ getvaultexp(250); // This is TMW's main quest, worth 50% of the EXP bar
mes "##2You were the MVP with "+$@DD5_TALLY_+" points!##0";
//mes "##2Exchange this blue rose with a Game Master!##0";
close;
diff --git a/npc/099-7/boss.txt b/npc/099-7/boss.txt
index 6afbf37c..ffd76bf5 100644
--- a/npc/099-7/boss.txt
+++ b/npc/099-7/boss.txt
@@ -549,6 +549,36 @@ L_Tools:
next;
mes "-- The ....";
close;
+
+OnInit:
+ // In theory, pattern ID must be between 1~9
+ // To set $@p1$~$@p9$ with the PERL expression
+ // But as we're only using $@p0$ (full string)
+ // the value itself is meaningless
+ .pid=getnpcid();
+ debugmes "Engraving: Pattern %d", .pid;
+ //I'm not going to learn PERL just for that
+ defpattern(.pid, "^(.*)$", "OnTalkNearby");
+ activatepset(.pid);
+ end;
+
+OnTalkNearby:
+ // Quest not assigned
+ if (!getq(Quest_Doomsday)) end;
+
+ // not very obvious stuff by gumi, $@p0$ contains the whole string
+ // so we must cut it. Could use $@p1$ if perl was proper but... meh.
+ .@no_nick$ = strip(substr($@p0$, getstrlen(strcharinfo(PC_NAME)) + 3, getstrlen($@p0$) - 1));
+ .@message$ = strtoupper(.@no_nick$);
+
+ // Only react if the message is what we want to hear
+ if (.@message$ == "TUTIN JANDE LIAISE") {
+ specialeffect(FX_MAGIC_TELEPORT, AREA, getcharid(3));
+ sleep2(800);
+ if (!ispcdead())
+ warp "099-1", 55, 49;
+ }
+ end;
}
diff --git a/npc/functions/clear_vars.txt b/npc/functions/clear_vars.txt
index 82ac931f..ab0259bb 100644
--- a/npc/functions/clear_vars.txt
+++ b/npc/functions/clear_vars.txt
@@ -5,10 +5,18 @@ function script ClearVariables {
// Remove old variables to new quest system
if (QL_VALON) {
setq CandorQuest_Valon, QL_VALON;
- QL_VALON=0;
+ QL_VALON = 0;
}
if (QL_HIDENSEEK) {
setq CandorQuest_HideNSeek, (QL_HIDENSEEK >= 64 ? 2 : 1), (QL_HIDENSEEK-1);
+ QL_HIDENSEEK = 0;
+ }
+ if (#CRYPT_PASSWORD && !getq(Quest_Reapercry)) {
+ setq Quest_Reapercry, 1;
+ }
+ if (#DD5_TALLY) {
+ setq Quest_Doomsday, 2;
+ #DD5_TALLY = 0; // Whatever
}
// Don't ask me what code below does