summaryrefslogblamecommitdiff
path: root/npc/028-1/Doctor3.txt
blob: 2a0def6452d9f67d2097be3d3e5d3b41bbed5364 (plain) (tree)
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
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585








































































































































































































































































































































































































































































































































































































                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
// Doctor 3, at the stones.

028-1.gat,65,95,0	script	Doctor#who3	184,{
    // States here
    callsub S_Helped_Count;
    if (@Easter_2010_helper >= 2 && !((Easter_2010_QuestState >> E10_FLAG_MID_REWARD_SHIFT) & E10_FLAG_MID_REWARD_MASK))
        goto L_MidReward;
    if (@Easter_2010_helper == 4 && !((Easter_2010_QuestState >> E10_FLAG_RETURN_READY_SHIFT) & E10_FLAG_RETURN_READY_MASK))
        goto L_Defeat_Invader;
    if ((Easter_2010_QuestState >> E10_FLAG_RETURN_READY_SHIFT) & E10_FLAG_RETURN_READY_MASK == E10_FLAG_RETURN_READY && (Easter_2010_QuestState >> E10_STATE_ROSE_SHIFT) & E10_STATE_ROSE_MASK == E10_STATE_ROSE_ROSE_COMPLETE)
        goto L_Return_Ready_Optional;

// =======================
// === Third  location ===
// =======================

L_At_Stones:
    // Checks for if the player has already helped the doctor, either here or elsewhere, go here.
    if ((Easter_2010_QuestState >> E10_FLAG_HELPED_DOCTOR_STONES_SHIFT) & E10_FLAG_HELPED_DOCTOR_STONES_MASK == E10_FLAG_HELPED_DOCTOR_STONES)
        goto L_At_Stones_Helped;

    if ((Easter_2010_QuestState >> E10_FLAG_KNOWS_DOCTOR_SHIFT) & E10_FLAG_KNOWS_DOCTOR_MASK == E10_FLAG_KNOWS_DOCTOR)
        goto L_At_Stones_Knows_Doctor;

    setarray @responses$, "\"There's something definitely unsettling about this region. Do you sense it, too?\" His acknowledgement comes suddenly and as a surprise. Something whirs and beeps as he continues, \"Oh, yes, this very spot.\"", "\"An abnormality! Yes, yes, here! Here! No, not quite imperceptible, but we must exercise caution, wouldn't you agree?\"", "\"The mysterious man paces from side to side, quickly taking notice. \"Um, I would be careful around here if I were you. I'm detecting something very powerful nearby.\"", "\"Er, that's interesting. Do you see this? It's remarkable, really. Terrifying all the same, but remarkable. Still not quite sure what makes *this* spot special.\"";
    callsub S_Update_Knows;
    close;

L_At_Stones_Knows_Doctor:
    setarray @responses$, "\"So from what I've gathered, this area here is somehow involved. See the stones? Yes, right there. The readings suggest it's something very, very strong.\"", "The Doctor takes a closer look at the stones on the ground. \"Interesting, don't you think?\" He waves the small device about as it beeps. \"Perhaps I'm missing something.\"", "\"If I had a, um... well, I don't know what it is. Yet. But what I do know is that there's a dark, disturbing presence here.\"", "\"Hm. The readings here were the highest.\" You take a second to look around as the Doctor continues. \"Ah, yes! I will likely be needing something... maybe similar in nature to this evil presence?\"", "\"Shouldn't get too close there. Ah, yes, be careful there. An evil consumes the life os this world, and my analysis led me to this area.\"", "\"Well, you don't see that every day, do you? Er, well, it's not that strange for me, I think. If I am correct, some agent is at work here, behind the scenes. For now, if you think of anything that might help, please let me know.\"";
    callsub S_Dialogue_Knows;
    next;

