summaryrefslogtreecommitdiff
path: root/npc/001-14/ctrl.txt
blob: e76421cc00b086de01aa1fba69b455a6694168d1 (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
// TMW2 script
// Author:
//   Jesusalva
// Description:
//    Magic Olympics

001-14,91,90,0	script	#MOLY_Sign00	NPC_NO_SPRITE,{
    dispbottom l("Welcome to Porthos - The Town of Portals (Kaizei's æther / Moubootaur Legends)");
    end;

OnInit:
    .distance=2;
    end;
}

// FIXME
001-14,88,27,0	script	Hocus#MOLY1200	NPC_BLACKWIZARD,{
    npctalk l("Icicle Challenge");
    end;

OnInit:
    .distance=7;
    end;
}

// FIXME
001-14,111,42,0	script	Hocus#MOLY0100	NPC_BLACKWIZARD,{
    if (gettimetick(2) < @moly_tick) end;
    mes ".:: " + l("Energy Ball Challenge") + ":: .";
    mes l("The goal is simple - I'll spawn an energy ball and you must kill it quickly. You'll be disqualified if you equip a non-magical weapon at any time.");
    dnext;
    mes l("You'll have 60 seconds to kill as many balls as you can!");
    mesc l("NOTE: Beside wands and staves, %s, %s, and the %s count as magic weapons.", getitemlink(Judgement), getitemlink(DarkPulsar), getitemlink(Lightbringer));
    mes "";
    mesc l("Your progress thus far: %s sparks", fnum(FYMOLY_ENBALL)), 3;
    next;
    mesc l("Begin campaign?"), 1;
    if (askyesno() == ASK_NO) close;
    @moly_tick = gettimetick(2) + 60;
    @moly_score = 0;
    @moly_chall = 1;
    .m$=getmap();
    @map$=getmap();
    .@m=areamonster(.m$, 108, 43, 118, 48, "Target", YellowSpark, 1, "Hocus#MOLY0100::OnClick");
    setunitdata(.@m, UDT_HP, 1);
    setunitdata(.@m, UDT_MAXHP, 1);
    setunitdata(.@m, UDT_LEVEL, 1);
    setunitdata(.@m, UDT_SPEED, 60);
    npctalk3 l("Countdown: 1 minute");
    addtimer 2000, instance_npcname("Hocus#MOLY0100")+"::OnCheck";
    initnpctimer;
    closeclientdialog;
    close;

OnTimer15000:
    npctalk "45 seconds";
    end;

OnTimer30000:
    npctalk "30 seconds";
    end;

OnTimer45000:
    npctalk "15 seconds";
    end;

OnTimer55000:
    npctalk col("5 seconds", 1);
    end;

OnTimer60000:
    killmonsterall(.m$);
    maptimer2(.m$, 10, "Hocus#MOLY0100::OnEnd");
    npctalk col("Time out!", 1);
    stopnpctimer;
    end;

OnClick:
    if (gettimetick(2) > @moly_tick) end;
    if (@moly_chall != 1) end;
    @moly_score+=1;
    .@m=areamonster(@map$, 108, 43, 118, 48, "Target", YellowSpark, 1, "Hocus#MOLY0100::OnClick");
    .@hp=rand2(50, 100);
    setunitdata(.@m, UDT_MAXHP, .@hp);
    setunitdata(.@m, UDT_HP, .@hp);
    setunitdata(.@m, UDT_LEVEL, 1);
    setunitdata(.@m, UDT_SPEED, 60);
    setunitdata(.@m, UDT_MODE, MD_CANMOVE);
    setunitdata(.@m, UDT_DEF, 32760);
    setunitdata(.@m, UDT_MDEF, 0);
    setunitdata(.@m, UDT_LUK, 32760);
    end;

OnCheck:
    if (gettimetick(2) > @moly_tick) end;
    .@wp = getequipid(EQI_HAND_R);
    // Disarmed
    if (.@wp < 1) {
        addtimer(2000, instance_npcname("Hocus#MOLY0100")+"::OnCheck");
        end;
    }
    // Illegal weapon
    if (.@wp != Judgement &&
        .@wp != DarkPulsar &&
        .@wp != Lightbringer &&
        getiteminfo(.@wp, ITEMINFO_SUBTYPE) != W_STAFF) {
            @moly_score = -1;
            @moly_tick = 0;
            dispbottom col(l("You have been disqualified - illegal weapon: %s", getitemname(.@wp)), 1);
            stopnpctimer;
            killmonsterall(getmap());
            end;
    }
    addtimer 2000, instance_npcname("Hocus#MOLY0100")+"::OnCheck";
    end;

OnEnd:
    if (@moly_chall != 1) end;
    dispbottom l("End! Score this time: %d", @moly_score);
    FYMOLY_ENBALL = max(FYMOLY_ENBALL, @moly_score);
    @moly_score = 0;
    @moly_chall = 0;
    end;

OnInit:
    .distance=7;
    .m$="001-14";
    end;
}

