summaryrefslogtreecommitdiff
path: root/data/maps/CinnabarIsland/scripts.inc
blob: 2ebce51b7ad0fc5aeb7a47911af7fe2ebfec0e9e (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
CinnabarIsland_MapScripts:: @ 8166ED6
	map_script 3, CinnabarIsland_MapScript1_166EE1
	map_script 2, CinnabarIsland_MapScript2_166F6E
	.byte 0

CinnabarIsland_MapScript1_166EE1:: @ 8166EE1
	setworldmapflag FLAG_WORLD_MAP_CINNABAR_ISLAND
	call EventScript_166F5E
	compare_var_to_value VAR_MAP_SCENE_CINNABAR_ISLAND, 1
	call_if eq, EventScript_166F24
	compare_var_to_value VAR_MAP_SCENE_CINNABAR_ISLAND, 3
	call_if eq, EventScript_166F52
	compare_var_to_value VAR_MAP_SCENE_CINNABAR_ISLAND_2, 1
	call_if eq, EventScript_166F0B
	end

EventScript_166F0B:: @ 8166F0B
	savebgm MUS_ANNAI
	setflag FLAG_TEMP_2
	setobjectxyperm 3, 15, 12
	setobjectmovementtype 3, 9
	setobjectxyperm 4, 30, 12
	return

EventScript_166F24:: @ 8166F24
	getplayerxy VAR_0x8004, VAR_0x8005
	compare_var_to_value VAR_0x8004, 18
	goto_if ge, EventScript_166F4A
	setflag FLAG_TEMP_2
	setobjectxyperm 3, 18, 12
	setobjectmovementtype 3, 7
	setobjectxyperm 4, 30, 12
	return

EventScript_166F4A:: @ 8166F4A
	setobjectxyperm 4, 30, 8
	return

EventScript_166F52:: @ 8166F52
	setobjectxyperm 3, 21, 8
	setobjectmovementtype 3, 7
	return

EventScript_166F5E:: @ 8166F5E
	checkflag FLAG_HIDE_POKEMON_MANSION_B1F_SECRET_KEY
	goto_if TRUE, EventScript_166F68
	return

EventScript_166F68:: @ 8166F68
	setvar VAR_0x4001, 1
	return

CinnabarIsland_MapScript2_166F6E:: @ 8166F6E
	map_script_2 VAR_MAP_SCENE_CINNABAR_ISLAND_2, 1, EventScript_166F88
	map_script_2 VAR_MAP_SCENE_CINNABAR_ISLAND, 1, EventScript_166FCD
	map_script_2 VAR_MAP_SCENE_CINNABAR_ISLAND, 3, EventScript_166FA0
	.2byte 0

EventScript_166F88:: @ 8166F88
	lockall
	clearflag FLAG_SPECIAL_FLAG_0x4001
	savebgm MUS_DUMMY
	textcolor 0
	setvar VAR_MAP_SCENE_CINNABAR_ISLAND_2, 2
	delay 20
	call EventScript_1670E6
	releaseall
	end

EventScript_166FA0:: @ 8166FA0
	lockall
	textcolor 0
	msgbox gUnknown_8180F09
	closemessage
	applymovement 3, Movement_166FC6
	waitmovement 0
	removeobject 3
	setvar VAR_MAP_SCENE_CINNABAR_ISLAND, 4
	setflag FLAG_HIDE_TWO_ISLAND_GAME_CORNER_LOSTELLE
	clearflag FLAG_HIDE_LOSTELLE_IN_HER_HOME
	releaseall
	end

Movement_166FC6:: @ 8166FC6
	step_10
	step_10
	step_10
	step_10
	step_10
	step_10
	step_end

EventScript_166FCD:: @ 8166FCD
	lockall
	textcolor 0
	checkflag FLAG_TEMP_2
	call_if FALSE, EventScript_167032
	checkflag FLAG_TEMP_2
	call_if TRUE, EventScript_16703D
	playse SE_PIN
	applymovement 3, Movement_1A75DB
	waitmovement 0
	applymovement 3, Movement_1A75DD
	waitmovement 0
	checkflag FLAG_TEMP_2
	call_if FALSE, EventScript_167048
	checkflag FLAG_TEMP_2
	call_if TRUE, EventScript_167053
	msgbox gUnknown_8180C90
	msgbox gUnknown_8180CAA, MSGBOX_YESNO
	compare_var_to_value VAR_RESULT, 1
	goto_if eq, EventScript_167068
	compare_var_to_value VAR_RESULT, 0
	goto_if eq, EventScript_167078
	end

EventScript_167032:: @ 8167032
	applymovement 3, Movement_1A75E9
	waitmovement 0
	return

EventScript_16703D:: @ 816703D
	applymovement 3, Movement_1A75E7
	waitmovement 0
	return

EventScript_167048:: @ 8167048
	applymovement 3, Movement_1671A4
	waitmovement 0
	return

EventScript_167053:: @ 8167053
	applymovement 3, Movement_1671A6
	waitmovement 0
	applymovement 255, Movement_1A75EB
	waitmovement 0
	return

EventScript_167068:: @ 8167068
	msgbox gUnknown_8180DDD
	closemessage
	call EventScript_1670E6
	releaseall
	end

EventScript_167078:: @ 8167078
	msgbox gUnknown_8180DF8
	closemessage
	checkflag FLAG_TEMP_2
	call_if FALSE, EventScript_1670A0
	checkflag FLAG_TEMP_2
	call_if TRUE, EventScript_1670B3
	removeobject 3
	setvar VAR_MAP_SCENE_CINNABAR_ISLAND, 2
	clearflag FLAG_HIDE_CINNABAR_POKECENTER_BILL
	releaseall
	end

EventScript_1670A0:: @ 81670A0
	applymovement 3, Movement_1670AB
	waitmovement 0
	return

Movement_1670AB:: @ 81670AB
	step_13
	step_10
	step_10
	step_10
	step_10
	step_10
	step_10
	step_end

EventScript_1670B3:: @ 81670B3
	applymovement 255, Movement_1670DB
	applymovement 3, Movement_1670DE
	waitmovement 0
	opendoor 14, 11
	waitdooranim
	applymovement 3, Movement_1670E2
	waitmovement 0
	closedoor 14, 11
	waitdooranim
	return

Movement_1670DB:: @ 81670DB
	step_12
	step_30
	step_end

Movement_1670DE:: @ 81670DE
	step_1c
	step_12
	step_2e
	step_end

Movement_1670E2:: @ 81670E2
	step_11
	step_1a
	step_60
	step_end

EventScript_1670E6:: @ 81670E6
	checkflag FLAG_TEMP_2
	call_if TRUE, EventScript_167142
	addobject 4
	checkflag FLAG_TEMP_2
	call_if FALSE, EventScript_167154
	checkflag FLAG_TEMP_2
	call_if TRUE, EventScript_167166
	msgbox gUnknown_8180EAD
	closemessage
	checkflag FLAG_TEMP_2
	call_if FALSE, EventScript_167171
	checkflag FLAG_TEMP_2
	call_if TRUE, EventScript_167183
	setvar VAR_MAP_SCENE_CINNABAR_ISLAND, 2
	removeobject 3
	delay 40
	setflag FLAG_HIDE_CINNABAR_SEAGALLOP
	setvar VAR_MAP_SCENE_ONE_ISLAND_HARBOR, 1
	setvar VAR_0x8004, SEAGALLOP_CINNABAR_ISLAND
	setvar VAR_0x8006, SEAGALLOP_ONE_ISLAND
	goto EventScript_1A90DA
	end

EventScript_167142:: @ 8167142
	applymovement 3, Movement_1671AF
	applymovement 255, Movement_1671AF
	waitmovement 0
	return

EventScript_167154:: @ 8167154
	applymovement 3, Movement_1671AA
	applymovement 4, Movement_167195
	waitmovement 0
	return

EventScript_167166:: @ 8167166
	applymovement 4, Movement_167195
	waitmovement 0
	return

EventScript_167171:: @ 8167171
	applymovement 3, Movement_16719D
	applymovement 255, Movement_1671BA
	waitmovement 0
	return

EventScript_167183:: @ 8167183
	applymovement 3, Movement_1671B6
	applymovement 255, Movement_1671C4
	waitmovement 0
	return

Movement_167195:: @ 8167195
	step_1c
	step_1c
	step_1f
	step_1f
	step_12
	step_left
	step_left
	step_end

Movement_16719D:: @ 816719D
	step_13
	step_10
	step_10
	step_13
	step_1a
	step_60
	step_end

Movement_1671A4:: @ 81671A4
	step_11
	step_end

Movement_1671A6:: @ 81671A6
	step_12
	step_12
	step_12
	step_end

Movement_1671AA:: @ 81671AA
	step_1c
	step_1c
	step_1b
	step_30
	step_end

Movement_1671AF:: @ 81671AF
	step_13
	step_13
	step_13
	step_13
	step_13
	step_13
	step_end

Movement_1671B6:: @ 81671B6
	step_13
	step_1a
	step_60
	step_end

Movement_1671BA:: @ 81671BA
	step_10
	step_13
	step_10
	step_10
	step_30
	step_1a
	step_13
	step_1a
	step_60
	step_end

Movement_1671C4:: @ 81671C4
	step_13
	step_1a
	step_13
	step_1a
	step_60
	step_end

CinnabarIsland_EventScript_1671CA:: @ 81671CA
	lockall
	applymovement 255, Movement_1A75E9
	waitmovement 0
	delay 20
	msgbox gUnknown_8180B20
	closemessage
	applymovement 255, Movement_1671ED
	waitmovement 0
	releaseall
	end

Movement_1671ED:: @ 81671ED
	step_10
	step_end

CinnabarIsland_EventScript_1671EF:: @ 81671EF
	lock
	faceplayer
	famechecker FAMECHECKER_BLAINE, 3
	msgbox gUnknown_8180B34
	release
	end

CinnabarIsland_EventScript_167208:: @ 8167208
	msgbox gUnknown_8180BA0, 2
	end

CinnabarIsland_EventScript_167211:: @ 8167211
	msgbox gUnknown_8180C0D, 3
	end

CinnabarIsland_EventScript_16721A:: @ 816721A
	msgbox gUnknown_8180C3E, 3
	end

CinnabarIsland_EventScript_167223:: @ 8167223
	lockall
	famechecker FAMECHECKER_BLAINE, 0
	msgbox gUnknown_8180C4A
	releaseall
	end