L_At_Stones_Menu:
    mes "[Doctor]";
    mes "";
    mes "\"This place... there's something, I'm not sure what. But I know there's something... something dark!\"";
    next;
    menu
        "Wow! How can you tell?", L_stones_light,
        "Do you need any more help?", L_stones_offer,
        "Er, pardon me? Did you hear what I said?", L_At_Stones_Pardon,
        "Actually, I was hoping you could help me leave this world.", L_Warning,
        "Good luck with that.", -;
    close;

L_At_Stones_Pardon:
    mes "[Doctor]";
    mes "";
    mes "\"H'm, what? Oh, hello...\"";
    next;
    mes "[Doctor]";
    mes "";
    mes "\"But this...\" - the man waves a strange, beeping device in the air - \"surely that must mean... oh? You're still here?\"";
    next;
    menu
        "What's that thing you've got there?", L_stones_device,
        "Sure I am. Do you need help with anything?", L_stones_offer,
        "I was just leaving.", -;
    close;

L_stones_device:
    mes "[Doctor]";
    mes "";
    mes "\"This? Oh, it's just an ordinary megalectrometer. Good model, though.\"";
    next;
    menu
        "I'm intrigued. Do you need any help?", L_stones_offer,
        "Megalawhat? I knew you were a crazy!", -;
    close;

L_stones_light:
    mes "[Doctor]";
    mes "";
    mes "\"Well, it's obvious.\"";
    next;
    mes "[Doctor]";
    mes "";
    mes "\"The red light on my megalectrometer's come on.\"";
    next;
    menu
        "Uh, okay. So... you need any more help?", L_stones_offer,
        "I've got better things to do. Bye.", -;
    close;

// Now comes the confusing part.
L_stones_offer:
    setarray @menuitems$, "", "", "", "", "", "", "", "", "", "", "", "", "", "";
    set @c, 0;

    if (countitem("WispPowder") < 1) goto L_stones_wisp;
    set @menuitems$[@c], "Wisp Powder?";
    set @menuid[@c], E10_STONES_WISP;
    set @c, @c + 1;

L_stones_wisp:
    if (countitem("SpectrePowder") < 1) goto L_stones_spectre;
    set @menuitems$[@c], "Spectre Powder?";
    set @menuid[@c], E10_STONES_SPECTRE;
    set @c, @c + 1;

L_stones_spectre:
    if (countitem("PoltergeistPowder") < 1) goto L_stones_poltergeist;
    set @menuitems$[@c], "Poltergeist Powder?";
    set @menuid[@c], E10_STONES_POLTERGEIST;
    set @c, @c + 1;

L_stones_poltergeist:
    if (countitem("DiseasedHeart") < 1) goto L_stones_soul;
    set @menuitems$[@c], "A Diseased Heart?";
    set @menuid[@c], E10_STONES_HEART;
    set @c, @c + 1;

L_stones_soul:
    if (countitem("JackOSoul") < 1) goto L_stones_heart;
    set @menuitems$[@c], "A Jack O Soul?";
    set @menuid[@c], E10_STONES_SOUL;
    set @c, @c + 1;

L_stones_heart:
    if (countitem("UndeadEar") < 1) goto L_stones_ear;
    set @menuitems$[@c], "An Undead Ear?";
    set @menuid[@c], E10_STONES_EAR;
    set @c, @c + 1;

L_stones_ear:
    if (countitem("UndeadEye") < 1) goto L_stones_eye;
    set @menuitems$[@c], "An Undead Eye?";
    set @menuid[@c], E10_STONES_EYE;
    set @c, @c + 1;

L_stones_eye:
    if (countitem("Bone") < 1) goto L_stones_bone;
    set @menuitems$[@c], "A Bone?";
    set @menuid[@c], E10_STONES_BONE;
    set @c, @c + 1;

L_stones_bone:
    if (countitem("Skull") < 1) goto L_stones_skull;
    set @menuitems$[@c], "A Skull?";
    set @menuid[@c], E10_STONES_SKULL;
    set @c, @c + 1;

L_stones_skull:
    if (countitem("DarkCrystal") < 1) goto L_stones_crystal;
    set @menuitems$[@c], "A Dark Crystal?";
    set @menuid[@c], E10_STONES_CRYSTAL;
    set @c, @c + 1;

