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
|
PalletTown_MapScripts:: @ 816545A
map_script 3, PalletTown_MapScript1_165465
map_script 2, PalletTown_MapScript2_1654CE
.byte 0
PalletTown_MapScript1_165465:: @ 8165465
setworldmapflag FLAG_WORLD_MAP_PALLET_TOWN
checkflag FLAG_PALLET_LADY_NOT_BLOCKING_SIGN
call_if TRUE, EventScript_165488
compare_var_to_value VAR_MAP_SCENE_PALLET_TOWN_SIGN_LADY, 0
call_if eq, EventScript_1654A8
compare_var_to_value VAR_MAP_SCENE_PALLET_TOWN_SIGN_LADY, 1
call_if eq, EventScript_1654A2
end
EventScript_165488:: @ 8165488
checkflag FLAG_PALLET_TOWN_LADY_MOVED_FROM_SIGN
goto_if FALSE, EventScript_1A77A9
compare_var_to_value VAR_MAP_SCENE_PALLET_TOWN_SIGN_LADY, 1
goto_if ge, EventScript_1A77A9
setvar VAR_MAP_SCENE_PALLET_TOWN_SIGN_LADY, 1
return
EventScript_1654A2:: @ 81654A2
setvar VAR_MAP_SCENE_PALLET_TOWN_SIGN_LADY, 2
return
EventScript_1654A8:: @ 81654A8
checkflag FLAG_PALLET_LADY_NOT_BLOCKING_SIGN
goto_if TRUE, EventScript_1654BD
setobjectxyperm 1, 5, 15
setobjectmovementtype 1, 7
return
EventScript_1654BD:: @ 81654BD
setobjectxyperm 1, 12, 2
setobjectmovementtype 1, 8
setvar VAR_0x4002, 1
return
PalletTown_MapScript2_1654CE:: @ 81654CE
map_script_2 VAR_MAP_SCENE_PALLET_TOWN_OAK, 2, EventScript_1654D8
.2byte 0
EventScript_1654D8:: @ 81654D8
lockall
textcolor 0
setobjectxyperm 3, 14, 14
setobjectmovementtype 3, 9
addobject 3
applymovement 3, Movement_1655AF
waitmovement 0
checkflag FLAG_WORLD_MAP_ONE_ISLAND
goto_if FALSE, EventScript_1655A1
msgbox gUnknown_817D8BF
setvar VAR_0x8004, 0
specialvar VAR_RESULT, Special_GetPokedexCount
copyvar VAR_0x8008, VAR_0x8005
copyvar VAR_0x8009, VAR_0x8006
getnumberstring 0, VAR_0x8008
getnumberstring 1, VAR_0x8009
compare_var_to_value VAR_0x8009, 60
goto_if lt, EventScript_165593
msgbox gUnknown_817D9AA
closemessage
playbgm MUS_ANNAI, 0
applymovement 255, Movement_1655DD
applymovement 3, Movement_1655CC
waitmovement 0
opendoor 16, 13
waitdooranim
applymovement 3, Movement_16572E
applymovement 255, Movement_165758
waitmovement 0
closedoor 16, 13
waitdooranim
setvar VAR_MAP_SCENE_PALLET_TOWN_PROFESSOR_OAKS_LAB, 7
setvar VAR_MAP_SCENE_PALLET_TOWN_OAK, 3
setflag FLAG_HIDE_OAK_IN_PALLET_TOWN
warp MAP_PALLET_TOWN_PROFESSOR_OAKS_LAB, 255, 6, 12
waitstate
releaseall
end
EventScript_16557E:: @ 816557E
closemessage
applymovement 3, Movement_1655BE
waitmovement 0
removeobject 3
setvar VAR_MAP_SCENE_PALLET_TOWN_OAK, 3
releaseall
end
EventScript_165593:: @ 8165593
msgbox gUnknown_817D925
goto EventScript_16557E
end
EventScript_1655A1:: @ 81655A1
msgbox gUnknown_817DA16
goto EventScript_16557E
end
Movement_1655AF:: @ 81655AF
step_12
step_12
step_12
step_11
step_11
step_11
step_11
step_11
step_12
step_12
step_12
step_12
step_12
step_2e
step_end
Movement_1655BE:: @ 81655BE
step_13
step_13
step_13
step_13
step_13
step_10
step_10
step_10
step_10
step_10
step_13
step_13
step_13
step_end
Movement_1655CC:: @ 81655CC
step_13
step_13
step_13
step_13
step_13
step_10
step_10
step_10
step_10
step_10
step_13
step_13
step_13
step_13
step_13
step_2e
step_end
Movement_1655DD:: @ 81655DD
step_10
step_13
step_13
step_13
step_13
step_13
step_10
step_10
step_10
step_10
step_10
step_13
step_13
step_13
step_13
step_end
PalletTown_EventScript_1655ED:: @ 81655ED
lockall
setvar VAR_0x4001, 0
goto EventScript_165605
end
PalletTown_EventScript_1655F9:: @ 81655F9
lockall
setvar VAR_0x4001, 1
goto EventScript_165605
end
EventScript_165605:: @ 8165605
famechecker FAMECHECKER_OAK, FCPICKSTATE_COLORED, UpdatePickStateFromSpecialVar8005
textcolor 0
delay 30
playbgm MUS_OHKIDO, 0
message Text_17D72C
waitmessage
delay 85
closemessage
applymovement 255, Movement_1A75ED
waitmovement 0
playse SE_PIN
applymovement 255, Movement_1A75DB
waitmovement 0
delay 30
addobject 3
compare_var_to_value VAR_0x4001, 0
call_if eq, EventScript_1656B8
compare_var_to_value VAR_0x4001, 1
call_if eq, EventScript_1656C3
delay 30
msgbox gUnknown_817D74A
closemessage
delay 30
compare_var_to_value VAR_0x4001, 0
call_if eq, EventScript_1656CE
compare_var_to_value VAR_0x4001, 1
call_if eq, EventScript_1656E0
opendoor 16, 13
waitdooranim
applymovement 3, Movement_16572E
applymovement 255, Movement_165758
waitmovement 0
closedoor 16, 13
waitdooranim
setvar VAR_MAP_SCENE_PALLET_TOWN_PROFESSOR_OAKS_LAB, 1
clearflag FLAG_HIDE_OAK_IN_HIS_LAB
setvar VAR_MAP_SCENE_PALLET_TOWN_OAK, 1
setflag FLAG_HIDE_OAK_IN_PALLET_TOWN
setflag FLAG_SPECIAL_FLAG_0x4001
warp MAP_PALLET_TOWN_PROFESSOR_OAKS_LAB, 255, 6, 12
waitstate
releaseall
end
EventScript_1656B8:: @ 81656B8
applymovement 3, Movement_1656F2
waitmovement 0
return
EventScript_1656C3:: @ 81656C3
applymovement 3, Movement_1656FB
waitmovement 0
return
EventScript_1656CE:: @ 81656CE
applymovement 3, Movement_165705
applymovement 255, Movement_165731
waitmovement 0
return
EventScript_1656E0:: @ 81656E0
applymovement 3, Movement_165719
applymovement 255, Movement_165744
waitmovement 0
return
Movement_1656F2:: @ 81656F2
step_11
step_11
step_13
step_11
step_11
step_13
step_11
step_11
step_end
Movement_1656FB:: @ 81656FB
step_13
step_11
step_11
step_13
step_11
step_11
step_13
step_11
step_11
step_end
Movement_165705:: @ 8165705
step_10
step_12
step_10
step_10
step_10
step_10
step_10
step_10
step_10
step_10
step_10
step_10
step_10
step_13
step_13
step_13
step_13
step_13
step_2e
step_end
Movement_165719:: @ 8165719
step_10
step_12
step_12
step_10
step_10
step_10
step_10
step_10
step_10
step_10
step_10
step_10
step_10
step_10
step_13
step_13
step_13
step_13
step_13
step_2e
step_end
Movement_16572E:: @ 816572E
step_11
step_60
step_end
Movement_165731:: @ 8165731
step_10
step_10
step_12
step_10
step_10
step_10
step_10
step_10
step_10
step_10
step_10
step_10
step_10
step_10
step_13
step_13
step_13
step_13
step_end
Movement_165744:: @ 8165744
step_10
step_10
step_12
step_12
step_10
step_10
step_10
step_10
step_10
step_10
step_10
step_10
step_10
step_10
step_10
step_13
step_13
step_13
step_13
step_end
Movement_165758:: @ 8165758
step_13
step_11
step_60
step_end
PalletTown_EventScript_16575C:: @ 816575C
lock
compare_var_to_value VAR_MAP_SCENE_PALLET_TOWN_SIGN_LADY, 2
goto_if eq, EventScript_1657ED
compare_var_to_value VAR_MAP_SCENE_PALLET_TOWN_SIGN_LADY, 1
goto_if eq, EventScript_165815
compare_var_to_value VAR_0x4002, 1
goto_if eq, EventScript_1658C2
checkflag FLAG_TEMP_2
goto_if TRUE, EventScript_165801
msgbox gUnknown_81B1C8B
applymovement 1, Movement_1A75E1
waitmovement 0
playse SE_PIN
applymovement 1, Movement_1A75DB
waitmovement 0
applymovement 1, Movement_1A75DD
waitmovement 0
msgbox gUnknown_81B1C9F
closemessage
compare_var_to_value VAR_FACING, 4
call_if eq, EventScript_1657D7
compare_var_to_value VAR_FACING, 4
call_if ne, EventScript_1657E2
moveobjectoffscreen 1
setflag FLAG_TEMP_2
release
end
EventScript_1657D7:: @ 81657D7
applymovement 1, Movement_165829
waitmovement 0
return
EventScript_1657E2:: @ 81657E2
applymovement 1, Movement_16582C
waitmovement 0
return
EventScript_1657ED:: @ 81657ED
applymovement 1, Movement_1A75E1
waitmovement 0
msgbox gUnknown_817D7C8
release
end
EventScript_165801:: @ 8165801
applymovement 1, Movement_1A75E1
waitmovement 0
msgbox gUnknown_81B1CAF
release
end
EventScript_165815:: @ 8165815
applymovement 1, Movement_1A75E1
waitmovement 0
msgbox gUnknown_81B1CEC
release
end
Movement_165829:: @ 8165829
step_13
step_2f
step_end
Movement_16582C:: @ 816582C
step_12
step_30
step_end
PalletTown_EventScript_16582F:: @ 816582F
msgbox gUnknown_817D80D, 2
end
PalletTown_EventScript_165838:: @ 8165838
lockall
famechecker FAMECHECKER_OAK, 0
msgbox gUnknown_817D866
releaseall
end
PalletTown_EventScript_165850:: @ 8165850
msgbox gUnknown_817D87F, 3
end
PalletTown_EventScript_165859:: @ 8165859
msgbox gUnknown_817D88A, 3
end
PalletTown_EventScript_165862:: @ 8165862
msgbox gUnknown_817D895, 3
end
PalletTown_EventScript_16586B:: @ 816586B
lockall
msgbox gUnknown_81B1CC1
setvar VAR_MAP_SCENE_PALLET_TOWN_SIGN_LADY, 1
releaseall
end
PalletTown_EventScript_16587B:: @ 816587B
lockall
applymovement 1, Movement_1A75EB
applymovement 255, Movement_1A75E7
waitmovement 0
call EventScript_165894
releaseall
end
EventScript_165894:: @ 8165894
textcolor 1
msgbox gUnknown_81B1D0B
closemessage
delay 20
textcolor 3
setflag FLAG_PALLET_TOWN_LADY_MOVED_FROM_SIGN
setvar VAR_MAP_SCENE_PALLET_TOWN_SIGN_LADY, 1
setvar VAR_0x4002, 0
special sub_80699E0
special sub_80699BC
signmsg
msgbox gUnknown_81B1D51
normalmsg
return
EventScript_1658C2:: @ 81658C2
applymovement 1, Movement_1A75E1
waitmovement 0
call EventScript_165894
release
end
|