summaryrefslogtreecommitdiff
path: root/data/scripts/maps/LilycoveCity_ContestLobby.inc
blob: 377c2908dff2be5228fcdcfcd63c5fe1e2df2f21 (plain)
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
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
LilycoveCity_ContestLobby_MapScripts:: @ 8158866
	map_script 3, LilycoveCity_ContestLobby_MapScript1_158871
	map_script 2, LilycoveCity_ContestLobby_MapScript2_158877
	.byte 0

LilycoveCity_ContestLobby_MapScript1_158871:: @ 8158871
	call LilycoveCity_ContestLobby_EventScript_1AE188
	end

LilycoveCity_ContestLobby_MapScript2_158877:: @ 8158877
	map_script_2 VAR_LILYCOVE_CONTEST_LOBBY_STATE, 1, LilycoveCity_ContestLobby_EventScript_158889
	map_script_2 VAR_LILYCOVE_CONTEST_LOBBY_STATE, 2, LilycoveCity_ContestLobby_EventScript_158A5B
	.2byte 0

LilycoveCity_ContestLobby_EventScript_158889:: @ 8158889
	checkflag FLAG_HIDE_LILYCOVE_MUSEUM_CURATOR
	goto_if_eq LilycoveCity_ContestLobby_EventScript_158898
	setvar VAR_LILYCOVE_CONTEST_LOBBY_STATE, 0
	end

LilycoveCity_ContestLobby_EventScript_158898:: @ 8158898
	lockall
	addobject 4
	applymovement 4, LilycoveCity_ContestLobby_Movement_158A3B
	waitmovement 4
	applymovement 255, LilycoveCity_ContestLobby_Movement_158A4C
	waitmovement 0
	msgbox LilycoveCity_ContestLobby_Text_18890F, 4
	lockall
	fadescreen 1
	drawcontestwinner 0
	lockall
	msgbox LilycoveCity_ContestLobby_Text_1889FD, 5
	compare RESULT, 1
	goto_if_eq LilycoveCity_ContestLobby_EventScript_1588DE
	compare RESULT, 0
	goto_if_eq LilycoveCity_ContestLobby_EventScript_158918
	releaseall
	end

LilycoveCity_ContestLobby_EventScript_1588DE:: @ 81588DE
	msgbox LilycoveCity_ContestLobby_Text_188AE8, 4
	closemessage
	special sub_80C4CEC
	setvar VAR_LILYCOVE_CONTEST_LOBBY_STATE, 0
	specialvar RESULT, GiveMonArtistRibbon
	compare RESULT, 1
	call_if 1, LilycoveCity_ContestLobby_EventScript_158948
	applymovement 4, LilycoveCity_ContestLobby_Movement_158A43
	waitmovement 0
	removeobject 4
	call LilycoveCity_ContestLobby_EventScript_158994
	call LilycoveCity_ContestLobby_EventScript_1589EA
	releaseall
	end

LilycoveCity_ContestLobby_EventScript_158918:: @ 8158918
	msgbox LilycoveCity_ContestLobby_Text_188C41, 5
	compare RESULT, 1
	goto_if_eq LilycoveCity_ContestLobby_EventScript_1588DE
	msgbox LilycoveCity_ContestLobby_Text_188CBD, 4
	closemessage
	applymovement 4, LilycoveCity_ContestLobby_Movement_158A43
	waitmovement 0
	setvar VAR_LILYCOVE_CONTEST_LOBBY_STATE, 0
	removeobject 4
	releaseall
	end

LilycoveCity_ContestLobby_EventScript_158948:: @ 8158948
	incrementgamestat GAME_STAT_RECEIVED_RIBBONS
	special sub_80C4858
	applymovement 4, LilycoveCity_ContestLobby_Movement_158A4E
	waitmovement 0
	playse 21
	applymovement 4, LilycoveCity_ContestLobby_Movement_1A0833
	waitmovement 0
	applymovement 4, LilycoveCity_ContestLobby_Movement_158A52
	waitmovement 0
	msgbox LilycoveCity_ContestLobby_Text_188BB5, 4
	playfanfare 370
	msgbox LilycoveCity_ContestLobby_Text_188C03, 4
	waitfanfare
	msgbox LilycoveCity_ContestLobby_Text_188C19, 4
	msgbox LilycoveCity_ContestLobby_Text_188C32, 4
	closemessage
	return

