summaryrefslogtreecommitdiff
path: root/npc/029-1/hideandseek.txt
blob: d689c55513fb065c0e75d3eb62950fdc4b8ad127 (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
-	script	#hideandseekNTconfig	NPC32767,{
    end;

OnInit:
    $@hideandseekNT_started = (1 << 0);
    $@hideandseekNT_found1 = (1 << 1);
    $@hideandseekNT_found2 = (1 << 2);
    $@hideandseekNT_found3 = (1 << 3);
    $@hideandseekNT_found4 = (1 << 4);
    $@hideandseekNT_found5 = (1 << 5);
    $@hideandseekNT_ended = (1 << 6);
    end;
}

function	script	CountHideNSeek	{
    .@q=getq2(CandorQuest_HideNSeek);
    setq3 CandorQuest_HideNSeek, bitmask_count(.@q);
    return getq3(CandorQuest_HideNSeek);
}

function	script	UpdateHideNSeek	{
    setq2 CandorQuest_HideNSeek, getq2(CandorQuest_HideNSeek) | getarg(0);
    setq3 CandorQuest_HideNSeek, bitmask_count(getq2(CandorQuest_HideNSeek));
    return;
}

029-1,64,90,0	script	AyashaDebug	NPC258,{
    .@q=getq2(CandorQuest_HideNSeek);
    mes "[Ayasha Debug]";
    menu
        "Show", L_Show,
        "Reset", L_Reset,
        "Close.", -;
    close;

L_Show:
    mes "State: " + .@q;
    if (.@q & $@hideandseekNT_started)
        mes "Start set";
    if (.@q & $@hideandseekNT_found1)
        mes "Found 1 set";
    if (.@q & $@hideandseekNT_found2)
        mes "Found 2 set";
    if (.@q & $@hideandseekNT_found3)
        mes "Found 3 set";
    if (.@q & $@hideandseekNT_found4)
        mes "Found 4 set";
    if (.@q & $@hideandseekNT_found5)
        mes "Found 5 set";
    if (.@q & $@hideandseekNT_ended)
        mes "Complete set";
    close;

L_Reset:
    setq CandorQuest_HideNSeek, 0, 0;
    close;

OnInit:
    if (!debug)
        disablenpc "AyashaDebug";
    end;
}

029-1,62,90,0	script	Ayasha	NPC258,{
    @child_number = 0;
    callfunc "XmasList";

    .@q=getq2(CandorQuest_HideNSeek);

    if (.@q > 63) goto L_Done;
    if (CountHideNSeek() >= 5) goto L_Reward;
    if (getq(CandorQuest_HideNSeek) == 1) goto L_Doing;

    mes l("You see a girl who is holding her hands in front of her face.");
    mesn;
    mesq l("98... 99... 100!");
    mesc l("She takes away her hands and looks up.");
    menu
        l("Hello, what are you doing?"), L_Next,
        l("(Leave)"), -;
    close;

L_Next:
    mesn;
    mes l("\"I'm playing hide and seek with my friends!");
    mes l("Do you want to play with us?\"");
    menu
        l("Sure, sounds like fun."), L_Next1,
        l("I'm busy with more important things!"), -;
    close;

L_Next1:
    mesn;
    mes l("\"Great! You can take my turn with searching. You need to find all five of my friends.");
    mes l("They're hiding somewhere on the island, you will have to explore to find them. They could be hiding anywhere.\"");
    next;
    mesc l("WARNING: Not all NPCs will interact if you shout with them! For the children hiding, they'll only reply if you get close enough to them.");

    setq CandorQuest_HideNSeek, 1, 0, 0;
    close;

L_Doing:
    mesn;
    mesq l("You still need to find some of my friends. You have found %d out of 5 of my friends.", CountHideNSeek());
    mesq l("Remember, they're hiding somewhere on the island, you will have to explore to find them. They could be hiding anywhere.");
    mesc l("WARNING: Not all NPCs will interact if you shout with them! For the children hiding, they'll only reply if you get close enough to them.");
    close;

L_Reward:
    mesn;
    mesq l("Oh, you found them all! Good job! Now it's my turn with searching again. Go and hide!");
    getexp 75, 0;
    setq CandorQuest_HideNSeek, 2, 127, 0;
    menu
        "I think I need to do other things now.",L_Next2;

L_Next2:
    mesn;
    mes "\"Oh, ok.";
    mes "Have you already seen Hurnscald? It's a very exciting place! I love the entertainer. She can make so many funny faces.\"";
    close;

L_Done:
    mesn;
    mes "\"Hello! It was fun to play with you.";
    mes "When you go to the Hurnscald, you can say hello to Mikhail. He's very nice! But very shy.\"";
    close;
}