001-14,135,61,0	script	Hocus#MOLY0200	NPC_BLACKWIZARD,{
    mes ".:: " + l("Intensive Mage Challenge") + ":: .";
    mes l("Description: Use a lot of magic spells, regardless of type or raw strength. Points earned by skill level.");
    mesc l("Note: Passives and some skills (e.g. Resync) doesn't count."), 1;
    mes "";
    mesc l("Your progress thus far: %s skills casted", fnum(FYMOLY_SPAMMY)), 3;
    close;

OnInit:
    .distance=7;
    end;
}

// FIXME
001-14,139,85,0	script	Hocus#MOLY0300	NPC_BLACKWIZARD,{
    npctalk l("Fluffy Hunter Challenge");
    end;

OnInit:
    .distance=7;
    end;
}

// Note: Do player knows any chants?
001-14,135,117,0	script	Hocus#MOLY0400	NPC_BLACKWIZARD,{
    mes ".:: " + l("Chanting Challenge") + ":: .";
    mes l("Description: Use chant-based magic. All chants score equally.");
    mes "";
    mesc l("Your progress thus far: %s chants casted", fnum(FYMOLY_CHANTI)), 3;
    close;

OnInit:
    .distance=7;
    end;
}

001-14,119,135,0	script	Hocus#MOLY0500	NPC_NICHOLAS,{
    mes ".:: " + l("Alchemy Master Challenge") + ":: .";
    mes l("Description: Whoever crafts more potions, regardless of type, wins this event.");
    mes "";
    mesc l("Your progress thus far: %s potions baked", fnum(FYMOLY_ALCHMY)), 3;
    next;
    // FREE brewing during event
    do {
        mesc l("What will you brew today?");
        mes "";

        if (AlchemySystem(CRAFT_PLAYER)) {
            mesc l("Success!"), 3;
        } else {
            mesc l("That didn't work!"), 1;
        }
        next;
        mesc l("Try again?");
    } while (askyesno() == ASK_YES);
    close;

OnInit:
    .distance=7;
    end;
}

// FIXME
001-14,88,139,0	script	Hocus#MOLY0600	NPC_BLACKWIZARD,{
    npctalk l("Ent Challenge");
    end;

OnInit:
    .distance=7;
    end;
}

001-14,54,133,0	script	Hocus#MOLY0700	NPC_BLACKWIZARD,{
    mes ".:: " + l("Mana Experience Challenge") + ":: .";
    mes l("Description: Similar to Intensive Mage, but measures mana experience - meaning even less skills will count, and swapping skills give a better effect.");
    mes "";
    mesc l("Your progress thus far: %s exp earned", fnum(FYMOLY_MANAXP)), 3;
    close;

OnInit:
    .distance=7;
    end;
}

// FIXME
001-14,39,114,0	script	Hocus#MOLY0800	NPC_BLACKWIZARD,{
    npctalk l("Maze Race Challenge");
    end;

OnInit:
    .distance=7;
    end;
}

// FIXME
001-14,37,84,0	script	Hocus#MOLY0900	NPC_BLACKWIZARD,{
    mes ".:: " + l("Hocus Said So Challenge") + ":: .";
    mes l("Description: There'll be differently colored sparks and you must kill ONLY those of the color I say so! Failure to do so will cause immediate disqualification!");
    mesc l("PS. No equipment restriction");
    mes "";
    mesc l("Your progress thus far: %s sparks killed", fnum(FYMOLY_HOCUSM)), 3;
    next;
    mesc l("Begin campaign?"), 1;
    if (askyesno() == ASK_NO) close;
    @moly_tick = gettimetick(2) + 60;
    @moly_score = 0;
    @moly_chall = 9;
    .m$=getmap();
    @map$=getmap();
    .@m=areamonster(.m$, 38, 85, 40, 90, strmobinfo(1, YellowSpark), YellowSpark, 1, "Hocus#MOLY0900::OnClY");
    setunitdata(.@m, UDT_HP, 1);
    setunitdata(.@m, UDT_MAXHP, 1);
    setunitdata(.@m, UDT_LEVEL, 1);
    setunitdata(.@m, UDT_SPEED, 60);
    .@m=areamonster(.m$, 38, 85, 40, 90, strmobinfo(1, MagentaSpark), MagentaSpark, 1, "Hocus#MOLY0900::OnClM");
    setunitdata(.@m, UDT_HP, 1);
    setunitdata(.@m, UDT_MAXHP, 1);
    setunitdata(.@m, UDT_LEVEL, 1);
    setunitdata(.@m, UDT_SPEED, 60);
    .@m=areamonster(.m$, 38, 85, 40, 90, strmobinfo(1, YellowSpark), YellowSpark, 1, "Hocus#MOLY0900::OnClY");
    setunitdata(.@m, UDT_HP, 1);
    setunitdata(.@m, UDT_MAXHP, 1);
    setunitdata(.@m, UDT_LEVEL, 1);
    setunitdata(.@m, UDT_SPEED, 60);
    .@m=areamonster(.m$, 38, 85, 40, 90, strmobinfo(1, MagentaSpark), MagentaSpark, 1, "Hocus#MOLY0900::OnClM");
    setunitdata(.@m, UDT_HP, 1);
    setunitdata(.@m, UDT_MAXHP, 1);
    setunitdata(.@m, UDT_LEVEL, 1);
    setunitdata(.@m, UDT_SPEED, 60);
    @cl=any(YellowSpark, MagentaSpark);
    npctalk3 l("Countdown: 1 minute - Kill %s!", strmobinfo(1, @cl));
    initnpctimer;
    closeclientdialog;
    close;

