summaryrefslogtreecommitdiff
path: root/world/map/npc/099-2/logic.txt
blob: 29d7e96ddf95ad37adf523c2500061d1fc8208ae (plain) (blame)
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
// Evol script
// Author:
//      Jesusalva
// Description:
//      099-2 and 099-6 KESHLAM ADVENTURER GUILD QUARTERS
//      Controls gimmicks in 099-3 as well
/////////////////////////////////////////////////////////////////////////////////


099-2,0,0,0|script|#099-2_Prestart|32767
{
    end;

// FIXME Do not work. Again.
OnTrial1:
    monster "099-1", 35, 27, "", 1140, 1, strnpcinfo(0)+"::OnTrial2";
    monster "099-1", 35, 27, "", 1141, 1, strnpcinfo(0)+"::OnTrial2";
    getexp 10000, 0;
    getitem "TreasureKey", 1;
    end;

OnTrial2:
    monster "099-1", 35, 27, "", 1143, 1, strnpcinfo(0)+"::OnTrial3";
    getexp 10000, 0;
    getitem "DarkConcentrationPotion", 1;
    end;

OnTrial3:
    getexp 10000, 0;
    getitem "BentNeedle", 1;
    end;

// Janitor Function
OnTimer30000:
    if (!$@DD5_STATUS)
        end;
    if (getmapusers("099-5") < 1)
        donpcevent "#TMWFinalExam::OnAbort";
    initnpctimer;
    end;

OnInit:
    // Initialize the 18 switches
    set $@DD5_TSWITCH, 0;
    // setarray $@DD5_SWITCH - not needed

    // Initialize the 16 passwords
    setarray $@DD5_PASSWORDS,
             3555+rand(10000),
             3555+rand(10000),
             3555+rand(10000),
             3555+rand(10000),
             3555+rand(10000),
             3555+rand(10000),
             3555+rand(10000),
             3555+rand(10000),
             3555+rand(10000),
             3555+rand(10000),
             3555+rand(10000),
             3555+rand(10000),
             3555+rand(10000),
             3555+rand(10000),
             3555+rand(10000),
             3555+rand(10000);

    // Spawn monsters on maps
    // The infantry
    areamonster "099-2", 20, 20, 130, 130, "", 1159, 10;
    areamonster "099-2", 20, 20, 130, 130, "", 1160, 10;
    areamonster "099-6", 20, 20, 130, 130, "", 1159, 10;
    areamonster "099-6", 20, 20, 130, 130, "", 1160, 10;
    areamonster "099-3", 20, 20, 120,  80, "", 1159, 15;
    areamonster "099-3", 20, 20, 120,  80, "", 1160, 15;

    // The small fry
    areamonster "099-1", 20, 20, 130, 130, "", 1156, 30;
    areamonster "099-2", 20, 20, 130, 130, "", 1156, 20;
    areamonster "099-6", 20, 20, 130, 130, "", 1156, 20;
    areamonster "099-3", 20, 20, 120,  80, "", 1156, 60;
    // The advanced mobs
    areamonster "099-1", 20, 20, 130, 130, "", 1152, 15;
    areamonster "099-2", 20, 20, 130, 130, "", 1152, 5;
    areamonster "099-6", 20, 20, 130, 130, "", 1152, 5;
    areamonster "099-3", 20, 20, 120,  80, "", 1152, 20;

    // The boss. Used to be 1137 Tormenta but... Well... Better not.
    monster "099-1", 35, 27, "", 1147, 1, "#099-2_Prestart::OnTrial1";
    end;

OnJanitor:
    // Maintain 099-5 (janitor)
    initnpctimer;
    end;
}






/////////////////////////////////////////////////////
// Lore subsystem
// Lore tidbits are distributed between four maps
// Strategy notes are mixed as well
// There is a total of 18 lore parts

