2021-07-20 21:18:31 +02:00
|
|
|
ProfBirch_EventScript_UpdateLocation::
|
2021-11-19 05:06:30 +01:00
|
|
|
goto_if_eq VAR_PETALBURG_GYM_STATE, 0, Common_EventScript_NopReturn
|
2019-10-07 07:13:34 +02:00
|
|
|
goto_if_set FLAG_SYS_GAME_CLEAR, ProfBirch_EventScript_MoveToLab
|
2021-11-19 05:06:30 +01:00
|
|
|
call_if_eq VAR_BIRCH_STATE, 0, ProfBirch_EventScript_MoveToLab
|
|
|
|
call_if_eq VAR_BIRCH_STATE, 1, ProfBirch_EventScript_MoveToLab
|
|
|
|
call_if_eq VAR_BIRCH_STATE, 2, ProfBirch_EventScript_MoveToRoute101
|
|
|
|
call_if_eq VAR_BIRCH_STATE, 3, ProfBirch_EventScript_MoveToRoute101
|
|
|
|
call_if_eq VAR_BIRCH_STATE, 4, ProfBirch_EventScript_MoveToRoute103
|
|
|
|
call_if_eq VAR_BIRCH_STATE, 5, ProfBirch_EventScript_MoveToRoute103
|
|
|
|
call_if_eq VAR_BIRCH_STATE, 6, ProfBirch_EventScript_MoveToLab
|
|
|
|
call_if_eq VAR_BIRCH_STATE, 7, ProfBirch_EventScript_MoveToLab
|
2019-10-05 16:52:48 +02:00
|
|
|
return
|
2019-09-27 20:20:51 +02:00
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
ProfBirch_EventScript_MoveToLab::
|
2019-10-05 16:52:48 +02:00
|
|
|
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
|
2019-09-27 20:20:51 +02:00
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
ProfBirch_EventScript_MoveToRoute101::
|
2019-10-05 16:52:48 +02:00
|
|
|
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
|
2019-09-27 20:20:51 +02:00
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
ProfBirch_EventScript_MoveToRoute103::
|
2019-10-05 16:52:48 +02:00
|
|
|
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
|
2019-09-27 20:20:51 +02:00
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
ProfBirch_EventScript_RatePokedexOrRegister::
|
2019-10-05 16:52:48 +02:00
|
|
|
lock
|
|
|
|
faceplayer
|
2019-10-07 07:13:34 +02:00
|
|
|
goto_if_unset FLAG_HAS_MATCH_CALL, ProfBirch_EventScript_AskRatePokedex
|
|
|
|
goto_if_unset FLAG_ENABLE_PROF_BIRCH_MATCH_CALL, EventScript_RegisterProfBirch
|
2019-09-27 20:20:51 +02:00
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
ProfBirch_EventScript_AskRatePokedex::
|
2019-10-05 16:52:48 +02:00
|
|
|
msgbox gBirchDexRatingText_AreYouCurious, MSGBOX_YESNO
|
2021-11-19 05:06:30 +01:00
|
|
|
goto_if_eq VAR_RESULT, NO, ProfBirch_EventScript_DeclineRating
|
2019-10-07 07:13:34 +02:00
|
|
|
call ProfBirch_EventScript_RatePokedex
|
2019-10-05 16:52:48 +02:00
|
|
|
release
|
|
|
|
end
|
2019-09-27 20:20:51 +02:00
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
ProfBirch_EventScript_DeclineRating::
|
2019-10-05 16:52:48 +02:00
|
|
|
msgbox gBirchDexRatingText_Cancel, MSGBOX_DEFAULT
|
|
|
|
release
|
|
|
|
end
|
2019-09-27 20:20:51 +02:00
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
ProfBirch_EventScript_ShowRatingMessage::
|
2019-10-05 16:52:48 +02:00
|
|
|
copyvar VAR_0x8004, VAR_0x8009
|
|
|
|
special ShowPokedexRatingMessage
|
|
|
|
waitmessage
|
|
|
|
waitbuttonpress
|
|
|
|
return
|
2019-09-27 20:20:51 +02:00
|
|
|
|
2021-07-20 21:18:31 +02:00
|
|
|
ProfBirch_EventScript_RatePokedex::
|
2019-10-05 16:52:48 +02:00
|
|
|
setvar VAR_0x8004, 0
|
|
|
|
specialvar VAR_RESULT, ScriptGetPokedexInfo
|
|
|
|
copyvar VAR_0x8008, VAR_0x8005
|
|
|
|
copyvar VAR_0x8009, VAR_0x8006
|
|
|
|
copyvar VAR_0x800A, VAR_RESULT
|
2021-11-18 04:00:44 +01:00
|
|
|
buffernumberstring STR_VAR_1, VAR_0x8008 @ Num Hoenn seen
|
|
|
|
buffernumberstring STR_VAR_2, VAR_0x8009 @ Num Hoenn caught
|
2019-10-05 16:52:48 +02:00
|
|
|
msgbox gBirchDexRatingText_SoYouveSeenAndCaught, MSGBOX_DEFAULT
|
2019-10-07 07:13:34 +02:00
|
|
|
call ProfBirch_EventScript_ShowRatingMessage
|
2021-11-19 05:06:30 +01:00
|
|
|
goto_if_eq VAR_0x800A, 0, Common_EventScript_NopReturn @ National dex not enabled
|
2019-10-05 16:52:48 +02:00
|
|
|
setvar VAR_0x8004, 1
|
|
|
|
specialvar VAR_RESULT, ScriptGetPokedexInfo
|
|
|
|
copyvar VAR_0x8008, VAR_0x8005
|
|
|
|
copyvar VAR_0x8009, VAR_0x8006
|
2021-11-18 04:00:44 +01:00
|
|
|
buffernumberstring STR_VAR_1, VAR_0x8008 @ Num National seen
|
|
|
|
buffernumberstring STR_VAR_2, VAR_0x8009 @ Num National caught
|
2019-10-05 16:52:48 +02:00
|
|
|
msgbox gBirchDexRatingText_OnANationwideBasis, MSGBOX_DEFAULT
|
|
|
|
return
|