summaryrefslogtreecommitdiff
path: root/npc/003-1/events.txt
blob: 75148ee6d644226fb08667c2c1d03e518a5af38f (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
// TMW2 scripts.
// Author:
//    Jesusalva
// Description:
//    The NPCs on this file are for when events end.
// TODO: Unify the script, change the NPC display depending on event
// Use duplicate() command to make it available in other towns as well

// Easter
003-1,47,53,0	script	Aurora	NPC_FEMALE,{
    function handleEaster();
    function handleValentine();
    function handleStPatrick();
    function handleAurora();
    mesn;
    mesq l("Heya.");
    close;


// OnRestore causes OnInit to start again
OnRestore:
    setnpcdisplay .name$, "Aurora", NPC_FEMALE;
OnInit:
    setunitdata(.@npcId, UDT_HEADTOP, Cap);
    setunitdata(.@npcId, UDT_HEADMIDDLE, RedStockings);
    setunitdata(.@npcId, UDT_HEADBOTTOM, BunnyEars);
    //setunitdata(.@npcId, UDT_WEAPON, GMRobe);
    setunitdata(.@npcId, UDT_HAIRSTYLE, 14);
    setunitdata(.@npcId, UDT_HAIRCOLOR, 18);
    .sex = G_FEMALE;
    .distance = 5;
    end;

// Overloaded
OnValentine:
    setnpcdisplay .name$, "Demure#ValentineFinal", NPC_FEMALE;
    .@npcId = getnpcid(.name$);
    setunitdata(.@npcId, UDT_HEADTOP, Cap);
    setunitdata(.@npcId, UDT_HEADMIDDLE, RedStockings);
    setunitdata(.@npcId, UDT_HEADBOTTOM, BunnyEars);
    setunitdata(.@npcId, UDT_WEAPON, GMRobe);
    setunitdata(.@npcId, UDT_HAIRSTYLE, 14);
    setunitdata(.@npcId, UDT_HAIRCOLOR, 18);
    end;
























/////////////////////////////////////////////////////////////////////////////////
function handleEaster {
    if (EASTER_YEAR != gettime(GETTIME_YEAR)) {
        EASTER_YEAR=gettime(GETTIME_YEAR);
        if (strcharinfo(0) == $@easter_name$[0]) {
            makepet BhopFluffy;
            mesn;
            mesc l("For the first place in Easter, you gained a Bhopper Fluffy."), 3;
            mesc l("Remember to give it a balanced diet of Aquadas to make it happy."), 3;
            next;
        }
        else
        {
            .@pos=array_find($@easter_name$, strcharinfo(0));
            // 0 (aka top 1) is not an appliable winner
            if (.@pos > 0) {
                // Reverse it so top 10 value is 2, and top 2 value is 10.
                .@pos=11-.@pos;
                getitem StrangeCoin, .@pos*10;
            }
        }
    }
    mesn;
    mesq l("Easter is over! I am the last chance to get rid of eggs!!");
    mesc l("Note: Golden and Silver Eggs are deleted after the next event end."), 1;
    // Heartbeat
    select
        l("Trade Silver Eggs"),
        l("Trade Golden Eggs"),
        l("View LeaderBoard"),
        l("Thanks Lilica.");
    mes "";
    switch (@menu) {
    case 1:
        openshop "#eastershop1";
        closedialog;
        break;
    case 2:
        openshop "#eastershop2";
        closedialog;
        break;
    case 3:
        mesn l("Easter @@", gettime(GETTIME_YEAR));
	    mes("1."+$@easter_name$[0]+" ("+$@easter_value[0]+")");
	    mes("2."+$@easter_name$[1]+" ("+$@easter_value[1]+")");
	    mes("3."+$@easter_name$[2]+" ("+$@easter_value[2]+")");
	    mes("4."+$@easter_name$[3]+" ("+$@easter_value[3]+")");
	    mes("5."+$@easter_name$[4]+" ("+$@easter_value[4]+")");
	    mes("6."+$@easter_name$[5]+" ("+$@easter_value[5]+")");
	    mes("7."+$@easter_name$[6]+" ("+$@easter_value[6]+")");
	    mes("8."+$@easter_name$[7]+" ("+$@easter_value[7]+")");
	    mes("9."+$@easter_name$[8]+" ("+$@easter_value[8]+")");
	    mes("10."+$@easter_name$[9]+" ("+$@easter_value[9]+")");
        break;
    }
    return;
}
























/////////////////////////////////////////////////////////////////////////////////
function handleValentine {
    return;
}
























/////////////////////////////////////////////////////////////////////////////////
function handleStPatrick {
    return;
}
























/////////////////////////////////////////////////////////////////////////////////
function handleAurora {
    return;
}























// DO NOT REMOVE
}

// Valentine Day
003-1,47,53,0	script	Demure#ValentineFinal_	NPC_FEMALE,{
    mesn;
    mesq l("Valentine Day is over!");
    if (#VALENTINE_SENT+#VALENTINE_OPENED <= 0)
        close;

    mes "##B"+l("Top 10 - Valentine Day")+"##b";
    mes("1." +$@valentine_name$[0]+" ("+$@valentine_value[0]+")");
    mes("2." +$@valentine_name$[1]+" ("+$@valentine_value[1]+")");
    mes("3." +$@valentine_name$[2]+" ("+$@valentine_value[2]+")");
    mes("4." +$@valentine_name$[3]+" ("+$@valentine_value[3]+")");
    mes("5." +$@valentine_name$[4]+" ("+$@valentine_value[4]+")");
    mes("6." +$@valentine_name$[5]+" ("+$@valentine_value[5]+")");
    mes("7." +$@valentine_name$[6]+" ("+$@valentine_value[6]+")");
    mes("8." +$@valentine_name$[7]+" ("+$@valentine_value[7]+")");
    mes("9." +$@valentine_name$[8]+" ("+$@valentine_value[8]+")");
    mes("10."+$@valentine_name$[9]+" ("+$@valentine_value[9]+")");
    next;
    #VALENTINE_SENT=0;
    #VALENTINE_OPENED=0;
    #VALENTINE_RECEIVED=0;
    if (strcharinfo(0) == .@name$[0]) {
        makepet DoggyDog;
        getitem PrismGift, 1;
    } else if (strcharinfo(0) == .@name$[1] || strcharinfo(0) == .@name$[2]) {
        getitem PrismGift, 1;
        getitem GoldenGift, 1;
    } else if (strcharinfo(0) == .@name$[3] || strcharinfo(0) == .@name$[4]) {
        getitem GoldenGift, 1;
        getitem SilverGift, 1;
    } else if (strcharinfo(0) == .@name$[5] || strcharinfo(0) == .@name$[6]) {
        getitem SilverGift, 1;
        getitem BronzeGift, 1;
    } else if (strcharinfo(0) == .@name$[7] || strcharinfo(0) == .@name$[8] || strcharinfo(0) == .@name$[9]) {
        getitem BronzeGift, 1;
        getitem StrangeCoin, 10;
    } else {
        getitem StrangeCoin, 5;
    }

    getexp #VALENTINE_SENT+#VALENTINE_RECEIVED, #VALENTINE_SENT;
    Zeny=Zeny+#VALENTINE_OPENED;

    if (strcharinfo(0) == .@name$[0])
        mesc l("You gained a @@ for the #1 place on the event. Remember to feed it @@, or it may run away from you.", getitemlink(DoggyDog), getitemlink(AnimalBones));

    close;

OnInit:
    .@npcId = getnpcid(.name$);
    setunitdata(.@npcId, UDT_HEADTOP, Cap);
    setunitdata(.@npcId, UDT_HEADMIDDLE, RedStockings);
    setunitdata(.@npcId, UDT_HEADBOTTOM, BunnyEars);
    setunitdata(.@npcId, UDT_WEAPON, GMRobe);
    setunitdata(.@npcId, UDT_HAIRSTYLE, 14);
    setunitdata(.@npcId, UDT_HAIRCOLOR, 18);

    .sex = G_FEMALE;
    .distance = 5;

    disablenpc(.name$);
    end;
}























// St. Patrick Day
003-1,47,53,0	script	Patrick Saulc_	NPC_WEIRDGREEN,{
    mesn;
    mesc l("It's St. Patrick Event!"), 3;
    mes l("At 00:00, 06:00, 12:00, 15:00, 18:00 and 21:00 server time");
    mes l("Several special clovers will show up at forests.");
    next;
    mes l("They have 10x more chance to drop a @@, so it is a great deal!", getitemlink(FourLeafClover));
    mes l("Also, hidden in a forest which is not either hot or cold, is the Gold Pot Cauldron...");
    mes l("You can get daily something from it, but unless you're green like me, you will have no luck...");
    close;

OnInit:
    .sex = G_OTHER;
    .distance = 5;

    if ($EVENT$ != "Patrick")
        disablenpc(.name$);
    end;
}