LilycoveCity_ContestLobby_EventScript_158994:: @ 8158994
	specialvar VAR_SPECIAL_4, sub_80C4D50
	switch VAR_SPECIAL_4
	case 1, LilycoveCity_ContestLobby_EventScript_1589D6
	case 2, LilycoveCity_ContestLobby_EventScript_1589DA
	case 3, LilycoveCity_ContestLobby_EventScript_1589DE
	case 4, LilycoveCity_ContestLobby_EventScript_1589E2
	case 5, LilycoveCity_ContestLobby_EventScript_1589E6
	return

LilycoveCity_ContestLobby_EventScript_1589D6:: @ 81589D6
	clearflag FLAG_HIDE_LILYCOVE_MUSEUM_PAINTING_LADY
	return

LilycoveCity_ContestLobby_EventScript_1589DA:: @ 81589DA
	clearflag FLAG_HIDE_LILYCOVE_MUSEUM_PAINTING_GIRL
	return

LilycoveCity_ContestLobby_EventScript_1589DE:: @ 81589DE
	clearflag FLAG_HIDE_LILYCOVE_MUSEUM_PAINTING_MAN
	return

LilycoveCity_ContestLobby_EventScript_1589E2:: @ 81589E2
	clearflag FLAG_HIDE_LILYCOVE_MUSEUM_PAINTER
	return

LilycoveCity_ContestLobby_EventScript_1589E6:: @ 81589E6
	clearflag FLAG_HIDE_LILYCOVE_MUSEUM_VISITORS
	return

LilycoveCity_ContestLobby_EventScript_1589EA:: @ 81589EA
	switch CONTEST_CATEGORY
	case 0, LilycoveCity_ContestLobby_EventScript_158A27
	case 1, LilycoveCity_ContestLobby_EventScript_158A2B
	case 2, LilycoveCity_ContestLobby_EventScript_158A2F
	case 3, LilycoveCity_ContestLobby_EventScript_158A33
	case 4, LilycoveCity_ContestLobby_EventScript_158A37
	return

LilycoveCity_ContestLobby_EventScript_158A27:: @ 8158A27
	setflag FLAG_COOL_PAINTING_MADE
	return

LilycoveCity_ContestLobby_EventScript_158A2B:: @ 8158A2B
	setflag FLAG_BEAUTY_PAINTING_MADE
	return

LilycoveCity_ContestLobby_EventScript_158A2F:: @ 8158A2F
	setflag FLAG_CUTE_PAINTING_MADE
	return

LilycoveCity_ContestLobby_EventScript_158A33:: @ 8158A33
	setflag FLAG_SMART_PAINTING_MADE
	return

LilycoveCity_ContestLobby_EventScript_158A37:: @ 8158A37
	setflag FLAG_TOUGH_PAINTING_MADE
	return

LilycoveCity_ContestLobby_Movement_158A3B:: @ 8158A3B
	step_down
	step_down
	step_down
	step_right
	step_right
	step_right
	step_right
	step_end

LilycoveCity_ContestLobby_Movement_158A43:: @ 8158A43
	step_down
	step_down
	step_down
	step_down
	step_down
	step_down
	step_down
	step_down
	step_end

LilycoveCity_ContestLobby_Movement_158A4C:: @ 8158A4C
	step_27
	step_end

LilycoveCity_ContestLobby_Movement_158A4E:: @ 8158A4E
	step_down
	step_down
	step_down
	step_end

LilycoveCity_ContestLobby_Movement_158A52:: @ 8158A52
	step_14
	step_14
	step_14
	step_14
	step_16
	step_16
	step_16
	step_28
	step_end

LilycoveCity_ContestLobby_EventScript_158A5B:: @ 8158A5B
	checkflag FLAG_HIDE_LILYCOVE_MUSEUM_CURATOR
	goto_if_eq LilycoveCity_ContestLobby_EventScript_158A6A
	setvar VAR_LILYCOVE_CONTEST_LOBBY_STATE, 0
	end