L_stones_crystal:
    if (countitem("RottenRags") < 1) goto L_stones_rags;
    set @menuitems$[@c], "Rotten Rags?";
    set @menuid[@c], E10_STONES_RAGS;
    set @c, @c +1;

    if (countitem("DarkPetal") < 1) goto L_stones_petal;
    set @menuitems$[@c], "A Dark Petal?";
    set @menuid[@c], E10_STONES_PETAL;
    set @c, @c + 1;

L_stones_petal:
    set @menuitems$[@c], "No, I don't have anything like that.";
    set @menuid[@c], E10_STONES_NEVERMIND;
    set @c, @c + 1;

    mes "[Doctor]";
    mes "";
    mes "\"I doubt you could help, since you wouldn't have - actually, you might. Coming from another world and all.\"";
    next;
    mes "[Doctor]";
    mes "";
    mes "\"I need something dark. Something connected with death... a deathly item. Sort of thing. Do you have anything of this kind?\"";
    next;
    menu
        @menuitems$[0], -,
        @menuitems$[1], -,
        @menuitems$[2], -,
        @menuitems$[3], -,
        @menuitems$[4], -,
        @menuitems$[5], -,
        @menuitems$[6], -,
        @menuitems$[7], -,
        @menuitems$[8], -,
        @menuitems$[9], -,
        @menuitems$[10], -,
        @menuitems$[11], -,
        @menuitems$[12], -,
        @menuitems$[13], -;

    set @menu, @menu -1;
    if (@menu >= @c) close;
    if (@menuid[@menu] == E10_STONES_WISP) goto L_stones_offer_wisp;
    if (@menuid[@menu] == E10_STONES_SPECTRE) goto L_stones_offer_spectre;
    if (@menuid[@menu] == E10_STONES_POLTERGEIST) goto L_stones_offer_poltergeist;
    if (@menuid[@menu] == E10_STONES_SOUL) goto L_stones_offer_soul;
    if (@menuid[@menu] == E10_STONES_HEART) goto L_stones_offer_heart;
    if (@menuid[@menu] == E10_STONES_EAR) goto L_stones_offer_ear;
    if (@menuid[@menu] == E10_STONES_EYE) goto L_stones_offer_eye;
    if (@menuid[@menu] == E10_STONES_BONE) goto L_stones_offer_bone;
    if (@menuid[@menu] == E10_STONES_SKULL) goto L_stones_offer_skull;
    if (@menuid[@menu] == E10_STONES_CRYSTAL) goto L_stones_offer_crystal;
    if (@menuid[@menu] == E10_STONES_RAGS) goto L_stones_offer_rags;
    if (@menuid[@menu] == E10_STONES_PETAL) goto L_stones_offer_petal;
    if (@menuid[@menu] == E10_STONES_NEVERMIND) goto L_stones_nevermind;
    close;

L_stones_offer_wisp:
    if (countitem("WispPowder") < 1) goto L_stones_noitem;
    delitem "WispPowder", 1;
    goto L_stones_thanks;

L_stones_offer_spectre:
    if (countitem("SpectrePowder") < 1) goto L_stones_noitem;
    delitem "SpectrePowder", 1;
    goto L_stones_thanks;

L_stones_offer_poltergeist:
    if (countitem("PoltergeistPowder") < 1) goto L_stones_noitem;
    delitem "PoltergeistPowder", 1;
    goto L_stones_thanks;

L_stones_offer_soul:
    if (countitem("JackOSoul") < 1) goto L_stones_noitem;
    delitem "JackOSoul", 1;
    goto L_stones_nothanks;

L_stones_offer_heart:
    if (countitem("DiseasedHeart") < 1) goto L_stones_noitem;
    delitem "DiseasedHeart", 1;
    goto L_stones_thanks;

L_stones_offer_ear:
    if (countitem("UndeadEar") < 1) goto L_stones_noitem;
    delitem "UndeadEar", 1;
    goto L_stones_thanks;