099-2,57,17,0|script|???#099-2_57_17|400
{
    // Default distance is 4 tiles - all we need
    callfunc "PCtoNPCRange";
    if(@npc_check) end;

    mes ".:: V0id Flower ::.";
	mes "This orange flower is dangerous!";
    mes "Do not disturb them - they have great range and damage!";
    mes "";
    mes "Whoever designed this artifical flower must have been crazy!";
    mes "Killing it is not fast enough, avoid its nectar at all costs!";
	close;
}

099-2,123,128,0|script|???#099-2_123_128|400
{
    // Default distance is 4 tiles - all we need
    callfunc "PCtoNPCRange";
    if(@npc_check) end;

    mes ".:: V0id Slime ::.";
	mes "A crazy combat unit made in a crazy laboratory.";
    mes "If you can, just avoid it. It is slow enough.";
    mes "It can be slain, but have a decent defense, so use magic.";
	close;
}

099-2,95,122,0|script|???#099-2_95_122|400
{
    // Default distance is 4 tiles - all we need
    callfunc "PCtoNPCRange";
    if(@npc_check) end;

    mes ".:: V0id Snake ::.";
	mes "If I find who designed these monsters ... Grr...";
    mes "They are fast. And powerful. Goes down quickly, though.";
	close;
}

099-2,28,122,0|script|???#099-2_28_122|400
{
    // Default distance is 4 tiles - all we need
    callfunc "PCtoNPCRange";
    if(@npc_check) end;

	mes "Last night, we were attacked by Xakelbael the Dark.";
    mes "Our attacks could barely do him any harm, and then...";
    mes "He cast \"Fourth Fall\". All our buffed soldiers fell down the same instant.";
    mes "";
    mes "I am gravely injured, but I'm leaving this note here.";
    mes "Comrades, please avenge me!";
	close;
}

099-2,91,92,0|script|???#099-2_91_92|400
{
    // Default distance is 4 tiles - all we need
    callfunc "PCtoNPCRange";
    if(@npc_check) end;

    mes ".:: Sasquatch ::.";
	mes "Developed for protection of the Earth Crystal.";
    mes "They are extreme power houses capable to smash intruders.";
    mes "They have very meh defense, though.";
    mes "Also, even then could not harm Xakelbael the Dark.";
	close;
}

099-2,62,43,0|script|???#099-6_62_43|400
{
    // Default distance is 4 tiles - all we need
    callfunc "PCtoNPCRange";
    if(@npc_check) end;

	mes "Zax De'Kagen trademark skill, the Bliss of Oblivion.";
    mes "A powerful skill which dispels mana around himself.";
    mes "Monsters will perish the very moment he cast it, and anyone too close";
    mes "will have their mana drained as well, and might die from it.";
    mes "";
    mes "Not only that, but he may become immune to certain sources of damage.";
    mes "It is a killer move which also allows him to assemble an army right after.";
    mes "I do believe there is a weakness, though. Something about excessive fur growth?";
	close;
}

099-6,57,17,0|script|???#099-6_57_17|400
{
    // Default distance is 4 tiles - all we need
    callfunc "PCtoNPCRange";
    if(@npc_check) end;

    mes ".:: V0id Soldier ::.";
	mes "These units can endure a lot of pain and use bows.";
	mes "They are not dangerous, but do not let they become fodder.";
	mes "A lot of soldiers can be very difficult to kill later on.";
    mes "Random trivia: They are afraid of bone arrows and knifes.";
	close;
}

099-6,123,128,0|script|???#099-6_123_128|400
{
    // Default distance is 4 tiles - all we need
    callfunc "PCtoNPCRange";
    if(@npc_check) end;

    mes ".:: V0id Mouboo ::.";
	mes "A solid all rounder unit, it has decent health and damage.";
    mes "But it proved useless as a security biopart.";
    mes "Figures out, we could not subvert its peaceful nature.";
	close;
}

