summaryrefslogtreecommitdiff
path: root/npc/018-5-4/darklord.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/018-5-4/darklord.txt')
-rw-r--r--npc/018-5-4/darklord.txt447
1 files changed, 447 insertions, 0 deletions
diff --git a/npc/018-5-4/darklord.txt b/npc/018-5-4/darklord.txt
new file mode 100644
index 000000000..9e3a9ac4b
--- /dev/null
+++ b/npc/018-5-4/darklord.txt
@@ -0,0 +1,447 @@
+// TMW2 Script
+// Author:
+// dangerDuck
+// Description:
+// Dark Lord is a suspicious npc.
+// In order to start the Lord's quest, one must completed the first stage of the Elder's quest
+// The first/second stages of the Lord's quest consists of gathering items for necromancy summon skills
+// Third stage of the quest consists of killing pious and piou knights for the necromancy attack skill
+// Variables:
+// LilitQuest_TheDuckSide
+
+function script DarkLordMobCount {
+ .@q=getq(LilitQuest_TheDuckSide);
+ .@t1=getq2(LilitQuest_TheDuckSide);
+ .@t2=getq3(LilitQuest_TheDuckSide);
+ .@map=getmap();
+ if (.@t1 >= 300 && .@t2 >= 20)
+ {
+ dispbottom l("That must have been the last piou. I should return to Duck Isle.");
+ setq(LilitQuest_TheDuckSide, 6, 0, 0);
+ }
+
+ if ((.@map == "006-2" ||
+ .@map == "006-2-3" ||
+ .@map == "006-2-5" ||
+ .@map == "006-2-6") &&
+ .@q == 5 &&
+ (killedrid == Piou ||
+ killedrid == ForestPiou ||
+ killedrid == ManaPiou ||
+ killedrid == Piousse))
+ {
+ setq2(LilitQuest_Pouf, .@t1+1);
+ }
+
+ if (.@map == "006-2-4" &&
+ .@q == 5 &&
+ killedrid == PiouKnight)
+ {
+ setq3(LilitQuest_Pouf, .@t2+1);
+ }
+ return;
+}
+
+
+018-5-4,37,46,0 script Dark Lord NPC_DARK_LORD,{
+ function lordQuest;
+ function lordStage1;
+ function lordSupplyMenu1;
+ function lordSupplyList1;
+ function lordSupplyGive1;
+ function lordStage2;
+ function lordSupplyMenu2;
+ function lordSupplyList2;
+ function lordSupplyGive2;
+ function lordHuntStart;
+ function lordHuntReport;
+ function lordHuntReward;
+ function lordTrainingComplete;
+ function lordClose;
+ if (MAGIC_LVL && getq(LilitQuest_PiratesOfSARAH) > 1)
+ {
+ lordQuest();
+ }
+ lordClose();
+ close;
+
+function lordQuest
+{
+ if (BaseLevel < 60)
+ {
+ elderClose();
+ return;
+ }
+ .@q=getq(LilitQuest_TheDuckSide);
+ if (.@q <= 0)
+ {
+ lordStage1();
+ }
+ else
+ {
+ mesn;
+ mesq l("Yes, Apprentice?");
+ next;
+ select
+ rif(.@q == 1 || .@q == 3, l("I've returned, as you requested...")),
+ rif(.@q == 2, l("Do you have other tasks for me, Master?")),
+ rif(.@q == 4, l("I'm ready to begin the next stage of my training.")),
+ rif(.@q == 5, l("How many more pious do I have to kill?")),
+ rif(.@q == 6, l("Do you have more tasks for me, Master?")),
+ rif(.@q == 7, l("How can I obtain more power from the Duck Side?")),
+ l("Nothing, Master.");
+ mes "";
+ switch (@menu) {
+ case 1:
+ lordSupplyMenu1();
+ break;
+ case 2:
+ lordStage2();
+ break;
+ case 3:
+ lordSupplyMenu2();
+ break;
+ case 4:
+ lordHuntStart();
+ break;
+ case 5:
+ lordHuntReport();
+ break;
+ case 6:
+ lordHuntReward();
+ break;
+ case 7:
+ lordTrainingComplete();
+ break;
+ }
+ }
+ return;
+}
+
+function lordStage1
+{
+ mesn;
+ mesq l("Hello %s. I have heard tell of your great deeds. You have indeed grown powerful, but you still remain shackled to weakness.", get_race());
+ mesn;
+ mesq l("True power can only come by first embracing the Duck Side. I can guide and train you, but be warned: the Duck Side is not for the faint of heart.");
+ mesn;
+ mesc l("WARNING: Choosing this path is irreversible and will prevent you from obtaining piou skills. Do you wish to accept the quest?"), 1;
+ if (askyesno() == ASK_NO)
+ return;
+ mesn;
+ mesq l("You have chosen wisely. For our first lesson, I will need you to gather certain ... supplies.");
+ next;
+ setq(LilitQuest_TheDuckSide, 1, 0, 0);
+ lordSupplyList1();
+}
+
+function lordSupplyMenu1
+{
+ do
+ {
+ mesn;
+ mesq l("Did you bring the supplies?");
+ next;
+ select
+ l("I have them right here."),
+ l("What did you need again?"),
+ l("I haven't collected them yet.");
+ mes "";
+ switch (@menu) {
+ case 1:
+ lordSupplyGive1();
+ break;
+ case 2:
+ lordSupplyList1();
+ // fallthrough
+ case 3:
+ break;
+ }
+ } while (true);
+ return;
+}
+
+function lordSupplyList1
+{
+ mesq "";
+ mesn;
+ mesq l("You must bring me:");
+ mesq l("%d/%d %s", countitem(PileOfAsh), 15, getitemlink(PileOfAsh));
+ mesq l("%d/%d %s", countitem(Pearl), 10, getitemlink(Pearl));
+ mesq l("%d/%d %s", countitem(FluoPowder), 6, getitemlink(FluoPowder));
+ mesq l("%d/%d %s", countitem(DarkCrystal), 1, getitemlink(DarkCrystal));
+ next;
+ return;
+}
+
+function lordSupplyGive1
+{
+ countitem(PileOfAsh) < 15 ||
+ if (countitem(Pearl) < 10 ||
+ countitem(FluoPowder) < 6 ||
+ countitem(DarkCrystal) < 1)
+ {
+ mesn;
+ mesq l("This isn't what I requested. Learn to count your items more carefully... Or else.");
+ percentheal -75, 0;
+ return;
+ }
+ skill(TMW2_DISEMBODYSPIRIT,1,0);
+
+ delitem(PileOfAsh, 15);
+ delitem(Pearl, 10);
+ delitem(FluoPowder, 6);
+ delitem(DarkCrystal, 1);
+
+ setq(LilitQuest_TheDuckSide, 2, 0, 0);
+
+ mes "";
+ mesn;
+ mesq l("These ingredients allow one access to undeath and grant control over the dead.");
+ next;
+ mesn;
+ mesq l("With a little knowledge, you can harness the power of life and death to summon forth the disembodied spirits of mana itself.");
+ next;
+ mesn;
+ mesq l("Keep in mind the more power you have, the less control you'll have as well. Less control may result in failure to summon.");
+ next;
+ mesn;
+ mesq l("You will need a %s and a %s to use this skill. Fail rate is high if you can't control your magic.", getitemlink(Pearl), getitemlink(PileOfAsh));
+
+ if (BaseLevel < 65)
+ {
+ mesn;
+ mesq l("That's all you're capable of learning for now, Apprentice. Practice and return when you are stronger.");
+ }
+ else
+ {
+ mesn;
+ mesq l("You demonstrate amazing potential for one so young. Once I have spoken to the Council of Elders, return to me...");
+ }
+ next;
+ return;
+}
+
+function lordStage2
+{
+ if (BaseLevel < 65)
+ {
+ mesn;
+ mesq l("Practice and return when you are stronger.");
+ return;
+ }
+ mesn;
+ mesq l("The Council of Elders has approved your training. Now that you have learned to summon forth spirits, we will progress to more powerful and... dangerous spells.");
+ mesn;
+ mesq l("You will again need to gather materials. Do not fail me.");
+ next;
+ setq(LilitQuest_TheDuckSide, 3, 0, 0);
+ lordSupplyList2();
+ return;
+}
+
+function lordSupplyMenu2
+{
+ do
+ {
+ mesn;
+ mesq l("Did you bring the supplies?");
+ next;
+ select
+ l("I have them right here."),
+ l("What did you need again?"),
+ l("I haven't collected them yet.");
+ mes "";
+ switch (@menu) {
+ case 1:
+ lordSupplyGive1();
+ break;
+ case 2:
+ lordSupplyList1();
+ // fallthrough
+ case 3:
+ break;
+ }
+ } while (true);
+ return;
+}
+
+function lordSupplyList2
+{
+ mesq "";
+ mesn;
+ mesq l("You must bring me:");
+ mesq l("%d/%d %s", countitem(AnimalBones), 25, getitemlink(AnimalBones));
+ mesq l("%d/%d %s", countitem(IronPowder), 20, getitemlink(IronPowder));
+ mesq l("%d/%d %s", countitem(PileOfAsh), 15, getitemlink(PileOfAsh));
+ mesq l("%d/%d %s", countitem(DiseasedHeart), 7, getitemlink(DiseasedHeart));
+ next;
+ return;
+}
+
+function lordSupplyGive2
+{
+ if (countitem(AnimalBones) < 25 ||
+ countitem(IronPowder) < 20 ||
+ countitem(PileOfAsh) < 15 ||
+ countitem(DiseasedHeart) < 7)
+ {
+ mesn;
+ mesq l("This isn't what I requested. Learn to count your items more carefully... Or else.");
+ percentheal -75, 0;
+ return;
+ }
+ skill(TMW2_RAISEDEAD,1,0);
+
+ delitem(AnimalBones, 25);
+ delitem(IronPowder, 20);
+ delitem(PileOfAsh, 15);
+ delitem(DiseasedHeart, 7);
+
+ setq(LilitQuest_TheDuckSide, 4, 0, 0);
+
+ mes "";
+ mesn;
+ mesq l("In the same way as our last lesson, knowledge is key to harnessing the power of life and death.");
+ next;
+ mesn;
+ mesq l("This time we will be using the power of the Duck Side to raise the dead to carry out one's bidding.");
+ next;
+ mesn;
+ mesq l("The %s are sufficient enough to form a crude body to host the spirits of the dead. The bodies don't last very long, though.", getitemlink(AnimalBones));
+ next;
+ mesn;
+ mesq l("By now you should have enough control to not fail summoning forth undead. If not, well... let's just say it wouldn't go well for you.");
+ next;
+ mesn;
+ mesq l("You will need an %s, an %s, and a %s to use this skill.", getitemlink(AnimalBones), getitemlink(IronPowder), getitemlink(PileOfAsh));
+
+ if (BaseLevel < 70)
+ {
+ mesn;
+ mesq l("That's all you're capable of learning for now, Apprentice. Practice and return when you are stronger.");
+ }
+ else
+ {
+ mesn;
+ mesq l("You had shown great promise and are nearing the end of your training. I must think on your final task...");
+ }
+ next;
+ return;
+}
+
+function lordHuntStart
+{
+ if (BaseLevel < 70)
+ {
+ mesn;
+ mesq l("Practice and return when you are stronger.");
+ return;
+ }
+ mesn;
+ mesq l("To complete your training, you must pass a test, a final exam... of sorts.");
+ next;
+ mesn;
+ mesq l("For years, ducks have fought to preserve our homeland and carry out the will of the Moubootaur through our mastery of the Duck Side.");
+ next;
+ mesn;
+ mesq l("The pious have been staunchly opposed to our efforts to return the Moubootaur's power and fight on its behalf. They must be dealt with.");
+ next;
+ mesn;
+ mesq l("Unfortunately, the piou village has managed to hide from duck forces and confound our scouts. We have been unable to infiltrate it.");
+ next;
+ mesn;
+ mesq l("Your task is to infiltrate the piou village and kill %d pious and %d piou knights. If you are successful, I will complete your training.", 300, 20);
+ next;
+ setq(LilitQuest_TheDuckSide, 5, 0, 0);
+ return;
+}
+
+function lordHuntReport
+{
+ mesn;
+ mesq l("You have killed %d/%d pious and %d/%d piou knights.", getq2(LilitQuest_TheDuckSide), 300, getq3(LilitQuest_TheDuckSide), 20);
+ next;
+ return;
+}
+
+function lordHuntReward
+{
+ mesn;
+ mesq l("For our last lesson, you must draw upon your rage. This is the source of the Duck Side's power.");
+ next;
+ mesn;
+ mesq l("Only then can you channel your passion and call upon the Duck Side. This is most simply expressed in a bolt of lightning, but there are always other ways to unleash your anger.");
+ next;
+ mesn;
+ mesq l("Traditionally, ducks have found that the use of powerful weapons, called lightsabers by some, greatly enhances the power of the channeled bolt.");
+ next;
+ mesn;
+ mesq l("Congratulations, Apprentice. Your training is complete. You now truly belong to the Duck Side.");
+ next;
+ mesn;
+ mesq l("Remember to practice, youngling. Discipline is everything.");
+ next;
+ skill(TMW2_NECROTICBOLT,1,0);
+ setq(LilitQuest_TheDuckSide, 7, 0, 0);
+ return:
+}
+
+function lordTrainingComplete
+{
+ mesn;
+ mesq l("You have mastered much, but you must practice more before you can draw even greater power from the Duck Side.");
+ next;
+ return;
+}
+
+
+function lordClose
+{
+ mesn;
+ if (BaseLevel < 60)
+ {
+ mesn;
+ mesq l("Begone %s!", get_race());
+ next;
+ mesq l("The Duck Side does not take kindly to outsiders and weaklings like you!");
+ }
+ else
+ {
+ mesq l("You show potential %s, but only if you embrace the Duck Side. Return when you are prepared to seek true power...", get_race());
+ }
+ return;
+}
+
+OnTimer1000:
+ domovestep();
+ end;
+
+OnInit:
+ initpath "move", 33, 46,
+ "dir", DOWN, 0,
+ "wait", 20, 0,
+ "move", 33, 42,
+ "dir", DOWN, 0,
+ "wait", 20, 0,
+ "dir", RIGHT, 0,
+ "wait", 5, 0,
+ "move", 29, 73,
+ "dir", DOWN, 0,
+ "wait", 15, 0,
+ "move", 37, 46,
+ "dir", LEFT, 0,
+ "wait", 1, 0,
+
+ initialmove;
+ initnpctimer;
+
+ .sex = G_OTHER;
+ .distance = 7;
+ end;
+
+OnInstanceInit:
+ disablenpc instance_npcname(.name$);
+ end;
+}
+