LilycoveCity_ContestLobby_EventScript_158A6A:: @ 8158A6A
	lockall
	addobject 11
	applymovement 11, LilycoveCity_ContestLobby_Movement_158B64
	waitmovement 11
	applymovement 255, LilycoveCity_ContestLobby_Movement_158B76
	waitmovement 0
	msgbox LilycoveCity_ContestLobby_Text_18890F, 4
	lockall
	fadescreen 1
	drawcontestwinner 0
	msgbox LilycoveCity_ContestLobby_Text_1889FD, 5
	compare RESULT, 1
	goto_if_eq LilycoveCity_ContestLobby_EventScript_158AAE
	compare RESULT, 0
	goto_if_eq LilycoveCity_ContestLobby_EventScript_158AE8
	end

LilycoveCity_ContestLobby_EventScript_158AAE:: @ 8158AAE
	msgbox LilycoveCity_ContestLobby_Text_188AE8, 4
	closemessage
	special sub_80C4CEC
	setvar VAR_LILYCOVE_CONTEST_LOBBY_STATE, 0
	specialvar RESULT, GiveMonArtistRibbon
	compare RESULT, 1
	call_if 1, LilycoveCity_ContestLobby_EventScript_158B18
	applymovement 11, LilycoveCity_ContestLobby_Movement_158B6D
	waitmovement 0
	removeobject 11
	call LilycoveCity_ContestLobby_EventScript_158994
	call LilycoveCity_ContestLobby_EventScript_1589EA
	releaseall
	end

LilycoveCity_ContestLobby_EventScript_158AE8:: @ 8158AE8
	msgbox LilycoveCity_ContestLobby_Text_188C41, 5
	compare RESULT, 1
	goto_if_eq LilycoveCity_ContestLobby_EventScript_158AAE
	msgbox LilycoveCity_ContestLobby_Text_188CBD, 4
	closemessage
	applymovement 11, LilycoveCity_ContestLobby_Movement_158B6D
	waitmovement 0
	setvar VAR_LILYCOVE_CONTEST_LOBBY_STATE, 0
	removeobject 11
	releaseall
	end

LilycoveCity_ContestLobby_EventScript_158B18:: @ 8158B18
	incrementgamestat GAME_STAT_RECEIVED_RIBBONS
	special sub_80C4858
	applymovement 11, LilycoveCity_ContestLobby_Movement_158B78
	waitmovement 0
	playse 21
	applymovement 11, LilycoveCity_ContestLobby_Movement_1A0833
	waitmovement 0
	applymovement 11, LilycoveCity_ContestLobby_Movement_158B7C
	waitmovement 0
	msgbox LilycoveCity_ContestLobby_Text_188BB5, 4
	playfanfare 370
	msgbox LilycoveCity_ContestLobby_Text_188C03, 4
	waitfanfare
	msgbox LilycoveCity_ContestLobby_Text_188C19, 4
	msgbox LilycoveCity_ContestLobby_Text_188C32, 4
	closemessage
	return

LilycoveCity_ContestLobby_Movement_158B64:: @ 8158B64
	step_down
	step_down
	step_down
	step_left
	step_left
	step_left
	step_left
	step_left
	step_end

LilycoveCity_ContestLobby_Movement_158B6D:: @ 8158B6D
	step_down
	step_down
	step_down
	step_down
	step_down
	step_down
	step_down
	step_down
	step_end

LilycoveCity_ContestLobby_Movement_158B76:: @ 8158B76
	step_28
	step_end

LilycoveCity_ContestLobby_Movement_158B78:: @ 8158B78
	step_down
	step_down
	step_down
	step_end

LilycoveCity_ContestLobby_Movement_158B7C:: @ 8158B7C
	step_14
	step_14
	step_14
	step_14
	step_16
	step_16
	step_16
	step_27
	step_end

LilycoveCity_ContestLobby_EventScript_158B85:: @ 8158B85
	lockall
	checkitem ITEM_CONTEST_PASS, 1
	compare RESULT, 0
	goto_if_eq LilycoveCity_ContestLobby_EventScript_158BBA
	checkflag FLAG_TEMP_2
	goto_if_eq LilycoveCity_ContestLobby_EventScript_158BAE
	message LilycoveCity_ContestLobby_Text_18848C
	waitmessage
	setflag FLAG_TEMP_2
	goto LilycoveCity_ContestLobby_EventScript_158BF0
	end