L_stones_offer_eye:
    if (countitem("UndeadEye") < 1) goto L_stones_noitem;
    delitem "UndeadEye", 1;
    goto L_stones_thanks;

L_stones_offer_bone:
    if (countitem("Bone") < 1) goto L_stones_noitem;
    delitem "Bone", 1;
    goto L_stones_thanks;

L_stones_offer_skull:
    if (countitem("Skull") < 1) goto L_stones_noitem;
    delitem "Skull", 1;
    goto L_stones_thanks;

L_stones_offer_crystal:
    if (countitem("DarkCrystal") < 1) goto L_stones_noitem;
    delitem "DarkCrystal", 1;
    goto L_stones_thanks;

L_stones_offer_rags:
    if (countitem("RottenRags") < 1) goto L_stones_noitem;
    delitem "RottenRags", 1;
    goto L_stones_nothanks;

L_stones_offer_petal:
    if (countitem("DarkPetal") < 1) goto L_stones_noitem;
    mes "[Doctor]";
    mes "";
    mes "\"Let me examine it... h'm...\"";
    next;
    mes "[Doctor]";
    mes "";
    mes "\"Well now... this is quite... impressive.\"";
    next;
    mes "[Doctor]";
    mes "";
    mes "\"I think I've figured out how you came here...\"";
    next;
    mes "[Doctor]";
    mes "";
    mes "\"This item will certainly serve my purposes. However, when it comes time for you to go home, you may find it a little more difficult.\"";
    mes "\"Not impossible, but difficult.\"";
    next;
    mes "[Doctor]";
    mes "";
    mes "\"Do you want to give it to me anyway?\"";
    next;
    menu
        "I'm a tough guy, I'll still make it home.", L_stones_tough,
        "Sorry, I'm a coward. Maybe I've got something else...", L_stones_offer;
    close;

L_stones_nevermind:
    mes "[Doctor]";
    mes "";
    mes "\"H'm, well, if you come by anything please let me know!\"";
    close;

L_stones_thanks:
    callsub S_Update_Helped;
    mes "[Doctor]";
    mes "";
    mes "\"Let me examine it... h'm...\"";
    next;
    mes "[Doctor]";
    mes "";
    mes "\"Yes, that should do perfectly! Thank you very much.\"";
    next;
    menu
        "Is there anything else you need?", L_stones_help,
        "Yep, that's fine. Bye then!", -;
    close;

L_stones_nothanks:
    mes "[Doctor]";
    mes "";
    mes "\"Let me examine it... h'm...\"";
    mes "\"No, I'm afraid that won't work. Do you have anything else?\"";
    goto L_stones_offer;

L_stones_noitem:
    mes "[Doctor]";
    mes "";
    mes "\"Let me examine it... h'm...\"";
    next;
    mes "[Doctor]";
    mes "";
    mes "\"Wait a minute! You don't even have one of those!\"";
    next;
    menu
        "Well, I did, but I dropped it halfway through the dialogue.", L_stones_dropped,
        "Sorry, I thought I did. Let's see what else I have...", L_stones_offer,
        "Aha! Got you all excited there!", -;
    close;

L_stones_tough:
    mes "[Doctor]";
    mes "";
    mes "\"Well, if you're sure...\"";
    next;
    menu
        "I am! Just take the petal, okay?", L_give_petal,
        "Er, actually, I'm not. Maybe I have something else...", L_stones_offer;
    close;

L_give_petal:
    if (countitem("DarkPetal") < 1) goto L_stones_noitem;
    delitem "DarkPetal", 1;
    goto L_stones_thanks;

L_stones_help:
    mes "[Doctor]";
    mes "";
    mes "\"Hmm, that's all for now, thank you. I'm going to have a look around this area, though, and I might need some assistance later on.\"";
    close;