029-1,50,105,0	script	Latif	NPC262,{
    @child_number = 1;
    callfunc "XmasList";
    .@Exp = 15;

    .@q=getq(CandorQuest_HideNSeek);
    .@q2=getq2(CandorQuest_HideNSeek);
    if (.@q2 > 63) goto L_Done;
    if (.@q && !(.@q2 & $@hideandseekNT_found1)) goto L_Find;
    if (.@q) goto L_Doing;

    mes "You see a kid hiding behind a box.";
    menu
        "What are you doing there?",L_Next,
        "(Leave)",L_close;

L_Next:
    mes "[Latif]";
    mes "\"Hiding. We're playing hide and seek. Don't say that is boring. It's fun.\"";
    menu
        "I agree, it's fun.",L_Agree,
        "Hide and seek? Lame.",L_Next1;

L_Next1:
    mes "[Latif]";
    mes "\"My friend Vincent thinks so too. He doesn't join us playing.";
    mes "Do you know what he does instead? He builds action figures out of Bug Legs! That is lame.\"";
    goto L_close;

L_Agree:
    mes "[Latif]";
    mes "\"Yeah, right? My friend Vincent doesn't thinks so. He doesn't join us playing.";
    mes "Do you know what he does instead? He builds action figures out of Bug Legs! That is lame.\"";
    goto L_close;

L_Find:
    mes "[Latif]";
    mes "\"Hey! Ah, you found me. Well done. But my hiding place wasn't that difficult this time.\"";
    getexp .@Exp, 0;
    UpdateHideNSeek($@hideandseekNT_found1);
    mes "\"Here, do you want a candy?\"";
    getitem "Candy", 1;
    goto L_close;

L_Doing:
    mes "[Latif]";
    mes "\"You didn't find all of us yet? Seems like the other ones found a better place to hide.\"";
    mesq l("%d out of 5 have been found.", CountHideNSeek());
    goto L_close;

L_Done:
    mes "[Latif]";
    mes "\"The northeastern most building of town is a workshop. My father works there and wants me to do that too when I'm grown up. But I don't want do that! I want to go on an adventure! Just like you.\"";
    goto L_close;

L_close:
    close;

OnInit:
    .distance=2;
    end;
}

029-1,48,67,0	script	Charda	NPC260,{
    @child_number = 2;
    callfunc "XmasList";
    .@Exp = 15;

    .@q=getq(CandorQuest_HideNSeek);
    .@q2=getq2(CandorQuest_HideNSeek);
    if (.@q2 > 63) goto L_Done;
    if (.@q && !(.@q2 & $@hideandseekNT_found2)) goto L_Find;
    if (.@q) goto L_Doing;

    mes "[Charda]";
    mes "\"Hello. Psht, be careful. I'm playing hide and seek with Ayasha. You'll draw attention to my hiding place.\"";
    mes "\"They will never find me here.\"";
    goto L_close;

L_Find:
    mes "[Charda]";
    mes "\"Oh! Got me! You're good at this.\"";
    getexp .@Exp, 0;
    UpdateHideNSeek($@hideandseekNT_found2);
    mes "She takes something out of her pocket.";
    mes "\"I'm hungry now. Do you want chocolate too?\"";
    getitem "ChocolateBar", 1;
    mes "\"My mom doesn't want me to eat so much chocolate, but I got it from the trader at the Hurnscald Market. He sells many different things";
    mes "when we goto vacation in Hurnscald. I convinced him to teach me how to trade. It's fun.\"";
    goto L_close;

L_Doing:
    mes "[Charda]";
    mes "\"Did you find the others yet?\"";
    mesq l("Hrmm, no looks like only %d out of 5 have been found.", CountHideNSeek());
    goto L_close;

L_Done:
    mes "[Charda]";
    mes "\"Hey! We're still playing hide and seek. What are you going to do? Will you go to Hurnscald with the ferry? The mother of my friends Rossy and Julia come from there. They are on a vacation there at the moment.\"";
    mes "\"Rossy told me that it's a very beautiful place. Lots of trees and flowers and grass, everything's green.\"";
    mes "She sighs.";
    mes "[Charda]";
    mes "\"Sounds wonderful.\"";
    goto L_close;

L_close:
    close;

OnInit:
    .distance=2;
    end;
}