LilycoveCity_ContestLobby_EventScript_158BAE:: @ 8158BAE
	message LilycoveCity_ContestLobby_Text_188584
	waitmessage
	goto LilycoveCity_ContestLobby_EventScript_158BF0
	end

LilycoveCity_ContestLobby_EventScript_158BBA:: @ 8158BBA
	msgbox LilycoveCity_ContestLobby_Text_1A63F4, 4
	releaseall
	end

LilycoveCity_ContestLobby_EventScript_158BC4:: @ 8158BC4
	msgbox LilycoveCity_ContestLobby_Text_188521, 5
	compare RESULT, 0
	goto_if_eq LilycoveCity_ContestLobby_EventScript_158C35
	call S_DoSaveDialog
	erasebox 0, 0, 15, 9
	compare RESULT, 0
	goto_if_eq LilycoveCity_ContestLobby_EventScript_158C35
	setflag FLAG_TEMP_3
	return

LilycoveCity_ContestLobby_EventScript_158BF0:: @ 8158BF0
	multichoice 0, 0, 2, 0
	switch RESULT
	case 0, LilycoveCity_ContestLobby_EventScript_158CEA
	case 1, LilycoveCity_ContestLobby_EventScript_158C27
	case 2, LilycoveCity_ContestLobby_EventScript_158C35
	case 127, LilycoveCity_ContestLobby_EventScript_158C35
	end

LilycoveCity_ContestLobby_EventScript_158C27:: @ 8158C27
	msgbox LilycoveCity_ContestLobby_Text_1885A7, 4
	goto LilycoveCity_ContestLobby_EventScript_158B85
	end

LilycoveCity_ContestLobby_EventScript_158C35:: @ 8158C35
	msgbox LilycoveCity_ContestLobby_Text_188559, 4
	releaseall
	clearflag FLAG_TEMP_3
	end

LilycoveCity_ContestLobby_EventScript_158C42:: @ 8158C42
	msgbox LilycoveCity_ContestLobby_Text_188703, 4
	setvar CONTEST_RANK, 0
	choosecontestmon
	compare VAR_SPECIAL_4, 255
	goto_if_eq LilycoveCity_ContestLobby_EventScript_158CEA
	special sub_80C43F4
	compare RESULT, 0
	goto_if_eq LilycoveCity_ContestLobby_EventScript_158C96
	compare RESULT, 1
	goto_if_eq LilycoveCity_ContestLobby_EventScript_158CC0
	compare RESULT, 2
	goto_if_eq LilycoveCity_ContestLobby_EventScript_158CC0
	compare RESULT, 3
	goto_if_eq LilycoveCity_ContestLobby_EventScript_158CA4
	compare RESULT, 4
	goto_if_eq LilycoveCity_ContestLobby_EventScript_158CB2
	end

LilycoveCity_ContestLobby_EventScript_158C96:: @ 8158C96
	msgbox LilycoveCity_ContestLobby_Text_1A664A, 4
	goto LilycoveCity_ContestLobby_EventScript_158C42
	end

LilycoveCity_ContestLobby_EventScript_158CA4:: @ 8158CA4
	msgbox LilycoveCity_ContestLobby_Text_1A669F, 4
	goto LilycoveCity_ContestLobby_EventScript_158C42
	end

LilycoveCity_ContestLobby_EventScript_158CB2:: @ 8158CB2
	msgbox LilycoveCity_ContestLobby_Text_1A66DC, 4
	goto LilycoveCity_ContestLobby_EventScript_158C42
	end

LilycoveCity_ContestLobby_EventScript_158CC0:: @ 8158CC0
	copyvar VAR_SPECIAL_8, VAR_SPECIAL_4
	message LilycoveCity_ContestLobby_Text_1A67A3
	waitmessage
	yesnobox 20, 8
	switch RESULT
	case 0, LilycoveCity_ContestLobby_EventScript_158C42
	case 1, LilycoveCity_ContestLobby_EventScript_158D24
	end

LilycoveCity_ContestLobby_EventScript_158CEA:: @ 8158CEA
	checkflag FLAG_TEMP_3
	call_if 0, LilycoveCity_ContestLobby_EventScript_158BC4
	message LilycoveCity_ContestLobby_Text_1886DC
	waitmessage
	multichoice 0, 0, 4, 0
	switch RESULT
	case 5, LilycoveCity_ContestLobby_EventScript_158C35
	case 127, LilycoveCity_ContestLobby_EventScript_158C35
	copyvar CONTEST_CATEGORY, RESULT
	goto LilycoveCity_ContestLobby_EventScript_158C42
	end

