1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
|
// 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 lordSkillTraining;
function lordClose;
if ((MAGIC_LVL) && (getq(LilitQuest_PiratesOfSARAH) > 1))
{
lordQuest();
}
lordClose();
close;
function lordQuest
{
if (BaseLevel < 60)
{
lordClose();
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
{
if (countitem(PileOfAsh) < 15 ||
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("I teach the skills necessary to draw even greater power from the Duck Side.");
next;
if (MAGIC_LVL)
{
lordSkillTraining();
}
return;
}
function lordSkillTraining
{
mes l(".:: Destructive Magic Class ::.");
mesc l("Specialized in necromancer skills with undead-based damage and summoning.");
next;
mesn;
mesc l("You have @@ magic skill points available.", sk_points());
mes "";
mes l(".:: Necrotic Bolt ::.");
mesc l("Blast your enemies with a bolt of pure undeath, leeching life from them in the process.");
mes "";
menuint
l("Necrotic Bolt"), TMW2_NECROTICBOLT,
l("Cancel"), 0;
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;
}
|