Document eterna forest and old chateau scripts (#998)
Some checks are pending
build / build (push) Waiting to run

This commit is contained in:
Viperio 2026-03-11 16:43:22 +01:00 committed by GitHub
parent b238efaf3c
commit cae54c6ca1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
26 changed files with 352 additions and 350 deletions

View File

@ -3927,10 +3927,10 @@
.short \arg1
.endm
.macro ScrCmd_292 arg0, arg1
.macro CheckShouldShowGhost percentChance, destVar
.short 658
.byte \arg0
.short \arg1
.byte \percentChance
.short \destVar
.endm
.macro GetUndergroundTalkCounter destVarID

View File

@ -137,7 +137,7 @@ FLAG_TALKED_TO_MOM
FLAG_ENTERED_DRESSING_ROOM
FLAG_OBTAINED_ALL_BATTLE_FRONTIER_GOLD_PRINTS
FLAG_TALKED_TO_OREBURGH_CITY_RIVAL
FLAG_UNK_0x008B
FLAG_TALKED_TO_ETERNA_FOREST_CHERYL
FLAG_UNK_0x008C
FLAG_UNK_0x008D
FLAG_MAP_LOCAL
@ -296,7 +296,7 @@ FLAG_CAUGHT_AZELF
FLAG_CAUGHT_UXIE
FLAG_UNK_0x0128
FLAG_VEILSTONE_STORE_1F_RECEIVED_MASK
FLAG_UNK_0x012A
FLAG_OBTAINED_ETERNA_FOREST_OUTSIDE_ACCESSORY_BIG_TREE
FLAG_UNK_0x012B
FLAG_UNK_0x012C
FLAG_UNK_0x012D
@ -327,7 +327,7 @@ FLAG_UNK_0x0145
FLAG_UNK_0x0146
FLAG_UNK_0x0147
FLAG_UNK_0x0148
FLAG_UNK_0x0149
FLAG_CAUGHT_OLD_CHATEAU_ROTOM
FLAG_UNK_0x014A
FLAG_UNK_0x014B
FLAG_UNK_0x014C
@ -633,8 +633,8 @@ FLAG_UNK_0x0277
FLAG_UNK_0x0278
FLAG_UNK_0x0279
FLAG_UNK_0x027A
FLAG_UNK_0x027B
FLAG_UNK_0x027C
FLAG_HIDE_OLD_CHATEAU_DINING_AREA_OLD_MAN
FLAG_HIDE_OLD_CHATEAU_BACK_MIDDLE_EAST_ROOM_TWIN
FLAG_HIDE_VALOR_LAKEFRONT_COLLECTOR
FLAG_UNK_0x027E
FLAG_UNK_0x027F
@ -2736,7 +2736,7 @@ FLAG_UNK_0x0AAC
FLAG_UNK_0x0AAD
FLAG_UNK_0x0AAE
FLAG_UNK_0x0AAF
FLAG_UNK_0x0AB0
FLAG_BATTLED_OLD_CHATEAU_ROTOM
FLAG_UNK_0x0AB1
FLAG_UNK_0x0AB2
FLAG_OBTAINED_LOTTERY_PRIZE
@ -4276,7 +4276,7 @@ VAR_UNK_0x40AD
VAR_ETERNA_GYM_TRAINERS_BEATEN
VAR_UNK_0x40AF
VAR_UNK_0x40B0
VAR_UNK_0x40B1
VAR_ETERNA_FOREST_FOLLOWER_CHERYL_STATE
VAR_CANALAVE_LIBRARY_STATE
VAR_UNK_0x40B3
VAR_REVIVED_POKEMON_SPECIES
@ -4304,7 +4304,7 @@ VAR_UNK_0x40C9
VAR_FOLLOWER_RIVAL_TIMES_TALKED
VAR_UNK_0x40CB
VAR_UNK_0x40CC
VAR_UNK_0x40CD
VAR_ETERNA_FOREST_CHERYL_OLD_CHATEAU_CUTSCENE_STATE
VAR_ELEVATOR_FLOORS_ABOVE
VAR_VALLEY_WINDWORKS_TEAM_GALACTIC_STATE
VAR_HAS_SEEN_UNDERGROUND_ROARK_INTRO
@ -4371,8 +4371,8 @@ VAR_TURNBACK_CAVE_ROOMS_VISITED
VAR_UNK_0x410D
VAR_UNK_0x410E
VAR_PLAYER_HOUSE_POSTGAME_STATE
VAR_UNK_0x4110
VAR_UNK_0x4111
VAR_OLD_CHATEAU_DINING_AREA_OLD_MAN_STATE
VAR_OLD_CHATEAU_BACK_MIDDLE_EAST_ROOM_TWIN_STATE
VAR_UNK_0x4112
VAR_UNK_0x4113
VAR_UNK_0x4114

View File

@ -11,7 +11,7 @@
],
"object_events": [
{
"id": "ETERNA_FOREST_CHERYL_0",
"id": "LOCALID_CHERYL",
"graphics_id": "OBJ_EVENT_GFX_CHERYL",
"movement_type": "MOVEMENT_TYPE_LOOK_SOUTH",
"trainer_type": "TRAINER_TYPE_NONE",
@ -26,7 +26,7 @@
"y": 0
},
{
"id": "ETERNA_FOREST_BUG_CATCHER_1",
"id": "LOCALID_BUG_CATCHER",
"graphics_id": "OBJ_EVENT_GFX_BUG_CATCHER",
"movement_type": "MOVEMENT_TYPE_WANDER_AROUND",
"trainer_type": "TRAINER_TYPE_NONE",
@ -41,7 +41,7 @@
"y": 0
},
{
"id": "ETERNA_FOREST_BUG_CATCHER_JACK",
"id": "LOCALID_BUG_CATCHER_JACK",
"graphics_id": "OBJ_EVENT_GFX_BUG_CATCHER",
"movement_type": "MOVEMENT_TYPE_LOOK_EAST",
"trainer_type": "TRAINER_TYPE_NORMAL",
@ -58,7 +58,7 @@
"y": 0
},
{
"id": "ETERNA_FOREST_BUG_CATCHER_PHILLIP",
"id": "LOCALID_BUG_CATCHER_PHILLIP",
"graphics_id": "OBJ_EVENT_GFX_BUG_CATCHER",
"movement_type": "MOVEMENT_TYPE_LOOK_NORTH",
"trainer_type": "TRAINER_TYPE_NORMAL",
@ -75,7 +75,7 @@
"y": 0
},
{
"id": "ETERNA_FOREST_PSYCHIC_KODY",
"id": "LOCALID_PSYCHIC_KODY",
"graphics_id": "OBJ_EVENT_GFX_PSYCHIC",
"movement_type": "MOVEMENT_TYPE_LOOK_EAST",
"trainer_type": "TRAINER_TYPE_NORMAL",
@ -92,7 +92,7 @@
"y": 0
},
{
"id": "ETERNA_FOREST_PSYCHIC_LINDSEY",
"id": "LOCALID_PSYCHIC_LINDSEY",
"graphics_id": "OBJ_EVENT_GFX_PSYCHIC",
"movement_type": "MOVEMENT_TYPE_LOOK_EAST",
"trainer_type": "TRAINER_TYPE_NORMAL",
@ -109,7 +109,7 @@
"y": 0
},
{
"id": "ETERNA_FOREST_LASS_BRIANA",
"id": "LOCALID_LASS_BRIANA",
"graphics_id": "OBJ_EVENT_GFX_LASS",
"movement_type": "MOVEMENT_TYPE_LOOK_WEST",
"trainer_type": "TRAINER_TYPE_NORMAL",
@ -126,7 +126,7 @@
"y": 0
},
{
"id": "ETERNA_FOREST_BUG_CATCHER_DONALD",
"id": "LOCALID_BUG_CATCHER_DONALD",
"graphics_id": "OBJ_EVENT_GFX_BUG_CATCHER",
"movement_type": "MOVEMENT_TYPE_LOOK_SOUTH",
"trainer_type": "TRAINER_TYPE_NORMAL",
@ -203,7 +203,7 @@
"y": 0
},
{
"id": "ETERNA_FOREST_SIGNBOARD_12",
"id": "LOCALID_SIGNBOARD",
"graphics_id": "OBJ_EVENT_GFX_SIGNBOARD",
"movement_type": "MOVEMENT_TYPE_NONE",
"trainer_type": "TRAINER_TYPE_NONE",
@ -218,7 +218,7 @@
"y": 0
},
{
"id": "ETERNA_FOREST_TRAINER_TIPS_SIGNPOST_13",
"id": "LOCALID_TRAINER_TIPS_SIGNPOST",
"graphics_id": "OBJ_EVENT_GFX_TRAINER_TIPS_SIGNPOST",
"movement_type": "MOVEMENT_TYPE_NONE",
"trainer_type": "TRAINER_TYPE_NONE",
@ -233,7 +233,7 @@
"y": 0
},
{
"id": "ETERNA_FOREST_PSYCHIC_ELIJAH",
"id": "LOCALID_PSYCHIC_ELIJAH",
"graphics_id": "OBJ_EVENT_GFX_PSYCHIC",
"movement_type": "MOVEMENT_TYPE_LOOK_WEST",
"trainer_type": "TRAINER_TYPE_NORMAL",
@ -250,7 +250,7 @@
"y": 0
},
{
"id": "ETERNA_FOREST_PSYCHIC_RACHAEL",
"id": "LOCALID_PSYCHIC_RACHAEL",
"graphics_id": "OBJ_EVENT_GFX_PSYCHIC",
"movement_type": "MOVEMENT_TYPE_LOOK_WEST",
"trainer_type": "TRAINER_TYPE_NORMAL",
@ -267,7 +267,7 @@
"y": 0
},
{
"id": "ETERNA_FOREST_MOSS_ROCK_16",
"id": "LOCALID_MOSS_ROCK",
"graphics_id": "OBJ_EVENT_GFX_MOSS_ROCK",
"movement_type": "MOVEMENT_TYPE_NONE",
"trainer_type": "TRAINER_TYPE_NONE",
@ -312,7 +312,7 @@
"y": 0
},
{
"id": "ETERNA_FOREST_CUT_TREE_19",
"id": "LOCALID_CUT_TREE_1",
"graphics_id": "OBJ_EVENT_GFX_CUT_TREE",
"movement_type": "MOVEMENT_TYPE_NONE",
"trainer_type": "TRAINER_TYPE_NONE",
@ -327,7 +327,7 @@
"y": 0
},
{
"id": "ETERNA_FOREST_CUT_TREE_20",
"id": "LOCALID_CUT_TREE_2",
"graphics_id": "OBJ_EVENT_GFX_CUT_TREE",
"movement_type": "MOVEMENT_TYPE_NONE",
"trainer_type": "TRAINER_TYPE_NONE",
@ -342,7 +342,7 @@
"y": 0
},
{
"id": "ETERNA_FOREST_CUT_TREE_21",
"id": "LOCALID_CUT_TREE_3",
"graphics_id": "OBJ_EVENT_GFX_CUT_TREE",
"movement_type": "MOVEMENT_TYPE_NONE",
"trainer_type": "TRAINER_TYPE_NONE",
@ -357,7 +357,7 @@
"y": 0
},
{
"id": "ETERNA_FOREST_CUT_TREE_22",
"id": "LOCALID_CUT_TREE_4",
"graphics_id": "OBJ_EVENT_GFX_CUT_TREE",
"movement_type": "MOVEMENT_TYPE_NONE",
"trainer_type": "TRAINER_TYPE_NONE",
@ -372,7 +372,7 @@
"y": 0
},
{
"id": "ETERNA_FOREST_CUT_TREE_23",
"id": "LOCALID_CUT_TREE_5",
"graphics_id": "OBJ_EVENT_GFX_CUT_TREE",
"movement_type": "MOVEMENT_TYPE_NONE",
"trainer_type": "TRAINER_TYPE_NONE",
@ -387,7 +387,7 @@
"y": 0
},
{
"id": "ETERNA_FOREST_GARDENIA_24",
"id": "LOCALID_GARDENIA",
"graphics_id": "OBJ_EVENT_GFX_GARDENIA",
"movement_type": "MOVEMENT_TYPE_LOOK_NORTH",
"trainer_type": "TRAINER_TYPE_NONE",
@ -442,7 +442,7 @@
"y": 0,
"width": 2,
"length": 1,
"var": "VAR_UNK_0x40B1",
"var": "VAR_ETERNA_FOREST_FOLLOWER_CHERYL_STATE",
"value": 0
},
{
@ -452,7 +452,7 @@
"y": 0,
"width": 2,
"length": 1,
"var": "VAR_UNK_0x40B1",
"var": "VAR_ETERNA_FOREST_FOLLOWER_CHERYL_STATE",
"value": 1
},
{
@ -462,7 +462,7 @@
"y": 0,
"width": 1,
"length": 6,
"var": "VAR_UNK_0x40B1",
"var": "VAR_ETERNA_FOREST_FOLLOWER_CHERYL_STATE",
"value": 1
}
]