LilycoveCity_ContestLobby_EventScript_158D24:: @ 8158D24
	message LilycoveCity_ContestLobby_Text_1887C7
	waitmessage
	copyvar VAR_SPECIAL_4, RESULT
	special sub_808363C
	waitstate
	compare RESULT, 3
	goto_if_eq LilycoveCity_ContestLobby_EventScript_158D90
	compare RESULT, 5
	goto_if_eq LilycoveCity_ContestLobby_EventScript_158DA1
	compare RESULT, 6
	goto_if_eq LilycoveCity_ContestLobby_EventScript_158DB2
	messageautoscroll LilycoveCity_ContestLobby_Text_18872A
	waitmessage
	contestlinktransfer
	switch VAR_SPECIAL_4
	case 0, LilycoveCity_ContestLobby_EventScript_158DD1
	case 1, LilycoveCity_ContestLobby_EventScript_158D82
	case 2, LilycoveCity_ContestLobby_EventScript_158DC3
	end

LilycoveCity_ContestLobby_EventScript_158D82:: @ 8158D82
	msgbox LilycoveCity_ContestLobby_Text_188750, 4
	goto LilycoveCity_ContestLobby_EventScript_158CEA
	end

LilycoveCity_ContestLobby_EventScript_158D90:: @ 8158D90
	special CloseLink
	msgbox LilycoveCity_ContestLobby_Text_18878D, 4
	closemessage
	releaseall
	clearflag FLAG_TEMP_3
	end

LilycoveCity_ContestLobby_EventScript_158DA1:: @ 8158DA1
	special CloseLink
	msgbox LilycoveCity_ContestLobby_Text_1887F4, 4
	closemessage
	releaseall
	clearflag FLAG_TEMP_3
	end

LilycoveCity_ContestLobby_EventScript_158DB2:: @ 8158DB2
	special CloseLink
	msgbox LilycoveCity_ContestLobby_Text_18881F, 4
	closemessage
	releaseall
	clearflag FLAG_TEMP_3
	end

LilycoveCity_ContestLobby_EventScript_158DC3:: @ 8158DC3
	msgbox LilycoveCity_ContestLobby_Text_18873A, 4
	goto LilycoveCity_ContestLobby_EventScript_158CEA
	end

LilycoveCity_ContestLobby_EventScript_158DD1:: @ 8158DD1
	special sub_80C496C
	addvar VAR_SPECIAL_4, 1
	buffernumberstring 1, 32772
	messageautoscroll LilycoveCity_ContestLobby_Text_188845
	waitmessage
	addvar VAR_SPECIAL_4, 65535
	goto LilycoveCity_ContestLobby_EventScript_158DEE
	end

LilycoveCity_ContestLobby_EventScript_158DEE:: @ 8158DEE
	call LilycoveCity_ContestLobby_EventScript_158E0B
	setvar VAR_LINK_CONTEST_ROOM_STATE, 1
	special sub_80C4F70
	setvar VAR_CONTEST_LOCATION, 5
	setvar CONTEST_RANK, 3
	call LilycoveCity_ContestLobby_EventScript_158F08
	end

LilycoveCity_ContestLobby_EventScript_158E0B:: @ 8158E0B
	lockall
	messageautoscroll LilycoveCity_ContestLobby_Text_1888C6
	waitmessage
	delay 20
	closemessage
	applymovement 2, LilycoveCity_ContestLobby_Movement_158E9C
	waitmovement 0
	playse 71
	setmetatile 9, 2, 545, 1
	setmetatile 9, 3, 609, 1
	special DrawWholeMapView
	applymovement 2, LilycoveCity_ContestLobby_Movement_158EA0
	waitmovement 0
	playse 71
	setmetatile 9, 2, 721, 1
	setmetatile 9, 3, 729, 1
	special DrawWholeMapView
	delay 20
	applymovement 2, LilycoveCity_ContestLobby_Movement_158EAE
	waitmovement 0
	applymovement 255, LilycoveCity_ContestLobby_Movement_158E99
	waitmovement 0
	messageautoscroll LilycoveCity_ContestLobby_Text_1A6832
	waitmessage
	delay 20
	closemessage
	applymovement 2, LilycoveCity_ContestLobby_Movement_158EA4
	applymovement 255, LilycoveCity_ContestLobby_Movement_158E8E
	waitmovement 0
	releaseall
	return

