pokeemerald/data/scripts/prof_birch.inc
2019-10-05 10:52:48 -04:00

95 lines
3.0 KiB
PHP

LittlerootTown_ProfessorBirchsLab_EventScript_2720AD:: @ 82720AD
Route101_EventScript_2720AD:: @ 82720AD
Route103_EventScript_2720AD:: @ 82720AD
compare VAR_PETALBURG_GYM_STATE, 0
goto_if_eq Common_EventScript_NopReturn
goto_if_set FLAG_SYS_GAME_CLEAR, Route101_EventScript_27211A
compare VAR_BIRCH_STATE, 0
call_if_eq Route101_EventScript_27211A
compare VAR_BIRCH_STATE, 1
call_if_eq Route101_EventScript_27211A
compare VAR_BIRCH_STATE, 2
call_if_eq Route101_EventScript_272127
compare VAR_BIRCH_STATE, 3
call_if_eq Route101_EventScript_272127
compare VAR_BIRCH_STATE, 4
call_if_eq Route101_EventScript_272134
compare VAR_BIRCH_STATE, 5
call_if_eq Route101_EventScript_272134
compare VAR_BIRCH_STATE, 6
call_if_eq Route101_EventScript_27211A
compare VAR_BIRCH_STATE, 7
call_if_eq Route101_EventScript_27211A
return
Route101_EventScript_27211A:: @ 827211A
clearflag FLAG_HIDE_LITTLEROOT_TOWN_BIRCHS_LAB_BIRCH
clearflag FLAG_HIDE_LITTLEROOT_TOWN_BIRCHS_LAB_UNKNOWN_0x380
setflag FLAG_HIDE_ROUTE_101_BIRCH
setflag FLAG_HIDE_ROUTE_103_BIRCH
return
Route101_EventScript_272127:: @ 8272127
clearflag FLAG_HIDE_ROUTE_101_BIRCH
setflag FLAG_HIDE_LITTLEROOT_TOWN_BIRCHS_LAB_BIRCH
setflag FLAG_HIDE_LITTLEROOT_TOWN_BIRCHS_LAB_UNKNOWN_0x380
setflag FLAG_HIDE_ROUTE_103_BIRCH
return
Route101_EventScript_272134:: @ 8272134
clearflag FLAG_HIDE_ROUTE_103_BIRCH
setflag FLAG_HIDE_ROUTE_101_BIRCH
setflag FLAG_HIDE_LITTLEROOT_TOWN_BIRCHS_LAB_BIRCH
setflag FLAG_HIDE_LITTLEROOT_TOWN_BIRCHS_LAB_UNKNOWN_0x380
return
LittlerootTown_ProfessorBirchsLab_EventScript_272141:: @ 8272141
Route101_EventScript_272141:: @ 8272141
Route103_EventScript_272141:: @ 8272141
lock
faceplayer
goto_if_unset FLAG_HAS_MATCH_CALL, Route101_EventScript_272155
goto_if_unset FLAG_ENABLE_PROF_BIRCH_MATCH_CALL, Route101_EventScript_1FA2D2
Route101_EventScript_272155:: @ 8272155
msgbox gBirchDexRatingText_AreYouCurious, MSGBOX_YESNO
compare VAR_RESULT, 0
goto_if_eq Route101_EventScript_27216F
call Route101_EventScript_272184
release
end
Route101_EventScript_27216F:: @ 827216F
msgbox gBirchDexRatingText_Cancel, MSGBOX_DEFAULT
release
end
Route101_EventScript_272179:: @ 8272179
copyvar VAR_0x8004, VAR_0x8009
special ShowPokedexRatingMessage
waitmessage
waitbuttonpress
return
EverGrandeCity_ChampionsRoom_EventScript_272184:: @ 8272184
Route101_EventScript_272184:: @ 8272184
setvar VAR_0x8004, 0
specialvar VAR_RESULT, ScriptGetPokedexInfo
copyvar VAR_0x8008, VAR_0x8005
copyvar VAR_0x8009, VAR_0x8006
copyvar VAR_0x800A, VAR_RESULT
buffernumberstring 0, VAR_0x8008
buffernumberstring 1, VAR_0x8009
msgbox gBirchDexRatingText_SoYouveSeenAndCaught, MSGBOX_DEFAULT
call Route101_EventScript_272179
compare VAR_0x800A, 0
goto_if_eq Common_EventScript_NopReturn
setvar VAR_0x8004, 1
specialvar VAR_RESULT, ScriptGetPokedexInfo
copyvar VAR_0x8008, VAR_0x8005
copyvar VAR_0x8009, VAR_0x8006
buffernumberstring 0, VAR_0x8008
buffernumberstring 1, VAR_0x8009
msgbox gBirchDexRatingText_OnANationwideBasis, MSGBOX_DEFAULT
return