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
|
@ These are event scripts. They should not be moved to C.
#include "constants/global.h"
#include "constants/flags.h"
#include "constants/moves.h"
#include "constants/songs.h"
#include "constants/species.h"
#include "constants/vars.h"
#include "constants/items.h"
.include "asm/macros.inc"
.include "asm/macros/event.inc"
.include "constants/constants.inc"
.section .rodata
.align 2
MysteryEventScript_StampCard:: @ 8488E28
setvaddress MysteryEventScript_StampCard
setorcopyvar VAR_RESULT, 1
specialvar VAR_0x8008, BattleCardAction
setorcopyvar VAR_RESULT, 0
specialvar VAR_0x8009, BattleCardAction
subvar VAR_0x8008, VAR_0x8009
getnumberstring 0, VAR_0x8008
lock
faceplayer
vmessage sText_MysteryGiftStampCard
waitmessage
waitbuttonpress
release
end
sText_MysteryGiftStampCard: @ 8488E55
.string "Thank you for using the STAMP CARD\n"
.string "System.\p"
.string "You have {STR_VAR_1} more to collect to\n"
.string "fill your STAMP CARD.$"
MysteryEventScript_SurfPichu:: @ 8488EB5
setvaddress MysteryEventScript_SurfPichu
vgoto_if_unset FLAG_MYSTERY_GIFT_DONE, SurfPichu_GiveIfPossible
gotoram
SurfPichu_GiveIfPossible: @ 8488EC4
specialvar VAR_EVENT_PICHU_SLOT, CalculatePlayerPartyCount
compare VAR_EVENT_PICHU_SLOT, PARTY_SIZE
vgoto_if_eq SurfPichu_FullParty
setflag FLAG_MYSTERY_GIFT_DONE
vcall SurfPichu_GiveEgg
lock
faceplayer
vmessage sText_MysteryGiftEgg
waitmessage
waitbuttonpress
playfanfare MUS_OBTAIN_ITEM
waitfanfare
release
end
SurfPichu_FullParty: @ 8488EEB
lock
faceplayer
vmessage sText_FullParty
waitmessage
waitbuttonpress
release
end
SurfPichu_GiveEgg: @ 8488EF6
giveegg SPECIES_PICHU
setmoneventlegal VAR_EVENT_PICHU_SLOT
setmonmetlocation VAR_EVENT_PICHU_SLOT, 0xff
compare VAR_EVENT_PICHU_SLOT, 1
vgoto_if_eq SurfPichu_Slot1
compare VAR_EVENT_PICHU_SLOT, 2
vgoto_if_eq SurfPichu_Slot2
compare VAR_EVENT_PICHU_SLOT, 3
vgoto_if_eq SurfPichu_Slot3
compare VAR_EVENT_PICHU_SLOT, 4
vgoto_if_eq SurfPichu_Slot4
compare VAR_EVENT_PICHU_SLOT, 5
vgoto_if_eq SurfPichu_Slot5
return
SurfPichu_Slot1: @ 8488F38
setmonmove 1, 2, MOVE_SURF
return
SurfPichu_Slot2: @ 8488F3E
setmonmove 2, 2, MOVE_SURF
return
SurfPichu_Slot3: @ 8488F44
setmonmove 3, 2, MOVE_SURF
return
SurfPichu_Slot4: @ 8488F4A
setmonmove 4, 2, MOVE_SURF
return
SurfPichu_Slot5: @ 8488F50
setmonmove 5, 2, MOVE_SURF
return
sText_MysteryGiftEgg: @ 8488F56
.string "Thank you for using the MYSTERY\n"
.string "GIFT System.\p"
.string "From the POKéMON CENTER we\n"
.string "have a gift - a POKéMON EGG!\p"
.string "Please raise it with love and\n"
.string "kindness.$"
sText_FullParty: @ 8488FE3
.string "Oh, your party appears to be full.\p"
.string "Please come see me after storing\n"
.string "a POKéMON on a PC.$"
MysteryEventScript_VisitingTrainer:: @ 848903A
setvaddress MysteryEventScript_VisitingTrainer
special ValidateEReaderTrainer
compare VAR_RESULT, 0
vgoto_if_eq MysteryEventScript_VisitingTrainerArrived
lock
faceplayer
vmessage sText_MysteryGiftVisitingTrainer
waitmessage
waitbuttonpress
release
end
MysteryEventScript_VisitingTrainerArrived: @ 8489058
lock
faceplayer
vmessage sText_MysteryGiftVisitingTrainer_2
waitmessage
waitbuttonpress
release
end
sText_MysteryGiftVisitingTrainer: @ 8489063
.string "Thank you for using the MYSTERY\n"
.string "GIFT System.\p"
.string "By holding this WONDER CARD, you\n"
.string "may take part in a survey at a\l"
.string "POKéMON MART.\p"
.string "Use these surveys to invite\n"
.string "TRAINERS to the SEVII ISLANDS.\p"
.string "…Let me give you a secret\n"
.string "password for a survey:\p"
.string "“GIVE ME\n"
.string "AWESOME TRAINER”\p"
.string "Write that in on a survey and send\n"
.string "it to the WIRELESS\l"
.string "COMMUNICATION SYSTEM.$"
sText_MysteryGiftVisitingTrainer_2: @ 84891B0
.string "Thank you for using the MYSTERY\n"
.string "GIFT System.\p"
.string "A TRAINER has arrived in the SEVII\n"
.string "ISLANDS looking for you.\p"
.string "We hope you will enjoy\n"
.string "battling the visiting TRAINER.\p"
.string "You may invite other TRAINERS by\n"
.string "entering other passwords.\p"
.string "Try looking for other passwords\n"
.string "that may work.$"
MysteryEventScript_BattleCard:: @ 84892B9
setvaddress MysteryEventScript_BattleCard
vgoto_if_set FLAG_MYSTERY_GIFT_DONE, MysteryEventScript_BattleCardInfo
setorcopyvar VAR_RESULT, 2
specialvar VAR_0x8008, BattleCardAction
compare VAR_0x8008, 3
vgoto_if_ne MysteryEventScript_BattleCardInfo
lock
faceplayer
vmessage sText_MysteryGiftBattleCountCard_2
waitmessage
waitbuttonpress
giveitem ITEM_POTION
release
setflag FLAG_MYSTERY_GIFT_DONE
end
MysteryEventScript_BattleCardInfo: @ 84892F6
lock
faceplayer
vmessage sText_MysteryGiftBattleCountCard
waitmessage
waitbuttonpress
release
end
sText_MysteryGiftBattleCountCard: @ 8489301
.string "Thank you for using the MYSTERY\n"
.string "GIFT System.\p"
.string "Your BATTLE COUNT CARD keeps\n"
.string "track of your battle record against\l"
.string "TRAINERS with the same CARD.\p"
.string "Look for and battle TRAINERS who\n"
.string "have the same CARD as you.\p"
.string "You may check the overall rankings\n"
.string "by reading the NEWS.\p"
.string "Please do give it a try!$"
sText_MysteryGiftBattleCountCard_2: @ 8489419
.string "Thank you for using the MYSTERY\n"
.string "GIFT System.\p"
.string "Congratulations!\p"
.string "You have won a prize for winning\n"
.string "three battles!\p"
.string "We hope you will be inspired to\n"
.string "battle some more.$"
MysteryEventScript_AuroraTicket:: @ 84894B9
setvaddress MysteryEventScript_AuroraTicket
lock
faceplayer
vgoto_if_set FLAG_GOT_AURORA_TICKET, AuroraTicket_Obtained
vgoto_if_set FLAG_FOUGHT_DEOXYS, AuroraTicket_Obtained
checkitem ITEM_AURORA_TICKET, 1
compare VAR_RESULT, TRUE
vgoto_if_eq AuroraTicket_Obtained
vmessage sText_AuroraTicket1
waitmessage
waitbuttonpress
checkitemspace ITEM_AURORA_TICKET, 1
compare VAR_RESULT, FALSE
vgoto_if_eq AuroraTicket_NoBagSpace
giveitem ITEM_AURORA_TICKET
setflag FLAG_ENABLE_SHIP_BIRTH_ISLAND
setflag FLAG_GOT_AURORA_TICKET
vmessage sText_AuroraTicket2
waitmessage
waitbuttonpress
release
end
AuroraTicket_NoBagSpace: @ 8489514
vmessage sText_AuroraTicketNoPlace
waitmessage
waitbuttonpress
release
end
AuroraTicket_Obtained: @ 848951D
vmessage sText_AuroraTicketGot
waitmessage
waitbuttonpress
release
end
sText_AuroraTicket1: @ 8489526
.string "Thank you for using the MYSTERY\n"
.string "GIFT System.\p"
.string "You must be {PLAYER}.\n"
.string "There is a ticket here for you.$"
sText_AuroraTicket2: @ 8489583
.string "It appears to be for use at the\n"
.string "VERMILION CITY port.\p"
.string "Why not give it a try and see what\n"
.string "it is about?$"
sText_AuroraTicketGot: @ 84895E8
.string "Thank you for using the MYSTERY\n"
.string "GIFT System.$"
sText_AuroraTicketNoPlace: @ 8489615
.string "Oh, I'm sorry, {PLAYER}. Your BAG's\n"
.string "KEY ITEMS POCKET is full.\p"
.string "Please store something on your PC,\n"
.string "then come back for this.$"
MysteryEventScript_MysticTicket:: @ 8489689
setvaddress MysteryEventScript_MysticTicket
lock
faceplayer
vgoto_if_set FLAG_GOT_MYSTIC_TICKET, MysticTicket_Obtained
vgoto_if_set FLAG_FOUGHT_LUGIA, MysticTicket_Obtained
vgoto_if_set FLAG_FOUGHT_HO_OH, MysticTicket_Obtained
checkitem ITEM_MYSTIC_TICKET, 1
compare VAR_RESULT, TRUE
vgoto_if_eq MysticTicket_Obtained
vmessage sText_MysticTicket2
waitmessage
waitbuttonpress
checkitemspace ITEM_MYSTIC_TICKET, 1
compare VAR_RESULT, FALSE
vgoto_if_eq MysticTicket_NoBagSpace
giveitem ITEM_MYSTIC_TICKET
setflag FLAG_ENABLE_SHIP_NAVEL_ROCK
setflag FLAG_GOT_MYSTIC_TICKET
vmessage sText_MysticTicket1
waitmessage
waitbuttonpress
release
end
MysticTicket_NoBagSpace: @ 84896ED
vmessage sText_MysticTicketNoPlace
waitmessage
waitbuttonpress
release
end
MysticTicket_Obtained: @ 84896F6
vmessage sText_MysticTicketGot
waitmessage
waitbuttonpress
release
end
sText_MysticTicket2: @ 84896FF
.string "Thank you for using the MYSTERY\n"
.string "GIFT System.\p"
.string "You must be {PLAYER}.\n"
.string "There is a ticket here for you.$"
sText_MysticTicket1: @ 848975C
.string "It appears to be for use at the\n"
.string "VERMILION CITY port.\p"
.string "Why not give it a try and see what\n"
.string "it is about?$"
sText_MysticTicketGot: @ 84897C1
.string "Thank you for using the MYSTERY\n"
.string "GIFT System.$"
sText_MysticTicketNoPlace: @ 84897EE
.string "Oh, I'm sorry, {PLAYER}. Your BAG's\n"
.string "KEY ITEMS POCKET is full.\p"
.string "Please store something on your PC,\n"
.string "then come back for this.$"
MysteryEventScript_AlteringCave:: @ 8489862
setvaddress MysteryEventScript_AlteringCave
addvar VAR_ALTERING_CAVE_WILD_SET, 1
compare VAR_ALTERING_CAVE_WILD_SET, 10
vgoto_if_ne MysteryEventScript_AlteringCave_
setvar VAR_ALTERING_CAVE_WILD_SET, 0
MysteryEventScript_AlteringCave_: @ 848987C
lock
faceplayer
vmessage sText_MysteryGiftAlteringCave
waitmessage
waitbuttonpress
release
end
sText_MysteryGiftAlteringCave: @ 8489887
.string "Thank you for using the MYSTERY\n"
.string "GIFT System.\p"
.string "Recently, there have been rumors\n"
.string "of rare POKéMON appearances.\p"
.string "The rumors are about ALTERING\n"
.string "CAVE on OUTCAST ISLAND.\p"
.string "Why not visit there and check if\n"
.string "the rumors are indeed true?$"
|