LilycoveCity_ContestLobby_Movement_158E8E:: @ 8158E8E
	step_right
	step_right
	step_right
	step_right
	step_right
	step_up
	step_up
	step_up
	step_13
	step_54
	step_end

LilycoveCity_ContestLobby_Movement_158E99:: @ 8158E99
	step_28
	step_right
	step_end

LilycoveCity_ContestLobby_Movement_158E9C:: @ 8158E9C
	step_right
	step_right
	step_25
	step_end

LilycoveCity_ContestLobby_Movement_158EA0:: @ 8158EA0
	step_down
	step_down
	step_26
	step_end

LilycoveCity_ContestLobby_Movement_158EA4:: @ 8158EA4
	step_right
	step_right
	step_right
	step_right
	step_up
	step_up
	step_up
	step_13
	step_54
	step_end

LilycoveCity_ContestLobby_Movement_158EAE:: @ 8158EAE
	step_27
	step_end

LilycoveCity_ContestLobby_EventScript_158EB0:: @ 8158EB0
	specialvar RESULT, sub_80C5044
	compare RESULT, 1
	goto_if_eq LilycoveCity_ContestLobby_EventScript_158EE8
	setvar VAR_SPECIAL_B, 8
	setvar CONTEST_RANK, 3
	call LilycoveCity_ContestLobby_EventScript_1A4E92
	call LilycoveCity_ContestLobby_EventScript_158F86
	special SetContestTrainerGfxIds
	call LilycoveCity_ContestLobby_EventScript_15FBDB
	setvar VAR_CONTEST_LOCATION, 4
	call LilycoveCity_ContestLobby_EventScript_158F08
	waitstate
	end

LilycoveCity_ContestLobby_EventScript_158EE8:: @ 8158EE8
	setflag FLAG_HIDE_LILYCOVE_MUSEUM_CURATOR
	copyvar VAR_LILYCOVE_MUSEUM_2F_STATE, 0x1
	giveitem ITEM_CONTEST_PASS, 1
	setvar VAR_SPECIAL_B, 8
	setvar CONTEST_RANK, 3
	setvar VAR_LILYCOVE_CONTEST_LOBBY_STATE, 1
	setflag FLAG_SYS_RIBBON_GET
	end

LilycoveCity_ContestLobby_EventScript_158F08:: @ 8158F08
	switch CONTEST_CATEGORY
	case 0, LilycoveCity_ContestLobby_EventScript_158F45
	case 1, LilycoveCity_ContestLobby_EventScript_158F52
	case 2, LilycoveCity_ContestLobby_EventScript_158F5F
	case 3, LilycoveCity_ContestLobby_EventScript_158F6C
	case 4, LilycoveCity_ContestLobby_EventScript_158F79
	return

LilycoveCity_ContestLobby_EventScript_158F45:: @ 8158F45
	setwarp MAP_LINK_CONTEST_ROOM4, 255, 7, 5
	special sub_8081334
	waitstate
	return

LilycoveCity_ContestLobby_EventScript_158F52:: @ 8158F52
	setwarp MAP_LINK_CONTEST_ROOM2, 255, 7, 5
	special sub_8081334
	waitstate
	return

LilycoveCity_ContestLobby_EventScript_158F5F:: @ 8158F5F
	setwarp MAP_LINK_CONTEST_ROOM6, 255, 7, 5
	special sub_8081334
	waitstate
	return

LilycoveCity_ContestLobby_EventScript_158F6C:: @ 8158F6C
	setwarp MAP_LINK_CONTEST_ROOM5, 255, 7, 5
	special sub_8081334
	waitstate
	return

LilycoveCity_ContestLobby_EventScript_158F79:: @ 8158F79
	setwarp MAP_LINK_CONTEST_ROOM3, 255, 7, 5
	special sub_8081334
	waitstate
	return