099-6,95,122,0|script|???#099-6_95_122|400
{
    // Default distance is 4 tiles - all we need
    callfunc "PCtoNPCRange";
    if(@npc_check) end;

    mes ".:: Tengu ::.";
	mes "Developed for protection of the Earth Crystal.";
    mes "There shouldn't be any here, but they have a high defense.";
    mes "They turned out vulnerable to magic, unfortunately.";
	close;
}

099-6,28,122,0|script|???#099-6_28_122|400
{
    // Default distance is 4 tiles - all we need
    callfunc "PCtoNPCRange";
    if(@npc_check) end;

    mes ".:: V0id Bat ::.";
	mes "They fly very fast and can quickly swarm you.";
    mes "Their damage and health is not important.";
    mes "But if not careful, they will overwhelm you.";
    mes "Also, did you hear about lay on hands on overlapping dimensions?";
    mes "This have nothing to do with bats but is a cool fact!";
	close;
}

099-6,91,92,0|script|???#099-6_91_92|400
{
    // Default distance is 4 tiles - all we need
    callfunc "PCtoNPCRange";
    if(@npc_check) end;

    mes ".:: Mana Slayer ::.";
	mes "An anti-magic unit, made to run and slay mages.";
    mes "They look so much like us, that we are afraid of them all time.";
    mes "Not strong against physical damage, but can resist magic pretty well.";
	close;
}

099-6,62,43,0|script|???#099-6_92_43|400
{
    // Default distance is 4 tiles - all we need
    callfunc "PCtoNPCRange";
    if(@npc_check) end;

	mes "Do not neglect the potions which you deemed useless until now.";
    mes "Our foe is formidable. Our knowledge is being tested, here.";
    mes "The same techniques which worked for years simply do not apply.";
    mes "";
    mes "Knowing what and when to cast is important in survival.";
    mes "I think what should sense magic, might sense mana devoid-ness as well.";
    mes "In this case, such would be the only way to know how far of killing we are.";
    mes "But I'm not sure if such trick would work except on support role.";
	close;
}



///////////////////////////////
099-1,43,14,0|script|Painting#099-1|400
{
    // Default distance is 4 tiles - all we need
    callfunc "PCtoNPCRange";
    if(@npc_check) end;

    mes "Reading this is as hard as finding a needle in a haystack.";
    if (debug) goto L_Close;
    if (countitem(FlawedLens) < 1) goto L_Tools;
	mes "Although the painting also has no artistic value on its own...";
    mes "Something tells you there is something ominous with it.";
    next;
    mes "##9 Use [Flawed Lens] on the painting? ##0";
    menu
        "No", L_Close,
        "Yes", L_UseLens;

L_Close:
    close;

L_Tools:
    mes "The painting itself has no artistic value, either.";
    mes "There is something ominous, but you don't know what.";
    close;

L_UseLens:
    //delitem FlawedLens, 1;
    //getexp 10000, 10000;
    mes "~~~graphics/images/kirin.png~";
    mes "[@@https://wiki.themanaworld.org/images/5/57/Kirin_by_clef.jpg|There is the image of a woman on it@@].";
    next;
    mes "";
    mes "You can make out the following words on it:";
    mes "In memoriam ..... Kirin De'Kagen.";
    mes ".... help .... stop ... neither .....";
    mes "Went missing .... .... .... The War.";
    mes "";
    mes "Rest in Peace. Damnatio memoriae. Effective immediately.";
    // ;-- TRANSLATORS: Damnatio memoriae - "condemnation of memory", indicating that a person is to be excluded from official accounts. History rewrite if required.
    next;
    //mes "The lens break! They were not only poorly effective but also of bad quality.";
    mes "If only we could make the real Lens, we would have been able to find out";
    mes "what is up with this ominous, eerie feeling this picture gives.";
    close;
}

099-1,35,22,0|script|Fireplace#099-1|400
{
    // Default distance is 4 tiles - all we need
    callfunc "PCtoNPCRange";
    if(@npc_check) end;

	mes "##9 There is something interesting on this fireplace. ##0";
	mes "##9 It doesn't seems to fit this building. ##0";
	mes "##9 As if it have been taken from another world and put here. ##0";
    next;
	mes "##9 After searching it, you found nothing. ##0";
	mes "##9 It is just a common fireplace, after all. ##0";
	close;
}