029-1,100,36,0	script	Faris	NPC259,{
    @child_number = 3;
    callfunc "XmasList";
    .@Exp = 25;

    .@q=getq(CandorQuest_HideNSeek);
    .@q2=getq2(CandorQuest_HideNSeek);
    if (.@q2 > 63) goto L_Done;
    if (.@q && !(.@q2 & $@hideandseekNT_found3)) goto L_Find;
    if (.@q) goto L_Doing;

    mes "[Faris]";
    mes "\"Oh, hi there. What are you doing here on the beach?\"";
    menu
        "I'm just having a look around.",L_Next,
        "It's nice place here, isn't it?",L_Next;

L_Next:
    mes "[Faris]";
    mes "\"Hey, you're cool. I'm hiding here from Ayasha, we're playing hide and seek. This is the best hiding place ever.\"";
    goto L_close;

L_Find:
    mes "[Faris]";
    mes "\"You found me! Well done. You look a bit thirsty, here.\"";
    getexp .@Exp, 0;
    getitem CactusDrink, 1;
    UpdateHideNSeek($@hideandseekNT_found3);
    mes "\"It's really cool you're playing with us. I'm sure you have a lot of other things to do.";
    mes "You're an adventurer, right? I want to become an adventurer too when I'm grown up. I'll talk to Aidan then.\"";
    mes "\"Aidan is outside Sorfina's place and you can register there for monster points. That's something the Wizard's Council made up. They reward you for slaying monsters. It's so cool.\"";
    goto L_close;

L_Doing:
    mes "[Faris]";
    mes "\"Are you still searching for the others? Nobody else is here.\"";
    mesq l("It seems you found %d out of 5 of my friends.", CountHideNSeek());
    goto L_close;

L_Done:
    mes "[Faris]";
    mes "\"I'll go to Hurnscald's Inn and ask Bernard for some soup when we're done with playing. His soup is delicious!\"";
    goto L_close;

L_close:
    close;

OnInit:
    .distance=2;
    end;
}

029-1,28,52,0	script	Rasin	NPC263,{
    @child_number = 4;
    callfunc "XmasList";

    .@Exp = 15;

    .@q=getq(CandorQuest_HideNSeek);
    .@q2=getq2(CandorQuest_HideNSeek);
    if (.@q2 > 63) goto L_Done;
    if (.@q && !(.@q2 & $@hideandseekNT_found4)) goto L_Find;
    if (.@q) goto L_Doing;

    mes "[Rasin]";
    mes "\"The harbor is to the south from here. There you can take a ferry to other places.";
    mes "And now go away, I'm playing hide and seek and Ayasha shouldn't see me here. You'll draw her attention when you talk to me.\"";
    goto L_close;

L_Find:
    mes "[Rasin]";
    mes "\"Ah, you found me. I need to find a better place to hide next time.\"";
    getexp .@Exp, 0;
    UpdateHideNSeek($@hideandseekNT_found4);
    goto L_close;

L_Doing:
    mes "[Rasin]";
    mes "\"Hehe, I'm curious when you'll have found all of us.\"";
    mesq l("There are %d out of 5 found.", CountHideNSeek());
    goto L_close;

L_Done:
    mes "[Rasin]";
    mes "\"Thanks for playing with us! It was fun!";
    mes "Will you leave Candor to go on an adventure in other places of the world?\"";
    goto L_close;

L_close:
    close;

OnInit:
    .distance=2;
    end;
}

029-1,79,99,0	script	Ghada	NPC265,{
    @child_number = 5;
    callfunc "XmasList";

    .@Exp = 15;

    .@q=getq(CandorQuest_HideNSeek);
    .@q2=getq2(CandorQuest_HideNSeek);
    if (.@q2 > 63) goto L_Done;
    if (.@q && !(.@q2 & $@hideandseekNT_found5)) goto L_Find;
    if (.@q) goto L_Doing;

    mes "You see a girl standing behind the wheat. She has a look of intense concentration on her face.";
    menu
        "Hi, what are you doing there?",L_Next,
        "(Leave)",L_close;

L_Next:
    mes "[Ghada]";
    mes "\"Oh, hello. I'm hiding. We're playing hide and seek.\"";
    goto L_close;

L_Find:
    mes "[Ghada]";
    mes "\"Oh no! You found me! You must be very clever.";
    mes "My friend Sandra is clever too, but she said it's a waste of time to play hide and seek.\"";
    getexp .@Exp, 0;
    UpdateHideNSeek($@hideandseekNT_found5);
    goto L_close;

L_Doing:
    mes "[Ghada]";
    mes "\"Are you still searching for the others? I'm sure you'll find them soon.\"";
    mesq l("You found %d out of 5 us.", CountHideNSeek());
    goto L_close;

L_Done:
    mes "[Ghada]";
    mes "\"It's so nice that you played with us! You're about the same age as my older sister, but she never plays with us. Her name is Sarah.\"";
    goto L_close;

L_close:
    close;

OnInit:
    .distance=2;
    end;
}