OnTimer9000:
    npctalk "Hocus commands...";
    end;

OnTimer10000:
    maptimer2(.m$, 10, "Hocus#MOLY0900::OnSeed");
    npctalk sprintf("Time left = 50 seconds");
    end;

OnTimer19000:
    npctalk "Hocus commands...";
    end;

OnTimer20000:
    maptimer2(.m$, 10, "Hocus#MOLY0900::OnSeed");
    npctalk sprintf("Time left = 40 seconds");
    end;

OnTimer29000:
    npctalk "Hocus commands...";
    end;

OnTimer30000:
    maptimer2(.m$, 10, "Hocus#MOLY0900::OnSeed");
    npctalk sprintf("Time left = 30 seconds");
    end;

OnTimer39000:
    npctalk "Hocus commands...";
    end;

OnTimer40000:
    maptimer2(.m$, 10, "Hocus#MOLY0900::OnSeed");
    npctalk sprintf("Time left = 20 seconds");
    end;

OnTimer49000:
    npctalk "Hocus commands...";
    end;

OnTimer50000:
    maptimer2(.m$, 10, "Hocus#MOLY0900::OnSeed");
    npctalk sprintf("Time left = 10 seconds");
    end;

OnTimer55000:
    npctalk col("5 seconds", 1);
    end;

OnTimer60000:
    killmonsterall(.m$);
    maptimer2(.m$, 10, "Hocus#MOLY0900::OnEnd");
    npctalk col("Time out!", 1);
    stopnpctimer;
    end;

OnSeed:
    @cl=any(YellowSpark, MagentaSpark);
    dispbottom l("Kill %s!", strmobinfo(1, @cl));
    end;

OnClY:
    if (gettimetick(2) > @moly_tick) end;
    if (@moly_chall != 9) end;
    if (@cl != YellowSpark) {
        @moly_score = -1;
        @moly_tick = 0;
        @moly_chall = 0;
        dispbottom col(l("You have been disqualified - target was: %s", strmobinfo(1, @cl)), 1);
        killmonsterall(getmap());
        // FIXME: Stop npc timer
        end;
    }
    @moly_score+=1;
    .@m=areamonster(getmap(), 38, 85, 40, 90, strmobinfo(1, YellowSpark), YellowSpark, 1, "Hocus#MOLY0900::OnClY");
    setunitdata(.@m, UDT_HP, 1);
    setunitdata(.@m, UDT_MAXHP, 1);
    setunitdata(.@m, UDT_LEVEL, 1);
    setunitdata(.@m, UDT_SPEED, 60);
    end;

OnClM:
    if (gettimetick(2) > @moly_tick) end;
    if (@moly_chall != 9) end;
    if (@cl != MagentaSpark) {
        @moly_score = -1;
        @moly_tick = 0;
        dispbottom col(l("You have been disqualified - target was: %s", strmobinfo(1, @cl)), 1);
        killmonsterall(getmap());
        // FIXME: Stop npc timer
        end;
    }
    @moly_score+=1;
    .@m=areamonster(getmap(), 38, 85, 40, 90, strmobinfo(1, MagentaSpark), MagentaSpark, 1, "Hocus#MOLY0900::OnClM");
    setunitdata(.@m, UDT_HP, 1);
    setunitdata(.@m, UDT_MAXHP, 1);
    setunitdata(.@m, UDT_LEVEL, 1);
    setunitdata(.@m, UDT_SPEED, 60);
    end;

OnEnd:
    if (@moly_chall != 9) end;
    dispbottom l("End! Score this time: %d", @moly_score);
    FYMOLY_HOCUSM = max(FYMOLY_HOCUSM, @moly_score);
    @moly_score = 0;
    @moly_chall = 0;
    end;

OnInit:
    .distance=7;
    .m$="001-14";
    .cl=Dummy;
    end;
}

// FIXME
001-14,41,46,0	script	Hocus#MOLY1000	NPC_BLACKWIZARD,{
    npctalk l("Survival Challenge");
    end;

OnInit:
    .distance=7;
    end;
}

001-14,62,37,0	script	Hocus#MOLY1100	NPC_BLACKWIZARD,{
    mes ".:: " + l("Friendship's Strength Challenge") + ":: .";
    mes l("Description: Use support skills and win the event with the power of FRIENDSHIP!");
    mesc l("Note: Support skills used on self does not count."), 1;
    mes "";
    mesc l("Your progress thus far: %s friends supported", fnum(FYMOLY_FRIEND)), 3;
    close;

OnInit:
    .distance=7;
    end;
}