LilycoveCity_ContestLobby_EventScript_158F86:: @ 8158F86
	lockall
	applymovement 1, LilycoveCity_ContestLobby_Movement_15900B
	waitmovement 0
	playse 71
	setmetatile 4, 2, 545, 1
	setmetatile 4, 3, 609, 1
	special DrawWholeMapView
	applymovement 1, LilycoveCity_ContestLobby_Movement_15900F
	waitmovement 0
	playse 71
	setmetatile 4, 2, 721, 1
	setmetatile 4, 3, 729, 1
	special DrawWholeMapView
	delay 20
	applymovement 1, LilycoveCity_ContestLobby_Movement_15901C
	waitmovement 0
	applymovement 255, LilycoveCity_ContestLobby_Movement_159008
	waitmovement 0
	msgbox LilycoveCity_ContestLobby_Text_1A6832, 4
	closemessage
	applymovement 1, LilycoveCity_ContestLobby_Movement_159013
	applymovement 255, LilycoveCity_ContestLobby_Movement_158FFE
	waitmovement 0
	releaseall
	return

LilycoveCity_ContestLobby_Movement_158FFE:: @ 8158FFE
	step_left
	step_left
	step_left
	step_left
	step_up
	step_up
	step_up
	step_13
	step_54
	step_end

LilycoveCity_ContestLobby_Movement_159008:: @ 8159008
	step_27
	step_left
	step_end

LilycoveCity_ContestLobby_Movement_15900B:: @ 815900B
	step_left
	step_left
	step_25
	step_end

LilycoveCity_ContestLobby_Movement_15900F:: @ 815900F
	step_down
	step_down
	step_26
	step_end

LilycoveCity_ContestLobby_Movement_159013:: @ 8159013
	step_left
	step_left
	step_left
	step_up
	step_up
	step_up
	step_13
	step_54
	step_end

LilycoveCity_ContestLobby_Movement_15901C:: @ 815901C
	step_28
	step_end

LilycoveCity_ContestLobby_EventScript_15901E:: @ 815901E
	msgbox LilycoveCity_ContestLobby_Text_188D3C, 2
	end

LilycoveCity_ContestLobby_EventScript_159027:: @ 8159027
	checkflag FLAG_RECEIVED_CONTEST_PASS
	goto_if 0, LilycoveCity_ContestLobby_EventScript_159039
	msgbox LilycoveCity_ContestLobby_Text_188DDA, 2
	end

LilycoveCity_ContestLobby_EventScript_159039:: @ 8159039
	msgbox LilycoveCity_ContestLobby_Text_188E47, 2
	end

LilycoveCity_ContestLobby_EventScript_159042:: @ 8159042
	msgbox LilycoveCity_ContestLobby_Text_188F07, 2
	end

LilycoveCity_ContestLobby_EventScript_15904B:: @ 815904B
	msgbox LilycoveCity_ContestLobby_Text_188F81, 2
	end

LilycoveCity_ContestLobby_EventScript_159054:: @ 8159054
	msgbox LilycoveCity_ContestLobby_Text_188FE3, 2
	end

LilycoveCity_ContestLobby_EventScript_15905D:: @ 815905D
	msgbox LilycoveCity_ContestLobby_Text_18904D, 2
	end

LilycoveCity_ContestLobby_EventScript_159066:: @ 8159066
	lockall
	fadescreen 1
	drawcontestwinner 6
	releaseall
	end

LilycoveCity_ContestLobby_EventScript_15906D:: @ 815906D
	lockall
	fadescreen 1
	drawcontestwinner 7
	releaseall
	end

LilycoveCity_ContestLobby_EventScript_159074:: @ 8159074
	lockall
	fadescreen 1
	drawcontestwinner 8
	releaseall
	end

LilycoveCity_ContestLobby_EventScript_15907B:: @ 815907B
	msgbox LilycoveCity_ContestLobby_Text_1B7225, 2
	end

LilycoveCity_ContestLobby_EventScript_159084:: @ 8159084
	msgbox LilycoveCity_ContestLobby_Text_1B7241, 2
	end

LilycoveCity_ContestLobby_EventScript_15908D:: @ 815908D
SlateportCity_ContestLobby_EventScript_15908D:: @ 815908D
	lockall
	special ShowBerryBlenderRecordWindow
	waitbuttonpress
	erasebox 0, 0, 29, 19
	releaseall
	end