L_At_Stones_Helped:
    mes "[Doctor]";
    mes "";
    mes "A smile appears on the Doctor's face. \"You really have done splendidly here.\"";
    next;
    mes "[Doctor]";
    mes "";
    mes "\"Will have to see about taking care of these other loose ends, though. Well, I should be getting back to my observations. Please feel free to let me know if you have some new information for me.\"";
    next;
    menu "Okay, I'll see you around!", -,
            "Actually, I'd like to go home now. Any chance you could help?", L_Warning;
    close;

// ===================================================================
// Helper portions, duplicated in each script for want of time, sorry.
// ===================================================================

// The player has defeated the invader and helped enough times.
L_Return_Ready_Optional:
    if (!(~(Easter_2010_QuestState >> E10_HELPED_DOCTOR_SHIFT) & E10_HELPED_DOCTOR_MASK) || ((Easter_2010_QuestState >> E10_HELPED_DOCTOR_STONES_SHIFT) & E10_HELPED_DOCTOR_STONES_MASK))
        goto L_Return_Ready;

    // Player can help one more time, if so desired.
    mes "[Doctor]";
    mes "";
    mes "\"Well... this has been quite an adventure, hasn't it? I'd say it's about timey--er, time for me to go, but I think I can stick around for a little while longer to tie up some loose ends for myself.\"";
    next;
    mes "[Doctor]";
    mes "";
    mes "\"Oh, did you want to help again?\"";
    next;
    menu "Sure, that sounds good", L_At_Stones,
            "Hm, I can't right now, but maybe later.", L_Return_Ready,
            "I was looking for a way to go home.", L_Return_Capable,
            "No, sorry, I don't think so.", L_Return_Ready;
    close;

// Player has done "everything" to do in this world, just talking to the Doctor.
L_Return_Ready:
    set @parting$, "!";
    if (strcharinfo(0) == "Alonso" || strcharinfo(0) == "AlOnS") set @parting$, ", Alonso!";
    mes "[Doctor]";
    mes "";
    mes "\"Well, you have been absolutely brilliant! Brilliant! Very impressive.\" He smiles kindly and shakes your hand. \"It has been a pleasure. Now for the next adventure. Allons-y" + @parting$ + "\"";
    close;

L_Defeat_Invader:
    mes "[Doctor]";
    mes "";
    mes "\"Ah-ha! It's nice to see you again. How goes the battle?\"";
    next;
    menu "I'm having a hard time, actually. I'd like to go home...", -,
            "Regrouping now for the next encounter, actually.", L_Encourage;
    goto L_Warning;

L_Encourage:
    mes "[Doctor]";
    mes "";
    mes "\"Oh, well, I think you'll prevail in the end! If you'll excuse me, I still have some things to see to.\"";
    close;

L_MidReward:
    if (((Easter_2010_QuestState >> E10_FLAG_MID_REWARD_SHIFT) & E10_FLAG_MID_REWARD_MASK)) close;
    mes "[Doctor]";
    mes "";
    mes "\"Fantastic! You have really been quite helpful.\"";
    next;
    mes "[Doctor]";
    mes "";
    mes "\"Er, now that I think about it, perhaps I have something you'd be interested in.\"";
    next;
    mes "[Doctor]";
    mes "";
    mes "\"While visiting another dimension--hm, as a matter of fact, it was quite like this one. But their choices in the past seem to have differed from the ones here...\"";
	next;
    mes "[Doctor]";
    mes "";
    mes "The Doctor reflects on his words. \"Interesting how things turn out. Well, I now have a lot of these Valentine's Glasses, if you'd like a pair.\"";
    next;
    getinventorylist;
    if (@inventorylist_count == 100)
        goto L_MidReward_NoRoom;
    mes "[Doctor]";
    mes "";
    mes "He hands you the glasses.";
    mes "\"They're not too brainy, or suited for detecting background radiation, but they are charming.\"";
    set Easter_2010_QuestState, Easter_2010_QuestState & ~(E10_FLAG_MID_REWARD_MASK << E10_FLAG_MID_REWARD_SHIFT) | (E10_FLAG_MID_REWARD << E10_FLAG_MID_REWARD_SHIFT);
    getitem E10_MIDREWARD_ID, 1;
    close;

