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
|
SkyPillar_Top_MapScripts:: @ 82396B8
map_script MAP_SCRIPT_ON_RESUME, SkyPillar_Top_MapScript1_2396C8
map_script MAP_SCRIPT_ON_TRANSITION, SkyPillar_Top_MapScript1_2396E6
map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, SkyPillar_Top_MapScript2_239713
.byte 0
SkyPillar_Top_MapScript1_2396C8: @ 82396C8
call_if_set FLAG_SYS_CTRL_OBJ_DELETE, SkyPillar_Top_EventScript_2396D2
end
SkyPillar_Top_EventScript_2396D2:: @ 82396D2
specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, 7
goto_if_ne Common_EventScript_NopReturn
removeobject VAR_LAST_TALKED
return
SkyPillar_Top_MapScript1_2396E6: @ 82396E6
compare VAR_SKY_PILLAR_STATE, 2
call_if_lt SkyPillar_Top_EventScript_2396FD
compare VAR_SKY_PILLAR_STATE, 2
call_if_ge SkyPillar_Top_EventScript_239705
end
SkyPillar_Top_EventScript_2396FD:: @ 82396FD
setmaplayoutindex LAYOUT_SKY_PILLAR_TOP_CLEAN
setobjectmovementtype 1, MOVEMENT_TYPE_FACE_DOWN
return
SkyPillar_Top_EventScript_239705:: @ 8239705
call_if_unset FLAG_DEFEATED_RAYQUAZA, SkyPillar_Top_EventScript_23970F
return
SkyPillar_Top_EventScript_23970F:: @ 823970F
clearflag FLAG_RAYQUAZA_ON_SKY_TOWER_SUMMIT
return
SkyPillar_Top_MapScript2_239713: @ 8239713
map_script_2 VAR_SKY_PILLAR_STATE, 0, SkyPillar_Top_EventScript_23971D
.2byte 0
SkyPillar_Top_EventScript_23971D:: @ 823971D
turnobject 1, 1
end
SkyPillar_Top_EventScript_239722:: @ 8239722
lockall
waitse
playmoncry SPECIES_RAYQUAZA, 2
delay 40
waitmoncry
setwildbattle SPECIES_RAYQUAZA, 70, ITEM_NONE
setflag FLAG_SYS_CTRL_OBJ_DELETE
special BattleSetup_StartLegendaryBattle
waitstate
clearflag FLAG_SYS_CTRL_OBJ_DELETE
specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, 1
goto_if_eq SkyPillar_Top_EventScript_239768
compare VAR_RESULT, 4
goto_if_eq SkyPillar_Top_EventScript_239771
compare VAR_RESULT, 5
goto_if_eq SkyPillar_Top_EventScript_239771
setflag FLAG_DEFEATED_RAYQUAZA
releaseall
end
SkyPillar_Top_EventScript_239768:: @ 8239768
setflag FLAG_DEFEATED_RAYQUAZA
goto SkyPillar_Top_EventScript_23977C
end
SkyPillar_Top_EventScript_239771:: @ 8239771
setvar VAR_0x8004, 406
goto SkyPillar_Top_EventScript_239785
end
SkyPillar_Top_EventScript_23977C:: @ 823977C
fadescreenswapbuffers 1
removeobject VAR_LAST_TALKED
fadescreenswapbuffers 0
releaseall
end
SkyPillar_Top_EventScript_239785:: @ 8239785
fadescreenswapbuffers 1
removeobject VAR_LAST_TALKED
fadescreenswapbuffers 0
bufferspeciesname 0, VAR_0x8004
msgbox gText_LegendaryFlewAway, MSGBOX_DEFAULT
releaseall
end
SkyPillar_Top_EventScript_23979A:: @ 823979A
lockall
fadeoutbgm 1
applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_FaceUp
waitmovement 0
special SpawnCameraObject
applymovement EVENT_OBJ_ID_CAMERA, SkyPillar_Top_Movement_239858
waitmovement 0
special RemoveCameraObject
applymovement 1, SkyPillar_Top_Movement_23983A
waitmovement 0
waitse
playmoncry SPECIES_RAYQUAZA, 2
setvar VAR_0x8004, 1
setvar VAR_0x8005, 1
setvar VAR_0x8006, 8
setvar VAR_0x8007, 3
special sub_8139560
waitstate
waitse
playmoncry SPECIES_RAYQUAZA, 2
setvar VAR_0x8004, 1
setvar VAR_0x8005, 2
setvar VAR_0x8006, 8
setvar VAR_0x8007, 5
special sub_8139560
waitstate
waitmoncry
applymovement 1, SkyPillar_Top_Movement_23984B
waitmovement 0
removeobject 1
msgbox SkyPillar_Top_Text_239860, MSGBOX_DEFAULT
closemessage
delay 20
fadeinbgm 1
special SpawnCameraObject
applymovement EVENT_OBJ_ID_CAMERA, SkyPillar_Top_Movement_23985C
waitmovement 0
special RemoveCameraObject
setvar VAR_RAYQUAZA_STATE, 5
setvar VAR_SKY_PILLAR_STATE, 1
setvar VAR_SKY_PILLAR_RAQUAZA_CRY_DONE, 1
releaseall
end
SkyPillar_Top_Movement_23983A: @ 823983A
delay_16
walk_in_place_fast_left
delay_16
delay_16
delay_16
delay_16
delay_16
walk_in_place_left
delay_16
walk_in_place_right
delay_16
delay_16
delay_16
delay_16
delay_16
delay_16
step_end
SkyPillar_Top_Movement_23984B: @ 823984B
delay_16
walk_in_place_down
delay_8
walk_in_place_right
delay_8
walk_fastest_up
slide_up
slide_up
slide_up
slide_up
slide_up
slide_up
step_end
SkyPillar_Top_Movement_239858: @ 8239858
walk_slow_up
walk_slow_up
walk_slow_up
step_end
SkyPillar_Top_Movement_23985C: @ 823985C
walk_slow_down
walk_slow_down
walk_slow_down
step_end
SkyPillar_Top_Text_239860: @ 8239860
.string "The awakened RAYQUAZA flew off…$"
|