View File

@ -2,7 +2,7 @@
"bg_events": [],
"object_events": [
{
"id": "ETERNA_FOREST_OUTSIDE_BERRY_SOIL_0",
"id": "LOCALID_BERRY_SOIL_1",
"graphics_id": "OBJ_EVENT_GFX_BERRY_SOIL",
"movement_type": "MOVEMENT_TYPE_BERRY_SOIL",
"trainer_type": "TRAINER_TYPE_NONE",
@ -19,7 +19,7 @@
"y": 0
},
{
"id": "ETERNA_FOREST_OUTSIDE_BERRY_SOIL_1",
"id": "LOCALID_BERRY_SOIL_2",
"graphics_id": "OBJ_EVENT_GFX_BERRY_SOIL",
"movement_type": "MOVEMENT_TYPE_BERRY_SOIL",
"trainer_type": "TRAINER_TYPE_NONE",
@ -36,7 +36,7 @@
"y": 0
},
{
"id": "ETERNA_FOREST_OUTSIDE_BERRY_SOIL_2",
"id": "LOCALID_BERRY_SOIL_3",
"graphics_id": "OBJ_EVENT_GFX_BERRY_SOIL",
"movement_type": "MOVEMENT_TYPE_BERRY_SOIL",
"trainer_type": "TRAINER_TYPE_NONE",
@ -53,7 +53,7 @@
"y": 0
},
{
"id": "ETERNA_FOREST_OUTSIDE_BERRY_SOIL_3",
"id": "LOCALID_BERRY_SOIL_4",
"graphics_id": "OBJ_EVENT_GFX_BERRY_SOIL",
"movement_type": "MOVEMENT_TYPE_BERRY_SOIL",
"trainer_type": "TRAINER_TYPE_NONE",
@ -70,7 +70,7 @@
"y": 0
},
{
"id": "ETERNA_FOREST_OUTSIDE_CUT_TREE_4",
"id": "LOCALID_CUT_TREE_1",
"graphics_id": "OBJ_EVENT_GFX_CUT_TREE",
"movement_type": "MOVEMENT_TYPE_NONE",
"trainer_type": "TRAINER_TYPE_NONE",
@ -85,7 +85,7 @@
"y": 0
},
{
"id": "ETERNA_FOREST_OUTSIDE_CUT_TREE_5",
"id": "LOCALID_CUT_TREE_2",
"graphics_id": "OBJ_EVENT_GFX_CUT_TREE",
"movement_type": "MOVEMENT_TYPE_NONE",
"trainer_type": "TRAINER_TYPE_NONE",
@ -100,7 +100,7 @@
"y": 0
},
{
"id": "ETERNA_FOREST_OUTSIDE_CUT_TREE_6",
"id": "LOCALID_CUT_TREE_3",
"graphics_id": "OBJ_EVENT_GFX_CUT_TREE",
"movement_type": "MOVEMENT_TYPE_NONE",
"trainer_type": "TRAINER_TYPE_NONE",
@ -115,7 +115,7 @@
"y": 0
},
{
"id": "ETERNA_FOREST_OUTSIDE_CUT_TREE_7",
"id": "LOCALID_CUT_TREE_4",
"graphics_id": "OBJ_EVENT_GFX_CUT_TREE",
"movement_type": "MOVEMENT_TYPE_NONE",
"trainer_type": "TRAINER_TYPE_NONE",
@ -160,7 +160,7 @@
"y": 0
},
{
"id": "ETERNA_FOREST_OUTSIDE_POKEMON_BREEDER_F_10",
"id": "LOCALID_POKEMON_BREEDER_F",
"graphics_id": "OBJ_EVENT_GFX_POKEMON_BREEDER_F",
"movement_type": "MOVEMENT_TYPE_WANDER_AROUND",
"trainer_type": "TRAINER_TYPE_NONE",

View File

@ -17,11 +17,11 @@
"y": 0
},
{
"id": "OLD_CHATEAU_BACK_MIDDLE_EAST_ROOM_TWIN_1",
"id": "LOCALID_TWIN",
"graphics_id": "OBJ_EVENT_GFX_TWIN",
"movement_type": "MOVEMENT_TYPE_NONE",
"trainer_type": "TRAINER_TYPE_NONE",
"hidden_flag": "FLAG_UNK_0x027C",
"hidden_flag": "FLAG_HIDE_OLD_CHATEAU_BACK_MIDDLE_EAST_ROOM_TWIN",
"script": 0,
"initial_dir": 2,
"data": [],

View File

@ -11,11 +11,11 @@
],
"object_events": [
{
"id": "OLD_CHATEAU_DINING_AREA_OLD_MAN_0",
"id": "LOCALID_OLD_MAN",
"graphics_id": "OBJ_EVENT_GFX_OLD_MAN",
"movement_type": "MOVEMENT_TYPE_NONE",
"trainer_type": "TRAINER_TYPE_NONE",
"hidden_flag": "FLAG_UNK_0x027B",
"hidden_flag": "FLAG_HIDE_OLD_CHATEAU_DINING_AREA_OLD_MAN",
"script": 0,
"initial_dir": 1,
"data": [],

View File

@ -11,7 +11,7 @@
],
"object_events": [
{
"id": "ROUTE_205_NORTH_FISHERMAN_ANDREW",
"id": "LOCALID_FISHERMAN_ANDREW",
"graphics_id": "OBJ_EVENT_GFX_FISHERMAN",
"movement_type": "MOVEMENT_TYPE_LOOK_EAST",
"trainer_type": "TRAINER_TYPE_NORMAL",
@ -26,7 +26,7 @@
"y": 7
},
{
"id": "ROUTE_205_NORTH_FISHERMAN_JOSEPH",
"id": "LOCALID_FISHERMAN_JOSEPH",
"graphics_id": "OBJ_EVENT_GFX_FISHERMAN",
"movement_type": "MOVEMENT_TYPE_LOOK_SOUTH",
"trainer_type": "TRAINER_TYPE_NORMAL",
@ -41,7 +41,7 @@
"y": 7
},
{
"id": "ROUTE_205_NORTH_FISHERMAN_ZACHARY",
"id": "LOCALID_FISHERMAN_ZACHARY",
"graphics_id": "OBJ_EVENT_GFX_FISHERMAN",
"movement_type": "MOVEMENT_TYPE_LOOK_SOUTH",
"trainer_type": "TRAINER_TYPE_NORMAL",
@ -56,7 +56,7 @@
"y": 7
},
{
"id": "ROUTE_205_NORTH_ARROW_SIGNPOST_3",
"id": "LOCALID_ARROW_SIGNPOST_ETERNA_FOREST",
"graphics_id": "OBJ_EVENT_GFX_ARROW_SIGNPOST",
"movement_type": "MOVEMENT_TYPE_NONE",
"trainer_type": "TRAINER_TYPE_NONE",
@ -73,7 +73,7 @@
"y": 0
},
{
"id": "ROUTE_205_NORTH_ARROW_SIGNPOST_4",
"id": "LOCALID_ARROW_SIGNPOST_ETERNA_CITY",
"graphics_id": "OBJ_EVENT_GFX_ARROW_SIGNPOST",
"movement_type": "MOVEMENT_TYPE_NONE",
"trainer_type": "TRAINER_TYPE_NONE",
@ -90,7 +90,7 @@
"y": 0
},
{
"id": "ROUTE_205_NORTH_FISHERMAN_5",
"id": "LOCALID_FISHERMAN",
"graphics_id": "OBJ_EVENT_GFX_FISHERMAN",
"movement_type": "MOVEMENT_TYPE_LOOK_SOUTH",
"trainer_type": "TRAINER_TYPE_NONE",
@ -120,7 +120,7 @@
"y": 0
},
{
"id": "ROUTE_205_NORTH_BERRY_SOIL_7",
"id": "LOCALID_BERRY_SOIL_1",
"graphics_id": "OBJ_EVENT_GFX_BERRY_SOIL",
"movement_type": "MOVEMENT_TYPE_BERRY_SOIL",
"trainer_type": "TRAINER_TYPE_NONE",
@ -137,7 +137,7 @@
"y": 0
},
{
"id": "ROUTE_205_NORTH_BERRY_SOIL_8",
"id": "LOCALID_BERRY_SOIL_2",
"graphics_id": "OBJ_EVENT_GFX_BERRY_SOIL",
"movement_type": "MOVEMENT_TYPE_BERRY_SOIL",
"trainer_type": "TRAINER_TYPE_NONE",
@ -154,7 +154,7 @@
"y": 0
},
{
"id": "ROUTE_205_NORTH_BERRY_SOIL_9",
"id": "LOCALID_BERRY_SOIL_3",
"graphics_id": "OBJ_EVENT_GFX_BERRY_SOIL",
"movement_type": "MOVEMENT_TYPE_BERRY_SOIL",
"trainer_type": "TRAINER_TYPE_NONE",
@ -171,7 +171,7 @@
"y": 0
},
{
"id": "ROUTE_205_NORTH_BERRY_SOIL_10",
"id": "LOCALID_BERRY_SOIL_4",
"graphics_id": "OBJ_EVENT_GFX_BERRY_SOIL",
"movement_type": "MOVEMENT_TYPE_BERRY_SOIL",
"trainer_type": "TRAINER_TYPE_NONE",
@ -188,12 +188,12 @@
"y": 0
},
{
"id": "ROUTE_205_NORTH_MAP_SIGNPOST_11",
"id": "LOCALID_MAP_SIGNPOST",
"clone_id": 7,
"graphics_id": "OBJ_EVENT_GFX_MAP_SIGNPOST",
"movement_type": "MOVEMENT_TYPE_NONE",
"trainer_type": "TRAINER_TYPE_NONE",
"hidden_flag": "FLAG_UNK_0x0041",
"hidden_flag": "MAP_HEADER_ETERNA_CITY",
"script": 65535,
"initial_dir": 0,
"data": [

View File

@ -1,280 +1,280 @@
#include "macros/scrcmd.inc"
#include "res/text/bank/eterna_forest.h"
#include "res/field/events/events_eterna_forest.h"
ScriptEntry _0047
ScriptEntry _0108
ScriptEntry _0198
ScriptEntry _03EC
ScriptEntry _03F5
ScriptEntry _03FE
ScriptEntry _0411
ScriptEntry _04E0
ScriptEntry _04F7
ScriptEntry _050C
ScriptEntry _0032
ScriptEntry _051D
ScriptEntry EternaForest_TriggerStartFollowingCheryl
ScriptEntry EternaForest_TriggerPlayerLeaveCheryl
ScriptEntry EternaForest_TriggerCherylLeavePlayer
ScriptEntry EternaForest_Unused4
ScriptEntry EternaForest_Unused5
ScriptEntry EternaForest_BugCatcher
ScriptEntry EternaForest_Gardenia
ScriptEntry EternaForest_LandmarkSignEternaForest
ScriptEntry EternaForest_TrainerTipsSignpost
ScriptEntry EternaForest_MossRock
ScriptEntry EternaForest_OnTransition
ScriptEntry EternaForest_OnFrameCherylOldChateauCutscene
ScriptEntryEnd
_0032:
GoToIfUnset FLAG_TRAVELED_WITH_CHERYL, _003F
EternaForest_OnTransition:
GoToIfUnset FLAG_TRAVELED_WITH_CHERYL, EternaForest_ResetFollowerCherylState
End
_003F:
SetVar VAR_UNK_0x40B1, 0
EternaForest_ResetFollowerCherylState:
SetVar VAR_ETERNA_FOREST_FOLLOWER_CHERYL_STATE, 0
End
_0047:
EternaForest_TriggerStartFollowingCheryl:
LockAll
SetPlayerBike FALSE
GetPlayerMapPos VAR_0x8004, VAR_0x8005
GoToIfEq VAR_0x8004, 28, _006E
GoToIfEq VAR_0x8004, 29, _007E
GoToIfEq VAR_0x8004, 28, EternaForest_CherylNoticeAndWalkToPlayerX28
GoToIfEq VAR_0x8004, 29, EternaForest_CherylNoticeAndWalkToPlayerX29
End
_006E:
ApplyMovement 0, _00E8
EternaForest_CherylNoticeAndWalkToPlayerX28:
ApplyMovement LOCALID_CHERYL, EternaForest_Movement_CherylNoticeAndWalkToPlayerX28
WaitMovement
GoTo _008E
GoTo EternaForest_StartFollowingCheryl
_007E:
ApplyMovement 0, _00F4
EternaForest_CherylNoticeAndWalkToPlayerX29:
ApplyMovement LOCALID_CHERYL, EternaForest_Movement_CherylNoticeAndWalkToPlayerX29
WaitMovement
GoTo _008E
GoTo EternaForest_StartFollowingCheryl
_008E:
CallIfUnset FLAG_UNK_0x008B, _00D8
CallIfSet FLAG_UNK_0x008B, _00E0
EternaForest_StartFollowingCheryl:
CallIfUnset FLAG_TALKED_TO_ETERNA_FOREST_CHERYL, EternaForest_PleaseMayIGoThroughWithYou
CallIfSet FLAG_TALKED_TO_ETERNA_FOREST_CHERYL, EternaForest_LetsGetThroughThisForestTogether
BufferPlayerName 0
PlaySound SEQ_GONIN
Message 1
Message EternaForest_Text_PlayerDecidedToGoWithCheryl
WaitSound
SetFlag FLAG_UNK_0x008B
SetVar VAR_UNK_0x40B1, 1
Message 2
SetFlag FLAG_TALKED_TO_ETERNA_FOREST_CHERYL
SetVar VAR_ETERNA_FOREST_FOLLOWER_CHERYL_STATE, 1
Message EternaForest_Text_IllKeepYourPokemonInPerfectHealth
WaitABXPadPress
CloseMessage
SetVar VAR_PARTNER_TRAINER_ID, TRAINER_CHERYL_ETERNA_FOREST
SetHasPartner
SetMovementType 0, 48
SetObjectFlagIsPersistent 0, TRUE
SetMovementType LOCALID_CHERYL, MOVEMENT_TYPE_FOLLOW_PLAYER
SetObjectFlagIsPersistent LOCALID_CHERYL, TRUE
ReleaseAll
End
_00D8:
EternaForest_PleaseMayIGoThroughWithYou:
BufferPlayerName 0
Message 0
Message EternaForest_Text_PleaseMayIGoThroughWithYou
Return
_00E0:
EternaForest_LetsGetThroughThisForestTogether:
BufferPlayerName 0
Message 3
Message EternaForest_Text_LetsGetThroughThisForestTogether
Return
.balign 4, 0
_00E8:
EternaForest_Movement_CherylNoticeAndWalkToPlayerX28:
MoveAction_153
WalkNormalSouth
EndMovement
.balign 4, 0
_00F4:
EternaForest_Movement_CherylNoticeAndWalkToPlayerX29:
MoveAction_153
WalkNormalSouth
WalkNormalEast
WalkOnSpotNormalSouth
EndMovement
_0108:
EternaForest_TriggerPlayerLeaveCheryl:
LockAll
ClearHasPartner
SetMovementType 0, 15
SetObjectFlagIsPersistent 0, FALSE
ApplyMovement 0, _0190
SetMovementType LOCALID_CHERYL, MOVEMENT_TYPE_LOOK_SOUTH
SetObjectFlagIsPersistent LOCALID_CHERYL, FALSE
ApplyMovement LOCALID_CHERYL, EternaForest_Movement_CherylWalkOnSpotSouth
WaitMovement
Message 4
Message EternaForest_Text_IllWaitHereForYouThen
CloseMessage
GetPlayerMapPos VAR_0x8004, VAR_0x8005
GoToIfEq VAR_0x8004, 28, _0148
GoToIfEq VAR_0x8004, 29, _0158
GoToIfEq VAR_0x8004, 28, EternaForest_CherylWalkBackToOriginalPositionX28
GoToIfEq VAR_0x8004, 29, EternaForest_CherylWalkBackToOriginalPositionX29
End
_0148:
ApplyMovement 0, _0174
EternaForest_CherylWalkBackToOriginalPositionX28:
ApplyMovement LOCALID_CHERYL, EternaForest_Movement_CherylWalkBackToOriginalPositionX28
WaitMovement
GoTo _0168
GoTo EternaForest_ResetFollowerCherylStateAndRelease
_0158:
ApplyMovement 0, _0180
EternaForest_CherylWalkBackToOriginalPositionX29:
ApplyMovement LOCALID_CHERYL, EternaForest_Movement_CherylWalkBackToOriginalPositionX29
WaitMovement
GoTo _0168
GoTo EternaForest_ResetFollowerCherylStateAndRelease
_0168:
SetVar VAR_UNK_0x40B1, 0
EternaForest_ResetFollowerCherylStateAndRelease:
SetVar VAR_ETERNA_FOREST_FOLLOWER_CHERYL_STATE, 0
ReleaseAll
End
.balign 4, 0
_0174:
EternaForest_Movement_CherylWalkBackToOriginalPositionX28:
WalkNormalNorth 2
WalkOnSpotNormalSouth
EndMovement
.balign 4, 0
_0180:
EternaForest_Movement_CherylWalkBackToOriginalPositionX29:
WalkNormalNorth 2
WalkNormalWest
WalkOnSpotNormalSouth
EndMovement
.balign 4, 0
_0190:
EternaForest_Movement_CherylWalkOnSpotSouth:
WalkOnSpotNormalSouth
EndMovement
_0198:
EternaForest_TriggerCherylLeavePlayer:
LockAll
ApplyMovement 0, _0300
ApplyMovement LOCALID_PLAYER, _0368
ApplyMovement LOCALID_CHERYL, EternaForest_Movement_CherylExclamationMark
ApplyMovement LOCALID_PLAYER, EternaForest_Movement_PlayerWalkOnSpotWest
WaitMovement
BufferPlayerName 0
Message 5
Message EternaForest_Text_OhTheresTheExitThankYouSoMuchPlayer
SetVar VAR_0x8004, ITEM_SOOTHE_BELL
SetVar VAR_0x8005, 1
GoToIfCannotFitItem VAR_0x8004, VAR_0x8005, VAR_RESULT, _01EA
GoTo _01DB
GoToIfCannotFitItem VAR_0x8004, VAR_0x8005, VAR_RESULT, EternaForest_CherylWalkToExit
GoTo EternaForest_GiveSootheBell
End
_01DB:
Message 6
EternaForest_GiveSootheBell:
Message EternaForest_Text_ThisIsMyTokenOfAppreciation
Common_GiveItemQuantityNoLineFeed
GoTo _01EA
GoTo EternaForest_CherylWalkToExit
End
_01EA:
EternaForest_CherylWalkToExit:
CloseMessage
GetPlayerMapPos VAR_0x8004, VAR_0x8005
GoToIfEq VAR_0x8005, 34, _023B
GoToIfEq VAR_0x8005, 35, _0253
GoToIfEq VAR_0x8005, 36, _026B
GoToIfEq VAR_0x8005, 37, _0283
GoToIfEq VAR_0x8005, 38, _029B
GoTo _02B3
GoToIfEq VAR_0x8005, 34, EternaForest_CherylWalkToExitX34
GoToIfEq VAR_0x8005, 35, EternaForest_CherylWalkToExitX35
GoToIfEq VAR_0x8005, 36, EternaForest_CherylWalkToExitX36
GoToIfEq VAR_0x8005, 37, EternaForest_CherylWalkToExitX37
GoToIfEq VAR_0x8005, 38, EternaForest_CherylWalkToExitX38
GoTo EternaForest_CherylWalkToExitX39
End
_023B:
ApplyMovement 0, _030C
ApplyMovement LOCALID_PLAYER, _0374
EternaForest_CherylWalkToExitX34:
ApplyMovement LOCALID_CHERYL, EternaForest_Movement_CherylWalkToExitX34
ApplyMovement LOCALID_PLAYER, EternaForest_Movement_PlayerWatchCherylWalkToExitX34
WaitMovement
GoTo _02CB
GoTo EternaForest_CherylLeave
_0253:
ApplyMovement 0, _0318
ApplyMovement LOCALID_PLAYER, _0388
EternaForest_CherylWalkToExitX35:
ApplyMovement LOCALID_CHERYL, EternaForest_Movement_CherylWalkToExitX35
ApplyMovement LOCALID_PLAYER, EternaForest_Movement_PlayerWatchCherylWalkToExitX35
WaitMovement
GoTo _02CB
GoTo EternaForest_CherylLeave
_026B:
ApplyMovement 0, _0324
ApplyMovement LOCALID_PLAYER, _039C
EternaForest_CherylWalkToExitX36:
ApplyMovement LOCALID_CHERYL, EternaForest_Movement_CherylWalkToExitX36
ApplyMovement LOCALID_PLAYER, EternaForest_Movement_PlayerWatchCherylWalkToExitX36
WaitMovement
GoTo _02CB
GoTo EternaForest_CherylLeave
_0283:
ApplyMovement 0, _0330
ApplyMovement LOCALID_PLAYER, _03B0
EternaForest_CherylWalkToExitX37:
ApplyMovement LOCALID_CHERYL, EternaForest_Movement_CherylWalkToExitX37
ApplyMovement LOCALID_PLAYER, EternaForest_Movement_PlayerWatchCherylWalkToExitX37
WaitMovement
GoTo _02CB
GoTo EternaForest_CherylLeave
_029B:
ApplyMovement 0, _033C
ApplyMovement LOCALID_PLAYER, _03C4
EternaForest_CherylWalkToExitX38:
ApplyMovement LOCALID_CHERYL, EternaForest_Movement_CherylWalkToExitX38
ApplyMovement LOCALID_PLAYER, EternaForest_Movement_PlayerWatchCherylWalkToExitX38
WaitMovement
GoTo _02CB
GoTo EternaForest_CherylLeave
_02B3:
ApplyMovement 0, _0348
ApplyMovement LOCALID_PLAYER, _03D8
EternaForest_CherylWalkToExitX39:
ApplyMovement LOCALID_CHERYL, EternaForest_Movement_CherylWalkToExitX39
ApplyMovement LOCALID_PLAYER, EternaForest_Movement_PlayerWatchCherylWalkToExitX39
WaitMovement
GoTo _02CB
GoTo EternaForest_CherylLeave
_02CB:
ApplyMovement 0, _0354
EternaForest_CherylLeave:
ApplyMovement LOCALID_CHERYL, EternaForest_Movement_CherylWalkOnSpotWest
WaitMovement
Message 7
Message EternaForest_Text_ImSureWellMeetAgainSomewhere
CloseMessage
ApplyMovement 0, _035C
ApplyMovement LOCALID_CHERYL, EternaForest_Movement_CherylLeave
WaitMovement
PlayFanfare SEQ_SE_DP_KAIDAN2
ClearHasPartner
RemoveObject 0
RemoveObject LOCALID_CHERYL
WaitFanfare SEQ_SE_DP_KAIDAN2
SetFlag FLAG_TRAVELED_WITH_CHERYL
SetVar VAR_UNK_0x40B1, 2
SetVar VAR_ETERNA_FOREST_FOLLOWER_CHERYL_STATE, 2
ReleaseAll
End
.balign 4, 0
_0300:
EternaForest_Movement_CherylExclamationMark:
WalkOnSpotNormalEast
MoveAction_153
EndMovement
.balign 4, 0
_030C:
EternaForest_Movement_CherylWalkToExitX34:
WalkNormalSouth 2
WalkNormalEast 5
EndMovement
.balign 4, 0
_0318:
EternaForest_Movement_CherylWalkToExitX35:
WalkNormalSouth
WalkNormalEast 5
EndMovement
.balign 4, 0
_0324:
EternaForest_Movement_CherylWalkToExitX36:
WalkNormalSouth
WalkNormalEast 5
EndMovement
.balign 4, 0
_0330:
EternaForest_Movement_CherylWalkToExitX37:
WalkNormalNorth
WalkNormalEast 5
EndMovement
.balign 4, 0
_033C:
EternaForest_Movement_CherylWalkToExitX38:
WalkNormalNorth
WalkNormalEast 5
EndMovement
.balign 4, 0
_0348:
EternaForest_Movement_CherylWalkToExitX39:
WalkNormalNorth 2
WalkNormalEast 5
EndMovement
.balign 4, 0
_0354:
EternaForest_Movement_CherylWalkOnSpotWest:
WalkOnSpotNormalWest
EndMovement
.balign 4, 0
_035C:
EternaForest_Movement_CherylLeave:
Delay8
WalkOnSpotNormalEast
EndMovement
.balign 4, 0
_0368:
EternaForest_Movement_PlayerWalkOnSpotWest:
Delay8 3
WalkOnSpotNormalWest
EndMovement
.balign 4, 0
_0374:
EternaForest_Movement_PlayerWatchCherylWalkToExitX34:
Delay8 2
WalkOnSpotNormalSouth
Delay8
@ -282,7 +282,7 @@ _0374:
EndMovement
.balign 4, 0
_0388:
EternaForest_Movement_PlayerWatchCherylWalkToExitX35:
Delay8
WalkOnSpotNormalSouth
Delay8
@ -290,7 +290,7 @@ _0388:
EndMovement
.balign 4, 0
_039C:
EternaForest_Movement_PlayerWatchCherylWalkToExitX36:
Delay8
WalkOnSpotNormalSouth
Delay8
@ -298,7 +298,7 @@ _039C:
EndMovement
.balign 4, 0
_03B0:
EternaForest_Movement_PlayerWatchCherylWalkToExitX37:
Delay8
WalkOnSpotNormalNorth
Delay8
@ -306,7 +306,7 @@ _03B0:
EndMovement
.balign 4, 0
_03C4:
EternaForest_Movement_PlayerWatchCherylWalkToExitX38:
Delay8
WalkOnSpotNormalNorth
Delay8
@ -314,119 +314,119 @@ _03C4:
EndMovement
.balign 4, 0
_03D8:
EternaForest_Movement_PlayerWatchCherylWalkToExitX39:
Delay8 2
WalkOnSpotNormalNorth
Delay8
WalkOnSpotNormalEast
EndMovement
_03EC:
EternaForest_Unused4:
LockAll
BufferPlayerName 0
ReleaseAll
End
_03F5:
EternaForest_Unused5:
LockAll
BufferPlayerName 0
ReleaseAll
End
_03FE:
NPCMessage 9
EternaForest_BugCatcher:
NPCMessage EternaForest_Text_ImSearchingForBugPokemonSoICanWinAtTheEternaGym
End
_0411:
EternaForest_Gardenia:
PlayFanfare SEQ_SE_CONFIRM
LockAll
FacePlayer
Message 11
Message EternaForest_Text_HiyaWereYouIngriguedByTheRumorsGoingAroundToo
CloseMessage
ApplyMovement 24, _04BC
ApplyMovement LOCALID_GARDENIA, EternaForest_Movement_GardeniaWalkOnSpotNorth
WaitMovement
Message 12
Message EternaForest_Text_YouKnowPeopleveBeenTalkingAboutTheGhostPokemonOfTheOldChateau
FacePlayer
Message 13
Message EternaForest_Text_IShouldCheckItOutMyselfButGoingInThereIs
CloseMessage
GetPlayerDir VAR_RESULT
GoToIfEq VAR_RESULT, 0, _046C
GoToIfEq VAR_RESULT, 1, _047E
GoToIfEq VAR_RESULT, 2, _0490
GoToIfEq VAR_RESULT, 3, _04A2
GoToIfEq VAR_RESULT, DIR_NORTH, EternaForest_GardeniaLeaveNorth
GoToIfEq VAR_RESULT, DIR_SOUTH, EternaForest_GardeniaLeaveSouth
GoToIfEq VAR_RESULT, DIR_WEST, EternaForest_GardeniaLeaveWest
GoToIfEq VAR_RESULT, DIR_EAST, EternaForest_GardeniaLeaveEast
End
_046C:
ApplyMovement 24, _04D0
EternaForest_GardeniaLeaveNorth:
ApplyMovement LOCALID_GARDENIA, EternaForest_Movement_GardeniaLeaveNorth
WaitMovement
GoTo _04B4
GoTo EternaForest_RemoveGardenia
End
_047E:
ApplyMovement 24, _04C4
EternaForest_GardeniaLeaveSouth:
ApplyMovement LOCALID_GARDENIA, EternaForest_Movement_GardeniaLeaveSouthWestEast
WaitMovement
GoTo _04B4
GoTo EternaForest_RemoveGardenia
End
_0490:
ApplyMovement 24, _04C4
EternaForest_GardeniaLeaveWest:
ApplyMovement LOCALID_GARDENIA, EternaForest_Movement_GardeniaLeaveSouthWestEast
WaitMovement
GoTo _04B4
GoTo EternaForest_RemoveGardenia
End
_04A2:
ApplyMovement 24, _04C4
EternaForest_GardeniaLeaveEast:
ApplyMovement LOCALID_GARDENIA, EternaForest_Movement_GardeniaLeaveSouthWestEast
WaitMovement
GoTo _04B4
GoTo EternaForest_RemoveGardenia
End
_04B4:
RemoveObject 24
EternaForest_RemoveGardenia:
RemoveObject LOCALID_GARDENIA
ReleaseAll
End
.balign 4, 0
_04BC:
EternaForest_Movement_GardeniaWalkOnSpotNorth:
WalkOnSpotNormalNorth
EndMovement
.balign 4, 0
_04C4:
EternaForest_Movement_GardeniaLeaveSouthWestEast:
WalkNormalSouth 2
WalkNormalEast 9
EndMovement
.balign 4, 0
_04D0:
EternaForest_Movement_GardeniaLeaveNorth:
WalkNormalWest
WalkNormalSouth 2
WalkNormalEast 10
EndMovement
_04E0:
ShowLandmarkSign 14
EternaForest_LandmarkSignEternaForest:
ShowLandmarkSign EternaForest_Text_TheEternaForestWhereTimeFlowsEternally
End
_04F7:
ShowScrollingSign 15
EternaForest_TrainerTipsSignpost:
ShowScrollingSign EternaForest_Text_TrainerTipsInForestsAndCavesThereAreManyItemsOnTheGround
End
_050C:
EventMessage 10
EternaForest_MossRock:
EventMessage EternaForest_Text_TheRockIsCoveredInMoss
End
_051D:
EternaForest_OnFrameCherylOldChateauCutscene:
LockAll
SetVar VAR_UNK_0x40CD, 2
ApplyMovement 0, _053C
SetVar VAR_ETERNA_FOREST_CHERYL_OLD_CHATEAU_CUTSCENE_STATE, 2
ApplyMovement LOCALID_CHERYL, EternaForest_Movement_CherylWalkOnSpotNorth
WaitMovement
Message 8
Message EternaForest_Text_ThereIsAnOldChateauAhead
WaitABXPadPress
CloseMessage
ReleaseAll
End
.balign 4, 0
_053C:
EternaForest_Movement_CherylWalkOnSpotNorth:
WalkOnSpotNormalNorth
EndMovement

View File

@ -2,42 +2,42 @@
#include "res/text/bank/eterna_forest_outside.h"
ScriptEntry _0012
ScriptEntry _0058
ScriptEntry _006F
ScriptEntry _0018
ScriptEntry EternaForestOutside_OnTransition
ScriptEntry EternaForestOutside_Unused2
ScriptEntry EternaForestOutside_Unused3
ScriptEntry EternaForestOutside_PokemonBreederF
ScriptEntryEnd
_0012:
EternaForestOutside_OnTransition:
SetFlag FLAG_FIRST_ARRIVAL_ETERNA_FOREST
End
_0018:
EternaForestOutside_PokemonBreederF:
PlayFanfare SEQ_SE_CONFIRM
LockAll
FacePlayer
GoToIfSet FLAG_UNK_0x012A, _004D
GoToIfSet FLAG_OBTAINED_ETERNA_FOREST_OUTSIDE_ACCESSORY_BIG_TREE, EternaForestOutside_ICollectBerriesAndTradeThemForAccessoriesInFloaromaTown
SetVar VAR_0x8004, ACCESSORY_BIG_TREE
BufferAccessoryName 0, VAR_0x8004
Message 0
Message EternaForestOutside_Text_OhAreYouCollectingAccessoriesIveGotSomethingForYou
SetVar VAR_0x8005, 1
Common_GiveAccessoryWaitForConfirm
SetFlag FLAG_UNK_0x012A
SetFlag FLAG_OBTAINED_ETERNA_FOREST_OUTSIDE_ACCESSORY_BIG_TREE
CloseMessage
ReleaseAll
End
_004D:
Message 1
EternaForestOutside_ICollectBerriesAndTradeThemForAccessoriesInFloaromaTown:
Message EternaForestOutside_Text_ICollectBerriesAndTradeThemForAccessoriesInFloaromaTown
WaitABXPadPress
CloseMessage
ReleaseAll
End
_0058:
ShowLandmarkSign 2
EternaForestOutside_Unused2:
ShowLandmarkSign EternaForestOutside_Text_Dummy2
End
_006F:
ShowScrollingSign 3
EternaForestOutside_Unused3:
ShowScrollingSign EternaForestOutside_Text_Dummy3
End

View File

@ -80,11 +80,11 @@ _0133:
End
_014A:
GoToIfNe VAR_UNK_0x40CD, 0, _0221
GoToIfNe VAR_UNK_0x40B1, 1, _0221
GoToIfNe VAR_ETERNA_FOREST_CHERYL_OLD_CHATEAU_CUTSCENE_STATE, 0, _0221
GoToIfNe VAR_ETERNA_FOREST_FOLLOWER_CHERYL_STATE, 1, _0221
Call _017F
GoToIfEq VAR_RESULT, 0, _0221
SetVar VAR_UNK_0x40CD, 1
SetVar VAR_ETERNA_FOREST_CHERYL_OLD_CHATEAU_CUTSCENE_STATE, 1
Return
_017F:

View File

@ -6,7 +6,7 @@
InitScriptEntryEnd
InitScriptFrameTable:
InitScriptGoToIfEqual VAR_UNK_0x40CD, 1, 12
InitScriptGoToIfEqual VAR_ETERNA_FOREST_CHERYL_OLD_CHATEAU_CUTSCENE_STATE, 1, 12
InitScriptFrameTableEnd
InitScriptEnd

View File

@ -6,7 +6,7 @@
InitScriptEntryEnd
InitScriptFrameTable:
InitScriptGoToIfEqual VAR_UNK_0x4111, 1, 2
InitScriptGoToIfEqual VAR_OLD_CHATEAU_BACK_MIDDLE_EAST_ROOM_TWIN_STATE, 1, 2
InitScriptFrameTableEnd
InitScriptEnd

View File

@ -6,7 +6,7 @@
InitScriptEntryEnd
InitScriptFrameTable:
InitScriptGoToIfEqual VAR_UNK_0x4110, 1, 2
InitScriptGoToIfEqual VAR_OLD_CHATEAU_DINING_AREA_OLD_MAN_STATE, 1, 2
InitScriptFrameTableEnd
InitScriptEnd

View File

@ -2,16 +2,16 @@
#include "res/text/bank/old_chateau.h"
ScriptEntry _000A
ScriptEntry _0010
ScriptEntry OldChateau_OnTransition
ScriptEntry OldChateau_Statue
ScriptEntryEnd
_000A:
OldChateau_OnTransition:
SetFlag FLAG_FIRST_ARRIVAL_OLD_CHATEAU
End
_0010:
EventMessage 0
OldChateau_Statue:
EventMessage OldChateau_Text_ItAppearsAsIfItIsGlaring
End
.balign 4, 0

View File

@ -1,33 +1,34 @@
#include "macros/scrcmd.inc"
#include "res/field/events/events_old_chateau_back_middle_east_room.h"
ScriptEntry _000A
ScriptEntry _002E
ScriptEntry OldChateauBackMiddleEastRoom_OnTransition
ScriptEntry OldChateauBackMiddleEastRoom_OnFrameTwinLeave
ScriptEntryEnd
_000A:
ScrCmd_292 25, VAR_MAP_LOCAL_0
GoToIfEq VAR_MAP_LOCAL_0, 1, _0022
SetFlag FLAG_UNK_0x027C
OldChateauBackMiddleEastRoom_OnTransition:
CheckShouldShowGhost 25, VAR_MAP_LOCAL_0
GoToIfEq VAR_MAP_LOCAL_0, 1, OldChateauBackMiddleEastRoom_ShowTwin
SetFlag FLAG_HIDE_OLD_CHATEAU_BACK_MIDDLE_EAST_ROOM_TWIN
End
_0022:
ClearFlag FLAG_UNK_0x027C
SetVar VAR_UNK_0x4111, 1
OldChateauBackMiddleEastRoom_ShowTwin:
ClearFlag FLAG_HIDE_OLD_CHATEAU_BACK_MIDDLE_EAST_ROOM_TWIN
SetVar VAR_OLD_CHATEAU_BACK_MIDDLE_EAST_ROOM_TWIN_STATE, 1
End
_002E:
OldChateauBackMiddleEastRoom_OnFrameTwinLeave:
LockAll
ApplyMovement 1, _004C
ApplyMovement LOCALID_TWIN, OldChateauBackMiddleEastRoom_Movement_TwinLeave
WaitMovement
SetFlag FLAG_UNK_0x027C
RemoveObject 1
SetVar VAR_UNK_0x4111, 0
SetFlag FLAG_HIDE_OLD_CHATEAU_BACK_MIDDLE_EAST_ROOM_TWIN
RemoveObject LOCALID_TWIN
SetVar VAR_OLD_CHATEAU_BACK_MIDDLE_EAST_ROOM_TWIN_STATE, 0
ReleaseAll
End
.balign 4, 0
_004C:
OldChateauBackMiddleEastRoom_Movement_TwinLeave:
Delay16
FaceSouth
Delay16

View File

@ -2,54 +2,54 @@
#include "res/text/bank/old_chateau_back_middle_west_room.h"
ScriptEntry _0006
ScriptEntry OldChateauBackMiddleWestRoom_TV
ScriptEntryEnd
_0006:
OldChateauBackMiddleWestRoom_TV:
PlayFanfare SEQ_SE_CONFIRM
LockAll
GoToIfSet FLAG_UNK_0x0149, _009C
GoToIfSet FLAG_UNK_0x0AB0, _009C
GoToIfSet FLAG_CAUGHT_OLD_CHATEAU_ROTOM, OldChateauBackMiddleWestRoom_TheTVHasAnOddlyMalevolentFeel
GoToIfSet FLAG_BATTLED_OLD_CHATEAU_ROTOM, OldChateauBackMiddleWestRoom_TheTVHasAnOddlyMalevolentFeel
GetTimeOfDay VAR_RESULT
GoToIfLt VAR_RESULT, 3, _009C
Message 1
GoToIfLt VAR_RESULT, TIMEOFDAY_NIGHT, OldChateauBackMiddleWestRoom_TheTVHasAnOddlyMalevolentFeel
Message OldChateauBackMiddleWestRoom_Text_ThereAppearsToBeAPokemonWantToThumpTheTV
ShowYesNoMenu VAR_RESULT
GoToIfEq VAR_RESULT, MENU_NO, _0096
GoToIfEq VAR_RESULT, MENU_NO, OldChateauBackMiddleWestRoom_End
BufferPlayerName 0
Message 2
Message OldChateauBackMiddleWestRoom_Text_PlayerThumpedTheTVSet
CloseMessage
PlayCry SPECIES_ROTOM
WaitCry
SetFlag FLAG_UNK_0x0AB0
SetFlag FLAG_BATTLED_OLD_CHATEAU_ROTOM
StartWildBattle SPECIES_ROTOM, 20
CheckWonBattle VAR_RESULT
GoToIfEq VAR_RESULT, FALSE, _00A7
GoToIfEq VAR_RESULT, FALSE, OldChateauBackMiddleWestRoom_BlackOut
CheckDidNotCapture VAR_RESULT
GoToIfEq VAR_RESULT, TRUE, _008B
SetFlag FLAG_UNK_0x0149
GoToIfEq VAR_RESULT, TRUE, OldChateauBackMiddleWestRoom_RotomDisappearedIntoTheTVSet
SetFlag FLAG_CAUGHT_OLD_CHATEAU_ROTOM
ReleaseAll
End
_008B:
Message 3
OldChateauBackMiddleWestRoom_RotomDisappearedIntoTheTVSet:
Message OldChateauBackMiddleWestRoom_Text_RotomDisappearedIntoTheTVSet
WaitABXPadPress
CloseMessage
ReleaseAll
End
_0096:
OldChateauBackMiddleWestRoom_End:
CloseMessage
ReleaseAll
End
_009C:
Message 0
OldChateauBackMiddleWestRoom_TheTVHasAnOddlyMalevolentFeel:
Message OldChateauBackMiddleWestRoom_Text_TheTVHasAnOddlyMalevolentFeel
WaitABXPadPress
CloseMessage
ReleaseAll
End
_00A7:
OldChateauBackMiddleWestRoom_BlackOut:
BlackOutFromBattle
ReleaseAll
End

View File

@ -1,41 +1,42 @@
#include "macros/scrcmd.inc"
#include "res/field/events/events_old_chateau_dining_area.h"
ScriptEntry _000A
ScriptEntry _002E
ScriptEntry OldChateauDiningArea_OnTransition
ScriptEntry OldChateauDiningArea_OnFrameOldManLeave
ScriptEntryEnd
_000A:
ScrCmd_292 10, VAR_MAP_LOCAL_0
GoToIfEq VAR_MAP_LOCAL_0, 1, _0022
SetFlag FLAG_UNK_0x027B
OldChateauDiningArea_OnTransition:
CheckShouldShowGhost 10, VAR_MAP_LOCAL_0
GoToIfEq VAR_MAP_LOCAL_0, 1, OldChateauDiningArea_ShowOldMan
SetFlag FLAG_HIDE_OLD_CHATEAU_DINING_AREA_OLD_MAN
End
_0022:
ClearFlag FLAG_UNK_0x027B
SetVar VAR_UNK_0x4110, 1
OldChateauDiningArea_ShowOldMan:
ClearFlag FLAG_HIDE_OLD_CHATEAU_DINING_AREA_OLD_MAN
SetVar VAR_OLD_CHATEAU_DINING_AREA_OLD_MAN_STATE, 1
End
_002E:
OldChateauDiningArea_OnFrameOldManLeave:
LockAll
ApplyMovement LOCALID_PLAYER, _0054
ApplyMovement 0, _0064
ApplyMovement LOCALID_PLAYER, OldChateauDiningArea_Movement_PlayerWatchOldManLeave
ApplyMovement LOCALID_OLD_MAN, OldChateauDiningArea_Movement_OldManLeave
WaitMovement
SetFlag FLAG_UNK_0x027B
RemoveObject 0
SetVar VAR_UNK_0x4110, 0
SetFlag FLAG_HIDE_OLD_CHATEAU_DINING_AREA_OLD_MAN
RemoveObject LOCALID_OLD_MAN
SetVar VAR_OLD_CHATEAU_DINING_AREA_OLD_MAN_STATE, 0
ReleaseAll
End
.balign 4, 0
_0054:
OldChateauDiningArea_Movement_PlayerWatchOldManLeave:
WalkNormalNorth
Delay32
FaceWest
EndMovement
.balign 4, 0
_0064:
OldChateauDiningArea_Movement_OldManLeave:
Delay8
FaceWest
Delay16

View File

@ -2,11 +2,11 @@
#include "res/text/bank/old_chateau_side_rooms.h"
ScriptEntry _0006
ScriptEntry OldChateauSideRooms_Notebook
ScriptEntryEnd
_0006:
EventMessage 0
OldChateauSideRooms_Notebook:
EventMessage OldChateauSideRooms_Text_ItsAnOldNotebook
End
.balign 4, 0

View File

@ -2,21 +2,21 @@
#include "res/text/bank/route_205_north.h"
ScriptEntry _000E
ScriptEntry _0021
ScriptEntry _0038
ScriptEntry Route205North_Fisherman
ScriptEntry Route205North_ArrowSignpostEternaForest
ScriptEntry Route205North_ArrowSignpostEternaCity
ScriptEntryEnd
_000E:
NPCMessage 0
Route205North_Fisherman:
NPCMessage Route205North_Text_ToSitBackAndFishCasually
End
_0021:
ShowArrowSign 1
Route205North_ArrowSignpostEternaForest:
ShowArrowSign Route205North_Text_Rt205EternaForest
End
_0038:
ShowArrowSign 2
Route205North_ArrowSignpostEternaCity:
ShowArrowSign Route205North_Text_Rt205EternaCity
End
.balign 4, 0

View File

@ -2,7 +2,7 @@
"key": 1026,
"messages": [
{
"id": "pl_msg_00000227_00000",
"id": "EternaForest_Text_PleaseMayIGoThroughWithYou",
"en_US": [
"Hello, my names Cheryl.\n",
"And you are...?\r",
@ -20,21 +20,21 @@
]
},
{
"id": "pl_msg_00000227_00001",
"id": "EternaForest_Text_PlayerDecidedToGoWithCheryl",
"en_US": [
"{STRVAR_1 3, 0, 0} decided to go with\n",
"Cheryl!"
]
},
{
"id": "pl_msg_00000227_00002",
"id": "EternaForest_Text_IllKeepYourPokemonInPerfectHealth",
"en_US": [
"Cheryl: Ill keep your Pokémon\n",
"in perfect health."
]
},
{
"id": "pl_msg_00000227_00003",
"id": "EternaForest_Text_LetsGetThroughThisForestTogether",
"en_US": [
"Cheryl: Oh, hi, {STRVAR_1 3, 0, 0}!\n",
"Ive been waiting like I said.\r",
@ -43,14 +43,14 @@
]
},
{
"id": "pl_msg_00000227_00004",
"id": "EternaForest_Text_IllWaitHereForYouThen",
"en_US": [
"Cheryl: Oh? Are you going back?\n",
"Ill wait here for you, then.\r"
]
},
{
"id": "pl_msg_00000227_00005",
"id": "EternaForest_Text_OhTheresTheExitThankYouSoMuchPlayer",
"en_US": [
"Cheryl: Oh! Theres the exit!\n",
"Im so relieved... We finally got here.\r",
@ -60,21 +60,21 @@
]
},
{
"id": "pl_msg_00000227_00006",
"id": "EternaForest_Text_ThisIsMyTokenOfAppreciation",
"en_US": [
"This is my token of appreciation.\n",
"Please accept it!\r"
]
},
{
"id": "pl_msg_00000227_00007",
"id": "EternaForest_Text_ImSureWellMeetAgainSomewhere",
"en_US": [
"Im sure well meet again somewhere!\n",
"Bye for now!\r"
]
},
{
"id": "pl_msg_00000227_00008",
"id": "EternaForest_Text_ThereIsAnOldChateauAhead",
"en_US": [
"Cheryl: There is an Old Chateau ahead.\r",
"No one lives there now.\n",
@ -82,7 +82,7 @@
]
},
{
"id": "pl_msg_00000227_00009",
"id": "EternaForest_Text_ImSearchingForBugPokemonSoICanWinAtTheEternaGym",
"en_US": [
"Im searching for bug Pokémon so I can\n",
"win at the Eterna Gym.\r",
@ -91,21 +91,21 @@
]
},
{
"id": "pl_msg_00000227_00010",
"id": "EternaForest_Text_TheRockIsCoveredInMoss",
"en_US": [
"The rock is covered in moss.\n",
"It feels pleasantly cool."
]
},
{
"id": "pl_msg_00000227_00011",
"id": "EternaForest_Text_HiyaWereYouIngriguedByTheRumorsGoingAroundToo",
"en_US": [
"Gardenia: Hiya! Were you intrigued\n",
"by the rumors going around, too?\r"
]
},
{
"id": "pl_msg_00000227_00012",
"id": "EternaForest_Text_YouKnowPeopleveBeenTalkingAboutTheGhostPokemonOfTheOldChateau",
"en_US": [
"You know, peopleve been talking about\n",
"the ghost Pokémon of the Old Chateau.\r",
@ -114,7 +114,7 @@
]
},
{
"id": "pl_msg_00000227_00013",
"id": "EternaForest_Text_IShouldCheckItOutMyselfButGoingInThereIs",
"en_US": [
"I should check it out myself, but\n",
"going in there is...\r",
@ -127,14 +127,14 @@
]
},
{
"id": "pl_msg_00000227_00014",
"id": "EternaForest_Text_TheEternaForestWhereTimeFlowsEternally",
"en_US": [
"The Eterna Forest\n",
"Where Time Flows Eternally"
]
},
{
"id": "pl_msg_00000227_00015",
"id": "EternaForest_Text_TrainerTipsInForestsAndCavesThereAreManyItemsOnTheGround",
"en_US": [
"Trainer Tips!\r",
"In forests and caves, there are many\n",

View File

@ -2,14 +2,14 @@
"key": 51106,
"messages": [
{
"id": "pl_msg_00000226_00000",
"id": "EternaForestOutside_Text_OhAreYouCollectingAccessoriesIveGotSomethingForYou",
"en_US": [
"Oh, are you collecting Accessories?\n",
"Ive got something for you.\r"
]
},
{
"id": "pl_msg_00000226_00001",
"id": "EternaForestOutside_Text_ICollectBerriesAndTradeThemForAccessoriesInFloaromaTown",
"en_US": [
"I collect Berries and trade them for\n",
"Accessories in Floaroma Town.\r",
@ -19,11 +19,11 @@
]
},
{
"id": "pl_msg_00000226_00002",
"id": "EternaForestOutside_Text_Dummy2",
"garbage": 12
},
{
"id": "pl_msg_00000226_00003",
"id": "EternaForestOutside_Text_Dummy3",
"garbage": 54
}
]

View File

@ -2,7 +2,7 @@
"key": 58435,
"messages": [
{
"id": "pl_msg_00000279_00000",
"id": "OldChateau_Text_ItAppearsAsIfItIsGlaring",
"en_US": "...It appears as if it is glaring..."
}
]

View File

@ -2,14 +2,14 @@
"key": 58463,
"messages": [
{
"id": "pl_msg_00000281_00000",
"id": "OldChateauBackMiddleWestRoom_Text_TheTVHasAnOddlyMalevolentFeel",
"en_US": [
"The TV has an oddly malevolent feel...\n",
"Its as if it is staring..."
]
},
{
"id": "pl_msg_00000281_00001",
"id": "OldChateauBackMiddleWestRoom_Text_ThereAppearsToBeAPokemonWantToThumpTheTV",
"en_US": [
"Inside the TV...\n",
"There appears to be a Pokémon?...\r",
@ -18,11 +18,11 @@
]
},
{
"id": "pl_msg_00000281_00002",
"id": "OldChateauBackMiddleWestRoom_Text_PlayerThumpedTheTVSet",
"en_US": "{STRVAR_1 3, 0, 0} thumped the TV set!\r"
},
{
"id": "pl_msg_00000281_00003",
"id": "OldChateauBackMiddleWestRoom_Text_RotomDisappearedIntoTheTVSet",
"en_US": "ROTOM disappeared into the TV set..."
}
]

View File

@ -2,7 +2,7 @@
"key": 58443,
"messages": [
{
"id": "pl_msg_00000280_00000",
"id": "OldChateauSideRooms_Text_ItsAnOldNotebook",
"en_US": [
"Its an old notebook.\n",
"Theres something scrawled in it...\r",

View File

@ -2,21 +2,21 @@
"key": 3442,
"messages": [
{
"id": "pl_msg_00000473_00000",
"id": "Route205North_Text_ToSitBackAndFishCasually",
"en_US": [
"To sit back and fish casually...\n",
"Its a grown-ups hobby."
]
},
{
"id": "pl_msg_00000473_00001",
"id": "Route205North_Text_Rt205EternaForest",
"en_US": [
"Rt. 205\n",
"Eterna Forest"
]
},
{
"id": "pl_msg_00000473_00002",
"id": "Route205North_Text_Rt205EternaCity",
"en_US": [
"Rt. 205\n",
"Eterna City"

View File

@ -674,7 +674,7 @@ static BOOL ScrCmd_28D(ScriptContext *ctx);
static BOOL ScrCmd_28E(ScriptContext *ctx);
static BOOL sub_02041FF8(ScriptContext *ctx);
static BOOL ScrCmd_GetLeagueVictories(ScriptContext *ctx);
static BOOL ScrCmd_292(ScriptContext *ctx);
static BOOL ScrCmd_CheckShouldShowGhost(ScriptContext *ctx);
static BOOL ScrCmd_OpenPartyMenuForDaycare(ScriptContext *ctx);
static BOOL ScrCmd_291(ScriptContext *ctx);
static BOOL ScrCmd_29E(ScriptContext *ctx);
@ -1423,7 +1423,7 @@ const ScrCmdFunc Unk_020EAC58[] = {
ScrCmd_GetLeagueVictories,
ScrCmd_OpenPartyMenuForDaycare,
ScrCmd_291,
ScrCmd_292,
ScrCmd_CheckShouldShowGhost,
ScrCmd_GetUndergroundTalkCounter,
ScrCmd_ShowBattlePoints,
ScrCmd_HideBattlePoints,
@ -7167,21 +7167,21 @@ static BOOL ScrCmd_291(ScriptContext *ctx)
return FALSE;
}
static BOOL ScrCmd_292(ScriptContext *ctx)
static BOOL ScrCmd_CheckShouldShowGhost(ScriptContext *ctx)
{
u8 v1 = ScriptContext_ReadByte(ctx);
u16 *v2 = ScriptContext_GetVarPointer(ctx);
u8 percentChance = ScriptContext_ReadByte(ctx);
u16 *destVar = ScriptContext_GetVarPointer(ctx);
if (v1 > 100) {
v1 = 100;
if (percentChance > 100) {
percentChance = 100;
}
u16 v0 = LCRNG_Next() % 101;
u16 rand = LCRNG_Next() % 101;
if (v0 <= v1) {
*v2 = 1;
if (rand <= percentChance) {
*destVar = TRUE;
} else {
*v2 = 0;
*destVar = FALSE;
}
return FALSE;