L_MidReward_NoRoom:
    mes "[Doctor]";
    mes "";
    mes "\"Oh, I don't think you have room for these. Well, I suppose I'll hold on to them for now.\"";
    close;

// Warning about the potential perils ahead, but the player must still want to abort the quest.
L_Warning:
    mes "[Doctor]";
    mes "";
    mes "\"There is no doubt in my mind that what awaits us is both powerful and dangerous, to say the least.\"";
    next;
    mes "[Doctor]";
    mes "";
    mes "\"If this... destruction, this disregard for life isn't an indication, what is?\"";
    mes "He takes a moment, searching your face.";
    next;
    mes "[Doctor]";
    mes "";
    if (((Easter_2010_QuestState >> E10_HELPED_DOCTOR_SHIFT) & E10_HELPED_DOCTOR_MASK))
        mes "\"I do appreciate your help thus far, really. And I did look forward to working with you again in putting an end to this devastation.\"";
    if (!((Easter_2010_QuestState >> E10_HELPED_DOCTOR_SHIFT) & E10_HELPED_DOCTOR_MASK))
        mes "\"Despite the danger, I think pressing on would certainly be a brave choice.\"";
    next;
    mes "[Doctor]";
    mes "";
    mes "\"But if you were to leave now, I'm afraid it would be impossible to return...\"";
    mes "He pauses again. \"There is still time for you to turn back now, while it's relatively easy.\"";
    next;
    menu "N-no, I-I think I will continue... Yes, I'm ready!", -,
            "Now that you mention it, maybe I'd better leave now while I can.", L_Turn_Back,
            "Um, could I have a minute to think it over?", -;
    close;

L_Turn_Back:
    mes "[Doctor]";
    mes "";
    mes "\"You really want to turn back now?\"";
    next;
    mes "[Doctor]";
    mes "";
    mes "\"I don't think there's any shame in going back. Quite the contrary. You're brave for even being here.\"";
    mes "He hesitates ever so slightly, choosing his words. \"I just wanted to make sure you were certain about your decision.\"";
    next;
    mes "[Doctor]";
    mes "";
    mes "\"Once you've left, I don't see how you'll be able to return.\"";
    next;
    menu "On second thought, perhaps I will stick around.", -,
            "No, no, I'm quite sure I want to leave.", L_Really_Return;
    close;

// The player definitely wants to go back, and there's no returning.
L_Really_Return:
    if ((Easter_2010_QuestState >> E10_FLAG_RETURN_READY_SHIFT) & E10_FLAG_RETURN_READY_MASK == E10_FLAG_RETURN_READY && (Easter_2010_QuestState >> E10_STATE_ROSE_SHIFT) & E10_STATE_ROSE_MASK == E10_STATE_ROSE_ROSE_COMPLETE)
        goto L_Return_Capable;
    mes "[Doctor]";
    mes "";
    mes "\"If that is what you want, then consider it done. And good luck.\"";
    next;
    goto L_Return_Player;

L_Return_Player:
    callsub S_Helped_Count;
    if (countitem("DarkPetal") == 0 && @Easter_2010_helper < 3) goto L_Difficult_Return;
    set Easter_2010_QuestState, (Easter_2010_QuestState & ~(E10_STATE_ROSE_MASK << E10_STATE_ROSE_SHIFT)) | (E10_STATE_ROSE_RETURNED << E10_STATE_ROSE_SHIFT);
    if (@Easter_2010_helper < 3)
        delitem "DarkPetal", 1;
    savepoint "009-1", 52, 40;
    warp "009-1", 0, 0;
    close;

L_Difficult_Return:
    mes "[Doctor]";
    mes "";
    mes "\"Hm... you don't seem to have the thing that brought you here, that petal, that I could have used to send you back... assuming you really do want to give up.\"";
    next;
    mes "[Doctor]";
    mes "";
    mes "\"Others have been able to battle some darkness directly, which might serve as a substitute.\"";
    mes "\"You could still help me here and elsewhere if you want to try to get this done once and for all, but if you want to go early you will need to fight, somehow.\"";
    next;
    mes "[Doctor]";
    mes "";
    mes "\"Though there are others helping, too. No doubt that soon enough, you'll be able to go anyway...\"";
    close;

