summaryrefslogtreecommitdiff
path: root/data/scripts/pokeblocks.inc
blob: 8d4a92cf4bb3f674b1d635eaa332133501439a15 (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
FallarborTown_ContestLobby_EventScript_1B7604:: @ 81B7604
	setvar VAR_0x8008, 4
	setvar VAR_0x8009, 1
	applymovement VAR_0x8008, FallarborTown_ContestLobby_Movement_1B7821
	waitmovement 0
	goto FallarborTown_ContestLobby_EventScript_1B7681
	end

SlateportCity_ContestLobby_EventScript_1B761E:: @ 81B761E
	setvar VAR_0x8008, 2
	setvar VAR_0x8009, 2
	applymovement 6, Common_Movement_FaceOriginalDirection
	applymovement VAR_0x8008, SlateportCity_ContestLobby_Movement_1B7821
	waitmovement 0
	goto SlateportCity_ContestLobby_EventScript_1B7681
	end

VerdanturfTown_ContestLobby_EventScript_1B763F:: @ 81B763F
	setvar VAR_0x8008, 2
	setvar VAR_0x8009, 1
	applymovement VAR_0x8008, VerdanturfTown_ContestLobby_Movement_1B7821
	waitmovement 0
	goto VerdanturfTown_ContestLobby_EventScript_1B7681
	end

LilycoveCity_ContestLobby_EventScript_1B7659:: @ 81B7659
	setvar VAR_0x8008, 3
	setvar VAR_0x8009, 3
	applymovement 9, Common_Movement_FaceOriginalDirection
	applymovement 10, Common_Movement_FaceOriginalDirection
	applymovement VAR_0x8008, LilycoveCity_ContestLobby_Movement_1B7821
	waitmovement 0
	goto LilycoveCity_ContestLobby_EventScript_1B7681
	end

FallarborTown_ContestLobby_EventScript_1B7681:: @ 81B7681
LilycoveCity_ContestLobby_EventScript_1B7681:: @ 81B7681
SlateportCity_ContestLobby_EventScript_1B7681:: @ 81B7681
VerdanturfTown_ContestLobby_EventScript_1B7681:: @ 81B7681
	lockall
	msgbox FallarborTown_ContestLobby_Text_1B6E63, MSGBOX_YESNO
	compare VAR_RESULT, YES
	goto_if_eq FallarborTown_ContestLobby_EventScript_1B76A1
	compare VAR_RESULT, NO
	goto_if_eq FallarborTown_ContestLobby_EventScript_1B76E5
	end

FallarborTown_ContestLobby_EventScript_1B76A1:: @ 81B76A1
	checkitem ITEM_POKEBLOCK_CASE, 1
	compare VAR_RESULT, 0
	goto_if_eq FallarborTown_ContestLobby_EventScript_1B7780
	specialvar VAR_RESULT, PlayerHasBerries
	compare VAR_RESULT, 0
	goto_if_eq FallarborTown_ContestLobby_EventScript_1B770E
	msgbox FallarborTown_ContestLobby_Text_1B6E9D, MSGBOX_DEFAULT
	specialvar VAR_RESULT, GetFirstFreePokeblockSlot
	compare VAR_RESULT, -1
	goto_if_ne FallarborTown_ContestLobby_EventScript_1B76EF
	compare VAR_RESULT, -1
	goto_if_eq FallarborTown_ContestLobby_EventScript_1B7776
	end

FallarborTown_ContestLobby_EventScript_1B76E5:: @ 81B76E5
	msgbox FallarborTown_ContestLobby_Text_1B6EA8, MSGBOX_DEFAULT
	releaseall
	end

FallarborTown_ContestLobby_EventScript_1B76EF:: @ 81B76EF
	msgbox FallarborTown_ContestLobby_Text_1B6ED0, MSGBOX_YESNO
	compare VAR_RESULT, YES
	goto_if_eq FallarborTown_ContestLobby_EventScript_1B7734
	compare VAR_RESULT, NO
	goto_if_eq FallarborTown_ContestLobby_EventScript_1B7726
	end

FallarborTown_ContestLobby_EventScript_1B770E:: @ 81B770E
	msgbox FallarborTown_ContestLobby_Text_1B6FF0, MSGBOX_DEFAULT
	dotimebasedevents
	goto_if_set FLAG_DAILY_RECEIVED_BERRY_FALLARBOR, FallarborTown_ContestLobby_EventScript_1B774F
	goto FallarborTown_ContestLobby_EventScript_1B7759
	end

FallarborTown_ContestLobby_EventScript_1B7726:: @ 81B7726
	msgbox FallarborTown_ContestLobby_Text_1B6F1F, MSGBOX_DEFAULT
	goto FallarborTown_ContestLobby_EventScript_1B7734
	end

FallarborTown_ContestLobby_EventScript_1B7734:: @ 81B7734
	msgbox FallarborTown_ContestLobby_Text_1B6EF1, MSGBOX_DEFAULT
	goto FallarborTown_ContestLobby_EventScript_1B7742
	end

FallarborTown_ContestLobby_EventScript_1B7742:: @ 81B7742
	copyvar VAR_0x8004, VAR_0x8009
	fadescreen FADE_TO_BLACK
	special DoBerryBlending
	waitstate
	releaseall
	end

FallarborTown_ContestLobby_EventScript_1B774F:: @ 81B774F
	msgbox FallarborTown_ContestLobby_Text_1B70F6, MSGBOX_DEFAULT
	releaseall
	end

FallarborTown_ContestLobby_EventScript_1B7759:: @ 81B7759
	msgbox FallarborTown_ContestLobby_Text_1B704A, MSGBOX_DEFAULT
	giveitem ITEM_PECHA_BERRY
	setflag FLAG_DAILY_RECEIVED_BERRY_FALLARBOR
	goto FallarborTown_ContestLobby_EventScript_1B76EF
	end

FallarborTown_ContestLobby_EventScript_1B7776:: @ 81B7776
	msgbox FallarborTown_ContestLobby_Text_1B717C, MSGBOX_DEFAULT
	releaseall
	end

FallarborTown_ContestLobby_EventScript_1B7780:: @ 81B7780
	msgbox FallarborTown_ContestLobby_Text_1B71D2, MSGBOX_DEFAULT
	releaseall
	end

FallarborTown_ContestLobby_EventScript_1B778A:: @ 81B778A
	setvar VAR_0x8008, 4
	goto FallarborTown_ContestLobby_EventScript_1B77B6
	end

SlateportCity_ContestLobby_EventScript_1B7795:: @ 81B7795
	setvar VAR_0x8008, 2
	goto SlateportCity_ContestLobby_EventScript_1B77B6
	end

VerdanturfTown_ContestLobby_EventScript_1B77A0:: @ 81B77A0
	setvar VAR_0x8008, 2
	goto VerdanturfTown_ContestLobby_EventScript_1B77B6
	end

LilycoveCity_ContestLobby_EventScript_1B77AB:: @ 81B77AB
	setvar VAR_0x8008, 3
	goto LilycoveCity_ContestLobby_EventScript_1B77B6
	end

FallarborTown_ContestLobby_EventScript_1B77B6:: @ 81B77B6
LilycoveCity_ContestLobby_EventScript_1B77B6:: @ 81B77B6
SlateportCity_ContestLobby_EventScript_1B77B6:: @ 81B77B6
VerdanturfTown_ContestLobby_EventScript_1B77B6:: @ 81B77B6
	lock
	faceplayer
	msgbox FallarborTown_ContestLobby_Text_1B742F, MSGBOX_DEFAULT
	specialvar VAR_RESULT, PlayerHasBerries
	compare VAR_RESULT, 1
	goto_if_eq FallarborTown_ContestLobby_EventScript_1B77DC
	compare VAR_RESULT, 0
	goto_if_eq FallarborTown_ContestLobby_EventScript_1B77E6
	end

FallarborTown_ContestLobby_EventScript_1B77DC:: @ 81B77DC
	msgbox FallarborTown_ContestLobby_Text_1B7469, MSGBOX_DEFAULT
	release
	end

FallarborTown_ContestLobby_EventScript_1B77E6:: @ 81B77E6
	dotimebasedevents
	goto_if_set FLAG_DAILY_RECEIVED_BERRY_FALLARBOR, FallarborTown_ContestLobby_EventScript_1B77F6
	goto FallarborTown_ContestLobby_EventScript_1B7800
	end

FallarborTown_ContestLobby_EventScript_1B77F6:: @ 81B77F6
	msgbox FallarborTown_ContestLobby_Text_1B7578, MSGBOX_DEFAULT
	release
	end

FallarborTown_ContestLobby_EventScript_1B7800:: @ 81B7800
	msgbox FallarborTown_ContestLobby_Text_1B74B4, MSGBOX_DEFAULT
	giveitem ITEM_PECHA_BERRY
	setflag FLAG_DAILY_RECEIVED_BERRY_FALLARBOR
	msgbox FallarborTown_ContestLobby_Text_1B753A, MSGBOX_DEFAULT
	release
	end

FallarborTown_ContestLobby_Movement_1B7821:: @ 81B7821
LilycoveCity_ContestLobby_Movement_1B7821:: @ 81B7821
SlateportCity_ContestLobby_Movement_1B7821:: @ 81B7821
VerdanturfTown_ContestLobby_Movement_1B7821:: @ 81B7821
	walk_in_place_fastest_right
	step_end

FallarborTown_ContestLobby_EventScript_1B7823:: @ 81B7823
	goto FallarborTown_ContestLobby_EventScript_1B783B
	end

SlateportCity_ContestLobby_EventScript_1B7829:: @ 81B7829
	goto SlateportCity_ContestLobby_EventScript_1B783B
	end

VerdanturfTown_ContestLobby_EventScript_1B782F:: @ 81B782F
	goto VerdanturfTown_ContestLobby_EventScript_1B783B
	end

LilycoveCity_ContestLobby_EventScript_1B7835:: @ 81B7835
	goto LilycoveCity_ContestLobby_EventScript_1B783B
	end

FallarborTown_ContestLobby_EventScript_1B783B:: @ 81B783B
LilycoveCity_ContestLobby_EventScript_1B783B:: @ 81B783B
SlateportCity_ContestLobby_EventScript_1B783B:: @ 81B783B
VerdanturfTown_ContestLobby_EventScript_1B783B:: @ 81B783B
	lockall
	specialvar VAR_RESULT, PlayerHasBerries
	compare VAR_RESULT, 0
	goto_if_eq FallarborTown_ContestLobby_EventScript_1B7897
	checkitem ITEM_POKEBLOCK_CASE, 1
	compare VAR_RESULT, 0
	goto_if_eq FallarborTown_ContestLobby_EventScript_1B7942
	specialvar VAR_RESULT, GetFirstFreePokeblockSlot
	compare VAR_RESULT, -1
	goto_if_ne FallarborTown_ContestLobby_EventScript_1B7878
	compare VAR_RESULT, -1
	goto_if_eq FallarborTown_ContestLobby_EventScript_1B7938
	end

FallarborTown_ContestLobby_EventScript_1B7878:: @ 81B7878
	msgbox FallarborTown_ContestLobby_Text_1B727C, MSGBOX_YESNO
	compare VAR_RESULT, YES
	goto_if_eq FallarborTown_ContestLobby_EventScript_1B78A1
	compare VAR_RESULT, NO
	goto_if_eq FallarborTown_ContestLobby_EventScript_1B7936
	end

FallarborTown_ContestLobby_EventScript_1B7897:: @ 81B7897
	msgbox FallarborTown_ContestLobby_Text_1B7381, MSGBOX_DEFAULT
	releaseall
	end

FallarborTown_ContestLobby_EventScript_1B78A1:: @ 81B78A1
	call Common_EventScript_SaveGame
	compare VAR_RESULT, 0
	goto_if_eq FallarborTown_ContestLobby_EventScript_1B7936
	message FallarborTown_ContestLobby_Text_1B7304
	waitmessage
	special sub_8083614
	waitstate
	compare VAR_RESULT, 1
	goto_if_eq FallarborTown_ContestLobby_EventScript_1B7980
	compare VAR_RESULT, 2
	goto_if_eq FallarborTown_ContestLobby_EventScript_1B794C
	compare VAR_RESULT, 3
	goto_if_eq FallarborTown_ContestLobby_EventScript_1B7959
	compare VAR_RESULT, 5
	goto_if_eq FallarborTown_ContestLobby_EventScript_1B7966
	compare VAR_RESULT, 6
	goto_if_eq FallarborTown_ContestLobby_EventScript_1B7973
	end

FallarborTown_ContestLobby_EventScript_1B78F3:: @ 81B78F3
	msgbox FallarborTown_ContestLobby_Text_1B733B, MSGBOX_DEFAULT
	goto FallarborTown_ContestLobby_EventScript_1B791D
	end

FallarborTown_ContestLobby_EventScript_1B7901:: @ 81B7901
	msgbox FallarborTown_ContestLobby_Text_1B7347, MSGBOX_DEFAULT
	goto FallarborTown_ContestLobby_EventScript_1B791D
	end

FallarborTown_ContestLobby_EventScript_1B790F:: @ 81B790F
	msgbox FallarborTown_ContestLobby_Text_1B735A, MSGBOX_DEFAULT
	goto FallarborTown_ContestLobby_EventScript_1B791D
	end

FallarborTown_ContestLobby_EventScript_1B791D:: @ 81B791D
	setvar VAR_0x8004, 0
	fadescreen FADE_TO_BLACK
	removeobject 240
	removeobject 239
	removeobject 238
	removeobject 237
	special DoBerryBlending
	waitstate
	releaseall
	end

FallarborTown_ContestLobby_EventScript_1B7936:: @ 81B7936
	releaseall
	end

FallarborTown_ContestLobby_EventScript_1B7938:: @ 81B7938
	msgbox FallarborTown_ContestLobby_Text_1B73B7, MSGBOX_DEFAULT
	releaseall
	end

FallarborTown_ContestLobby_EventScript_1B7942:: @ 81B7942
	msgbox FallarborTown_ContestLobby_Text_1B73F1, MSGBOX_DEFAULT
	releaseall
	end

FallarborTown_ContestLobby_EventScript_1B794C:: @ 81B794C
	special CloseLink
	msgbox FallarborTown_ContestLobby_Text_1A4A30, MSGBOX_DEFAULT
	releaseall
	end

FallarborTown_ContestLobby_EventScript_1B7959:: @ 81B7959
	special CloseLink
	msgbox FallarborTown_ContestLobby_Text_1A4B1D, MSGBOX_DEFAULT
	releaseall
	end

FallarborTown_ContestLobby_EventScript_1B7966:: @ 81B7966
	special CloseLink
	msgbox FallarborTown_ContestLobby_Text_1A10EB, MSGBOX_DEFAULT
	releaseall
	end

FallarborTown_ContestLobby_EventScript_1B7973:: @ 81B7973
	special CloseLink
	msgbox FallarborTown_ContestLobby_Text_1A4A85, MSGBOX_DEFAULT
	releaseall
	end

FallarborTown_ContestLobby_EventScript_1B7980:: @ 81B7980
	fadescreen FADE_TO_BLACK
	specialvar VAR_RESULT, GetLinkPartnerNames
	copyvar VAR_0x8008, VAR_RESULT
	copyvar VAR_0x8004, VAR_0x8008
	special SpawnBerryBlenderLinkPlayerSprites
	goto FallarborTown_ContestLobby_EventScript_1B799A
	end

FallarborTown_ContestLobby_EventScript_1B799A:: @ 81B799A
	fadescreen FADE_FROM_BLACK
	switch VAR_0x8008
	case 2, FallarborTown_ContestLobby_EventScript_1B78F3
	case 3, FallarborTown_ContestLobby_EventScript_1B7901
	case 4, FallarborTown_ContestLobby_EventScript_1B790F
	end