///////////////////////////////
// Basic Monsters Knowledge
099-1,20,22,0|script|Bookcase#099-1|400
{
    // Default distance is 4 tiles - all we need
    callfunc "PCtoNPCRange";
    if(@npc_check) end;

    mes ".:: V0id Scorpion ::.";
	mes "The most basic combat unit in Keshlam.";
    mes "They have decent health, damage, and speed.";
    mes "";
    mes ".:: V0id Mushroom ::.";
	mes "The most basic combat unit in Keshlam.";
    mes "They have decent health, damage, and speed, and a higher range.";
    mes "Unlike the scorpions, they can move faster, but attack is slower.";
	close;
}

099-1,45,22,0|script|Bookcase#099-1b|400
{
    // Default distance is 4 tiles - all we need
    callfunc "PCtoNPCRange";
    if(@npc_check) end;

    mes ".:: V0id Maggot ::.";
	mes "They are pathetic individually, and slow, a failed experiment.";
    mes "But do not let them overwhelm you, togheter they are formidable!";
    mes "";
    mes ".:: V0id Archant ::.";
	mes "An advanced combat unit, without weak points.";
    mes "They are slow in movement, but other than that, they are good.";
	close;
}

///////////////////////////////
// Boss fight general knowledge
099-3,107,50,0|script|Music Score#099-3|400
{
    // Default distance is 4 tiles - all we need
    callfunc "PCtoNPCRange";
    if(@npc_check) end;

	mes "There is a nice score here.";
    mes "I assume important info will be sent by SFX only.";
    next;
    mes "Also, the time beats of this score are all in 600ms intervals.";
    mes "Could it be that attack speed is overridden during the fight?!";
    mes "";
    mes "However, potions will still work, hmm.";
    mes "There is also a spell here: \"##B#storage##b\".";
    mes "I assume it only works at specific times.";
	close;
}

099-3,39,46,0|script|Outstanding Book#099-3|400
{
    // Default distance is 4 tiles - all we need
    callfunc "PCtoNPCRange";
    if(@npc_check) end;

	mes "Zax De'Kagen's Diary, entry #27";
    mes "";
    mes "##9 I am all soaking wet. They found my weak point. ##0";
    mes "##9 However it was too late, Fourth Fall brought the end to this. ##0";
    mes "##9 I did not even had to cancel my illusion. ##0";
    next;
	mes "Zax De'Kagen's Diary, entry #34";
    mes "";
    mes "##9 Today my Rubber Bat flew away. Probably shouldn't have given life to it. ##0";
    mes "##9 I'll miss it, my dear friend, I hope one day he returns? ##0";
    next;
	mes "Zax De'Kagen's Diary, entry #42";
    mes "";
    mes "##9 What I wouldn't give for some pickled beets right now... ##0";
    mes "##9 Meh, whatever. I'm not going to Dimond's Cove ever again! ##0";
	close;
}

099-3,64,62,0|script|Pan#099-3|400
{
    // Default distance is 4 tiles - all we need
    callfunc "PCtoNPCRange";
    if(@npc_check) end;

    if (rand(60) % 2 == 0)
        goto L_Shock;
    goto L_Potion;

L_Shock:
	mes "Some was trying to make Shock Sweets here.";
    mes "However, it doesn't seems to have been finished.";
    next;
    mes "There are the initials \"To stop F.F.\" nearby.";
    mes "One can only wonder who or what F.F. is.";
	close;

L_Potion:
	mes "Some was trying to make a Mana Potion here.";
    mes "However, it doesn't seems to have been finished.";
    next;
    mes "There are the initials \"To stop Bob\" nearby.";
    mes "Well, I assume it is \"Bob\", text is fainted.";
    mes "it could be \"boo\" as well. Maybe from Mouboo?";
	close;
}