L_Return_Capable:
    mes "[Doctor]";
    mes "";
    mes "\"Hm. Oh, it looks like you've learned how to travel between these worlds on your own. Don't you remember the way?\"";
    next;
    menu "Oh, you're right! It was a spell, um..." + getspellinvocation("world-shift") + " was the name!", -;
    mes "[Doctor]";
    mes "";
    mes "\"Excellent! Though I suspect its effects will work best when you are closer to where you started.\"";
    next;
    mes "[Doctor]";
    mes "";
    mes "\"When you came to this world, where did you end up? I trust that is your origin.\"";
    close;

S_Dialogue_Knows:
    mes "[Doctor]";
    mes "";
    mes "\"Oh, hello again... hm...\"";
    next;
    mes "[Doctor]";
    mes "";
    mes @responses$[rand(getarraysize(@responses$))];
    return;

S_Update_Knows:
    // Working "name" for when he hasn't introduced himself (can be changed).
    mes "[Mysterious Man]";
    mes "";
    mes @responses$[rand(getarraysize(@responses$))];
    next;
    set Easter_2010_QuestState, Easter_2010_QuestState & ~(E10_FLAG_KNOWS_DOCTOR_MASK << E10_FLAG_KNOWS_DOCTOR_SHIFT) | (E10_FLAG_KNOWS_DOCTOR << E10_FLAG_KNOWS_DOCTOR_SHIFT);
    mes "[Doctor]";
    mes "";
    mes "\"Oh, excuse me,\" he gestures. \"I'm the Doctor.\"";
    return;

S_Update_Helped:
    set Easter_2010_QuestState, Easter_2010_QuestState & ~(E10_FLAG_HELPED_DOCTOR_STONES_MASK << E10_FLAG_HELPED_DOCTOR_STONES_SHIFT) | (E10_FLAG_HELPED_DOCTOR_STONES << E10_FLAG_HELPED_DOCTOR_STONES_SHIFT);
    callsub S_Helped_Count;
    if (@Easter_2010_helper == 3) set Easter_2010_QuestState, (Easter_2010_QuestState & ~(E10_STATE_ROSE_MASK << E10_STATE_ROSE_SHIFT)) | (E10_STATE_ROSE_ROSE_COMPLETE << E10_STATE_ROSE_SHIFT);
    return;

S_Helped_Count:
    set @Easter_2010_helper, 0;
    if ((Easter_2010_QuestState >> E10_FLAG_HELPED_DOCTOR_TREE_SHIFT) & E10_FLAG_HELPED_DOCTOR_TREE_MASK == E10_FLAG_HELPED_DOCTOR_TREE)
        set @Easter_2010_helper, @Easter_2010_helper + 1;
    if ((Easter_2010_QuestState >> E10_FLAG_HELPED_DOCTOR_ISLAND_SHIFT) & E10_FLAG_HELPED_DOCTOR_ISLAND_MASK == E10_FLAG_HELPED_DOCTOR_ISLAND)
        set @Easter_2010_helper, @Easter_2010_helper + 1;
    if ((Easter_2010_QuestState >> E10_FLAG_HELPED_DOCTOR_STONES_SHIFT) & E10_FLAG_HELPED_DOCTOR_STONES_MASK == E10_FLAG_HELPED_DOCTOR_STONES)
        set @Easter_2010_helper, @Easter_2010_helper + 1;
    if ((Easter_2010_QuestState >> E10_FLAG_HELPED_DOCTOR_FRUIT_SHIFT) & E10_FLAG_HELPED_DOCTOR_FRUIT_MASK == E10_FLAG_HELPED_DOCTOR_FRUIT)
        set @Easter_2010_helper, @Easter_2010_helper + 1;
    return;
}