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
|
@ Gabby and Ty always move to the same spots for the first 5 battles
@ From the 6th battle onwards, they move randomly between locations 6-8
@ Note: The local IDs of Gabby and Ty are hard-coded in GetGabbyAndTyLocalIds
GabbyAndTy_EventScript_UpdateLocation::
cleartrainerflag TRAINER_GABBY_AND_TY_6
specialvar VAR_RESULT, GabbyAndTyGetBattleNum
switch VAR_RESULT
case 0, GabbyAndTy_EventScript_MoveForBattle1
case 1, GabbyAndTy_EventScript_MoveForBattle2
case 2, GabbyAndTy_EventScript_MoveForBattle3
case 3, GabbyAndTy_EventScript_MoveForBattle4
case 4, GabbyAndTy_EventScript_MoveForBattle5
case 5, GabbyAndTy_EventScript_MoveForBattle6
case 6, GabbyAndTy_EventScript_MoveForBattle7
case 7, GabbyAndTy_EventScript_MoveForBattle8
case 8, GabbyAndTy_EventScript_MoveForBattle9
end
GabbyAndTy_EventScript_MoveForBattle1::
call GabbyAndTy_EventScript_ShowAtRoute111_1
return
GabbyAndTy_EventScript_MoveForBattle2::
call GabbyAndTy_EventScript_ShowAtRoute118_1
call GabbyAndTy_EventScript_HideAtRoute111_1
return
GabbyAndTy_EventScript_MoveForBattle3::
call GabbyAndTy_EventScript_ShowAtRoute120_1
call GabbyAndTy_EventScript_HideAtRoute118_1
return
GabbyAndTy_EventScript_MoveForBattle4::
call GabbyAndTy_EventScript_ShowAtRoute111_3
call GabbyAndTy_EventScript_HideAtRoute120_1
return
GabbyAndTy_EventScript_MoveForBattle5::
call GabbyAndTy_EventScript_ShowAtRoute118_2
call GabbyAndTy_EventScript_HideAtRoute111_3
return
GabbyAndTy_EventScript_MoveForBattle6::
call GabbyAndTy_EventScript_ShowAtRoute120_2
call GabbyAndTy_EventScript_HideAtRoute118_2
return
GabbyAndTy_EventScript_MoveForBattle7::
call GabbyAndTy_EventScript_ShowAtRoute111_2
call GabbyAndTy_EventScript_HideAtRoute120_2
return
GabbyAndTy_EventScript_MoveForBattle8::
call GabbyAndTy_EventScript_ShowAtRoute118_3
call GabbyAndTy_EventScript_HideAtRoute111_2
return
GabbyAndTy_EventScript_MoveForBattle9::
call GabbyAndTy_EventScript_ShowAtRoute120_2
call GabbyAndTy_EventScript_HideAtRoute118_3
return
GabbyAndTy_EventScript_HideAtRoute111_1::
setflag FLAG_HIDE_ROUTE_111_GABBY_AND_TY_1
return
GabbyAndTy_EventScript_ShowAtRoute111_1::
clearflag FLAG_HIDE_ROUTE_111_GABBY_AND_TY_1
return
GabbyAndTy_EventScript_HideAtRoute118_1::
setflag FLAG_HIDE_ROUTE_118_GABBY_AND_TY_1
return
GabbyAndTy_EventScript_ShowAtRoute118_1::
clearflag FLAG_HIDE_ROUTE_118_GABBY_AND_TY_1
return
GabbyAndTy_EventScript_HideAtRoute120_1::
setflag FLAG_HIDE_ROUTE_120_GABBY_AND_TY_1
return
GabbyAndTy_EventScript_ShowAtRoute120_1::
clearflag FLAG_HIDE_ROUTE_120_GABBY_AND_TY_1
return
GabbyAndTy_EventScript_HideAtRoute111_3::
setflag FLAG_HIDE_ROUTE_111_GABBY_AND_TY_3
return
GabbyAndTy_EventScript_ShowAtRoute111_3::
clearflag FLAG_HIDE_ROUTE_111_GABBY_AND_TY_3
return
GabbyAndTy_EventScript_HideAtRoute118_2::
setflag FLAG_HIDE_ROUTE_118_GABBY_AND_TY_2
return
GabbyAndTy_EventScript_ShowAtRoute118_2::
clearflag FLAG_HIDE_ROUTE_118_GABBY_AND_TY_2
return
GabbyAndTy_EventScript_HideAtRoute120_2::
setflag FLAG_HIDE_ROUTE_120_GABBY_AND_TY_2
return
GabbyAndTy_EventScript_ShowAtRoute120_2::
clearflag FLAG_HIDE_ROUTE_120_GABBY_AND_TY_2
return
GabbyAndTy_EventScript_HideAtRoute111_2::
setflag FLAG_HIDE_ROUTE_111_GABBY_AND_TY_2
return
GabbyAndTy_EventScript_ShowAtRoute111_2::
clearflag FLAG_HIDE_ROUTE_111_GABBY_AND_TY_2
return
GabbyAndTy_EventScript_HideAtRoute118_3::
setflag FLAG_HIDE_ROUTE_118_GABBY_AND_TY_3
return
GabbyAndTy_EventScript_ShowAtRoute118_3::
clearflag FLAG_HIDE_ROUTE_118_GABBY_AND_TY_3
return
GabbyAndTy_EventScript_GabbyBattle1::
trainerbattle_double TRAINER_GABBY_AND_TY_1, GabbyAndTy_Text_GabbyPreFirstBattle, GabbyAndTy_Text_GabbyDefeatFirstTime, GabbyAndTy_Text_GabbyNotEnoughMons, GabbyAndTy_EventScript_FirstInterview
msgbox GabbyAndTy_Text_KeepingAnEyeOutForYou, MSGBOX_DEFAULT
release
end
GabbyAndTy_EventScript_TyBattle1::
trainerbattle_double TRAINER_GABBY_AND_TY_1, GabbyAndTy_Text_TyPreFirstBattle, GabbyAndTy_Text_TyDefeatFirstTime, GabbyAndTy_Text_TyNotEnoughMons, GabbyAndTy_EventScript_FirstInterview
msgbox GabbyAndTy_Text_TyPostBattle, MSGBOX_DEFAULT
release
end
GabbyAndTy_EventScript_GabbyBattle2::
trainerbattle_double TRAINER_GABBY_AND_TY_2, GabbyAndTy_Text_GabbyIntro, GabbyAndTy_Text_GabbyDefeat, GabbyAndTy_Text_GabbyNotEnoughMons, GabbyAndTy_EventScript_RequestInterview
msgbox GabbyAndTy_Text_KeepingAnEyeOutForYou, MSGBOX_DEFAULT
release
end
GabbyAndTy_EventScript_TyBattle2::
trainerbattle_double TRAINER_GABBY_AND_TY_2, GabbyAndTy_Text_TyIntro, GabbyAndTy_Text_TyDefeat, GabbyAndTy_Text_TyNotEnoughMons, GabbyAndTy_EventScript_RequestInterview
msgbox GabbyAndTy_Text_TyPostBattle, MSGBOX_DEFAULT
release
end
GabbyAndTy_EventScript_GabbyBattle3::
trainerbattle_double TRAINER_GABBY_AND_TY_3, GabbyAndTy_Text_GabbyIntro, GabbyAndTy_Text_GabbyDefeat, GabbyAndTy_Text_GabbyNotEnoughMons, GabbyAndTy_EventScript_RequestInterview
msgbox GabbyAndTy_Text_KeepingAnEyeOutForYou, MSGBOX_DEFAULT
release
end
GabbyAndTy_EventScript_TyBattle3::
trainerbattle_double TRAINER_GABBY_AND_TY_3, GabbyAndTy_Text_TyIntro, GabbyAndTy_Text_TyDefeat, GabbyAndTy_Text_TyNotEnoughMons, GabbyAndTy_EventScript_RequestInterview
msgbox GabbyAndTy_Text_TyPostBattle, MSGBOX_DEFAULT
release
end
GabbyAndTy_EventScript_GabbyBattle4::
trainerbattle_double TRAINER_GABBY_AND_TY_4, GabbyAndTy_Text_GabbyIntro, GabbyAndTy_Text_GabbyDefeat, GabbyAndTy_Text_GabbyNotEnoughMons, GabbyAndTy_EventScript_RequestInterview
msgbox GabbyAndTy_Text_KeepingAnEyeOutForYou, MSGBOX_DEFAULT
release
end
GabbyAndTy_EventScript_TyBattle4::
trainerbattle_double TRAINER_GABBY_AND_TY_4, GabbyAndTy_Text_TyIntro, GabbyAndTy_Text_TyDefeat, GabbyAndTy_Text_TyNotEnoughMons, GabbyAndTy_EventScript_RequestInterview
msgbox GabbyAndTy_Text_TyPostBattle, MSGBOX_DEFAULT
release
end
GabbyAndTy_EventScript_GabbyBattle5::
trainerbattle_double TRAINER_GABBY_AND_TY_5, GabbyAndTy_Text_GabbyIntro, GabbyAndTy_Text_GabbyDefeat, GabbyAndTy_Text_GabbyNotEnoughMons, GabbyAndTy_EventScript_RequestInterview
msgbox GabbyAndTy_Text_KeepingAnEyeOutForYou, MSGBOX_DEFAULT
release
end
GabbyAndTy_EventScript_TyBattle5::
trainerbattle_double TRAINER_GABBY_AND_TY_5, GabbyAndTy_Text_TyIntro, GabbyAndTy_Text_TyDefeat, GabbyAndTy_Text_TyNotEnoughMons, GabbyAndTy_EventScript_RequestInterview
msgbox GabbyAndTy_Text_TyPostBattle, MSGBOX_DEFAULT
release
end
GabbyAndTy_EventScript_GabbyBattle6::
trainerbattle_double TRAINER_GABBY_AND_TY_6, GabbyAndTy_Text_GabbyIntro, GabbyAndTy_Text_GabbyDefeat, GabbyAndTy_Text_GabbyNotEnoughMons, GabbyAndTy_EventScript_RequestInterview
msgbox GabbyAndTy_Text_KeepingAnEyeOutForYou, MSGBOX_DEFAULT
release
end
GabbyAndTy_EventScript_TyBattle6::
trainerbattle_double TRAINER_GABBY_AND_TY_6, GabbyAndTy_Text_TyIntro, GabbyAndTy_Text_TyDefeat, GabbyAndTy_Text_TyNotEnoughMons, GabbyAndTy_EventScript_RequestInterview
msgbox GabbyAndTy_Text_TyPostBattle, MSGBOX_DEFAULT
release
end
GabbyAndTy_EventScript_FirstInterview::
special GabbyAndTyBeforeInterview
special GetGabbyAndTyLocalIds
call_if_eq VAR_FACING, DIR_NORTH, GabbyAndTy_EventScript_FacePlayerNorth
call_if_eq VAR_FACING, DIR_SOUTH, GabbyAndTy_EventScript_FacePlayerSouth
call_if_eq VAR_FACING, DIR_EAST, GabbyAndTy_EventScript_FacePlayerEast
goto_if_set FLAG_TEMP_1, GabbyAndTy_EventScript_KeepingAnEyeOutForYou
msgbox GabbyAndTy_Text_WhoAreYouInterview, MSGBOX_YESNO
goto GabbyAndTy_EventScript_Interview
end
GabbyAndTy_EventScript_FacePlayerNorth::
applymovement VAR_0x8004, GabbyAndTy_Movement_WalkInPlaceDown
waitmovement 0
return
GabbyAndTy_EventScript_FacePlayerSouth::
applymovement VAR_0x8004, GabbyAndTy_Movement_WalkInPlaceUp
applymovement VAR_0x8005, Common_Movement_WalkInPlaceFasterUp
waitmovement 0
return
GabbyAndTy_EventScript_FacePlayerEast::
applymovement VAR_0x8004, GabbyAndTy_Movement_WalkInPlaceLeft
applymovement VAR_0x8005, Common_Movement_WalkInPlaceFasterLeft
waitmovement 0
return
GabbyAndTy_EventScript_RequestInterview::
special GabbyAndTyBeforeInterview
special GetGabbyAndTyLocalIds
call_if_eq VAR_FACING, DIR_NORTH, GabbyAndTy_EventScript_FacePlayerNorth
call_if_eq VAR_FACING, DIR_SOUTH, GabbyAndTy_EventScript_FacePlayerSouth
call_if_eq VAR_FACING, DIR_EAST, GabbyAndTy_EventScript_FacePlayerEast
goto_if_set FLAG_TEMP_1, GabbyAndTy_EventScript_KeepingAnEyeOutForYou
specialvar VAR_RESULT, GabbyAndTyGetLastQuote
goto_if_eq VAR_RESULT, 0, GabbyAndTy_EventScript_DidntInterviewLastTime
msgbox GabbyAndTy_Text_QuoteFromLastInterview, MSGBOX_DEFAULT
specialvar VAR_RESULT, GabbyAndTyGetLastBattleTrivia
switch VAR_RESULT
case 0, GabbyAndTy_EventScript_RequestInterviewNoTrivia
case 1, GabbyAndTy_EventScript_RequestInterviewShortBattle
case 2, GabbyAndTy_EventScript_RequestInterviewThrewBall
case 3, GabbyAndTy_EventScript_RequestInterviewUsedItems
case 4, GabbyAndTy_EventScript_RequestInterviewLostAMon
end
GabbyAndTy_Movement_WalkInPlaceDown:
walk_in_place_down
step_end
GabbyAndTy_Movement_WalkInPlaceUp:
walk_in_place_up
step_end
GabbyAndTy_Movement_WalkInPlaceLeft:
walk_in_place_left
step_end
GabbyAndTy_EventScript_DidntInterviewLastTime::
msgbox GabbyAndTy_Text_GiveUsAnInterviewThisTime, MSGBOX_YESNO
goto GabbyAndTy_EventScript_Interview
end
GabbyAndTy_EventScript_RequestInterviewNoTrivia::
msgbox GabbyAndTy_Text_InterviewAgain, MSGBOX_YESNO
goto GabbyAndTy_EventScript_Interview
end
GabbyAndTy_EventScript_RequestInterviewShortBattle::
msgbox GabbyAndTy_Text_YouStompedUsInterviewAgain, MSGBOX_YESNO
goto GabbyAndTy_EventScript_Interview
end
GabbyAndTy_EventScript_RequestInterviewThrewBall::
msgbox GabbyAndTy_Text_YouThrewABallAtUsInterviewAgain, MSGBOX_YESNO
goto GabbyAndTy_EventScript_Interview
end
GabbyAndTy_EventScript_RequestInterviewUsedItems::
msgbox GabbyAndTy_Text_CleverItemSkillsInterviewAgain, MSGBOX_YESNO
goto GabbyAndTy_EventScript_Interview
end
GabbyAndTy_EventScript_RequestInterviewLostAMon::
msgbox GabbyAndTy_Text_WeLookedRespectableInterviewAgain, MSGBOX_YESNO
goto GabbyAndTy_EventScript_Interview
end
GabbyAndTy_EventScript_Interview::
goto_if_eq VAR_RESULT, NO, GabbyAndTy_EventScript_DontGiveUpKeepingEyeOut
msgbox GabbyAndTy_Text_DescribeYourFeelings, MSGBOX_DEFAULT
setvar VAR_0x8004, EASY_CHAT_TYPE_GABBY_AND_TY
call Common_ShowEasyChatScreen
lock
faceplayer
goto_if_eq VAR_RESULT, 0, GabbyAndTy_EventScript_DontGiveUpKeepingEyeOut
msgbox GabbyAndTy_Text_PerfectWellBeSeeingYou, MSGBOX_DEFAULT
special GabbyAndTyAfterInterview
setflag FLAG_TEMP_1
release
end
GabbyAndTy_EventScript_DontGiveUpKeepingEyeOut::
msgbox GabbyAndTy_Text_DontGiveUpKeepingEyeOut, MSGBOX_DEFAULT
setflag FLAG_TEMP_1
release
end
GabbyAndTy_EventScript_KeepingAnEyeOutForYou::
msgbox GabbyAndTy_Text_KeepingAnEyeOutForYou, MSGBOX_DEFAULT
release
end
|