summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--asm/easy_chat.s1862
-rw-r--r--data/easy_chat.s4
-rw-r--r--data/event_scripts.s682
-rw-r--r--data/map_events.s1
-rw-r--r--data/maps/AbandonedShip_Corridors_B1F/scripts.inc4
-rw-r--r--data/maps/AbandonedShip_Deck/scripts.inc2
-rw-r--r--data/maps/AbandonedShip_HiddenFloorCorridors/scripts.inc4
-rw-r--r--data/maps/AbandonedShip_HiddenFloorRooms/scripts.inc2
-rw-r--r--data/maps/AbandonedShip_Rooms_B1F/scripts.inc2
-rw-r--r--data/maps/AbandonedShip_Underwater1/scripts.inc2
-rw-r--r--data/maps/AbandonedShip_Underwater2/scripts.inc2
-rw-r--r--data/maps/AlteringCave/scripts.inc2
-rw-r--r--data/maps/AncientTomb/scripts.inc8
-rw-r--r--data/maps/AquaHideout_B1F/scripts.inc6
-rw-r--r--data/maps/AquaHideout_B2F/scripts.inc14
-rw-r--r--data/maps/ArtisanCave_B1F/scripts.inc2
-rw-r--r--data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc8
-rw-r--r--data/maps/BattleFrontier_BattleArenaCorridor/scripts.inc2
-rw-r--r--data/maps/BattleFrontier_BattleArenaLobby/scripts.inc6
-rw-r--r--data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc12
-rw-r--r--data/maps/BattleFrontier_BattleDomeCorridor/scripts.inc2
-rw-r--r--data/maps/BattleFrontier_BattleDomeLobby/scripts.inc8
-rw-r--r--data/maps/BattleFrontier_BattleDomePreBattleRoom/scripts.inc4
-rw-r--r--data/maps/BattleFrontier_BattleFactoryBattleRoom/scripts.inc18
-rw-r--r--data/maps/BattleFrontier_BattleFactoryLobby/scripts.inc6
-rw-r--r--data/maps/BattleFrontier_BattleFactoryPreBattleRoom/scripts.inc4
-rw-r--r--data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc14
-rw-r--r--data/maps/BattleFrontier_BattlePalaceCorridor/scripts.inc2
-rw-r--r--data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc6
-rw-r--r--data/maps/BattleFrontier_BattlePikeCorridor/scripts.inc4
-rw-r--r--data/maps/BattleFrontier_BattlePikeLobby/scripts.inc6
-rw-r--r--data/maps/BattleFrontier_BattlePikeRandomRoom1/scripts.inc8
-rw-r--r--data/maps/BattleFrontier_BattlePikeRandomRoom2/scripts.inc4
-rw-r--r--data/maps/BattleFrontier_BattlePikeRandomRoom3/scripts.inc6
-rw-r--r--data/maps/BattleFrontier_BattlePikeThreePathRoom/scripts.inc6
-rw-r--r--data/maps/BattleFrontier_BattlePyramidEmptySquare/scripts.inc6
-rw-r--r--data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc8
-rw-r--r--data/maps/BattleFrontier_BattlePyramidTop/scripts.inc8
-rw-r--r--data/maps/BattleFrontier_BattleTowerBattleRoom/scripts.inc8
-rw-r--r--data/maps/BattleFrontier_BattleTowerBattleRoom2/scripts.inc6
-rw-r--r--data/maps/BattleFrontier_BattleTowerCorridor/scripts.inc4
-rw-r--r--data/maps/BattleFrontier_BattleTowerCorridor2/scripts.inc10
-rw-r--r--data/maps/BattleFrontier_BattleTowerElevator/scripts.inc4
-rw-r--r--data/maps/BattleFrontier_BattleTowerLobby/scripts.inc28
-rw-r--r--data/maps/BattleFrontier_BattleTowerMultiBattleRoom/scripts.inc12
-rw-r--r--data/maps/BattleFrontier_Lounge3/scripts.inc2
-rw-r--r--data/maps/BattleFrontier_Mart/scripts.inc2
-rw-r--r--data/maps/BattleFrontier_OutsideEast/map.json4
-rw-r--r--data/maps/BattleFrontier_OutsideEast/scripts.inc8
-rw-r--r--data/maps/BattleFrontier_OutsideWest/map.json4
-rw-r--r--data/maps/BattleFrontier_OutsideWest/scripts.inc20
-rw-r--r--data/maps/BattleFrontier_PokemonCenter_1F/scripts.inc4
-rw-r--r--data/maps/BattleFrontier_PokemonCenter_2F/scripts.inc8
-rw-r--r--data/maps/BattleFrontier_ReceptionGate/scripts.inc20
-rw-r--r--data/maps/BattleFrontier_ScottsHouse/scripts.inc10
-rw-r--r--data/maps/BirthIsland_Exterior/scripts.inc10
-rw-r--r--data/maps/BirthIsland_Harbor/scripts.inc2
-rw-r--r--data/maps/CaveOfOrigin_1F/scripts.inc2
-rw-r--r--data/maps/CaveOfOrigin_B1F/scripts.inc8
-rw-r--r--data/maps/CaveOfOrigin_Entrance/scripts.inc2
-rw-r--r--data/maps/CaveOfOrigin_UnusedRubySapphireMap1/scripts.inc2
-rw-r--r--data/maps/CaveOfOrigin_UnusedRubySapphireMap2/scripts.inc2
-rw-r--r--data/maps/CaveOfOrigin_UnusedRubySapphireMap3/scripts.inc2
-rw-r--r--data/maps/DesertRuins/scripts.inc8
-rw-r--r--data/maps/DesertUnderpass/scripts.inc2
-rw-r--r--data/maps/DewfordTown/map.json4
-rw-r--r--data/maps/DewfordTown/scripts.inc8
-rw-r--r--data/maps/DewfordTown_Gym/scripts.inc12
-rw-r--r--data/maps/DewfordTown_Hall/scripts.inc14
-rw-r--r--data/maps/DewfordTown_PokemonCenter_1F/scripts.inc4
-rw-r--r--data/maps/DewfordTown_PokemonCenter_2F/scripts.inc8
-rw-r--r--data/maps/EverGrandeCity/map.json4
-rw-r--r--data/maps/EverGrandeCity/scripts.inc4
-rw-r--r--data/maps/EverGrandeCity_ChampionsRoom/scripts.inc28
-rw-r--r--data/maps/EverGrandeCity_DrakesRoom/scripts.inc12
-rw-r--r--data/maps/EverGrandeCity_GlaciasRoom/scripts.inc12
-rw-r--r--data/maps/EverGrandeCity_Hall1/scripts.inc2
-rw-r--r--data/maps/EverGrandeCity_Hall2/scripts.inc2
-rw-r--r--data/maps/EverGrandeCity_Hall3/scripts.inc2
-rw-r--r--data/maps/EverGrandeCity_Hall4/scripts.inc2
-rw-r--r--data/maps/EverGrandeCity_Hall5/scripts.inc2
-rw-r--r--data/maps/EverGrandeCity_HallOfFame/scripts.inc16
-rw-r--r--data/maps/EverGrandeCity_PhoebesRoom/scripts.inc12
-rw-r--r--data/maps/EverGrandeCity_PokemonCenter_1F/scripts.inc6
-rw-r--r--data/maps/EverGrandeCity_PokemonCenter_2F/scripts.inc8
-rw-r--r--data/maps/EverGrandeCity_PokemonLeague_1F/scripts.inc8
-rw-r--r--data/maps/EverGrandeCity_PokemonLeague_2F/scripts.inc8
-rw-r--r--data/maps/EverGrandeCity_SidneysRoom/scripts.inc14
-rw-r--r--data/maps/FallarborTown/map.json8
-rw-r--r--data/maps/FallarborTown/scripts.inc4
-rw-r--r--data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc6
-rw-r--r--data/maps/FallarborTown_BattleTentCorridor/scripts.inc2
-rw-r--r--data/maps/FallarborTown_BattleTentLobby/scripts.inc6
-rw-r--r--data/maps/FallarborTown_House1/scripts.inc2
-rw-r--r--data/maps/FallarborTown_House2/scripts.inc2
-rw-r--r--data/maps/FallarborTown_PokemonCenter_1F/scripts.inc4
-rw-r--r--data/maps/FallarborTown_PokemonCenter_2F/scripts.inc8
-rw-r--r--data/maps/FarawayIsland_Entrance/scripts.inc4
-rw-r--r--data/maps/FarawayIsland_Interior/scripts.inc16
-rw-r--r--data/maps/FieryPath/scripts.inc2
-rw-r--r--data/maps/FortreeCity/map.json8
-rw-r--r--data/maps/FortreeCity/scripts.inc4
-rw-r--r--data/maps/FortreeCity_Gym/scripts.inc10
-rw-r--r--data/maps/FortreeCity_House2/scripts.inc2
-rw-r--r--data/maps/FortreeCity_House4/scripts.inc8
-rw-r--r--data/maps/FortreeCity_PokemonCenter_1F/scripts.inc4
-rw-r--r--data/maps/FortreeCity_PokemonCenter_2F/scripts.inc8
-rw-r--r--data/maps/GraniteCave_B1F/scripts.inc6
-rw-r--r--data/maps/InsideOfTruck/map.json6
-rw-r--r--data/maps/InsideOfTruck/scripts.inc12
-rw-r--r--data/maps/IslandCave/scripts.inc8
-rw-r--r--data/maps/JaggedPass/scripts.inc20
-rw-r--r--data/maps/LavaridgeTown/map.json8
-rw-r--r--data/maps/LavaridgeTown/scripts.inc30
-rw-r--r--data/maps/LavaridgeTown_Gym_1F/scripts.inc14
-rw-r--r--data/maps/LavaridgeTown_Gym_B1F/scripts.inc2
-rw-r--r--data/maps/LavaridgeTown_HerbShop/scripts.inc2
-rw-r--r--data/maps/LavaridgeTown_PokemonCenter_1F/scripts.inc4
-rw-r--r--data/maps/LavaridgeTown_PokemonCenter_2F/scripts.inc8
-rw-r--r--data/maps/LilycoveCity/map.json4
-rw-r--r--data/maps/LilycoveCity/scripts.inc22
-rw-r--r--data/maps/LilycoveCity_ContestHall/scripts.inc56
-rw-r--r--data/maps/LilycoveCity_ContestLobby/scripts.inc44
-rw-r--r--data/maps/LilycoveCity_CoveLilyMotel_1F/scripts.inc18
-rw-r--r--data/maps/LilycoveCity_CoveLilyMotel_2F/scripts.inc2
-rw-r--r--data/maps/LilycoveCity_DepartmentStoreElevator/scripts.inc2
-rw-r--r--data/maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc2
-rw-r--r--data/maps/LilycoveCity_DepartmentStore_1F/scripts.inc4
-rw-r--r--data/maps/LilycoveCity_DepartmentStore_5F/scripts.inc6
-rw-r--r--data/maps/LilycoveCity_Harbor/scripts.inc52
-rw-r--r--data/maps/LilycoveCity_House2/scripts.inc2
-rw-r--r--data/maps/LilycoveCity_House3/scripts.inc8
-rw-r--r--data/maps/LilycoveCity_LilycoveMuseum_1F/scripts.inc4
-rw-r--r--data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc18
-rw-r--r--data/maps/LilycoveCity_MoveDeletersHouse/scripts.inc2
-rw-r--r--data/maps/LilycoveCity_PokemonCenter_1F/scripts.inc4
-rw-r--r--data/maps/LilycoveCity_PokemonCenter_2F/scripts.inc8
-rw-r--r--data/maps/LilycoveCity_PokemonTrainerFanClub/scripts.inc10
-rw-r--r--data/maps/LinkContestRoom1/scripts.inc18
-rw-r--r--data/maps/LittlerootTown/scripts.inc66
-rw-r--r--data/maps/LittlerootTown_BrendansHouse_1F/map.json8
-rw-r--r--data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc42
-rw-r--r--data/maps/LittlerootTown_BrendansHouse_2F/scripts.inc32
-rw-r--r--data/maps/LittlerootTown_MaysHouse_1F/map.json8
-rw-r--r--data/maps/LittlerootTown_MaysHouse_1F/scripts.inc44
-rw-r--r--data/maps/LittlerootTown_MaysHouse_2F/scripts.inc32
-rw-r--r--data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc50
-rw-r--r--data/maps/MagmaHideout_1F/scripts.inc4
-rw-r--r--data/maps/MagmaHideout_4F/scripts.inc10
-rw-r--r--data/maps/MarineCave_End/scripts.inc8
-rw-r--r--data/maps/MarineCave_Entrance/scripts.inc2
-rw-r--r--data/maps/MauvilleCity/map.json8
-rw-r--r--data/maps/MauvilleCity/scripts.inc34
-rw-r--r--data/maps/MauvilleCity_GameCorner/scripts.inc8
-rw-r--r--data/maps/MauvilleCity_Gym/scripts.inc32
-rw-r--r--data/maps/MauvilleCity_House2/scripts.inc4
-rw-r--r--data/maps/MauvilleCity_PokemonCenter_1F/scripts.inc4
-rw-r--r--data/maps/MauvilleCity_PokemonCenter_2F/scripts.inc8
-rw-r--r--data/maps/MeteorFalls_1F_1R/map.json2
-rw-r--r--data/maps/MeteorFalls_1F_1R/scripts.inc28
-rw-r--r--data/maps/MeteorFalls_StevensCave/scripts.inc8
-rw-r--r--data/maps/MirageTower_1F/scripts.inc2
-rw-r--r--data/maps/MirageTower_2F/scripts.inc6
-rw-r--r--data/maps/MirageTower_3F/scripts.inc6
-rw-r--r--data/maps/MossdeepCity/map.json8
-rw-r--r--data/maps/MossdeepCity/scripts.inc8
-rw-r--r--data/maps/MossdeepCity_GameCorner_1F/scripts.inc10
-rw-r--r--data/maps/MossdeepCity_Gym/scripts.inc8
-rw-r--r--data/maps/MossdeepCity_PokemonCenter_1F/scripts.inc4
-rw-r--r--data/maps/MossdeepCity_PokemonCenter_2F/scripts.inc8
-rw-r--r--data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc24
-rw-r--r--data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc30
-rw-r--r--data/maps/MossdeepCity_StevensHouse/scripts.inc20
-rw-r--r--data/maps/MtChimney/scripts.inc18
-rw-r--r--data/maps/MtChimney_CableCarStation/scripts.inc12
-rw-r--r--data/maps/MtPyre_1F/scripts.inc2
-rw-r--r--data/maps/MtPyre_2F/scripts.inc6
-rw-r--r--data/maps/MtPyre_Exterior/scripts.inc2
-rw-r--r--data/maps/MtPyre_Summit/map.json12
-rw-r--r--data/maps/MtPyre_Summit/scripts.inc30
-rw-r--r--data/maps/NavelRock_Bottom/scripts.inc8
-rw-r--r--data/maps/NavelRock_Exterior/scripts.inc2
-rw-r--r--data/maps/NavelRock_Harbor/scripts.inc2
-rw-r--r--data/maps/NavelRock_Top/scripts.inc8
-rw-r--r--data/maps/NewMauville_Entrance/map.json2
-rw-r--r--data/maps/NewMauville_Entrance/scripts.inc10
-rw-r--r--data/maps/NewMauville_Inside/map.json2
-rw-r--r--data/maps/NewMauville_Inside/scripts.inc14
-rw-r--r--data/maps/OldaleTown/map.json16
-rw-r--r--data/maps/OldaleTown/scripts.inc20
-rw-r--r--data/maps/OldaleTown_PokemonCenter_1F/scripts.inc4
-rw-r--r--data/maps/OldaleTown_PokemonCenter_2F/scripts.inc8
-rw-r--r--data/maps/PacifidlogTown/map.json4
-rw-r--r--data/maps/PacifidlogTown/scripts.inc4
-rw-r--r--data/maps/PacifidlogTown_House2/scripts.inc6
-rw-r--r--data/maps/PacifidlogTown_PokemonCenter_1F/scripts.inc4
-rw-r--r--data/maps/PacifidlogTown_PokemonCenter_2F/scripts.inc8
-rw-r--r--data/maps/PetalburgCity/map.json16
-rw-r--r--data/maps/PetalburgCity/scripts.inc52
-rw-r--r--data/maps/PetalburgCity_Gym/scripts.inc114
-rw-r--r--data/maps/PetalburgCity_PokemonCenter_1F/scripts.inc4
-rw-r--r--data/maps/PetalburgCity_PokemonCenter_2F/scripts.inc8
-rw-r--r--data/maps/PetalburgCity_WallysHouse/scripts.inc10
-rw-r--r--data/maps/PetalburgWoods/map.json4
-rw-r--r--data/maps/PetalburgWoods/scripts.inc14
-rw-r--r--data/maps/Route101/map.json18
-rw-r--r--data/maps/Route101/scripts.inc18
-rw-r--r--data/maps/Route103/scripts.inc22
-rw-r--r--data/maps/Route104/scripts.inc30
-rw-r--r--data/maps/Route104_MrBrineysHouse/scripts.inc8
-rw-r--r--data/maps/Route104_PrettyPetalFlowerShop/scripts.inc4
-rw-r--r--data/maps/Route105/scripts.inc6
-rw-r--r--data/maps/Route109/scripts.inc10
-rw-r--r--data/maps/Route109_SeashoreHouse/scripts.inc4
-rw-r--r--data/maps/Route110/map.json6
-rw-r--r--data/maps/Route110/scripts.inc38
-rw-r--r--data/maps/Route110_SeasideCyclingRoadSouthEntrance/scripts.inc2
-rw-r--r--data/maps/Route110_TrickHouseCorridor/scripts.inc4
-rw-r--r--data/maps/Route110_TrickHouseEnd/scripts.inc46
-rw-r--r--data/maps/Route110_TrickHouseEntrance/map.json8
-rw-r--r--data/maps/Route110_TrickHouseEntrance/scripts.inc150
-rw-r--r--data/maps/Route110_TrickHousePuzzle1/scripts.inc8
-rw-r--r--data/maps/Route110_TrickHousePuzzle2/scripts.inc8
-rw-r--r--data/maps/Route110_TrickHousePuzzle3/scripts.inc8
-rw-r--r--data/maps/Route110_TrickHousePuzzle4/scripts.inc4
-rw-r--r--data/maps/Route110_TrickHousePuzzle5/scripts.inc36
-rw-r--r--data/maps/Route110_TrickHousePuzzle6/scripts.inc8
-rw-r--r--data/maps/Route110_TrickHousePuzzle7/scripts.inc22
-rw-r--r--data/maps/Route110_TrickHousePuzzle8/scripts.inc4
-rw-r--r--data/maps/Route111/scripts.inc22
-rw-r--r--data/maps/Route111_OldLadysRestStop/scripts.inc4
-rw-r--r--data/maps/Route111_WinstrateFamilysHouse/scripts.inc4
-rw-r--r--data/maps/Route112/scripts.inc20
-rw-r--r--data/maps/Route112_CableCarStation/scripts.inc12
-rw-r--r--data/maps/Route113/scripts.inc4
-rw-r--r--data/maps/Route113_GlassWorkshop/scripts.inc38
-rw-r--r--data/maps/Route114/scripts.inc10
-rw-r--r--data/maps/Route114_FossilManiacsHouse/scripts.inc4
-rw-r--r--data/maps/Route114_FossilManiacsTunnel/scripts.inc8
-rw-r--r--data/maps/Route114_LanettesHouse/scripts.inc2
-rw-r--r--data/maps/Route115/scripts.inc6
-rw-r--r--data/maps/Route116/map.json2
-rw-r--r--data/maps/Route116/scripts.inc14
-rw-r--r--data/maps/Route116_TunnelersRestHouse/scripts.inc2
-rw-r--r--data/maps/Route117/scripts.inc2
-rw-r--r--data/maps/Route117_PokemonDayCare/scripts.inc2
-rw-r--r--data/maps/Route118/map.json6
-rw-r--r--data/maps/Route118/scripts.inc14
-rw-r--r--data/maps/Route119/map.json4
-rw-r--r--data/maps/Route119/scripts.inc18
-rw-r--r--data/maps/Route119_WeatherInstitute_1F/scripts.inc4
-rw-r--r--data/maps/Route119_WeatherInstitute_2F/scripts.inc8
-rw-r--r--data/maps/Route120/scripts.inc24
-rw-r--r--data/maps/Route121/map.json8
-rw-r--r--data/maps/Route121/scripts.inc2
-rw-r--r--data/maps/Route121_SafariZoneEntrance/scripts.inc10
-rw-r--r--data/maps/Route123/scripts.inc4
-rw-r--r--data/maps/Route123_BerryMastersHouse/scripts.inc18
-rw-r--r--data/maps/Route124/scripts.inc4
-rw-r--r--data/maps/Route124_DivingTreasureHuntersHouse/scripts.inc2
-rw-r--r--data/maps/Route125/scripts.inc8
-rw-r--r--data/maps/Route126/scripts.inc4
-rw-r--r--data/maps/Route127/scripts.inc8
-rw-r--r--data/maps/Route128/scripts.inc24
-rw-r--r--data/maps/Route129/scripts.inc8
-rw-r--r--data/maps/Route130/scripts.inc4
-rw-r--r--data/maps/Route131/scripts.inc4
-rw-r--r--data/maps/Route134/scripts.inc2
-rw-r--r--data/maps/RustboroCity/map.json50
-rw-r--r--data/maps/RustboroCity/scripts.inc174
-rw-r--r--data/maps/RustboroCity_DevonCorp_1F/scripts.inc2
-rw-r--r--data/maps/RustboroCity_DevonCorp_2F/scripts.inc50
-rw-r--r--data/maps/RustboroCity_DevonCorp_3F/scripts.inc28
-rw-r--r--data/maps/RustboroCity_Flat1_2F/scripts.inc2
-rw-r--r--data/maps/RustboroCity_Flat2_2F/scripts.inc2
-rw-r--r--data/maps/RustboroCity_Gym/scripts.inc10
-rw-r--r--data/maps/RustboroCity_PokemonCenter_1F/scripts.inc4
-rw-r--r--data/maps/RustboroCity_PokemonCenter_2F/scripts.inc8
-rw-r--r--data/maps/RustboroCity_PokemonSchool/scripts.inc6
-rw-r--r--data/maps/RusturfTunnel/scripts.inc28
-rw-r--r--data/maps/SSTidalCorridor/scripts.inc4
-rw-r--r--data/maps/SSTidalRooms/scripts.inc4
-rw-r--r--data/maps/SafariZone_South/scripts.inc12
-rw-r--r--data/maps/ScorchedSlab/scripts.inc2
-rw-r--r--data/maps/SeafloorCavern_Entrance/scripts.inc16
-rw-r--r--data/maps/SeafloorCavern_Room9/map.json2
-rw-r--r--data/maps/SeafloorCavern_Room9/scripts.inc28
-rw-r--r--data/maps/SealedChamber_OuterRoom/scripts.inc6
-rw-r--r--data/maps/SecretBase_YellowCave4/scripts.inc8
-rw-r--r--data/maps/ShoalCave_LowTideEntranceRoom/scripts.inc4
-rw-r--r--data/maps/ShoalCave_LowTideInnerRoom/scripts.inc16
-rw-r--r--data/maps/ShoalCave_LowTideLowerRoom/scripts.inc6
-rw-r--r--data/maps/ShoalCave_LowTideStairsRoom/scripts.inc4
-rw-r--r--data/maps/SkyPillar_1F/scripts.inc2
-rw-r--r--data/maps/SkyPillar_2F/scripts.inc6
-rw-r--r--data/maps/SkyPillar_3F/scripts.inc2
-rw-r--r--data/maps/SkyPillar_4F/scripts.inc6
-rw-r--r--data/maps/SkyPillar_5F/scripts.inc2
-rw-r--r--data/maps/SkyPillar_Entrance/scripts.inc2
-rw-r--r--data/maps/SkyPillar_Outside/scripts.inc18
-rw-r--r--data/maps/SkyPillar_Top/scripts.inc10
-rw-r--r--data/maps/SlateportCity/map.json8
-rw-r--r--data/maps/SlateportCity/scripts.inc82
-rw-r--r--data/maps/SlateportCity_BattleTentBattleRoom/scripts.inc6
-rw-r--r--data/maps/SlateportCity_BattleTentCorridor/scripts.inc6
-rw-r--r--data/maps/SlateportCity_BattleTentLobby/scripts.inc8
-rw-r--r--data/maps/SlateportCity_Harbor/map.json8
-rw-r--r--data/maps/SlateportCity_Harbor/scripts.inc28
-rw-r--r--data/maps/SlateportCity_House1/scripts.inc2
-rw-r--r--data/maps/SlateportCity_OceanicMuseum_1F/map.json4
-rw-r--r--data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc12
-rw-r--r--data/maps/SlateportCity_OceanicMuseum_2F/scripts.inc12
-rw-r--r--data/maps/SlateportCity_PokemonCenter_1F/scripts.inc4
-rw-r--r--data/maps/SlateportCity_PokemonCenter_2F/scripts.inc8
-rw-r--r--data/maps/SlateportCity_PokemonFanClub/scripts.inc14
-rw-r--r--data/maps/SlateportCity_SternsShipyard_1F/scripts.inc14
-rw-r--r--data/maps/SootopolisCity/map.json8
-rw-r--r--data/maps/SootopolisCity/scripts.inc68
-rw-r--r--data/maps/SootopolisCity_Gym_1F/scripts.inc14
-rw-r--r--data/maps/SootopolisCity_House1/scripts.inc2
-rw-r--r--data/maps/SootopolisCity_House6/scripts.inc2
-rw-r--r--data/maps/SootopolisCity_MysteryEventsHouse_1F/scripts.inc24
-rw-r--r--data/maps/SootopolisCity_MysteryEventsHouse_B1F/scripts.inc10
-rw-r--r--data/maps/SootopolisCity_PokemonCenter_1F/scripts.inc4
-rw-r--r--data/maps/SootopolisCity_PokemonCenter_2F/scripts.inc8
-rw-r--r--data/maps/SouthernIsland_Exterior/scripts.inc4
-rw-r--r--data/maps/SouthernIsland_Interior/scripts.inc6
-rw-r--r--data/maps/TerraCave_End/scripts.inc8
-rw-r--r--data/maps/TerraCave_Entrance/scripts.inc2
-rw-r--r--data/maps/TrainerHill_1F/scripts.inc6
-rw-r--r--data/maps/TrainerHill_2F/scripts.inc6
-rw-r--r--data/maps/TrainerHill_3F/scripts.inc4
-rw-r--r--data/maps/TrainerHill_4F/scripts.inc4
-rw-r--r--data/maps/TrainerHill_Elevator/scripts.inc2
-rw-r--r--data/maps/TrainerHill_Entrance/scripts.inc12
-rw-r--r--data/maps/TrainerHill_Roof/scripts.inc4
-rw-r--r--data/maps/Underwater3/scripts.inc2
-rw-r--r--data/maps/Underwater5/scripts.inc2
-rw-r--r--data/maps/Underwater6/scripts.inc2
-rw-r--r--data/maps/Underwater7/scripts.inc2
-rw-r--r--data/maps/Underwater_MarineCave/scripts.inc4
-rw-r--r--data/maps/Underwater_Route134/scripts.inc2
-rw-r--r--data/maps/Underwater_SeafloorCavern/scripts.inc6
-rw-r--r--data/maps/Underwater_SealedChamber/scripts.inc2
-rw-r--r--data/maps/Underwater_SootopolisCity/scripts.inc2
-rw-r--r--data/maps/UnionRoom/scripts.inc4
-rw-r--r--data/maps/VerdanturfTown/map.json8
-rw-r--r--data/maps/VerdanturfTown/scripts.inc8
-rw-r--r--data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc14
-rw-r--r--data/maps/VerdanturfTown_BattleTentCorridor/scripts.inc2
-rw-r--r--data/maps/VerdanturfTown_BattleTentLobby/scripts.inc8
-rw-r--r--data/maps/VerdanturfTown_PokemonCenter_1F/scripts.inc4
-rw-r--r--data/maps/VerdanturfTown_PokemonCenter_2F/scripts.inc8
-rw-r--r--data/maps/VictoryRoad_1F/map.json4
-rw-r--r--data/maps/VictoryRoad_1F/scripts.inc10
-rw-r--r--data/mystery_event_msg.s1
-rw-r--r--data/scripts/cable_club.inc80
-rw-r--r--data/scripts/contest_hall.inc56
-rw-r--r--data/scripts/gabby_and_ty.inc4
-rw-r--r--data/scripts/players_house.inc68
-rw-r--r--data/scripts/pokeblocks.inc8
-rw-r--r--data/scripts/safari_zone.inc4
-rw-r--r--data/scripts/secret_base.inc20
-rw-r--r--data/specials.inc2
-rw-r--r--include/constants/map_scripts.h12
-rw-r--r--include/constants/vars.h448
-rw-r--r--include/constants/weather.h2
-rw-r--r--include/field_weather.h10
-rw-r--r--include/overworld.h2
-rw-r--r--include/script.h20
-rwxr-xr-xporymap.project.cfg1
-rw-r--r--src/battle_interface.c163
-rw-r--r--src/battle_pyramid.c2
-rwxr-xr-xsrc/cable_car.c8
-rw-r--r--src/contest_link_80F57C4.c6
-rw-r--r--src/easy_chat.c731
-rw-r--r--src/egg_hatch.c2
-rw-r--r--src/field_control_avatar.c2
-rw-r--r--src/field_screen_effect.c10
-rw-r--r--src/field_specials.c5
-rw-r--r--src/field_weather.c15
-rw-r--r--src/field_weather_effect.c103
-rw-r--r--src/fieldmap.c6
-rw-r--r--src/overworld.c20
-rw-r--r--src/rom_8011DC0.c4
-rw-r--r--src/script.c43
-rw-r--r--src/start_menu.c18
-rw-r--r--src/trainer_hill.c2
-rw-r--r--src/tv.c2
389 files changed, 3333 insertions, 5044 deletions
diff --git a/asm/easy_chat.s b/asm/easy_chat.s
index 50e707ac3..10536929e 100644
--- a/asm/easy_chat.s
+++ b/asm/easy_chat.s
@@ -5,1868 +5,6 @@
.text
- thumb_func_start sub_811DADC
-sub_811DADC: @ 811DADC
- push {r4,lr}
- sub sp, 0x8
- lsls r0, 24
- lsrs r4, r0, 24
- movs r0, 0x1E
- str r0, [sp]
- movs r0, 0xA
- str r0, [sp, 0x4]
- movs r0, 0x1
- movs r1, 0
- movs r2, 0
- movs r3, 0xA
- bl FillBgTilemapBufferRect_Palette0
- cmp r4, 0x16
- bls _0811DAFE
- b _0811DC1A
-_0811DAFE:
- lsls r0, r4, 2
- ldr r1, =_0811DB0C
- adds r0, r1
- ldr r0, [r0]
- mov pc, r0
- .pool
- .align 2, 0
-_0811DB0C:
- .4byte _0811DC1A
- .4byte _0811DB68
- .4byte _0811DB70
- .4byte _0811DB78
- .4byte _0811DB80
- .4byte _0811DB88
- .4byte _0811DB90
- .4byte _0811DC00
- .4byte _0811DBF2
- .4byte _0811DBE4
- .4byte _0811DBD6
- .4byte _0811DB9E
- .4byte _0811DBA6
- .4byte _0811DBAE
- .4byte _0811DBB6
- .4byte _0811DBBE
- .4byte _0811DBC6
- .4byte _0811DBCE
- .4byte _0811DBD6
- .4byte _0811DBE4
- .4byte _0811DBF2
- .4byte _0811DC00
- .4byte _0811DC0E
-_0811DB68:
- movs r0, 0xB
- movs r1, 0xE
- movs r2, 0x3
- b _0811DB96
-_0811DB70:
- movs r0, 0x9
- movs r1, 0xE
- movs r2, 0x7
- b _0811DB96
-_0811DB78:
- movs r0, 0x7
- movs r1, 0xE
- movs r2, 0xB
- b _0811DB96
-_0811DB80:
- movs r0, 0x5
- movs r1, 0xE
- movs r2, 0xF
- b _0811DB96
-_0811DB88:
- movs r0, 0x3
- movs r1, 0xE
- movs r2, 0x13
- b _0811DB96
-_0811DB90:
- movs r0, 0x1
- movs r1, 0xE
- movs r2, 0x17
-_0811DB96:
- movs r3, 0x2
- bl sub_811DC28
- b _0811DC1A
-_0811DB9E:
- movs r0, 0x1
- movs r1, 0xA
- movs r2, 0x18
- b _0811DBDC
-_0811DBA6:
- movs r0, 0x1
- movs r1, 0xA
- movs r2, 0x19
- b _0811DBDC
-_0811DBAE:
- movs r0, 0x1
- movs r1, 0xA
- movs r2, 0x1A
- b _0811DBDC
-_0811DBB6:
- movs r0, 0x1
- movs r1, 0xA
- movs r2, 0x1B
- b _0811DBDC
-_0811DBBE:
- movs r0, 0x1
- movs r1, 0xA
- movs r2, 0x1C
- b _0811DBDC
-_0811DBC6:
- movs r0, 0x1
- movs r1, 0xA
- movs r2, 0x1D
- b _0811DBDC
-_0811DBCE:
- movs r0, 0
- movs r1, 0xA
- movs r2, 0x1E
- b _0811DBDC
-_0811DBD6:
- movs r0, 0x1
- movs r1, 0xA
- movs r2, 0x17
-_0811DBDC:
- movs r3, 0xA
- bl sub_811DC28
- b _0811DC1A
-_0811DBE4:
- movs r0, 0x1
- movs r1, 0xB
- movs r2, 0x17
- movs r3, 0x8
- bl sub_811DC28
- b _0811DC1A
-_0811DBF2:
- movs r0, 0x1
- movs r1, 0xC
- movs r2, 0x17
- movs r3, 0x6
- bl sub_811DC28
- b _0811DC1A
-_0811DC00:
- movs r0, 0x1
- movs r1, 0xD
- movs r2, 0x17
- movs r3, 0x4
- bl sub_811DC28
- b _0811DC1A
-_0811DC0E:
- movs r0, 0x1
- movs r1, 0xE
- movs r2, 0x17
- movs r3, 0x2
- bl sub_811DC28
-_0811DC1A:
- movs r0, 0x1
- bl CopyBgTilemapBufferToVram
- add sp, 0x8
- pop {r4}
- pop {r0}
- bx r0
- thumb_func_end sub_811DADC
-
- thumb_func_start sub_811DC28
-sub_811DC28: @ 811DC28
- push {r4-r7,lr}
- mov r7, r10
- mov r6, r9
- mov r5, r8
- push {r5-r7}
- sub sp, 0x8
- mov r12, r0
- adds r7, r1, 0
- mov r9, r2
- mov r10, r3
- ldr r0, =gUnknown_0203A11C
- ldr r0, [r0]
- movs r1, 0xC0
- lsls r1, 2
- adds r6, r0, r1
- mov r0, r12
- add r0, r9
- subs r5, r0, 0x1
- adds r0, r7, r3
- subs r0, 0x1
- mov r8, r0
- mov r2, r12
- adds r3, r7, 0
- lsls r0, r3, 5
- adds r0, r2
- lsls r0, 1
- adds r0, r6
- ldr r4, =0x00004001
- adds r1, r4, 0
- strh r1, [r0]
- adds r2, 0x1
- cmp r2, r5
- bge _0811DC84
- ldr r0, =0x00004002
- adds r4, r0, 0
- lsls r1, r2, 1
- lsls r0, r3, 6
- adds r0, r6
- adds r1, r0
- subs r2, r5, r2
-_0811DC78:
- strh r4, [r1]
- adds r1, 0x2
- subs r2, 0x1
- cmp r2, 0
- bne _0811DC78
- adds r2, r5, 0
-_0811DC84:
- lsls r0, r3, 5
- adds r0, r2
- lsls r0, 1
- adds r0, r6
- ldr r2, =0x00004003
- adds r1, r2, 0
- strh r1, [r0]
- adds r3, 0x1
- mov r4, r12
- adds r4, 0x1
- adds r0, r7, 0x1
- str r0, [sp, 0x4]
- mov r1, r9
- subs r1, 0x2
- str r1, [sp]
- movs r2, 0x2
- negs r2, r2
- add r10, r2
- cmp r3, r8
- bge _0811DCF4
- lsls r7, r4, 1
- mov r9, r7
-_0811DCB0:
- lsls r0, r3, 5
- add r0, r12
- lsls r0, 1
- adds r0, r6
- ldr r2, =0x00004005
- adds r1, r2, 0
- strh r1, [r0]
- adds r2, r4, 0
- adds r7, r3, 0x1
- cmp r4, r5
- bge _0811DCE0
- movs r0, 0x80
- lsls r0, 7
- adds r1, r0, 0
- lsls r0, r3, 6
- adds r0, r6
- add r0, r9
- subs r2, r5, r4
-_0811DCD4:
- strh r1, [r0]
- adds r0, 0x2
- subs r2, 0x1
- cmp r2, 0
- bne _0811DCD4
- adds r2, r5, 0
-_0811DCE0:
- lsls r0, r3, 5
- adds r0, r2
- lsls r0, 1
- adds r0, r6
- ldr r2, =0x00004007
- adds r1, r2, 0
- strh r1, [r0]
- adds r3, r7, 0
- cmp r3, r8
- blt _0811DCB0
-_0811DCF4:
- lsls r0, r3, 5
- mov r7, r12
- adds r1, r0, r7
- lsls r1, 1
- adds r1, r6
- ldr r7, =0x00004009
- adds r2, r7, 0
- strh r2, [r1]
- adds r2, r4, 0
- mov r12, r0
- cmp r4, r5
- bge _0811DD26
- ldr r0, =0x0000400a
- adds r7, r0, 0
- lsls r1, r4, 1
- lsls r0, r3, 6
- adds r0, r6
- adds r0, r1, r0
- subs r2, r5, r4
-_0811DD1A:
- strh r7, [r0]
- adds r0, 0x2
- subs r2, 0x1
- cmp r2, 0
- bne _0811DD1A
- adds r2, r5, 0
-_0811DD26:
- mov r1, r12
- adds r0, r1, r2
- lsls r0, 1
- adds r0, r6
- ldr r2, =0x0000400b
- adds r1, r2, 0
- strh r1, [r0]
- lsls r0, r4, 27
- lsrs r0, 24
- ldr r3, [sp, 0x4]
- lsls r1, r3, 27
- lsrs r1, 24
- ldr r4, [sp]
- lsls r2, r4, 27
- lsrs r2, 24
- mov r7, r10
- lsls r3, r7, 27
- lsrs r3, 24
- bl sub_811DE5C
- add sp, 0x8
- pop {r3-r5}
- mov r8, r3
- mov r9, r4
- mov r10, r5
- pop {r4-r7}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_811DC28
-
- thumb_func_start sub_811DD84
-sub_811DD84: @ 811DD84
- push {lr}
- movs r1, 0x80
- lsls r1, 4
- movs r0, 0x2
- movs r2, 0
- bl ChangeBgY
- ldr r0, =gUnknown_0203A11C
- ldr r0, [r0]
- ldr r1, =0x000002ce
- adds r0, r1
- movs r1, 0
- strh r1, [r0]
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_811DD84
-
- thumb_func_start sub_811DDAC
-sub_811DDAC: @ 811DDAC
- push {r4,r5,lr}
- adds r4, r0, 0
- lsls r4, 16
- lsrs r4, 16
- lsls r1, 24
- lsrs r5, r1, 24
- movs r0, 0x2
- bl GetBgY
- adds r2, r0, 0
- ldr r0, =gUnknown_0203A11C
- ldr r3, [r0]
- ldr r0, =0x000002ce
- adds r1, r3, r0
- ldrh r0, [r1]
- adds r0, r4
- strh r0, [r1]
- lsls r4, 20
- asrs r4, 16
- lsls r0, r4, 8
- adds r2, r0
- cmp r5, 0
- beq _0811DE00
- movs r1, 0xB4
- lsls r1, 2
- adds r0, r3, r1
- str r2, [r0]
- movs r0, 0xB5
- lsls r0, 2
- adds r1, r3, r0
- lsls r0, r5, 8
- str r0, [r1]
- cmp r4, 0
- bge _0811DE0A
- negs r0, r0
- str r0, [r1]
- b _0811DE0A
- .pool
-_0811DE00:
- movs r0, 0x2
- adds r1, r2, 0
- movs r2, 0
- bl ChangeBgY
-_0811DE0A:
- pop {r4,r5}
- pop {r0}
- bx r0
- thumb_func_end sub_811DDAC
-
- thumb_func_start sub_811DE10
-sub_811DE10: @ 811DE10
- push {lr}
- movs r0, 0x2
- bl GetBgY
- ldr r1, =gUnknown_0203A11C
- ldr r2, [r1]
- movs r3, 0xB4
- lsls r3, 2
- adds r1, r2, r3
- ldr r1, [r1]
- cmp r0, r1
- beq _0811DE40
- movs r1, 0xB5
- lsls r1, 2
- adds r0, r2, r1
- ldr r1, [r0]
- movs r0, 0x2
- movs r2, 0x1
- bl ChangeBgY
- movs r0, 0x1
- b _0811DE42
- .pool
-_0811DE40:
- movs r0, 0
-_0811DE42:
- pop {r1}
- bx r1
- thumb_func_end sub_811DE10
-
- thumb_func_start sub_811DE48
-sub_811DE48: @ 811DE48
- ldr r0, =gUnknown_0203A11C
- ldr r0, [r0]
- ldr r1, =0x000002ce
- adds r0, r1
- ldrh r0, [r0]
- bx lr
- .pool
- thumb_func_end sub_811DE48
-
- thumb_func_start sub_811DE5C
-sub_811DE5C: @ 811DE5C
- push {r4,r5,lr}
- lsls r0, 24
- lsrs r0, 24
- lsls r1, 24
- lsrs r1, 24
- lsls r2, 24
- lsrs r2, 24
- lsls r3, 24
- lsrs r3, 24
- lsls r4, r0, 8
- adds r0, r2
- orrs r4, r0
- lsls r5, r1, 8
- adds r1, r3
- orrs r5, r1
- movs r0, 0x40
- adds r1, r4, 0
- bl SetGpuReg
- movs r0, 0x44
- adds r1, r5, 0
- bl SetGpuReg
- pop {r4,r5}
- pop {r0}
- bx r0
- thumb_func_end sub_811DE5C
-
- thumb_func_start sub_811DE90
-sub_811DE90: @ 811DE90
- push {r4,r5,lr}
- ldr r0, =gUnknown_08597CA0
- bl LoadSpriteSheets
- ldr r0, =gUnknown_08597CC0
- bl LoadSpritePalettes
- movs r5, 0
- ldr r4, =gUnknown_08597CE8
-_0811DEA2:
- adds r0, r4, 0
- bl LoadCompressedSpriteSheet
- adds r4, 0x8
- adds r5, 0x1
- cmp r5, 0x3
- bls _0811DEA2
- pop {r4,r5}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_811DE90
-
- thumb_func_start sub_811DEC4
-sub_811DEC4: @ 811DEC4
- push {lr}
- bl sub_811BA68
- lsls r0, 24
- ldr r1, =gUnknown_08597C30
- lsrs r0, 22
- adds r0, r1
- ldrb r2, [r0]
- lsls r1, r2, 27
- lsrs r1, 8
- lsrs r2, 5
- lsls r2, 19
- ldr r0, =gUnknown_08597D18
- movs r3, 0xD0
- lsls r3, 12
- adds r1, r3
- asrs r1, 16
- movs r3, 0x80
- lsls r3, 12
- adds r2, r3
- asrs r2, 16
- movs r3, 0x2
- bl CreateSprite
- lsls r0, 24
- lsrs r0, 24
- ldr r1, =gUnknown_0203A11C
- ldr r2, [r1]
- movs r1, 0xB6
- lsls r1, 2
- adds r2, r1
- lsls r1, r0, 4
- adds r1, r0
- lsls r1, 2
- ldr r0, =gSprites
- adds r1, r0
- str r1, [r2]
- movs r0, 0x1
- strh r0, [r1, 0x30]
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_811DEC4
-
- thumb_func_start sub_811DF28
-sub_811DF28: @ 811DF28
- push {lr}
- adds r1, r0, 0
- movs r2, 0x30
- ldrsh r0, [r1, r2]
- cmp r0, 0
- beq _0811DF56
- ldrh r0, [r1, 0x2E]
- adds r0, 0x1
- strh r0, [r1, 0x2E]
- lsls r0, 16
- asrs r0, 16
- cmp r0, 0x2
- ble _0811DF56
- movs r0, 0
- strh r0, [r1, 0x2E]
- ldrh r0, [r1, 0x24]
- adds r0, 0x1
- strh r0, [r1, 0x24]
- lsls r0, 16
- cmp r0, 0
- ble _0811DF56
- ldr r0, =0x0000fffa
- strh r0, [r1, 0x24]
-_0811DF56:
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_811DF28
-
- thumb_func_start sub_811DF60
-sub_811DF60: @ 811DF60
- push {r4,lr}
- lsls r0, 24
- lsrs r0, 24
- lsls r1, 24
- lsrs r1, 24
- ldr r2, =gUnknown_0203A11C
- ldr r2, [r2]
- movs r3, 0xB6
- lsls r3, 2
- adds r2, r3
- ldr r3, [r2]
- movs r4, 0
- strh r0, [r3, 0x20]
- ldr r0, [r2]
- strh r1, [r0, 0x22]
- ldr r0, [r2]
- strh r4, [r0, 0x24]
- ldr r0, [r2]
- strh r4, [r0, 0x2E]
- pop {r4}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_811DF60
-
- thumb_func_start sub_811DF90
-sub_811DF90: @ 811DF90
- ldr r0, =gUnknown_0203A11C
- ldr r1, [r0]
- movs r0, 0xB6
- lsls r0, 2
- adds r1, r0
- ldr r0, [r1]
- movs r2, 0
- strh r2, [r0, 0x2E]
- ldr r0, [r1]
- strh r2, [r0, 0x30]
- ldr r0, [r1]
- strh r2, [r0, 0x24]
- bx lr
- .pool
- thumb_func_end sub_811DF90
-
- thumb_func_start sub_811DFB0
-sub_811DFB0: @ 811DFB0
- ldr r0, =gUnknown_0203A11C
- ldr r0, [r0]
- movs r1, 0xB6
- lsls r1, 2
- adds r0, r1
- ldr r1, [r0]
- movs r0, 0x1
- strh r0, [r1, 0x30]
- bx lr
- .pool
- thumb_func_end sub_811DFB0
-
- thumb_func_start sub_811DFC8
-sub_811DFC8: @ 811DFC8
- push {r4-r6,lr}
- mov r6, r8
- push {r6}
- ldr r6, =gUnknown_08597D68
- adds r0, r6, 0
- movs r1, 0
- movs r2, 0
- movs r3, 0x3
- bl CreateSprite
- lsls r0, 24
- lsrs r0, 24
- ldr r5, =gUnknown_0203A11C
- ldr r2, [r5]
- movs r1, 0xB7
- lsls r1, 2
- mov r8, r1
- add r2, r8
- lsls r1, r0, 4
- adds r1, r0
- lsls r1, 2
- ldr r4, =gSprites
- adds r1, r4
- str r1, [r2]
- movs r0, 0x20
- strh r0, [r1, 0x24]
- adds r0, r6, 0
- movs r1, 0
- movs r2, 0
- movs r3, 0x3
- bl CreateSprite
- lsls r0, 24
- lsrs r0, 24
- ldr r2, [r5]
- movs r1, 0xB8
- lsls r1, 2
- adds r3, r2, r1
- lsls r1, r0, 4
- adds r1, r0
- lsls r1, 2
- adds r1, r4
- str r1, [r3]
- ldr r0, =0x0000ffe0
- strh r0, [r1, 0x24]
- add r2, r8
- ldr r1, [r2]
- adds r1, 0x3F
- ldrb r0, [r1]
- movs r2, 0x1
- orrs r0, r2
- strb r0, [r1]
- bl sub_811E088
- pop {r3}
- mov r8, r3
- pop {r4-r6}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_811DFC8
-
- thumb_func_start sub_811E050
-sub_811E050: @ 811E050
- push {r4-r6,lr}
- ldr r5, =gUnknown_0203A11C
- ldr r0, [r5]
- movs r4, 0xB7
- lsls r4, 2
- adds r0, r4
- ldr r0, [r0]
- bl DestroySprite
- ldr r0, [r5]
- adds r4, r0, r4
- movs r6, 0
- str r6, [r4]
- movs r4, 0xB8
- lsls r4, 2
- adds r0, r4
- ldr r0, [r0]
- bl DestroySprite
- ldr r0, [r5]
- adds r0, r4
- str r6, [r0]
- pop {r4-r6}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_811E050
-
- thumb_func_start sub_811E088
-sub_811E088: @ 811E088
- push {r4,lr}
- sub sp, 0x4
- ldr r0, =gUnknown_0203A11C
- ldr r1, [r0]
- movs r2, 0xB7
- lsls r2, 2
- adds r0, r1, r2
- ldr r0, [r0]
- cmp r0, 0
- beq _0811E0E4
- adds r2, 0x4
- adds r0, r1, r2
- ldr r0, [r0]
- cmp r0, 0
- beq _0811E0E4
- mov r4, sp
- adds r4, 0x1
- mov r0, sp
- adds r1, r4, 0
- bl sub_811BB9C
- bl sub_811BBB0
- lsls r0, 24
- cmp r0, 0
- bne _0811E0D4
- mov r0, sp
- ldrb r0, [r0]
- lsls r0, 24
- asrs r0, 24
- movs r1, 0
- ldrsb r1, [r4, r1]
- bl sub_811E0EC
- b _0811E0E4
- .pool
-_0811E0D4:
- mov r0, sp
- ldrb r0, [r0]
- lsls r0, 24
- asrs r0, 24
- movs r1, 0
- ldrsb r1, [r4, r1]
- bl sub_811E1A4
-_0811E0E4:
- add sp, 0x4
- pop {r4}
- pop {r0}
- bx r0
- thumb_func_end sub_811E088
-
- thumb_func_start sub_811E0EC
-sub_811E0EC: @ 811E0EC
- push {r4-r7,lr}
- mov r7, r8
- push {r7}
- lsls r1, 24
- lsrs r7, r1, 24
- lsls r0, 24
- asrs r5, r0, 24
- movs r0, 0x1
- negs r0, r0
- cmp r5, r0
- beq _0811E150
- ldr r0, =gUnknown_0203A11C
- mov r8, r0
- ldr r0, [r0]
- movs r4, 0xB7
- lsls r4, 2
- adds r0, r4
- ldr r0, [r0]
- movs r1, 0
- bl StartSpriteAnim
- mov r2, r8
- ldr r1, [r2]
- adds r4, r1, r4
- ldr r2, [r4]
- movs r0, 0x54
- muls r5, r0
- adds r5, 0x3A
- strh r5, [r2, 0x20]
- ldr r0, [r4]
- lsls r4, r7, 24
- asrs r4, 20
- adds r4, 0x60
- strh r4, [r0, 0x22]
- movs r6, 0xB8
- lsls r6, 2
- adds r1, r6
- ldr r0, [r1]
- movs r1, 0
- bl StartSpriteAnim
- mov r1, r8
- ldr r0, [r1]
- adds r0, r6
- ldr r1, [r0]
- strh r5, [r1, 0x20]
- b _0811E192
- .pool
-_0811E150:
- ldr r6, =gUnknown_0203A11C
- ldr r0, [r6]
- movs r4, 0xB7
- lsls r4, 2
- adds r0, r4
- ldr r0, [r0]
- movs r1, 0x1
- bl StartSpriteAnim
- ldr r1, [r6]
- adds r4, r1, r4
- ldr r0, [r4]
- movs r2, 0xD8
- mov r8, r2
- mov r2, r8
- strh r2, [r0, 0x20]
- ldr r0, [r4]
- lsls r4, r7, 24
- asrs r4, 20
- adds r4, 0x70
- strh r4, [r0, 0x22]
- movs r5, 0xB8
- lsls r5, 2
- adds r1, r5
- ldr r0, [r1]
- movs r1, 0x1
- bl StartSpriteAnim
- ldr r0, [r6]
- adds r0, r5
- ldr r1, [r0]
- mov r2, r8
- strh r2, [r1, 0x20]
-_0811E192:
- ldr r0, [r0]
- strh r4, [r0, 0x22]
- pop {r3}
- mov r8, r3
- pop {r4-r7}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_811E0EC
-
- thumb_func_start sub_811E1A4
-sub_811E1A4: @ 811E1A4
- push {r4-r7,lr}
- mov r7, r8
- push {r7}
- lsls r0, 24
- lsls r1, 24
- lsrs r5, r1, 24
- lsrs r4, r0, 24
- asrs r2, r0, 24
- movs r0, 0x1
- negs r0, r0
- cmp r2, r0
- beq _0811E234
- lsls r0, r5, 24
- asrs r1, r0, 24
- lsls r0, r1, 4
- adds r0, 0x60
- mov r8, r0
- movs r7, 0x20
- cmp r2, 0x6
- bne _0811E1D6
- cmp r1, 0
- bne _0811E1D6
- movs r7, 0x9E
- movs r6, 0x2
- b _0811E1EC
-_0811E1D6:
- ldr r3, =gUnknown_08597D08
- lsls r1, r4, 24
- lsrs r0, r1, 24
- movs r2, 0
- cmp r0, 0x6
- bhi _0811E1E4
- asrs r2, r1, 24
-_0811E1E4:
- adds r0, r2, r3
- ldrb r0, [r0]
- adds r7, r0
- movs r6, 0x3
-_0811E1EC:
- ldr r5, =gUnknown_0203A11C
- ldr r0, [r5]
- movs r4, 0xB7
- lsls r4, 2
- adds r0, r4
- ldr r0, [r0]
- adds r1, r6, 0
- bl StartSpriteAnim
- ldr r1, [r5]
- adds r4, r1, r4
- ldr r0, [r4]
- strh r7, [r0, 0x20]
- ldr r0, [r4]
- mov r2, r8
- strh r2, [r0, 0x22]
- movs r4, 0xB8
- lsls r4, 2
- adds r1, r4
- ldr r0, [r1]
- adds r1, r6, 0
- bl StartSpriteAnim
- ldr r0, [r5]
- adds r0, r4
- ldr r1, [r0]
- strh r7, [r1, 0x20]
- ldr r0, [r0]
- mov r1, r8
- strh r1, [r0, 0x22]
- b _0811E27A
- .pool
-_0811E234:
- ldr r6, =gUnknown_0203A11C
- ldr r0, [r6]
- movs r4, 0xB7
- lsls r4, 2
- adds r0, r4
- ldr r0, [r0]
- movs r1, 0x1
- bl StartSpriteAnim
- ldr r1, [r6]
- adds r4, r1, r4
- ldr r0, [r4]
- movs r2, 0xD8
- mov r8, r2
- mov r2, r8
- strh r2, [r0, 0x20]
- ldr r0, [r4]
- lsls r4, r5, 24
- asrs r4, 20
- adds r4, 0x70
- strh r4, [r0, 0x22]
- movs r5, 0xB8
- lsls r5, 2
- adds r1, r5
- ldr r0, [r1]
- movs r1, 0x1
- bl StartSpriteAnim
- ldr r0, [r6]
- adds r0, r5
- ldr r1, [r0]
- mov r2, r8
- strh r2, [r1, 0x20]
- ldr r0, [r0]
- strh r4, [r0, 0x22]
-_0811E27A:
- pop {r3}
- mov r8, r3
- pop {r4-r7}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_811E1A4
-
- thumb_func_start sub_811E288
-sub_811E288: @ 811E288
- push {lr}
- ldr r0, =gUnknown_08597D18
- movs r1, 0
- movs r2, 0
- movs r3, 0x4
- bl CreateSprite
- lsls r0, 24
- lsrs r0, 24
- ldr r1, =gUnknown_0203A11C
- ldr r2, [r1]
- movs r1, 0xB9
- lsls r1, 2
- adds r2, r1
- lsls r1, r0, 4
- adds r1, r0
- lsls r1, 2
- ldr r0, =gSprites
- adds r1, r0
- str r1, [r2]
- ldr r0, =sub_811E2DC
- str r0, [r1, 0x1C]
- ldrb r2, [r1, 0x5]
- movs r0, 0xD
- negs r0, r0
- ands r0, r2
- movs r2, 0x8
- orrs r0, r2
- strb r0, [r1, 0x5]
- bl sub_811E30C
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_811E288
-
- thumb_func_start sub_811E2DC
-sub_811E2DC: @ 811E2DC
- push {lr}
- adds r1, r0, 0
- ldrh r0, [r1, 0x2E]
- adds r0, 0x1
- strh r0, [r1, 0x2E]
- lsls r0, 16
- asrs r0, 16
- cmp r0, 0x2
- ble _0811E302
- movs r0, 0
- strh r0, [r1, 0x2E]
- ldrh r0, [r1, 0x24]
- adds r0, 0x1
- strh r0, [r1, 0x24]
- lsls r0, 16
- cmp r0, 0
- ble _0811E302
- ldr r0, =0x0000fffa
- strh r0, [r1, 0x24]
-_0811E302:
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_811E2DC
-
- thumb_func_start sub_811E30C
-sub_811E30C: @ 811E30C
- push {r4,lr}
- sub sp, 0x4
- mov r4, sp
- adds r4, 0x1
- mov r0, sp
- adds r1, r4, 0
- bl sub_811BBC8
- mov r0, sp
- movs r1, 0
- ldrsb r1, [r0, r1]
- movs r0, 0xD
- muls r0, r1
- lsls r0, 27
- movs r1, 0
- ldrsb r1, [r4, r1]
- lsls r1, 28
- movs r2, 0xE0
- lsls r2, 21
- adds r0, r2
- lsrs r0, 24
- movs r2, 0xC0
- lsls r2, 23
- adds r1, r2
- lsrs r1, 24
- bl sub_811E34C
- add sp, 0x4
- pop {r4}
- pop {r0}
- bx r0
- thumb_func_end sub_811E30C
-
- thumb_func_start sub_811E34C
-sub_811E34C: @ 811E34C
- push {r4,lr}
- lsls r0, 24
- lsrs r3, r0, 24
- lsls r1, 24
- lsrs r4, r1, 24
- ldr r0, =gUnknown_0203A11C
- ldr r0, [r0]
- movs r1, 0xB9
- lsls r1, 2
- adds r2, r0, r1
- ldr r0, [r2]
- cmp r0, 0
- beq _0811E376
- movs r1, 0
- strh r3, [r0, 0x20]
- ldr r0, [r2]
- strh r4, [r0, 0x22]
- ldr r0, [r2]
- strh r1, [r0, 0x24]
- ldr r0, [r2]
- strh r1, [r0, 0x2E]
-_0811E376:
- pop {r4}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_811E34C
-
- thumb_func_start sub_811E380
-sub_811E380: @ 811E380
- push {r4,lr}
- ldr r4, =gUnknown_0203A11C
- ldr r0, [r4]
- movs r1, 0xB9
- lsls r1, 2
- adds r0, r1
- ldr r0, [r0]
- cmp r0, 0
- beq _0811E3A2
- bl DestroySprite
- ldr r0, [r4]
- movs r1, 0xB9
- lsls r1, 2
- adds r0, r1
- movs r1, 0
- str r1, [r0]
-_0811E3A2:
- pop {r4}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_811E380
-
- thumb_func_start sub_811E3AC
-sub_811E3AC: @ 811E3AC
- push {r4-r6,lr}
- ldr r0, =gUnknown_08597DF0
- movs r1, 0xD0
- movs r2, 0x80
- movs r3, 0x6
- bl CreateSprite
- lsls r0, 24
- lsrs r0, 24
- ldr r5, =gUnknown_0203A11C
- ldr r2, [r5]
- movs r1, 0xBA
- lsls r1, 2
- adds r2, r1
- lsls r1, r0, 4
- adds r1, r0
- lsls r1, 2
- ldr r4, =gSprites
- adds r1, r4
- str r1, [r2]
- movs r6, 0
- ldr r0, =0x0000ffc0
- strh r0, [r1, 0x24]
- ldr r0, =gUnknown_08597DD0
- movs r1, 0xD0
- movs r2, 0x50
- movs r3, 0x5
- bl CreateSprite
- lsls r0, 24
- lsrs r0, 24
- ldr r2, [r5]
- movs r1, 0xBB
- lsls r1, 2
- adds r3, r2, r1
- lsls r1, r0, 4
- adds r1, r0
- lsls r1, 2
- adds r1, r4
- str r1, [r3]
- strb r6, [r2, 0x9]
- pop {r4-r6}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_811E3AC
-
- thumb_func_start sub_811E418
-sub_811E418: @ 811E418
- push {r4,lr}
- ldr r4, =gUnknown_0203A11C
- ldr r2, [r4]
- ldrb r3, [r2, 0x9]
- cmp r3, 0
- beq _0811E430
- cmp r3, 0x1
- beq _0811E488
- movs r0, 0
- b _0811E4A6
- .pool
-_0811E430:
- movs r0, 0xBA
- lsls r0, 2
- adds r2, r0
- ldr r1, [r2]
- ldrh r0, [r1, 0x24]
- adds r0, 0x8
- strh r0, [r1, 0x24]
- ldr r2, [r2]
- movs r1, 0x24
- ldrsh r0, [r2, r1]
- cmp r0, 0
- blt _0811E4A4
- strh r3, [r2, 0x24]
- bl sub_811BBB0
- lsls r0, 24
- cmp r0, 0
- bne _0811E466
- ldr r0, [r4]
- movs r1, 0xBB
- lsls r1, 2
- adds r0, r1
- ldr r0, [r0]
- movs r1, 0x1
- bl StartSpriteAnim
- b _0811E476
-_0811E466:
- ldr r0, [r4]
- movs r1, 0xBB
- lsls r1, 2
- adds r0, r1
- ldr r0, [r0]
- movs r1, 0x2
- bl StartSpriteAnim
-_0811E476:
- ldr r0, =gUnknown_0203A11C
- ldr r1, [r0]
- ldrb r0, [r1, 0x9]
- adds r0, 0x1
- strb r0, [r1, 0x9]
- b _0811E4A4
- .pool
-_0811E488:
- movs r1, 0xBB
- lsls r1, 2
- adds r0, r2, r1
- ldr r0, [r0]
- adds r0, 0x3F
- ldrb r1, [r0]
- movs r0, 0x10
- ands r0, r1
- cmp r0, 0
- beq _0811E4A4
- movs r0, 0x2
- strb r0, [r2, 0x9]
- movs r0, 0
- b _0811E4A6
-_0811E4A4:
- movs r0, 0x1
-_0811E4A6:
- pop {r4}
- pop {r1}
- bx r1
- thumb_func_end sub_811E418
-
- thumb_func_start sub_811E4AC
-sub_811E4AC: @ 811E4AC
- push {lr}
- ldr r2, =gUnknown_0203A11C
- ldr r1, [r2]
- movs r0, 0
- strb r0, [r1, 0x9]
- ldr r0, [r2]
- movs r1, 0xBB
- lsls r1, 2
- adds r0, r1
- ldr r0, [r0]
- movs r1, 0x3
- bl StartSpriteAnim
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_811E4AC
-
- thumb_func_start sub_811E4D0
-sub_811E4D0: @ 811E4D0
- push {r4-r6,lr}
- ldr r5, =gUnknown_0203A11C
- ldr r3, [r5]
- ldrb r0, [r3, 0x9]
- cmp r0, 0
- beq _0811E4E8
- cmp r0, 0x1
- beq _0811E502
- movs r0, 0
- b _0811E554
- .pool
-_0811E4E8:
- movs r1, 0xBB
- lsls r1, 2
- adds r0, r3, r1
- ldr r0, [r0]
- adds r0, 0x3F
- ldrb r1, [r0]
- movs r0, 0x10
- ands r0, r1
- cmp r0, 0
- beq _0811E552
- movs r0, 0x1
- strb r0, [r3, 0x9]
- b _0811E552
-_0811E502:
- movs r0, 0xBA
- lsls r0, 2
- adds r2, r3, r0
- ldr r1, [r2]
- ldrh r0, [r1, 0x24]
- subs r0, 0x8
- movs r6, 0
- strh r0, [r1, 0x24]
- ldr r0, [r2]
- movs r2, 0x24
- ldrsh r1, [r0, r2]
- movs r0, 0x40
- negs r0, r0
- cmp r1, r0
- bgt _0811E552
- movs r4, 0xBB
- lsls r4, 2
- adds r0, r3, r4
- ldr r0, [r0]
- bl DestroySprite
- ldr r0, [r5]
- movs r1, 0xBA
- lsls r1, 2
- adds r0, r1
- ldr r0, [r0]
- bl DestroySprite
- ldr r1, [r5]
- adds r4, r1, r4
- str r6, [r4]
- movs r2, 0xBA
- lsls r2, 2
- adds r0, r1, r2
- str r6, [r0]
- ldrb r0, [r1, 0x9]
- adds r0, 0x1
- strb r0, [r1, 0x9]
- movs r0, 0
- b _0811E554
-_0811E552:
- movs r0, 0x1
-_0811E554:
- pop {r4-r6}
- pop {r1}
- bx r1
- thumb_func_end sub_811E4D0
-
- thumb_func_start sub_811E55C
-sub_811E55C: @ 811E55C
- push {lr}
- ldr r0, =gUnknown_0203A11C
- ldr r0, [r0]
- movs r1, 0xBB
- lsls r1, 2
- adds r0, r1
- ldr r0, [r0]
- movs r1, 0x4
- bl StartSpriteAnim
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_811E55C
-
- thumb_func_start sub_811E578
-sub_811E578: @ 811E578
- push {lr}
- bl sub_811BBB0
- lsls r0, 24
- cmp r0, 0
- bne _0811E59C
- ldr r0, =gUnknown_0203A11C
- ldr r0, [r0]
- movs r1, 0xBB
- lsls r1, 2
- adds r0, r1
- ldr r0, [r0]
- movs r1, 0x1
- bl StartSpriteAnim
- b _0811E5AE
- .pool
-_0811E59C:
- ldr r0, =gUnknown_0203A11C
- ldr r0, [r0]
- movs r1, 0xBB
- lsls r1, 2
- adds r0, r1
- ldr r0, [r0]
- movs r1, 0x2
- bl StartSpriteAnim
-_0811E5AE:
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_811E578
-
- thumb_func_start sub_811E5B8
-sub_811E5B8: @ 811E5B8
- ldr r0, =gUnknown_0203A11C
- ldr r0, [r0]
- movs r1, 0xBB
- lsls r1, 2
- adds r0, r1
- ldr r0, [r0]
- adds r0, 0x3F
- ldrb r1, [r0]
- lsrs r1, 4
- movs r0, 0x1
- bics r0, r1
- bx lr
- .pool
- thumb_func_end sub_811E5B8
-
- thumb_func_start sub_811E5D4
-sub_811E5D4: @ 811E5D4
- push {r4,lr}
- ldr r4, =gUnknown_08597E48
- adds r0, r4, 0
- movs r1, 0x60
- movs r2, 0x50
- movs r3, 0
- bl CreateSprite
- lsls r0, 24
- lsrs r1, r0, 24
- cmp r1, 0x40
- beq _0811E602
- ldr r0, =gUnknown_0203A11C
- ldr r2, [r0]
- movs r0, 0xBC
- lsls r0, 2
- adds r2, r0
- lsls r0, r1, 4
- adds r0, r1
- lsls r0, 2
- ldr r1, =gSprites
- adds r0, r1
- str r0, [r2]
-_0811E602:
- adds r0, r4, 0
- movs r1, 0x60
- movs r2, 0x9C
- movs r3, 0
- bl CreateSprite
- lsls r0, 24
- lsrs r1, r0, 24
- cmp r1, 0x40
- beq _0811E636
- ldr r0, =gUnknown_0203A11C
- ldr r2, [r0]
- movs r0, 0xBD
- lsls r0, 2
- adds r2, r0
- lsls r0, r1, 4
- adds r0, r1
- lsls r0, 2
- ldr r1, =gSprites
- adds r0, r1
- str r0, [r2]
- adds r0, 0x3F
- ldrb r1, [r0]
- movs r2, 0x2
- orrs r1, r2
- strb r1, [r0]
-_0811E636:
- bl sub_811E6B0
- pop {r4}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_811E5D4
-
- thumb_func_start sub_811E64C
-sub_811E64C: @ 811E64C
- push {r4-r6,lr}
- bl sub_811BBF8
- ldr r6, =gUnknown_0203A11C
- ldr r1, [r6]
- movs r2, 0xBC
- lsls r2, 2
- adds r1, r2
- ldr r1, [r1]
- movs r2, 0
- cmp r0, 0
- bne _0811E666
- movs r2, 0x1
-_0811E666:
- adds r3, r1, 0
- adds r3, 0x3E
- movs r4, 0x1
- lsls r2, 2
- ldrb r1, [r3]
- movs r5, 0x5
- negs r5, r5
- adds r0, r5, 0
- ands r0, r1
- orrs r0, r2
- strb r0, [r3]
- bl sub_811BC2C
- ldr r1, [r6]
- movs r2, 0xBD
- lsls r2, 2
- adds r1, r2
- ldr r1, [r1]
- movs r2, 0
- cmp r0, 0
- bne _0811E692
- movs r2, 0x1
-_0811E692:
- adds r3, r1, 0
- adds r3, 0x3E
- adds r1, r4, 0
- ands r1, r2
- lsls r1, 2
- ldrb r2, [r3]
- adds r0, r5, 0
- ands r0, r2
- orrs r0, r1
- strb r0, [r3]
- pop {r4-r6}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_811E64C
-
- thumb_func_start sub_811E6B0
-sub_811E6B0: @ 811E6B0
- ldr r3, =gUnknown_0203A11C
- ldr r0, [r3]
- movs r1, 0xBC
- lsls r1, 2
- adds r0, r1
- ldr r1, [r0]
- adds r1, 0x3E
- ldrb r0, [r1]
- movs r2, 0x4
- orrs r0, r2
- strb r0, [r1]
- ldr r0, [r3]
- movs r1, 0xBD
- lsls r1, 2
- adds r0, r1
- ldr r1, [r0]
- adds r1, 0x3E
- ldrb r0, [r1]
- orrs r0, r2
- strb r0, [r1]
- bx lr
- .pool
- thumb_func_end sub_811E6B0
-
- thumb_func_start sub_811E6E0
-sub_811E6E0: @ 811E6E0
- push {lr}
- cmp r0, 0
- bne _0811E6FC
- ldr r0, =gUnknown_0203A11C
- ldr r2, [r0]
- movs r1, 0xBC
- lsls r1, 2
- adds r0, r2, r1
- ldr r0, [r0]
- movs r1, 0x60
- b _0811E70A
- .pool
-_0811E6FC:
- ldr r0, =gUnknown_0203A11C
- ldr r2, [r0]
- movs r1, 0xBC
- lsls r1, 2
- adds r0, r2, r1
- ldr r0, [r0]
- movs r1, 0x78
-_0811E70A:
- strh r1, [r0, 0x20]
- movs r3, 0xBD
- lsls r3, 2
- adds r0, r2, r3
- ldr r0, [r0]
- strh r1, [r0, 0x20]
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_811E6E0
-
- thumb_func_start sub_811E720
-sub_811E720: @ 811E720
- push {r4,lr}
- ldr r4, =gUnknown_08597E30
- adds r0, r4, 0
- movs r1, 0xDC
- movs r2, 0x54
- movs r3, 0x1
- bl CreateSprite
- lsls r0, 24
- lsrs r1, r0, 24
- cmp r1, 0x40
- beq _0811E74E
- ldr r0, =gUnknown_0203A11C
- ldr r2, [r0]
- movs r0, 0xBE
- lsls r0, 2
- adds r2, r0
- lsls r0, r1, 4
- adds r0, r1
- lsls r0, 2
- ldr r1, =gSprites
- adds r0, r1
- str r0, [r2]
-_0811E74E:
- adds r0, r4, 0
- movs r1, 0xDC
- movs r2, 0x9C
- movs r3, 0x1
- bl CreateSprite
- lsls r0, 24
- lsrs r1, r0, 24
- cmp r1, 0x40
- beq _0811E77E
- ldr r0, =gUnknown_0203A11C
- ldr r2, [r0]
- movs r0, 0xBF
- lsls r0, 2
- adds r2, r0
- lsls r0, r1, 4
- adds r0, r1
- lsls r0, 2
- ldr r1, =gSprites
- adds r0, r1
- str r0, [r2]
- movs r1, 0x1
- bl StartSpriteAnim
-_0811E77E:
- bl sub_811E7F8
- pop {r4}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_811E720
-
- thumb_func_start sub_811E794
-sub_811E794: @ 811E794
- push {r4-r6,lr}
- bl sub_811BBF8
- ldr r6, =gUnknown_0203A11C
- ldr r1, [r6]
- movs r2, 0xBE
- lsls r2, 2
- adds r1, r2
- ldr r1, [r1]
- movs r2, 0
- cmp r0, 0
- bne _0811E7AE
- movs r2, 0x1
-_0811E7AE:
- adds r3, r1, 0
- adds r3, 0x3E
- movs r4, 0x1
- lsls r2, 2
- ldrb r1, [r3]
- movs r5, 0x5
- negs r5, r5
- adds r0, r5, 0
- ands r0, r1
- orrs r0, r2
- strb r0, [r3]
- bl sub_811BC2C
- ldr r1, [r6]
- movs r2, 0xBF
- lsls r2, 2
- adds r1, r2
- ldr r1, [r1]
- movs r2, 0
- cmp r0, 0
- bne _0811E7DA
- movs r2, 0x1
-_0811E7DA:
- adds r3, r1, 0
- adds r3, 0x3E
- adds r1, r4, 0
- ands r1, r2
- lsls r1, 2
- ldrb r2, [r3]
- adds r0, r5, 0
- ands r0, r2
- orrs r0, r1
- strb r0, [r3]
- pop {r4-r6}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_811E794
-
- thumb_func_start sub_811E7F8
-sub_811E7F8: @ 811E7F8
- ldr r3, =gUnknown_0203A11C
- ldr r0, [r3]
- movs r1, 0xBE
- lsls r1, 2
- adds r0, r1
- ldr r1, [r0]
- adds r1, 0x3E
- ldrb r0, [r1]
- movs r2, 0x4
- orrs r0, r2
- strb r0, [r1]
- ldr r0, [r3]
- movs r1, 0xBF
- lsls r1, 2
- adds r0, r1
- ldr r1, [r0]
- adds r1, 0x3E
- ldrb r0, [r1]
- orrs r0, r2
- strb r0, [r1]
- bx lr
- .pool
- thumb_func_end sub_811E7F8
-
- thumb_func_start sub_811E828
-sub_811E828: @ 811E828
- push {r4,r5,lr}
- sub sp, 0x4
- bl sub_811BCBC
- lsls r0, 24
- lsrs r0, 24
- cmp r0, 0x1
- beq _0811E84C
- cmp r0, 0x1
- bgt _0811E842
- cmp r0, 0
- beq _0811E848
- b _0811E8D0
-_0811E842:
- cmp r0, 0x2
- beq _0811E850
- b _0811E8D0
-_0811E848:
- movs r4, 0x43
- b _0811E852
-_0811E84C:
- movs r4, 0x44
- b _0811E852
-_0811E850:
- movs r4, 0x7
-_0811E852:
- bl sub_811BA68
- lsls r0, 24
- lsrs r0, 24
- cmp r0, 0x4
- bne _0811E8D0
- adds r0, r4, 0
- ldr r5, =SpriteCallbackDummy
- movs r4, 0
- str r4, [sp]
- adds r1, r5, 0
- movs r2, 0x4C
- movs r3, 0x28
- bl AddPseudoEventObject
- lsls r0, 24
- lsrs r2, r0, 24
- cmp r2, 0x40
- beq _0811E892
- ldr r1, =gSprites
- lsls r0, r2, 4
- adds r0, r2
- lsls r0, 2
- adds r0, r1
- ldrb r2, [r0, 0x5]
- movs r1, 0xD
- negs r1, r1
- ands r1, r2
- strb r1, [r0, 0x5]
- movs r1, 0x2
- bl StartSpriteAnim
-_0811E892:
- ldr r0, =gSaveBlock2Ptr
- ldr r0, [r0]
- ldrb r0, [r0, 0x8]
- movs r1, 0x69
- cmp r0, 0
- bne _0811E8A0
- movs r1, 0x64
-_0811E8A0:
- str r4, [sp]
- adds r0, r1, 0
- adds r1, r5, 0
- movs r2, 0x34
- movs r3, 0x28
- bl AddPseudoEventObject
- lsls r0, 24
- lsrs r2, r0, 24
- cmp r2, 0x40
- beq _0811E8D0
- ldr r1, =gSprites
- lsls r0, r2, 4
- adds r0, r2
- lsls r0, 2
- adds r0, r1
- ldrb r2, [r0, 0x5]
- movs r1, 0xD
- negs r1, r1
- ands r1, r2
- strb r1, [r0, 0x5]
- movs r1, 0x3
- bl StartSpriteAnim
-_0811E8D0:
- add sp, 0x4
- pop {r4,r5}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_811E828
-
- thumb_func_start sub_811E8E4
-sub_811E8E4: @ 811E8E4
- push {lr}
- bl sub_811BA68
- lsls r0, 24
- ldr r1, =gUnknown_08597C30
- lsrs r0, 22
- adds r0, r1
- ldrb r0, [r0, 0x3]
- cmp r0, 0x1
- beq _0811E90E
- cmp r0, 0x1
- bgt _0811E908
- cmp r0, 0
- beq _0811E916
- b _0811E91A
- .pool
-_0811E908:
- cmp r0, 0x2
- beq _0811E912
- b _0811E91A
-_0811E90E:
- movs r0, 0x1
- b _0811E91C
-_0811E912:
- movs r0, 0x2
- b _0811E91C
-_0811E916:
- movs r0, 0
- b _0811E91C
-_0811E91A:
- movs r0, 0x3
-_0811E91C:
- pop {r1}
- bx r1
- thumb_func_end sub_811E8E4
-
- thumb_func_start sub_811E920
-sub_811E920: @ 811E920
- push {r4,lr}
- adds r4, r0, 0
- bl sub_811E8E4
- adds r1, r0, 0
- cmp r1, 0x2
- ble _0811E932
- movs r0, 0
- b _0811E93E
-_0811E932:
- ldr r0, =gUnknown_08597E60
- lsls r1, 2
- adds r1, r4, r1
- adds r1, r0
- ldrb r0, [r1]
- adds r0, 0x4
-_0811E93E:
- pop {r4}
- pop {r1}
- bx r1
- .pool
- thumb_func_end sub_811E920
-
thumb_func_start sub_811E948
sub_811E948: @ 811E948
push {r4-r7,lr}
diff --git a/data/easy_chat.s b/data/easy_chat.s
index b8df93d7a..ef632c69f 100644
--- a/data/easy_chat.s
+++ b/data/easy_chat.s
@@ -443,7 +443,9 @@ gUnknown_08597E48:: @ 8597E48
spr_template 0x0002, 0x0002, gUnknown_08597E10, gUnknown_08597E28, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
gUnknown_08597E60:: @ 8597E60
- .byte 0x10, 0x6f, 0xc4, 0x00, 0x10, 0x4e, 0x82, 0xa0, 0x10, 0x50, 0x86, 0xaa
+ .byte 0x10, 0x6f, 0xc4, 0x00
+ .byte 0x10, 0x4e, 0x82, 0xa0
+ .byte 0x10, 0x50, 0x86, 0xaa
.align 2
gUnknown_08597E6C:: @ 8597E6C
diff --git a/data/event_scripts.s b/data/event_scripts.s
index 1b8807ed7..55bbb7618 100644
--- a/data/event_scripts.s
+++ b/data/event_scripts.s
@@ -8,6 +8,7 @@
#include "constants/items.h"
#include "constants/heal_locations.h"
#include "constants/layouts.h"
+#include "constants/map_scripts.h"
#include "constants/maps.h"
#include "constants/moves.h"
#include "constants/songs.h"
@@ -824,27 +825,12 @@ Std_10: @ 8271347
EventScript_27134E: @ 827134E
return
-BattleFrontier_BattleArenaLobby_EventScript_27134F:: @ 827134F
-BattleFrontier_BattleDomeLobby_EventScript_27134F:: @ 827134F
-BattleFrontier_BattleFactoryLobby_EventScript_27134F:: @ 827134F
-BattleFrontier_BattlePalaceLobby_EventScript_27134F:: @ 827134F
-BattleFrontier_BattlePikeLobby_EventScript_27134F:: @ 827134F
-BattleFrontier_BattlePyramidLobby_EventScript_27134F:: @ 827134F
-BattleFrontier_BattleTowerLobby_EventScript_27134F:: @ 827134F
-FallarborTown_BattleTentLobby_EventScript_27134F:: @ 827134F
-LilycoveCity_ContestLobby_EventScript_27134F:: @ 827134F
-MossdeepCity_GameCorner_1F_EventScript_27134F:: @ 827134F
-OldaleTown_PokemonCenter_2F_EventScript_27134F:: @ 827134F
-SecretBase_RedCave1_EventScript_27134F:: @ 827134F
-SlateportCity_BattleTentLobby_EventScript_27134F:: @ 827134F
-SootopolisCity_MysteryEventsHouse_1F_EventScript_27134F:: @ 827134F
-TrainerHill_Entrance_EventScript_27134F:: @ 827134F
-VerdanturfTown_BattleTentLobby_EventScript_27134F:: @ 827134F
+Common_EventScript_SaveGame:: @ 827134F
special SaveGame
waitstate
return
- EventScript_271354:: @ 8271354
+EventScript_271354:: @ 8271354
cmdD8
cmdD9
@@ -1114,7 +1100,7 @@ EverGrandeCity_HallOfFame_EventScript_2717C1:: @ 82717C1
setflag FLAG_HIDE_SLATEPORT_CITY_STERNS_SHIPYARD_MR_BRINEY
clearflag FLAG_HIDE_SS_TIDAL_CORRIDOR_MR_BRINEY
clearflag FLAG_HIDE_MOSSDEEP_CITY_STEVENS_HOUSE_INVISIBLE_NINJA_BOY
- setvar VAR_0x40C6, 2
+ setvar VAR_STEVENS_HOUSE_STATE, 2
setflag FLAG_HIDE_VICTORY_ROAD_ENTRANCE_WALLY
clearflag FLAG_HIDE_VICTORY_ROAD_EXIT_WALLY
clearflag FLAG_HIDE_SLATEPORT_CITY_HARBOR_SS_TIDAL
@@ -1148,8 +1134,8 @@ EverGrandeCity_HallOfFame_EventScript_27183F:: @ 827183F
return
EverGrandeCity_HallOfFame_EventScript_271843:: @ 8271843
- setvar VAR_0x4082, 3
- setvar VAR_0x408C, 3
+ setvar VAR_LITTLEROOT_HOUSES_STATE, 3
+ setvar VAR_LITTLEROOT_HOUSES_STATE_2, 3
clearflag FLAG_HIDE_PLAYERS_HOUSE_DAD
return
@@ -1163,11 +1149,11 @@ EventScript_WhiteOut:: @ 8271857
end
EventScript_271862:: @ 8271862
- compare VAR_0x4096, 1
+ compare VAR_BRINEY_LOCATION, 1
goto_if_eq EverGrandeCity_HallOfFame_EventScript_271884
- compare VAR_0x4096, 2
+ compare VAR_BRINEY_LOCATION, 2
goto_if_eq EverGrandeCity_HallOfFame_EventScript_27189A
- compare VAR_0x4096, 3
+ compare VAR_BRINEY_LOCATION, 3
goto_if_eq EverGrandeCity_HallOfFame_EventScript_2718B3
end
@@ -1208,7 +1194,7 @@ EverGrandeCity_HallOfFame_EventScript_2718CC:: @ 82718CC
clearflag FLAG_DEFEATED_ELITE_4_PHOEBE
clearflag FLAG_DEFEATED_ELITE_4_GLACIA
clearflag FLAG_DEFEATED_ELITE_4_DRAKE
- setvar VAR_0x409C, 0
+ setvar VAR_ELITE_4_STATE, 0
return
DewfordTown_PokemonCenter_1F_EventScript_2718DE:: @ 82718DE
@@ -1220,23 +1206,23 @@ PetalburgCity_PokemonCenter_1F_EventScript_2718DE:: @ 82718DE
RustboroCity_PokemonCenter_1F_EventScript_2718DE:: @ 82718DE
SlateportCity_PokemonCenter_1F_EventScript_2718DE:: @ 82718DE
VerdanturfTown_PokemonCenter_1F_EventScript_2718DE:: @ 82718DE
- goto_if_unset FLAG_RECEIVED_POKENAV, OldaleTown_PokemonCenter_1F_EventScript_27374E
- goto_if_set FLAG_DEFEATED_PETALBURG_GYM, OldaleTown_PokemonCenter_1F_EventScript_27374E
+ goto_if_unset FLAG_RECEIVED_POKENAV, Common_EventScript_NopReturn
+ goto_if_set FLAG_DEFEATED_PETALBURG_GYM, Common_EventScript_NopReturn
goto_if_unset FLAG_HIDE_ROUTE_104_MR_BRINEY_BOAT, OldaleTown_PokemonCenter_1F_EventScript_27190C
goto_if_unset FLAG_HIDE_MR_BRINEY_DEWFORD_TOWN, OldaleTown_PokemonCenter_1F_EventScript_271912
goto_if_unset FLAG_HIDE_ROUTE_108_MR_BRINEY, OldaleTown_PokemonCenter_1F_EventScript_271918
return
OldaleTown_PokemonCenter_1F_EventScript_27190C:: @ 827190C
- setvar VAR_0x4096, 1
+ setvar VAR_BRINEY_LOCATION, 1
return
OldaleTown_PokemonCenter_1F_EventScript_271912:: @ 8271912
- setvar VAR_0x4096, 2
+ setvar VAR_BRINEY_LOCATION, 2
return
OldaleTown_PokemonCenter_1F_EventScript_271918:: @ 8271918
- setvar VAR_0x4096, 3
+ setvar VAR_BRINEY_LOCATION, 3
return
BattleFrontier_PokemonCenter_1F_EventScript_27191E:: @ 827191E
@@ -1295,11 +1281,11 @@ OldaleTown_PokemonCenter_1F_EventScript_27198D:: @ 827198D
return
OldaleTown_PokemonCenter_1F_EventScript_271993:: @ 8271993
- applymovement VAR_0x800B, OldaleTown_PokemonCenter_1F_Movement_2725A4
+ applymovement VAR_0x800B, Common_Movement_WalkInPlaceLeft
waitmovement 0
dofieldeffect FLDEFF_POKECENTER_HEAL
waitfieldeffect FLDEFF_POKECENTER_HEAL
- applymovement VAR_0x800B, OldaleTown_PokemonCenter_1F_Movement_2725AA
+ applymovement VAR_0x800B, Common_Movement_WalkInPlaceDown
waitmovement 0
special HealPlayerParty
return
@@ -1363,9 +1349,9 @@ OldaleTown_PokemonCenter_1F_EventScript_271A68:: @ 8271A68
setflag FLAG_OLDALE_NURSE_MENTIONS_GOLD_CARD
msgbox gUnknown_082727F5, MSGBOX_DEFAULT
playse SE_PIN
- applymovement VAR_0x800B, OldaleTown_PokemonCenter_1F_Movement_272598
+ applymovement VAR_0x800B, Common_Movement_ExclamationMark
waitmovement 0
- applymovement VAR_0x800B, OldaleTown_PokemonCenter_1F_Movement_27259A
+ applymovement VAR_0x800B, Common_Movement_Delay48
waitmovement 0
msgbox gUnknown_08272860, MSGBOX_YESNO
compare VAR_RESULT, 1
@@ -1542,7 +1528,7 @@ EventScript_271C9B:: @ 8271C9B
EventScript_271CA1:: @ 8271CA1
msgbox gUnknown_08272A78, MSGBOX_DEFAULT
- msgbox gUnknown_08272AD0, MSGBOX_DEFAULT
+ msgbox gText_TooBadBagIsFull, MSGBOX_DEFAULT
setvar VAR_RESULT, 0
return
@@ -1594,7 +1580,7 @@ EventScript_271D2A:: @ 8271D2A
EventScript_271D47:: @ 8271D47
msgbox gUnknown_08272ABF, MSGBOX_DEFAULT
- msgbox gUnknown_08272AD0, MSGBOX_DEFAULT
+ msgbox gText_TooBadBagIsFull, MSGBOX_DEFAULT
setvar VAR_RESULT, 0
releaseall
end
@@ -1689,38 +1675,12 @@ EventScript_271E54:: @ 8271E54
goto EventScript_271DBC
end
-BattleFrontier_OutsideWest_EventScript_271E6A:: @ 8271E6A
-FallarborTown_EventScript_271E6A:: @ 8271E6A
-FortreeCity_EventScript_271E6A:: @ 8271E6A
-LavaridgeTown_EventScript_271E6A:: @ 8271E6A
-MauvilleCity_EventScript_271E6A:: @ 8271E6A
-MossdeepCity_EventScript_271E6A:: @ 8271E6A
-OldaleTown_EventScript_271E6A:: @ 8271E6A
-PetalburgCity_EventScript_271E6A:: @ 8271E6A
-RustboroCity_EventScript_271E6A:: @ 8271E6A
-SlateportCity_EventScript_271E6A:: @ 8271E6A
-SootopolisCity_EventScript_271E6A:: @ 8271E6A
-VerdanturfTown_EventScript_271E6A:: @ 8271E6A
- msgbox gUnknown_08272B6A, MSGBOX_SIGN
- end
-
-BattleFrontier_OutsideEast_EventScript_271E73:: @ 8271E73
-DewfordTown_EventScript_271E73:: @ 8271E73
-EverGrandeCity_EventScript_271E73:: @ 8271E73
-FallarborTown_EventScript_271E73:: @ 8271E73
-FortreeCity_EventScript_271E73:: @ 8271E73
-LavaridgeTown_EventScript_271E73:: @ 8271E73
-LilycoveCity_EventScript_271E73:: @ 8271E73
-MauvilleCity_EventScript_271E73:: @ 8271E73
-MossdeepCity_EventScript_271E73:: @ 8271E73
-OldaleTown_EventScript_271E73:: @ 8271E73
-PacifidlogTown_EventScript_271E73:: @ 8271E73
-PetalburgCity_EventScript_271E73:: @ 8271E73
-RustboroCity_EventScript_271E73:: @ 8271E73
-SlateportCity_EventScript_271E73:: @ 8271E73
-SootopolisCity_EventScript_271E73:: @ 8271E73
-VerdanturfTown_EventScript_271E73:: @ 8271E73
- msgbox gUnknown_08272B9E, MSGBOX_SIGN
+Common_EventScript_ShowPokemartSign:: @ 8271E6A
+ msgbox gText_PokemartSign, MSGBOX_SIGN
+ end
+
+Common_EventScript_ShowPokemonCenterSign:: @ 8271E73
+ msgbox gText_PokemonCenterSign, MSGBOX_SIGN
end
BattleFrontier_BattleTowerLobby_EventScript_271E7C:: @ 8271E7C
@@ -1756,8 +1716,8 @@ DewfordTown_Hall_EventScript_271E8B:: @ 8271E8B
DewfordTown_EventScript_271E95:: @ 8271E95
Route104_MrBrineysHouse_EventScript_271E95:: @ 8271E95
Route109_EventScript_271E95:: @ 8271E95
- copyvar VAR_0x8008, VAR_0x4096
- setvar VAR_0x4096, 0
+ copyvar VAR_0x8008, VAR_BRINEY_LOCATION
+ setvar VAR_BRINEY_LOCATION, 0
return
EventScript_UseSurf:: @ 8271EA0
@@ -1779,17 +1739,7 @@ EventScript_271ED5:: @ 8271ED5
EventScript_271ED6:: @ 8271ED6
end
-EverGrandeCity_ChampionsRoom_EventScript_271ED7:: @ 8271ED7
-LavaridgeTown_EventScript_271ED7:: @ 8271ED7
-LilycoveCity_EventScript_271ED7:: @ 8271ED7
-LittlerootTown_EventScript_271ED7:: @ 8271ED7
-LittlerootTown_ProfessorBirchsLab_EventScript_271ED7:: @ 8271ED7
-OldaleTown_EventScript_271ED7:: @ 8271ED7
-Route103_EventScript_271ED7:: @ 8271ED7
-Route104_EventScript_271ED7:: @ 8271ED7
-Route110_EventScript_271ED7:: @ 8271ED7
-Route119_EventScript_271ED7:: @ 8271ED7
-RustboroCity_EventScript_271ED7:: @ 8271ED7
+Common_EventScript_SetupRivalGender:: @ 8271ED7
checkplayergender
compare VAR_RESULT, MALE
goto_if_eq RustboroCity_EventScript_271EEF
@@ -1805,9 +1755,7 @@ RustboroCity_EventScript_271EF5:: @ 8271EF5
setvar VAR_OBJ_GFX_ID_0, EVENT_OBJ_GFX_RIVAL_BRENDAN_NORMAL
return
-LavaridgeTown_EventScript_271EFB:: @ 8271EFB
-Route110_EventScript_271EFB:: @ 8271EFB
-Route119_EventScript_271EFB:: @ 8271EFB
+Common_EventScript_SetupRivalOnBikeGender:: @ 8271EFB
checkplayergender
compare VAR_RESULT, MALE
goto_if_eq LavaridgeTown_EventScript_271F13
@@ -1939,119 +1887,34 @@ DewfordTown_Gym_EventScript_272035:: @ 8272035
settrainerflag TRAINER_DAPHNE
return
-DewfordTown_Gym_EventScript_272054:: @ 8272054
-DewfordTown_Hall_EventScript_272054:: @ 8272054
-FallarborTown_House1_EventScript_272054:: @ 8272054
-FortreeCity_Gym_EventScript_272054:: @ 8272054
-FortreeCity_House2_EventScript_272054:: @ 8272054
-FortreeCity_House4_EventScript_272054:: @ 8272054
-LavaridgeTown_Gym_1F_EventScript_272054:: @ 8272054
-LavaridgeTown_HerbShop_EventScript_272054:: @ 8272054
-LilycoveCity_EventScript_272054:: @ 8272054
-LilycoveCity_House2_EventScript_272054:: @ 8272054
-LittlerootTown_BrendansHouse_1F_EventScript_272054:: @ 8272054
-MauvilleCity_EventScript_272054:: @ 8272054
-MauvilleCity_Gym_EventScript_272054:: @ 8272054
-MossdeepCity_EventScript_272054:: @ 8272054
-MossdeepCity_Gym_EventScript_272054:: @ 8272054
-MossdeepCity_SpaceCenter_1F_EventScript_272054:: @ 8272054
-MtPyre_1F_EventScript_272054:: @ 8272054
-PacifidlogTown_House2_EventScript_272054:: @ 8272054
-PetalburgCity_Gym_EventScript_272054:: @ 8272054
-PetalburgWoods_EventScript_272054:: @ 8272054
-Route104_EventScript_272054:: @ 8272054
-Route104_PrettyPetalFlowerShop_EventScript_272054:: @ 8272054
-Route109_EventScript_272054:: @ 8272054
-Route111_EventScript_272054:: @ 8272054
-Route111_WinstrateFamilysHouse_EventScript_272054:: @ 8272054
-Route114_EventScript_272054:: @ 8272054
-Route114_FossilManiacsHouse_EventScript_272054:: @ 8272054
-Route120_EventScript_272054:: @ 8272054
-Route123_BerryMastersHouse_EventScript_272054:: @ 8272054
-Route123_EventScript_272054:: @ 8272054
-RustboroCity_DevonCorp_3F_EventScript_272054:: @ 8272054
-RustboroCity_Flat2_2F_EventScript_272054:: @ 8272054
-RustboroCity_Gym_EventScript_272054:: @ 8272054
-RustboroCity_PokemonSchool_EventScript_272054:: @ 8272054
-SSTidalRooms_EventScript_272054:: @ 8272054
-ShoalCave_LowTideEntranceRoom_EventScript_272054:: @ 8272054
-ShoalCave_LowTideInnerRoom_EventScript_272054:: @ 8272054
-ShoalCave_LowTideLowerRoom_EventScript_272054:: @ 8272054
-ShoalCave_LowTideStairsRoom_EventScript_272054:: @ 8272054
-SlateportCity_BattleTentLobby_EventScript_272054:: @ 8272054
-SlateportCity_Harbor_EventScript_272054:: @ 8272054
-SlateportCity_PokemonFanClub_EventScript_272054:: @ 8272054
-SootopolisCity_EventScript_272054:: @ 8272054
-SootopolisCity_Gym_1F_EventScript_272054:: @ 8272054
-SootopolisCity_House1_EventScript_272054:: @ 8272054
-VerdanturfTown_BattleTentLobby_EventScript_272054:: @ 8272054
- msgbox gUnknown_08272AD0, MSGBOX_DEFAULT
+Common_EventScript_ShowBagIsFull:: @ 8272054
+ msgbox gText_TooBadBagIsFull, MSGBOX_DEFAULT
release
end
-DewfordTown_Gym_EventScript_27205E:: @ 827205E
-FortreeCity_Gym_EventScript_27205E:: @ 827205E
-LavaridgeTown_Gym_1F_EventScript_27205E:: @ 827205E
-LilycoveCity_ContestLobby_EventScript_27205E:: @ 827205E
-LinkContestRoom1_EventScript_27205E:: @ 827205E
-MauvilleCity_GameCorner_EventScript_27205E:: @ 827205E
-MauvilleCity_Gym_EventScript_27205E:: @ 827205E
-MossdeepCity_Gym_EventScript_27205E:: @ 827205E
-PetalburgCity_Gym_EventScript_27205E:: @ 827205E
-Route110_TrickHouseEnd_EventScript_27205E:: @ 827205E
-Route110_TrickHouseEntrance_EventScript_27205E:: @ 827205E
-Route113_GlassWorkshop_EventScript_27205E:: @ 827205E
-SootopolisCity_Gym_1F_EventScript_27205E:: @ 827205E
- msgbox gUnknown_08272AD0, MSGBOX_DEFAULT
+Common_EventScript_BagIsFull:: @ 827205E
+ msgbox gText_TooBadBagIsFull, MSGBOX_DEFAULT
return
Route114_LanettesHouse_EventScript_272067:: @ 8272067
- msgbox gUnknown_08272B1A, MSGBOX_DEFAULT
+ msgbox gText_NoRoomLeftForAnother, MSGBOX_DEFAULT
release
end
-LilycoveCity_LilycoveMuseum_2F_EventScript_272071:: @ 8272071
-MauvilleCity_GameCorner_EventScript_272071:: @ 8272071
-Route110_TrickHouseEnd_EventScript_272071:: @ 8272071
-Route110_TrickHouseEntrance_EventScript_272071:: @ 8272071
-Route113_GlassWorkshop_EventScript_272071:: @ 8272071
- msgbox gUnknown_08272B1A, MSGBOX_DEFAULT
- return
-
-EverGrandeCity_EventScript_27207A:: @ 827207A
-LilycoveCity_EventScript_27207A:: @ 827207A
-MossdeepCity_EventScript_27207A:: @ 827207A
-Route124_EventScript_27207A:: @ 827207A
-Route125_EventScript_27207A:: @ 827207A
-Route126_EventScript_27207A:: @ 827207A
-Route127_EventScript_27207A:: @ 827207A
-Route128_EventScript_27207A:: @ 827207A
-Route129_EventScript_27207A:: @ 827207A
-Route130_EventScript_27207A:: @ 827207A
-Route131_EventScript_27207A:: @ 827207A
-SkyPillar_Outside_EventScript_27207A:: @ 827207A
-SootopolisCity_EventScript_27207A:: @ 827207A
- setweather 15
- return
-
-DewfordTown_Gym_EventScript_27207E:: @ 827207E
-FortreeCity_Gym_EventScript_27207E:: @ 827207E
-LavaridgeTown_Gym_1F_EventScript_27207E:: @ 827207E
-LilycoveCity_CoveLilyMotel_2F_EventScript_27207E:: @ 827207E
-MauvilleCity_Gym_EventScript_27207E:: @ 827207E
-MossdeepCity_Gym_EventScript_27207E:: @ 827207E
-PetalburgCity_Gym_EventScript_27207E:: @ 827207E
-RustboroCity_Gym_EventScript_27207E:: @ 827207E
-SootopolisCity_Gym_1F_EventScript_27207E:: @ 827207E
+Common_EventScript_NoRoomLeftForAnother:: @ 8272071
+ msgbox gText_NoRoomLeftForAnother, MSGBOX_DEFAULT
+ return
+
+Common_EventScript_SetWeather15:: @ 827207A
+ setweather WEATHER_ALTERNATING
+ return
+
+Common_EventScript_PlayGymBadgeFanfare:: @ 827207E
playfanfare MUS_ME_BACHI
waitfanfare
return
-LittlerootTown_BrendansHouse_1F_EventScript_272083:: @ 8272083
-Route111_OldLadysRestStop_EventScript_272083:: @ 8272083
-Route119_WeatherInstitute_1F_EventScript_272083:: @ 8272083
-RustboroCity_DevonCorp_3F_EventScript_272083:: @ 8272083
-SSTidalRooms_EventScript_272083:: @ 8272083
+Common_EventScript_OutOfCenterPartyHeal:: @ 8272083
fadescreen 1
playfanfare MUS_ME_ASA
waitfanfare
@@ -2061,7 +1924,7 @@ SSTidalRooms_EventScript_272083:: @ 8272083
EventScript_RegionMap:: @ 827208F
lockall
- msgbox LittlerootTown_BrendansHouse_2F_Text_1F8820, MSGBOX_DEFAULT
+ msgbox Common_Text_LookCloserAtMap, MSGBOX_DEFAULT
fadescreen 1
special FieldShowRegionMap
waitstate
@@ -2085,8 +1948,8 @@ Route109_EventScript_2720A8:: @ 82720A8
LittlerootTown_ProfessorBirchsLab_EventScript_2720AD:: @ 82720AD
Route101_EventScript_2720AD:: @ 82720AD
Route103_EventScript_2720AD:: @ 82720AD
- compare VAR_0x4085, 0
- goto_if_eq Route101_EventScript_27374E
+ 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
@@ -2167,7 +2030,7 @@ Route101_EventScript_272184:: @ 8272184
msgbox gUnknown_082A5D2C, MSGBOX_DEFAULT
call Route101_EventScript_272179
compare VAR_0x800A, 0
- goto_if_eq Route101_EventScript_27374E
+ goto_if_eq Common_EventScript_NopReturn
setvar VAR_0x8004, 1
specialvar VAR_RESULT, ScriptGetPokedexInfo
copyvar VAR_0x8008, VAR_0x8005
@@ -2204,7 +2067,7 @@ PetalburgCity_Gym_EventScript_2721F8:: @ 82721F8
setflag FLAG_HIDE_ROUTE_104_MR_BRINEY_BOAT
setflag FLAG_HIDE_BRINEYS_HOUSE_MR_BRINEY
setflag FLAG_HIDE_BRINEYS_HOUSE_PEEKO
- setvar VAR_0x4096, 0
+ setvar VAR_BRINEY_LOCATION, 0
return
RusturfTunnel_EventScript_272216:: @ 8272216
@@ -2218,7 +2081,7 @@ RusturfTunnel_EventScript_272216:: @ 8272216
EventScript_27222B:: @ 827222B
delay 30
- applymovement EVENT_OBJ_ID_PLAYER, PetalburgCity_Movement_2725A6
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceUp
waitmovement 0
showobjectat 255, MAP_PETALBURG_CITY
delay 30
@@ -2361,7 +2224,7 @@ Route119_EventScript_272350:: @ 8272350
Route119_EventScript_272365:: @ 8272365
msgbox Route119_Text_1F5D63, MSGBOX_DEFAULT
closemessage
- applymovement VAR_LAST_TALKED, Route119_Movement_27259E
+ applymovement VAR_LAST_TALKED, Common_Movement_FacePlayer
waitmovement 0
applymovement VAR_LAST_TALKED, Route119_Movement_2723C7
waitmovement 0
@@ -2413,11 +2276,7 @@ Route120_Movement_2723C7: @ 82723C7
set_visible
step_end
-LittlerootTown_ProfessorBirchsLab_EventScript_2723DD:: @ 82723DD
-MossdeepCity_StevensHouse_EventScript_2723DD:: @ 82723DD
-Route119_WeatherInstitute_2F_EventScript_2723DD:: @ 82723DD
-RustboroCity_DevonCorp_2F_EventScript_2723DD:: @ 82723DD
-SlateportCity_House1_EventScript_2723DD:: @ 82723DD
+Common_EventScript_NameReceivedPokemon:: @ 82723DD
fadescreen 1
special ChangePokemonNickname
waitstate
@@ -2512,354 +2371,41 @@ SlateportCity_Movement_272596: @ 8272596
emote_question_mark
step_end
-AquaHideout_B2F_Movement_272598: @ 8272598
-BattleFrontier_BattleTowerBattleRoom_Movement_272598: @ 8272598
-BattleFrontier_ReceptionGate_Movement_272598: @ 8272598
-CaveOfOrigin_B1F_Movement_272598: @ 8272598
-EverGrandeCity_ChampionsRoom_Movement_272598: @ 8272598
-FarawayIsland_Interior_Movement_272598: @ 8272598
-JaggedPass_Movement_272598: @ 8272598
-LavaridgeTown_Movement_272598: @ 8272598
-LilycoveCity_ContestLobby_Movement_272598: @ 8272598
-LilycoveCity_CoveLilyMotel_1F_Movement_272598: @ 8272598
-LilycoveCity_Harbor_Movement_272598: @ 8272598
-LittlerootTown_BrendansHouse_1F_Movement_272598: @ 8272598
-LittlerootTown_BrendansHouse_2F_Movement_272598: @ 8272598
-LittlerootTown_MaysHouse_1F_Movement_272598: @ 8272598
-LittlerootTown_MaysHouse_2F_Movement_272598: @ 8272598
-LittlerootTown_Movement_272598: @ 8272598
-MauvilleCity_House2_Movement_272598: @ 8272598
-MauvilleCity_Movement_272598: @ 8272598
-MeteorFalls_1F_1R_Movement_272598: @ 8272598
-MeteorFalls_StevensCave_Movement_272598: @ 8272598
-MossdeepCity_SpaceCenter_2F_Movement_272598: @ 8272598
-MossdeepCity_StevensHouse_Movement_272598: @ 8272598
-MtChimney_Movement_272598: @ 8272598
-MtPyre_Summit_Movement_272598: @ 8272598
-OldaleTown_PokemonCenter_1F_Movement_272598: @ 8272598
-PetalburgCity_Gym_Movement_272598: @ 8272598
-PetalburgCity_Movement_272598: @ 8272598
-Route103_Movement_272598: @ 8272598
-Route104_Movement_272598: @ 8272598
-Route110_Movement_272598: @ 8272598
-Route110_TrickHouseEnd_Movement_272598: @ 8272598
-Route110_TrickHouseEntrance_Movement_272598: @ 8272598
-Route110_TrickHousePuzzle5_Movement_272598: @ 8272598
-Route119_WeatherInstitute_2F_Movement_272598: @ 8272598
-RustboroCity_DevonCorp_2F_Movement_272598: @ 8272598
-RustboroCity_Movement_272598: @ 8272598
-RusturfTunnel_Movement_272598: @ 8272598
-SeafloorCavern_Entrance_Movement_272598: @ 8272598
-SeafloorCavern_Room9_Movement_272598: @ 8272598
-SlateportCity_Movement_272598: @ 8272598
-SlateportCity_OceanicMuseum_1F_Movement_272598: @ 8272598
-SlateportCity_PokemonFanClub_Movement_272598: @ 8272598
+Common_Movement_ExclamationMark: @ 8272598
emote_exclamation_mark
step_end
-BattleFrontier_BattleTowerBattleRoom_Movement_27259A: @ 827259A
-BattleFrontier_ReceptionGate_Movement_27259A: @ 827259A
-CaveOfOrigin_B1F_Movement_27259A: @ 827259A
-EverGrandeCity_ChampionsRoom_Movement_27259A: @ 827259A
-FarawayIsland_Interior_Movement_27259A: @ 827259A
-JaggedPass_Movement_27259A: @ 827259A
-LavaridgeTown_Movement_27259A: @ 827259A
-LilycoveCity_CoveLilyMotel_1F_Movement_27259A: @ 827259A
-LilycoveCity_Harbor_Movement_27259A: @ 827259A
-LittlerootTown_BrendansHouse_1F_Movement_27259A: @ 827259A
-LittlerootTown_BrendansHouse_2F_Movement_27259A: @ 827259A
-LittlerootTown_MaysHouse_1F_Movement_27259A: @ 827259A
-LittlerootTown_MaysHouse_2F_Movement_27259A: @ 827259A
-MauvilleCity_House2_Movement_27259A: @ 827259A
-MauvilleCity_Movement_27259A: @ 827259A
-MeteorFalls_1F_1R_Movement_27259A: @ 827259A
-MeteorFalls_StevensCave_Movement_27259A: @ 827259A
-MossdeepCity_SpaceCenter_2F_Movement_27259A: @ 827259A
-MossdeepCity_StevensHouse_Movement_27259A: @ 827259A
-MtChimney_Movement_27259A: @ 827259A
-MtPyre_Summit_Movement_27259A: @ 827259A
-OldaleTown_PokemonCenter_1F_Movement_27259A: @ 827259A
-PetalburgCity_Gym_Movement_27259A: @ 827259A
-PetalburgCity_Movement_27259A: @ 827259A
-Route103_Movement_27259A: @ 827259A
-Route104_Movement_27259A: @ 827259A
-Route110_Movement_27259A: @ 827259A
-Route110_TrickHouseEntrance_Movement_27259A: @ 827259A
-Route110_TrickHousePuzzle5_Movement_27259A: @ 827259A
-Route119_WeatherInstitute_2F_Movement_27259A: @ 827259A
-RustboroCity_DevonCorp_2F_Movement_27259A: @ 827259A
-RustboroCity_Movement_27259A: @ 827259A
-RusturfTunnel_Movement_27259A: @ 827259A
-SeafloorCavern_Entrance_Movement_27259A: @ 827259A
-SeafloorCavern_Room9_Movement_27259A: @ 827259A
-SlateportCity_Movement_27259A: @ 827259A
-SlateportCity_OceanicMuseum_1F_Movement_27259A: @ 827259A
-SlateportCity_PokemonFanClub_Movement_27259A: @ 827259A
+Common_Movement_Delay48: @ 827259A
delay_16
delay_16
delay_16
step_end
-AquaHideout_B2F_Movement_27259E: @ 827259E
-BattleFrontier_BattlePyramidLobby_Movement_27259E: @ 827259E
-BattleFrontier_ScottsHouse_Movement_27259E: @ 827259E
-CaveOfOrigin_B1F_Movement_27259E: @ 827259E
-EverGrandeCity_PokemonLeague_1F_Movement_27259E: @ 827259E
-FallarborTown_House2_Movement_27259E: @ 827259E
-FortreeCity_House4_Movement_27259E: @ 827259E
-JaggedPass_Movement_27259E: @ 827259E
-LilycoveCity_ContestHall_Movement_27259E: @ 827259E
-LilycoveCity_CoveLilyMotel_1F_Movement_27259E: @ 827259E
-LilycoveCity_DepartmentStore_1F_Movement_27259E: @ 827259E
-LilycoveCity_DepartmentStore_5F_Movement_27259E: @ 827259E
-LilycoveCity_Harbor_Movement_27259E: @ 827259E
-LilycoveCity_LilycoveMuseum_1F_Movement_27259E: @ 827259E
-LilycoveCity_LilycoveMuseum_2F_Movement_27259E: @ 827259E
-LilycoveCity_MoveDeletersHouse_Movement_27259E: @ 827259E
-LilycoveCity_Movement_27259E: @ 827259E
-LittlerootTown_BrendansHouse_1F_Movement_27259E: @ 827259E
-LittlerootTown_BrendansHouse_2F_Movement_27259E: @ 827259E
-MagmaHideout_4F_Movement_27259E: @ 827259E
-MauvilleCity_Movement_27259E: @ 827259E
-MeteorFalls_StevensCave_Movement_27259E: @ 827259E
-MossdeepCity_SpaceCenter_2F_Movement_27259E: @ 827259E
-MtChimney_Movement_27259E: @ 827259E
-OldaleTown_Movement_27259E: @ 827259E
-PetalburgCity_Gym_Movement_27259E: @ 827259E
-PetalburgCity_Movement_27259E: @ 827259E
-Route103_Movement_27259E: @ 827259E
-Route104_Movement_27259E: @ 827259E
-Route110_TrickHouseEnd_Movement_27259E: @ 827259E
-Route110_TrickHouseEntrance_Movement_27259E: @ 827259E
-Route110_TrickHousePuzzle5_Movement_27259E: @ 827259E
-Route111_Movement_27259E: @ 827259E
-Route119_Movement_27259E: @ 827259E
-RustboroCity_Flat1_2F_Movement_27259E: @ 827259E
-RustboroCity_Movement_27259E: @ 827259E
-RusturfTunnel_Movement_27259E: @ 827259E
-SeafloorCavern_Room9_Movement_27259E: @ 827259E
-SlateportCity_Movement_27259E: @ 827259E
-SlateportCity_SternsShipyard_1F_Movement_27259E: @ 827259E
-SootopolisCity_Movement_27259E: @ 827259E
+Common_Movement_FacePlayer: @ 827259E
face_player
step_end
-BattleFrontier_OutsideWest_Movement_2725A0: @ 82725A0
+Common_Movement_FaceAwayPlayer: @ 82725A0
face_away_player
step_end
-BattleFrontier_Lounge3_Movement_2725A2: @ 82725A2
-BattleFrontier_OutsideWest_Movement_2725A2: @ 82725A2
-EverGrandeCity_PokemonLeague_1F_Movement_2725A2: @ 82725A2
-JaggedPass_Movement_2725A2: @ 82725A2
-LilycoveCity_ContestHall_Movement_2725A2: @ 82725A2
-LilycoveCity_ContestLobby_Movement_2725A2: @ 82725A2
-LilycoveCity_CoveLilyMotel_1F_Movement_2725A2: @ 82725A2
-LilycoveCity_House3_Movement_2725A2: @ 82725A2
-LilycoveCity_LilycoveMuseum_1F_Movement_2725A2: @ 82725A2
-LilycoveCity_Movement_2725A2: @ 82725A2
-LittlerootTown_Movement_2725A2: @ 82725A2
-MauvilleCity_GameCorner_Movement_2725A2: @ 82725A2
-MauvilleCity_Movement_2725A2: @ 82725A2
-MossdeepCity_Movement_2725A2: @ 82725A2
-MossdeepCity_SpaceCenter_1F_Movement_2725A2: @ 82725A2
-MossdeepCity_SpaceCenter_2F_Movement_2725A2: @ 82725A2
-MtChimney_Movement_2725A2: @ 82725A2
-OldaleTown_Movement_2725A2: @ 82725A2
-PetalburgCity_Movement_2725A2: @ 82725A2
-Route109_Movement_2725A2: @ 82725A2
-Route110_Movement_2725A2: @ 82725A2
-Route111_Movement_2725A2: @ 82725A2
-Route111_WinstrateFamilysHouse_Movement_2725A2: @ 82725A2
-Route112_Movement_2725A2: @ 82725A2
-Route119_Movement_2725A2: @ 82725A2
-RustboroCity_DevonCorp_3F_Movement_2725A2: @ 82725A2
-RustboroCity_Movement_2725A2: @ 82725A2
-RusturfTunnel_Movement_2725A2: @ 82725A2
-SlateportCity_Harbor_Movement_2725A2: @ 82725A2
-SlateportCity_Movement_2725A2: @ 82725A2
-SlateportCity_OceanicMuseum_2F_Movement_2725A2: @ 82725A2
-SlateportCity_SternsShipyard_1F_Movement_2725A2: @ 82725A2
-SootopolisCity_Movement_2725A2: @ 82725A2
-VerdanturfTown_Movement_2725A2: @ 82725A2
+Common_Movement_FaceOriginalDirection: @ 82725A2
face_original_direction
step_end
-AquaHideout_B2F_Movement_2725A4: @ 82725A4
-BattleFrontier_BattleFactoryBattleRoom_Movement_2725A4: @ 82725A4
-BattleFrontier_OutsideWest_Movement_2725A4: @ 82725A4
-BattleFrontier_ScottsHouse_Movement_2725A4: @ 82725A4
-DewfordTown_Hall_Movement_2725A4: @ 82725A4
-EverGrandeCity_ChampionsRoom_Movement_2725A4: @ 82725A4
-EverGrandeCity_HallOfFame_Movement_2725A4: @ 82725A4
-LavaridgeTown_Movement_2725A4: @ 82725A4
-LilycoveCity_Harbor_Movement_2725A4: @ 82725A4
-LilycoveCity_PokemonTrainerFanClub_Movement_2725A4: @ 82725A4
-LittlerootTown_BrendansHouse_1F_Movement_2725A4: @ 82725A4
-LittlerootTown_BrendansHouse_2F_Movement_2725A4: @ 82725A4
-LittlerootTown_MaysHouse_1F_Movement_2725A4: @ 82725A4
-LittlerootTown_MaysHouse_2F_Movement_2725A4: @ 82725A4
-LittlerootTown_Movement_2725A4: @ 82725A4
-LittlerootTown_ProfessorBirchsLab_Movement_2725A4: @ 82725A4
-MeteorFalls_1F_1R_Movement_2725A4: @ 82725A4
-MossdeepCity_SpaceCenter_2F_Movement_2725A4: @ 82725A4
-MossdeepCity_StevensHouse_Movement_2725A4: @ 82725A4
-MtChimney_Movement_2725A4: @ 82725A4
-MtPyre_Summit_Movement_2725A4: @ 82725A4
-OldaleTown_PokemonCenter_1F_Movement_2725A4: @ 82725A4
-PetalburgCity_Gym_Movement_2725A4: @ 82725A4
-PetalburgCity_Movement_2725A4: @ 82725A4
-PetalburgWoods_Movement_2725A4: @ 82725A4
-Route101_Movement_2725A4: @ 82725A4
-Route110_Movement_2725A4: @ 82725A4
-Route110_TrickHouseEnd_Movement_2725A4: @ 82725A4
-Route111_Movement_2725A4: @ 82725A4
-Route112_Movement_2725A4: @ 82725A4
-Route116_Movement_2725A4: @ 82725A4
-Route120_Movement_2725A4: @ 82725A4
-Route128_Movement_2725A4: @ 82725A4
-RustboroCity_Movement_2725A4: @ 82725A4
-SeafloorCavern_Entrance_Movement_2725A4: @ 82725A4
-SeafloorCavern_Room9_Movement_2725A4: @ 82725A4
-SkyPillar_Outside_Movement_2725A4: @ 82725A4
-SlateportCity_Movement_2725A4: @ 82725A4
-SlateportCity_OceanicMuseum_1F_Movement_2725A4: @ 82725A4
-SlateportCity_OceanicMuseum_2F_Movement_2725A4: @ 82725A4
-SootopolisCity_Movement_2725A4: @ 82725A4
+Common_Movement_WalkInPlaceLeft: @ 82725A4
walk_in_place_fastest_left
step_end
-BattleFrontier_BattleTowerCorridor2_Movement_2725A6: @ 82725A6
-BattleFrontier_BattleTowerMultiBattleRoom_Movement_2725A6: @ 82725A6
-BattleFrontier_OutsideWest_Movement_2725A6: @ 82725A6
-BattleFrontier_ReceptionGate_Movement_2725A6: @ 82725A6
-BattleFrontier_ScottsHouse_Movement_2725A6: @ 82725A6
-CaveOfOrigin_B1F_Movement_2725A6: @ 82725A6
-DewfordTown_Hall_Movement_2725A6: @ 82725A6
-EverGrandeCity_ChampionsRoom_Movement_2725A6: @ 82725A6
-EverGrandeCity_HallOfFame_Movement_2725A6: @ 82725A6
-LavaridgeTown_Movement_2725A6: @ 82725A6
-LilycoveCity_DepartmentStore_5F_Movement_2725A6: @ 82725A6
-LilycoveCity_Harbor_Movement_2725A6: @ 82725A6
-LittlerootTown_BrendansHouse_1F_Movement_2725A6: @ 82725A6
-LittlerootTown_BrendansHouse_2F_Movement_2725A6: @ 82725A6
-LittlerootTown_MaysHouse_2F_Movement_2725A6: @ 82725A6
-LittlerootTown_Movement_2725A6: @ 82725A6
-LittlerootTown_ProfessorBirchsLab_Movement_2725A6: @ 82725A6
-MagmaHideout_4F_Movement_2725A6: @ 82725A6
-MeteorFalls_1F_1R_Movement_2725A6: @ 82725A6
-MossdeepCity_SpaceCenter_2F_Movement_2725A6: @ 82725A6
-MtPyre_Summit_Movement_2725A6: @ 82725A6
-NewMauville_Entrance_Movement_2725A6: @ 82725A6
-OldaleTown_PokemonCenter_2F_Movement_2725A6: @ 82725A6
-PetalburgCity_Gym_Movement_2725A6: @ 82725A6
-PetalburgCity_Movement_2725A6: @ 82725A6
-PetalburgWoods_Movement_2725A6: @ 82725A6
-Route104_Movement_2725A6: @ 82725A6
-Route110_TrickHouseEnd_Movement_2725A6: @ 82725A6
-Route110_TrickHouseEntrance_Movement_2725A6: @ 82725A6
-Route111_Movement_2725A6: @ 82725A6
-Route114_FossilManiacsTunnel_Movement_2725A6: @ 82725A6
-Route120_Movement_2725A6: @ 82725A6
-Route121_SafariZoneEntrance_Movement_2725A6: @ 82725A6
-Route128_Movement_2725A6: @ 82725A6
-RustboroCity_Movement_2725A6: @ 82725A6
-RusturfTunnel_Movement_2725A6: @ 82725A6
-SeafloorCavern_Entrance_Movement_2725A6: @ 82725A6
-SeafloorCavern_Room9_Movement_2725A6: @ 82725A6
-SlateportCity_BattleTentCorridor_Movement_2725A6: @ 82725A6
-SlateportCity_Harbor_Movement_2725A6: @ 82725A6
-SlateportCity_Movement_2725A6: @ 82725A6
-SlateportCity_OceanicMuseum_2F_Movement_2725A6: @ 82725A6
-SootopolisCity_MysteryEventsHouse_1F_Movement_2725A6: @ 82725A6
-VerdanturfTown_BattleTentBattleRoom_Movement_2725A6: @ 82725A6
+Common_Movement_WalkInPlaceUp: @ 82725A6
walk_in_place_fastest_up
step_end
-BattleFrontier_BattleFactoryBattleRoom_Movement_2725A8: @ 82725A8
-BattleFrontier_BattlePalaceBattleRoom_Movement_2725A8: @ 82725A8
-BattleFrontier_OutsideWest_Movement_2725A8: @ 82725A8
-BattleFrontier_ScottsHouse_Movement_2725A8: @ 82725A8
-DewfordTown_Hall_Movement_2725A8: @ 82725A8
-EverGrandeCity_ChampionsRoom_Movement_2725A8: @ 82725A8
-EverGrandeCity_HallOfFame_Movement_2725A8: @ 82725A8
-LavaridgeTown_Movement_2725A8: @ 82725A8
-LilycoveCity_DepartmentStore_1F_Movement_2725A8: @ 82725A8
-LilycoveCity_PokemonTrainerFanClub_Movement_2725A8: @ 82725A8
-LittlerootTown_BrendansHouse_1F_Movement_2725A8: @ 82725A8
-LittlerootTown_BrendansHouse_2F_Movement_2725A8: @ 82725A8
-LittlerootTown_MaysHouse_1F_Movement_2725A8: @ 82725A8
-LittlerootTown_Movement_2725A8: @ 82725A8
-LittlerootTown_ProfessorBirchsLab_Movement_2725A8: @ 82725A8
-MagmaHideout_4F_Movement_2725A8: @ 82725A8
-MauvilleCity_Movement_2725A8: @ 82725A8
-MossdeepCity_SpaceCenter_1F_Movement_2725A8: @ 82725A8
-MossdeepCity_SpaceCenter_2F_Movement_2725A8: @ 82725A8
-MtPyre_Summit_Movement_2725A8: @ 82725A8
-OldaleTown_Movement_2725A8: @ 82725A8
-PetalburgCity_Gym_Movement_2725A8: @ 82725A8
-PetalburgCity_Movement_2725A8: @ 82725A8
-Route101_Movement_2725A8: @ 82725A8
-Route110_Movement_2725A8: @ 82725A8
-Route110_TrickHouseEnd_Movement_2725A8: @ 82725A8
-Route112_Movement_2725A8: @ 82725A8
-Route116_Movement_2725A8: @ 82725A8
-Route120_Movement_2725A8: @ 82725A8
-Route128_Movement_2725A8: @ 82725A8
-RustboroCity_Movement_2725A8: @ 82725A8
-SSTidalCorridor_Movement_2725A8: @ 82725A8
-SeafloorCavern_Entrance_Movement_2725A8: @ 82725A8
-SkyPillar_Outside_Movement_2725A8: @ 82725A8
-SlateportCity_Harbor_Movement_2725A8: @ 82725A8
-SlateportCity_Movement_2725A8: @ 82725A8
-SlateportCity_OceanicMuseum_1F_Movement_2725A8: @ 82725A8
-SlateportCity_OceanicMuseum_2F_Movement_2725A8: @ 82725A8
-SootopolisCity_Movement_2725A8: @ 82725A8
-VerdanturfTown_BattleTentBattleRoom_Movement_2725A8: @ 82725A8
+Common_Movement_WalkInPlaceRight: @ 82725A8
walk_in_place_fastest_right
step_end
-BattleFrontier_OutsideWest_Movement_2725AA: @ 82725AA
-BattleFrontier_ScottsHouse_Movement_2725AA: @ 82725AA
-BirthIsland_Harbor_Movement_2725AA: @ 82725AA
-DewfordTown_Hall_Movement_2725AA: @ 82725AA
-EverGrandeCity_ChampionsRoom_Movement_2725AA: @ 82725AA
-FarawayIsland_Entrance_Movement_2725AA: @ 82725AA
-LilycoveCity_CoveLilyMotel_1F_Movement_2725AA: @ 82725AA
-LilycoveCity_DepartmentStoreElevator_Movement_2725AA: @ 82725AA
-LilycoveCity_Harbor_Movement_2725AA: @ 82725AA
-LilycoveCity_Movement_2725AA: @ 82725AA
-LilycoveCity_PokemonTrainerFanClub_Movement_2725AA: @ 82725AA
-LittlerootTown_BrendansHouse_1F_Movement_2725AA: @ 82725AA
-LittlerootTown_MaysHouse_1F_Movement_2725AA: @ 82725AA
-LittlerootTown_Movement_2725AA: @ 82725AA
-MauvilleCity_Movement_2725AA: @ 82725AA
-MeteorFalls_1F_1R_Movement_2725AA: @ 82725AA
-MossdeepCity_SpaceCenter_2F_Movement_2725AA: @ 82725AA
-MtPyre_Summit_Movement_2725AA: @ 82725AA
-NavelRock_Harbor_Movement_2725AA: @ 82725AA
-OldaleTown_PokemonCenter_1F_Movement_2725AA: @ 82725AA
-PetalburgCity_Gym_Movement_2725AA: @ 82725AA
-PetalburgCity_Movement_2725AA: @ 82725AA
-PetalburgWoods_Movement_2725AA: @ 82725AA
-Route110_Movement_2725AA: @ 82725AA
-Route110_TrickHouseEnd_Movement_2725AA: @ 82725AA
-Route114_FossilManiacsTunnel_Movement_2725AA: @ 82725AA
-Route119_Movement_2725AA: @ 82725AA
-Route120_Movement_2725AA: @ 82725AA
-Route128_Movement_2725AA: @ 82725AA
-RustboroCity_Movement_2725AA: @ 82725AA
-RustboroCity_PokemonSchool_Movement_2725AA: @ 82725AA
-RusturfTunnel_Movement_2725AA: @ 82725AA
-SeafloorCavern_Entrance_Movement_2725AA: @ 82725AA
-SeafloorCavern_Room9_Movement_2725AA: @ 82725AA
-SkyPillar_Outside_Movement_2725AA: @ 82725AA
-SlateportCity_Harbor_Movement_2725AA: @ 82725AA
-SlateportCity_Movement_2725AA: @ 82725AA
-SlateportCity_OceanicMuseum_2F_Movement_2725AA: @ 82725AA
-SouthernIsland_Exterior_Movement_2725AA: @ 82725AA
-VerdanturfTown_BattleTentBattleRoom_Movement_2725AA: @ 82725AA
-VictoryRoad_1F_Movement_2725AA: @ 82725AA
+Common_Movement_WalkInPlaceDown: @ 82725AA
walk_in_place_fastest_down
step_end
@@ -2871,17 +2417,11 @@ RustboroCity_Movement_2725AE: @ 82725AE
face_left
step_end
-BattleFrontier_Mart_Movement_2725B0: @ 82725B0
-MeteorFalls_1F_1R_Movement_2725B0: @ 82725B0
+Common_Movement_FaceDown: @ 82725B0
face_down
step_end
-MarineCave_End_Movement_2725B2: @ 82725B2
-MtPyre_Summit_Movement_2725B2: @ 82725B2
-Route118_Movement_2725B2: @ 82725B2
-SkyPillar_Top_Movement_2725B2: @ 82725B2
-SlateportCity_Movement_2725B2: @ 82725B2
-TerraCave_End_Movement_2725B2: @ 82725B2
+Common_Movement_FaceUp: @ 82725B2
face_up
step_end
@@ -3033,7 +2573,7 @@ gUnknown_08272A9A:: @ 8272A9A
gUnknown_08272ABF:: @ 8272ABF
.string "{PLAYER} found one {STR_VAR_2}!$"
-gUnknown_08272AD0:: @ 8272AD0
+gText_TooBadBagIsFull:: @ 8272AD0
.string "Too bad!\nThe BAG is full…$"
gUnknown_08272AEA:: @ 8272AEA
@@ -3042,16 +2582,16 @@ gUnknown_08272AEA:: @ 8272AEA
gUnknown_08272B09:: @ 8272B09
.string "Obtained the {STR_VAR_2}!$"
-gUnknown_08272B1A:: @ 8272B1A
+gText_NoRoomLeftForAnother:: @ 8272B1A
.string "Too bad! There's no room left for\nanother {STR_VAR_2}…$"
gUnknown_08272B48:: @ 8272B48
.string "The {STR_VAR_2} was transferred\nto the PC.$"
-gUnknown_08272B6A:: @ 8272B6A
+gText_PokemartSign:: @ 8272B6A
.string "“Selected items for your convenience!”\nPOKéMON MART$"
-gUnknown_08272B9E:: @ 8272B9E
+gText_PokemonCenterSign:: @ 8272B9E
.string "“Rejuvenate your tired partners!”\nPOKéMON CENTER$"
gUnknown_08272BCF:: @ 8272BCF
@@ -3229,28 +2769,7 @@ EventScript_2736F8:: @ 82736F8
waitstate
end
-AncientTomb_EventScript_27374E:: @ 827374E
-AquaHideout_B1F_EventScript_27374E:: @ 827374E
-BattleFrontier_BattleDomeBattleRoom_EventScript_27374E:: @ 827374E
-BattleFrontier_OutsideEast_EventScript_27374E:: @ 827374E
-BirthIsland_Exterior_EventScript_27374E:: @ 827374E
-DesertRuins_EventScript_27374E:: @ 827374E
-EverGrandeCity_PokemonCenter_1F_EventScript_27374E:: @ 827374E
-FarawayIsland_Interior_EventScript_27374E:: @ 827374E
-IslandCave_EventScript_27374E:: @ 827374E
-LilycoveCity_Harbor_EventScript_27374E:: @ 827374E
-MarineCave_End_EventScript_27374E:: @ 827374E
-NavelRock_Bottom_EventScript_27374E:: @ 827374E
-NavelRock_Top_EventScript_27374E:: @ 827374E
-NewMauville_Inside_EventScript_27374E:: @ 827374E
-OldaleTown_PokemonCenter_1F_EventScript_27374E:: @ 827374E
-PacifidlogTown_House2_EventScript_27374E:: @ 827374E
-Route101_EventScript_27374E:: @ 827374E
-Route119_EventScript_27374E:: @ 827374E
-Route120_EventScript_27374E:: @ 827374E
-SkyPillar_Top_EventScript_27374E:: @ 827374E
-SouthernIsland_Interior_EventScript_27374E:: @ 827374E
-TerraCave_End_EventScript_27374E:: @ 827374E
+Common_EventScript_NopReturn:: @ 827374E
return
EventScript_27374F:: @ 827374F
@@ -3440,12 +2959,12 @@ EventScript_Questionnaire:: @ 827381B
EventScript_27386D:: @ 827386D
goto_if_unset FLAG_SYS_POKEDEX_GET, EventScript_2738FF
goto_if_set FLAG_SYS_MYSTERY_EVENT_ENABLE, EventScript_2738FF
- applymovement VAR_0x8008, BattleFrontier_Mart_Movement_2725B0
+ applymovement VAR_0x8008, Common_Movement_FaceDown
waitmovement 0
playse SE_PIN
- applymovement VAR_0x8008, BattleFrontier_ReceptionGate_Movement_272598
+ applymovement VAR_0x8008, Common_Movement_ExclamationMark
waitmovement 0
- applymovement VAR_0x8008, BattleFrontier_ReceptionGate_Movement_27259A
+ applymovement VAR_0x8008, Common_Movement_Delay48
waitmovement 0
msgbox gUnknown_08273506, MSGBOX_DEFAULT
setflag FLAG_SYS_MYSTERY_EVENT_ENABLE
@@ -3456,12 +2975,12 @@ EventScript_27386D:: @ 827386D
EventScript_2738B5:: @ 82738B5
goto_if_unset FLAG_SYS_POKEDEX_GET, EventScript_2738FF
goto_if_set FLAG_SYS_MYSTERY_GIFT_ENABLE, EventScript_2738FF
- applymovement VAR_0x8008, BattleFrontier_Mart_Movement_2725B0
+ applymovement VAR_0x8008, Common_Movement_FaceDown
waitmovement 0
playse SE_PIN
- applymovement VAR_0x8008, BattleFrontier_ReceptionGate_Movement_272598
+ applymovement VAR_0x8008, Common_Movement_ExclamationMark
waitmovement 0
- applymovement VAR_0x8008, BattleFrontier_ReceptionGate_Movement_27259A
+ applymovement VAR_0x8008, Common_Movement_Delay48
waitmovement 0
msgbox gUnknown_08273446, MSGBOX_DEFAULT
setflag FLAG_SYS_MYSTERY_GIFT_ENABLE
@@ -3474,7 +2993,7 @@ EventScript_2738FD:: @ 82738FD
end
EventScript_2738FF:: @ 82738FF
- applymovement VAR_0x8008, BattleFrontier_Mart_Movement_2725B0
+ applymovement VAR_0x8008, Common_Movement_FaceDown
waitmovement 0
msgbox gUnknown_082733D8, MSGBOX_DEFAULT
releaseall
@@ -3655,14 +3174,14 @@ Route105_EventScript_273D17:: @ 8273D17
Route125_EventScript_273D17:: @ 8273D17
Route127_EventScript_273D17:: @ 8273D17
Route129_EventScript_273D17:: @ 8273D17
- setweather 13
+ setweather WEATHER_RAIN_HEAVY
return
Route114_EventScript_273D1B:: @ 8273D1B
Route115_EventScript_273D1B:: @ 8273D1B
Route116_EventScript_273D1B:: @ 8273D1B
Route118_EventScript_273D1B:: @ 8273D1B
- setweather 12
+ setweather WEATHER_DROUGHT
return
gUnknown_08273D1F:: @ 8273D1F
@@ -3677,7 +3196,7 @@ gUnknown_08273D1F:: @ 8273D1F
Route105_EventScript_273D31:: @ 8273D31
closemessage
fadescreenswapbuffers 1
- setweather 2
+ setweather WEATHER_SUNNY
doweather
call Route105_EventScript_273D6D
special DrawWholeMapView
@@ -4467,13 +3986,13 @@ LilycoveCity_ContestLobby_EventScript_28CB21:: @ 828CB21
end
LilycoveCity_ContestLobby_EventScript_28CB2B:: @ 828CB2B
- compare VAR_0x4086, 2
+ compare VAR_LINK_CONTEST_ROOM_STATE, 2
goto_if_ne LilycoveCity_ContestLobby_EventScript_28CB95
setvar VAR_0x8005, 6
special InterviewBefore
compare VAR_RESULT, 1
goto_if_eq LilycoveCity_ContestLobby_EventScript_28CB95
- switch VAR_0x4088
+ switch VAR_CONTEST_LOCATION
case 0, LilycoveCity_ContestLobby_EventScript_28CB95
case 2, LilycoveCity_ContestLobby_EventScript_28CB91
case 1, LilycoveCity_ContestLobby_EventScript_28CB91
@@ -4560,7 +4079,7 @@ BattleFrontier_BattleTowerLobby_EventScript_28CC7A:: @ 828CC7A
end
BattleFrontier_BattleTowerLobby_EventScript_28CC84:: @ 828CC84
- compare VAR_0x40BC, 0
+ compare VAR_BRAVO_TRAINER_BATTLE_TOWER_ON, 0
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_28CCA6
setvar VAR_0x8005, 7
special InterviewBefore
@@ -5974,8 +5493,8 @@ gBattleDomeMatchNumberText15::
.string "Final Match$"
BattleFrontier_BattlePikeRandomRoom1_MapScripts_2C3E1B: @ 82C3E1B
- map_script 3, BattleFrontier_BattlePikeRandomRoom1_MapScript1_2C3E25
- map_script 4, BattleFrontier_BattlePikeRandomRoom1_MapScript2_2C3EDE
+ map_script MAP_SCRIPT_ON_TRANSITION, BattleFrontier_BattlePikeRandomRoom1_MapScript1_2C3E25
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattlePikeRandomRoom1_MapScript2_2C3EDE
BattleFrontier_BattlePikeRandomRoom1_MapScript1_2C3E25: @ 82C3E25
setvar VAR_0x8004, 4
@@ -7113,7 +6632,7 @@ SlateportCity_PokemonFanClub_EventScript_2C7F16:: @ 82C7F16
goto_if_eq SlateportCity_PokemonFanClub_EventScript_2C7F6A
msgbox SlateportCity_PokemonFanClub_Text_2C6F66, MSGBOX_DEFAULT
setvar VAR_0x8005, 23
- call SlateportCity_PokemonFanClub_EventScript_2C8326
+ call EventScript_ShowPartyMenu
compare VAR_RESULT, 0
goto_if_eq SlateportCity_PokemonFanClub_EventScript_2C7F6A
setflag FLAG_MOVE_TUTOR_TAUGHT_SWAGGER
@@ -7142,7 +6661,7 @@ MauvilleCity_EventScript_2C7F7E:: @ 82C7F7E
goto_if_eq MauvilleCity_EventScript_2C7FD2
msgbox MauvilleCity_Text_2C70F3, MSGBOX_DEFAULT
setvar VAR_0x8005, 16
- call MauvilleCity_EventScript_2C8326
+ call EventScript_ShowPartyMenu
compare VAR_RESULT, 0
goto_if_eq MauvilleCity_EventScript_2C7FD2
setflag FLAG_MOVE_TUTOR_TAUGHT_ROLLOUT
@@ -7171,7 +6690,7 @@ VerdanturfTown_PokemonCenter_1F_EventScript_2C7FE6:: @ 82C7FE6
goto_if_eq VerdanturfTown_PokemonCenter_1F_EventScript_2C803A
msgbox VerdanturfTown_PokemonCenter_1F_Text_2C7243, MSGBOX_DEFAULT
setvar VAR_0x8005, 29
- call VerdanturfTown_PokemonCenter_1F_EventScript_2C8326
+ call EventScript_ShowPartyMenu
compare VAR_RESULT, 0
goto_if_eq VerdanturfTown_PokemonCenter_1F_EventScript_2C803A
setflag FLAG_MOVE_TUTOR_TAUGHT_FURY_CUTTER
@@ -7200,7 +6719,7 @@ LavaridgeTown_House_EventScript_2C804E:: @ 82C804E
goto_if_eq LavaridgeTown_House_EventScript_2C80A2
msgbox LavaridgeTown_House_Text_2C73B1, MSGBOX_DEFAULT
setvar VAR_0x8005, 7
- call LavaridgeTown_House_EventScript_2C8326
+ call EventScript_ShowPartyMenu
compare VAR_RESULT, 0
goto_if_eq LavaridgeTown_House_EventScript_2C80A2
setflag FLAG_MOVE_TUTOR_TAUGHT_MIMIC
@@ -7229,7 +6748,7 @@ FallarborTown_Mart_EventScript_2C80B6:: @ 82C80B6
goto_if_eq FallarborTown_Mart_EventScript_2C810A
msgbox FallarborTown_Mart_Text_2C7582, MSGBOX_DEFAULT
setvar VAR_0x8005, 8
- call FallarborTown_Mart_EventScript_2C8326
+ call EventScript_ShowPartyMenu
compare VAR_RESULT, 0
goto_if_eq FallarborTown_Mart_EventScript_2C810A
setflag FLAG_MOVE_TUTOR_TAUGHT_METRONOME
@@ -7258,7 +6777,7 @@ FortreeCity_House2_EventScript_2C811E:: @ 82C811E
goto_if_eq FortreeCity_House2_EventScript_2C8172
msgbox FortreeCity_House2_Text_2C7721, MSGBOX_DEFAULT
setvar VAR_0x8005, 24
- call FortreeCity_House2_EventScript_2C8326
+ call EventScript_ShowPartyMenu
compare VAR_RESULT, 0
goto_if_eq FortreeCity_House2_EventScript_2C8172
setflag FLAG_MOVE_TUTOR_TAUGHT_SLEEP_TALK
@@ -7287,7 +6806,7 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_2C8186:: @ 82C8186
goto_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_2C81DA
msgbox LilycoveCity_DepartmentStoreRooftop_Text_2C7911, MSGBOX_DEFAULT
setvar VAR_0x8005, 14
- call LilycoveCity_DepartmentStoreRooftop_EventScript_2C8326
+ call EventScript_ShowPartyMenu
compare VAR_RESULT, 0
goto_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_2C81DA
setflag FLAG_MOVE_TUTOR_TAUGHT_SUBSTITUTE
@@ -7316,7 +6835,7 @@ MossdeepCity_EventScript_2C81EE:: @ 82C81EE
goto_if_eq MossdeepCity_EventScript_2C8242
msgbox MossdeepCity_Text_2C7B0D, MSGBOX_DEFAULT
setvar VAR_0x8005, 15
- call MossdeepCity_EventScript_2C8326
+ call EventScript_ShowPartyMenu
compare VAR_RESULT, 0
goto_if_eq MossdeepCity_EventScript_2C8242
setflag FLAG_MOVE_TUTOR_TAUGHT_DYNAMICPUNCH
@@ -7345,7 +6864,7 @@ SootopolisCity_PokemonCenter_1F_EventScript_2C8256:: @ 82C8256
goto_if_eq SootopolisCity_PokemonCenter_1F_EventScript_2C82AA
msgbox SootopolisCity_PokemonCenter_1F_Text_2C7C98, MSGBOX_DEFAULT
setvar VAR_0x8005, 4
- call SootopolisCity_PokemonCenter_1F_EventScript_2C8326
+ call EventScript_ShowPartyMenu
compare VAR_RESULT, 0
goto_if_eq SootopolisCity_PokemonCenter_1F_EventScript_2C82AA
setflag FLAG_MOVE_TUTOR_TAUGHT_DOUBLE_EDGE
@@ -7374,7 +6893,7 @@ PacifidlogTown_PokemonCenter_1F_EventScript_2C82BE:: @ 82C82BE
goto_if_eq PacifidlogTown_PokemonCenter_1F_EventScript_2C8312
msgbox PacifidlogTown_PokemonCenter_1F_Text_2C7E40, MSGBOX_DEFAULT
setvar VAR_0x8005, 12
- call PacifidlogTown_PokemonCenter_1F_EventScript_2C8326
+ call EventScript_ShowPartyMenu
compare VAR_RESULT, 0
goto_if_eq PacifidlogTown_PokemonCenter_1F_EventScript_2C8312
setflag FLAG_MOVE_TUTOR_TAUGHT_EXPLOSION
@@ -7391,16 +6910,7 @@ PacifidlogTown_PokemonCenter_1F_EventScript_2C831C:: @ 82C831C
release
end
-FallarborTown_Mart_EventScript_2C8326:: @ 82C8326
-FortreeCity_House2_EventScript_2C8326:: @ 82C8326
-LavaridgeTown_House_EventScript_2C8326:: @ 82C8326
-LilycoveCity_DepartmentStoreRooftop_EventScript_2C8326:: @ 82C8326
-MauvilleCity_EventScript_2C8326:: @ 82C8326
-MossdeepCity_EventScript_2C8326:: @ 82C8326
-PacifidlogTown_PokemonCenter_1F_EventScript_2C8326:: @ 82C8326
-SlateportCity_PokemonFanClub_EventScript_2C8326:: @ 82C8326
-SootopolisCity_PokemonCenter_1F_EventScript_2C8326:: @ 82C8326
-VerdanturfTown_PokemonCenter_1F_EventScript_2C8326:: @ 82C8326
+EventScript_ShowPartyMenu:: @ 82C8326
special sub_81B892C
waitstate
lock
diff --git a/data/map_events.s b/data/map_events.s
index c6f88d305..cd42bfe75 100644
--- a/data/map_events.s
+++ b/data/map_events.s
@@ -3,6 +3,7 @@
#include "constants/event_objects.h"
#include "constants/flags.h"
#include "constants/items.h"
+#include "constants/map_scripts.h"
#include "constants/maps.h"
#include "constants/secret_bases.h"
#include "constants/vars.h"
diff --git a/data/maps/AbandonedShip_Corridors_B1F/scripts.inc b/data/maps/AbandonedShip_Corridors_B1F/scripts.inc
index e89d72c23..e69666120 100644
--- a/data/maps/AbandonedShip_Corridors_B1F/scripts.inc
+++ b/data/maps/AbandonedShip_Corridors_B1F/scripts.inc
@@ -1,6 +1,6 @@
AbandonedShip_Corridors_B1F_MapScripts:: @ 8237D84
- map_script 5, AbandonedShip_Corridors_B1F_MapScript1_237D8F
- map_script 1, AbandonedShip_Corridors_B1F_MapScript1_237D98
+ map_script MAP_SCRIPT_ON_RESUME, AbandonedShip_Corridors_B1F_MapScript1_237D8F
+ map_script MAP_SCRIPT_ON_LOAD, AbandonedShip_Corridors_B1F_MapScript1_237D98
.byte 0
AbandonedShip_Corridors_B1F_MapScript1_237D8F: @ 8237D8F
diff --git a/data/maps/AbandonedShip_Deck/scripts.inc b/data/maps/AbandonedShip_Deck/scripts.inc
index 1f0c0e2f2..041c54593 100644
--- a/data/maps/AbandonedShip_Deck/scripts.inc
+++ b/data/maps/AbandonedShip_Deck/scripts.inc
@@ -1,5 +1,5 @@
AbandonedShip_Deck_MapScripts:: @ 823799A
- map_script 3, AbandonedShip_Deck_MapScript1_2379A0
+ map_script MAP_SCRIPT_ON_TRANSITION, AbandonedShip_Deck_MapScript1_2379A0
.byte 0
AbandonedShip_Deck_MapScript1_2379A0: @ 82379A0
diff --git a/data/maps/AbandonedShip_HiddenFloorCorridors/scripts.inc b/data/maps/AbandonedShip_HiddenFloorCorridors/scripts.inc
index f8b5bcc65..1c495c377 100644
--- a/data/maps/AbandonedShip_HiddenFloorCorridors/scripts.inc
+++ b/data/maps/AbandonedShip_HiddenFloorCorridors/scripts.inc
@@ -1,6 +1,6 @@
AbandonedShip_HiddenFloorCorridors_MapScripts:: @ 823896C
- map_script 5, AbandonedShip_HiddenFloorCorridors_MapScript1_238977
- map_script 1, AbandonedShip_HiddenFloorCorridors_MapScript1_238980
+ map_script MAP_SCRIPT_ON_RESUME, AbandonedShip_HiddenFloorCorridors_MapScript1_238977
+ map_script MAP_SCRIPT_ON_LOAD, AbandonedShip_HiddenFloorCorridors_MapScript1_238980
.byte 0
AbandonedShip_HiddenFloorCorridors_MapScript1_238977: @ 8238977
diff --git a/data/maps/AbandonedShip_HiddenFloorRooms/scripts.inc b/data/maps/AbandonedShip_HiddenFloorRooms/scripts.inc
index f8ecc9001..1c517735e 100644
--- a/data/maps/AbandonedShip_HiddenFloorRooms/scripts.inc
+++ b/data/maps/AbandonedShip_HiddenFloorRooms/scripts.inc
@@ -1,5 +1,5 @@
AbandonedShip_HiddenFloorRooms_MapScripts:: @ 8238C49
- map_script 2, AbandonedShip_HiddenFloorRooms_MapScript2_238C4F
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, AbandonedShip_HiddenFloorRooms_MapScript2_238C4F
.byte 0
AbandonedShip_HiddenFloorRooms_MapScript2_238C4F: @ 8238C4F
diff --git a/data/maps/AbandonedShip_Rooms_B1F/scripts.inc b/data/maps/AbandonedShip_Rooms_B1F/scripts.inc
index 470ae8987..05223592e 100644
--- a/data/maps/AbandonedShip_Rooms_B1F/scripts.inc
+++ b/data/maps/AbandonedShip_Rooms_B1F/scripts.inc
@@ -1,5 +1,5 @@
AbandonedShip_Rooms_B1F_MapScripts:: @ 8237FB7
- map_script 5, AbandonedShip_Rooms_B1F_MapScript1_237FBD
+ map_script MAP_SCRIPT_ON_RESUME, AbandonedShip_Rooms_B1F_MapScript1_237FBD
.byte 0
AbandonedShip_Rooms_B1F_MapScript1_237FBD: @ 8237FBD
diff --git a/data/maps/AbandonedShip_Underwater1/scripts.inc b/data/maps/AbandonedShip_Underwater1/scripts.inc
index 7e39b1939..b957bb6be 100644
--- a/data/maps/AbandonedShip_Underwater1/scripts.inc
+++ b/data/maps/AbandonedShip_Underwater1/scripts.inc
@@ -1,5 +1,5 @@
AbandonedShip_Underwater1_MapScripts:: @ 8238096
- map_script 5, AbandonedShip_Underwater1_MapScript1_23809C
+ map_script MAP_SCRIPT_ON_RESUME, AbandonedShip_Underwater1_MapScript1_23809C
.byte 0
AbandonedShip_Underwater1_MapScript1_23809C: @ 823809C
diff --git a/data/maps/AbandonedShip_Underwater2/scripts.inc b/data/maps/AbandonedShip_Underwater2/scripts.inc
index 17f52c691..cc000b09c 100644
--- a/data/maps/AbandonedShip_Underwater2/scripts.inc
+++ b/data/maps/AbandonedShip_Underwater2/scripts.inc
@@ -1,5 +1,5 @@
AbandonedShip_Underwater2_MapScripts:: @ 823895D
- map_script 5, AbandonedShip_Underwater2_MapScript1_238963
+ map_script MAP_SCRIPT_ON_RESUME, AbandonedShip_Underwater2_MapScript1_238963
.byte 0
AbandonedShip_Underwater2_MapScript1_238963: @ 8238963
diff --git a/data/maps/AlteringCave/scripts.inc b/data/maps/AlteringCave/scripts.inc
index a9faddc36..185466c80 100644
--- a/data/maps/AlteringCave/scripts.inc
+++ b/data/maps/AlteringCave/scripts.inc
@@ -1,5 +1,5 @@
AlteringCave_MapScripts:: @ 823B177
- map_script 3, AlteringCave_MapScript1_23B17D
+ map_script MAP_SCRIPT_ON_TRANSITION, AlteringCave_MapScript1_23B17D
.byte 0
AlteringCave_MapScript1_23B17D: @ 823B17D
diff --git a/data/maps/AncientTomb/scripts.inc b/data/maps/AncientTomb/scripts.inc
index 241cb50f1..8d1c029c3 100644
--- a/data/maps/AncientTomb/scripts.inc
+++ b/data/maps/AncientTomb/scripts.inc
@@ -1,7 +1,7 @@
AncientTomb_MapScripts:: @ 8238FB3
- map_script 5, AncientTomb_MapScript1_238FC3
- map_script 1, AncientTomb_MapScript1_238FF2
- map_script 3, AncientTomb_MapScript1_238FE1
+ map_script MAP_SCRIPT_ON_RESUME, AncientTomb_MapScript1_238FC3
+ map_script MAP_SCRIPT_ON_LOAD, AncientTomb_MapScript1_238FF2
+ map_script MAP_SCRIPT_ON_TRANSITION, AncientTomb_MapScript1_238FE1
.byte 0
AncientTomb_MapScript1_238FC3: @ 8238FC3
@@ -11,7 +11,7 @@ AncientTomb_MapScript1_238FC3: @ 8238FC3
AncientTomb_EventScript_238FCD:: @ 8238FCD
specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, 7
- goto_if_ne AncientTomb_EventScript_27374E
+ goto_if_ne Common_EventScript_NopReturn
removeobject VAR_LAST_TALKED
return
diff --git a/data/maps/AquaHideout_B1F/scripts.inc b/data/maps/AquaHideout_B1F/scripts.inc
index 1763bcd5d..2995f48dc 100644
--- a/data/maps/AquaHideout_B1F/scripts.inc
+++ b/data/maps/AquaHideout_B1F/scripts.inc
@@ -1,6 +1,6 @@
AquaHideout_B1F_MapScripts:: @ 82339A7
- map_script 5, AquaHideout_B1F_MapScript1_2339B2
- map_script 3, AquaHideout_B1F_MapScript1_2339D0
+ map_script MAP_SCRIPT_ON_RESUME, AquaHideout_B1F_MapScript1_2339B2
+ map_script MAP_SCRIPT_ON_TRANSITION, AquaHideout_B1F_MapScript1_2339D0
.byte 0
AquaHideout_B1F_MapScript1_2339B2: @ 82339B2
@@ -10,7 +10,7 @@ AquaHideout_B1F_MapScript1_2339B2: @ 82339B2
AquaHideout_B1F_EventScript_2339BC:: @ 82339BC
specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, 7
- goto_if_ne AquaHideout_B1F_EventScript_27374E
+ goto_if_ne Common_EventScript_NopReturn
removeobject VAR_LAST_TALKED
return
diff --git a/data/maps/AquaHideout_B2F/scripts.inc b/data/maps/AquaHideout_B2F/scripts.inc
index ba20cb681..cdfe3f58e 100644
--- a/data/maps/AquaHideout_B2F/scripts.inc
+++ b/data/maps/AquaHideout_B2F/scripts.inc
@@ -1,5 +1,5 @@
AquaHideout_B2F_MapScripts:: @ 8233DCF
- map_script 3, AquaHideout_B2F_MapScript1_233DD5
+ map_script MAP_SCRIPT_ON_TRANSITION, AquaHideout_B2F_MapScript1_233DD5
.byte 0
AquaHideout_B2F_MapScript1_233DD5: @ 8233DD5
@@ -14,9 +14,9 @@ AquaHideout_B2F_EventScript_233DE5:: @ 8233DE5
lockall
setvar VAR_0x8008, 1
playse SE_PIN
- applymovement VAR_0x8008, AquaHideout_B2F_Movement_272598
+ applymovement VAR_0x8008, Common_Movement_ExclamationMark
waitmovement 0
- applymovement VAR_0x8008, AquaHideout_B2F_Movement_27259E
+ applymovement VAR_0x8008, Common_Movement_FacePlayer
waitmovement 0
setvar VAR_TEMP_1, 1
releaseall
@@ -31,19 +31,19 @@ AquaHideout_B2F_EventScript_233E09:: @ 8233E09
AquaHideout_B2F_EventScript_233E25:: @ 8233E25
setvar VAR_0x8008, 1
setvar VAR_0x8009, 4
- applymovement VAR_0x8008, AquaHideout_B2F_Movement_2725A4
+ applymovement VAR_0x8008, Common_Movement_WalkInPlaceLeft
waitmovement 0
delay 20
- applymovement VAR_0x8008, AquaHideout_B2F_Movement_27259E
+ applymovement VAR_0x8008, Common_Movement_FacePlayer
waitmovement 0
msgbox AquaHideout_B2F_Text_233FA6, MSGBOX_DEFAULT
closemessage
- applymovement VAR_0x8008, AquaHideout_B2F_Movement_2725A4
+ applymovement VAR_0x8008, Common_Movement_WalkInPlaceLeft
applymovement VAR_0x8009, AquaHideout_B2F_Movement_233E80
waitmovement 0
removeobject VAR_0x8009
delay 20
- applymovement VAR_0x8008, AquaHideout_B2F_Movement_27259E
+ applymovement VAR_0x8008, Common_Movement_FacePlayer
waitmovement 0
msgbox AquaHideout_B2F_Text_233FF2, MSGBOX_DEFAULT
setflag FLAG_TEAM_AQUA_ESCAPED_IN_SUBMARINE
diff --git a/data/maps/ArtisanCave_B1F/scripts.inc b/data/maps/ArtisanCave_B1F/scripts.inc
index e46737583..433991bea 100644
--- a/data/maps/ArtisanCave_B1F/scripts.inc
+++ b/data/maps/ArtisanCave_B1F/scripts.inc
@@ -1,5 +1,5 @@
ArtisanCave_B1F_MapScripts:: @ 823AFAD
- map_script 3, ArtisanCave_B1F_MapScript1_23AFB3
+ map_script MAP_SCRIPT_ON_TRANSITION, ArtisanCave_B1F_MapScript1_23AFB3
.byte 0
ArtisanCave_B1F_MapScript1_23AFB3: @ 823AFB3
diff --git a/data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc
index cec596b2d..f3a0ecfb4 100644
--- a/data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc
+++ b/data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc
@@ -1,8 +1,8 @@
BattleFrontier_BattleArenaBattleRoom_MapScripts:: @ 8257487
- map_script 3, BattleFrontier_BattleArenaBattleRoom_MapScript1_2574A0
- map_script 2, BattleFrontier_BattleArenaBattleRoom_MapScript2_2574D2
- map_script 4, BattleFrontier_BattleArenaBattleRoom_MapScript2_257C0C
- map_script 5, BattleFrontier_BattleArenaBattleRoom_MapScript1_25749C
+ map_script MAP_SCRIPT_ON_TRANSITION, BattleFrontier_BattleArenaBattleRoom_MapScript1_2574A0
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattleArenaBattleRoom_MapScript2_2574D2
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattleArenaBattleRoom_MapScript2_257C0C
+ map_script MAP_SCRIPT_ON_RESUME, BattleFrontier_BattleArenaBattleRoom_MapScript1_25749C
.byte 0
BattleFrontier_BattleArenaBattleRoom_MapScript1_25749C: @ 825749C
diff --git a/data/maps/BattleFrontier_BattleArenaCorridor/scripts.inc b/data/maps/BattleFrontier_BattleArenaCorridor/scripts.inc
index f83f6f339..cc362f5f0 100644
--- a/data/maps/BattleFrontier_BattleArenaCorridor/scripts.inc
+++ b/data/maps/BattleFrontier_BattleArenaCorridor/scripts.inc
@@ -1,5 +1,5 @@
BattleFrontier_BattleArenaCorridor_MapScripts:: @ 82573B9
- map_script 2, BattleFrontier_BattleArenaCorridor_MapScript2_2573BF
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattleArenaCorridor_MapScript2_2573BF
.byte 0
BattleFrontier_BattleArenaCorridor_MapScript2_2573BF: @ 82573BF
diff --git a/data/maps/BattleFrontier_BattleArenaLobby/scripts.inc b/data/maps/BattleFrontier_BattleArenaLobby/scripts.inc
index 2c53b7ed6..5df47aed1 100644
--- a/data/maps/BattleFrontier_BattleArenaLobby/scripts.inc
+++ b/data/maps/BattleFrontier_BattleArenaLobby/scripts.inc
@@ -1,6 +1,6 @@
BattleFrontier_BattleArenaLobby_MapScripts:: @ 8255C36
- map_script 2, BattleFrontier_BattleArenaLobby_MapScript2_255C55
- map_script 4, BattleFrontier_BattleArenaLobby_MapScript2_255C41
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattleArenaLobby_MapScript2_255C55
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattleArenaLobby_MapScript2_255C41
.byte 0
BattleFrontier_BattleArenaLobby_MapScript2_255C41: @ 8255C41
@@ -199,7 +199,7 @@ BattleFrontier_BattleArenaLobby_EventScript_255EE8:: @ 8255EE8
special LoadPlayerParty
closemessage
delay 2
- call BattleFrontier_BattleArenaLobby_EventScript_27134F
+ call Common_EventScript_SaveGame
setvar VAR_TEMP_0, 255
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattleArenaLobby_EventScript_255FE1
diff --git a/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc
index 7dbeee042..e50ad9f0a 100644
--- a/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc
+++ b/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc
@@ -1,8 +1,8 @@
BattleFrontier_BattleDomeBattleRoom_MapScripts:: @ 824BC9C
- map_script 3, BattleFrontier_BattleDomeBattleRoom_MapScript1_24BCB1
- map_script 2, BattleFrontier_BattleDomeBattleRoom_MapScript2_24BD00
- map_script 4, BattleFrontier_BattleDomeBattleRoom_MapScript2_24C481
- map_script 5, BattleFrontier_BattleDomeBattleRoom_MapScript1_24C4F0
+ map_script MAP_SCRIPT_ON_TRANSITION, BattleFrontier_BattleDomeBattleRoom_MapScript1_24BCB1
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattleDomeBattleRoom_MapScript2_24BD00
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattleDomeBattleRoom_MapScript2_24C481
+ map_script MAP_SCRIPT_ON_RESUME, BattleFrontier_BattleDomeBattleRoom_MapScript1_24C4F0
.byte 0
BattleFrontier_BattleDomeBattleRoom_MapScript1_24BCB1: @ 824BCB1
@@ -966,14 +966,14 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_24C919:: @ 824C919
random 2
copyvar VAR_TEMP_D, VAR_RESULT
compare VAR_TEMP_D, 0
- goto_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_27374E
+ goto_if_eq Common_EventScript_NopReturn
setobjectxyperm 6, 2, 0
setobjectmovementtype 6, MOVEMENT_TYPE_FACE_RIGHT
return
BattleFrontier_BattleDomeBattleRoom_EventScript_24C938:: @ 824C938
compare VAR_TEMP_D, 0
- goto_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_27374E
+ goto_if_eq Common_EventScript_NopReturn
applymovement 6, BattleFrontier_BattleDomeBattleRoom_Movement_24C95E
return
diff --git a/data/maps/BattleFrontier_BattleDomeCorridor/scripts.inc b/data/maps/BattleFrontier_BattleDomeCorridor/scripts.inc
index ac43ee9a4..c777f7a7a 100644
--- a/data/maps/BattleFrontier_BattleDomeCorridor/scripts.inc
+++ b/data/maps/BattleFrontier_BattleDomeCorridor/scripts.inc
@@ -1,5 +1,5 @@
BattleFrontier_BattleDomeCorridor_MapScripts:: @ 824B0FE
- map_script 2, BattleFrontier_BattleDomeCorridor_MapScript2_24B104
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattleDomeCorridor_MapScript2_24B104
.byte 0
BattleFrontier_BattleDomeCorridor_MapScript2_24B104: @ 824B104
diff --git a/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc b/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc
index 35c32c3fa..68ecf802b 100644
--- a/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc
+++ b/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc
@@ -1,7 +1,7 @@
BattleFrontier_BattleDomeLobby_MapScripts:: @ 82497E2
- map_script 5, BattleFrontier_BattleDomeLobby_MapScript1_2497F2
- map_script 2, BattleFrontier_BattleDomeLobby_MapScript2_24980F
- map_script 4, BattleFrontier_BattleDomeLobby_MapScript2_2497FB
+ map_script MAP_SCRIPT_ON_RESUME, BattleFrontier_BattleDomeLobby_MapScript1_2497F2
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattleDomeLobby_MapScript2_24980F
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattleDomeLobby_MapScript2_2497FB
.byte 0
BattleFrontier_BattleDomeLobby_MapScript1_2497F2: @ 82497F2
@@ -248,7 +248,7 @@ BattleFrontier_BattleDomeLobby_EventScript_249B60:: @ 8249B60
special LoadPlayerParty
closemessage
delay 2
- call BattleFrontier_BattleDomeLobby_EventScript_27134F
+ call Common_EventScript_SaveGame
setvar VAR_TEMP_0, 255
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattleDomeLobby_EventScript_249C4A
diff --git a/data/maps/BattleFrontier_BattleDomePreBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleDomePreBattleRoom/scripts.inc
index 6cf1c7817..3901201bb 100644
--- a/data/maps/BattleFrontier_BattleDomePreBattleRoom/scripts.inc
+++ b/data/maps/BattleFrontier_BattleDomePreBattleRoom/scripts.inc
@@ -1,6 +1,6 @@
BattleFrontier_BattleDomePreBattleRoom_MapScripts:: @ 824B1F9
- map_script 2, BattleFrontier_BattleDomePreBattleRoom_MapScript2_24B218
- map_script 4, BattleFrontier_BattleDomePreBattleRoom_MapScript2_24B204
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattleDomePreBattleRoom_MapScript2_24B218
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattleDomePreBattleRoom_MapScript2_24B204
.byte 0
BattleFrontier_BattleDomePreBattleRoom_MapScript2_24B204: @ 824B204
diff --git a/data/maps/BattleFrontier_BattleFactoryBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleFactoryBattleRoom/scripts.inc
index 8c22a9bc9..9c76544f6 100644
--- a/data/maps/BattleFrontier_BattleFactoryBattleRoom/scripts.inc
+++ b/data/maps/BattleFrontier_BattleFactoryBattleRoom/scripts.inc
@@ -1,7 +1,7 @@
BattleFrontier_BattleFactoryBattleRoom_MapScripts:: @ 825ADAB
- map_script 3, BattleFrontier_BattleFactoryBattleRoom_MapScript1_25ADBB
- map_script 4, BattleFrontier_BattleFactoryBattleRoom_MapScript2_25AE00
- map_script 2, BattleFrontier_BattleFactoryBattleRoom_MapScript2_25AE31
+ map_script MAP_SCRIPT_ON_TRANSITION, BattleFrontier_BattleFactoryBattleRoom_MapScript1_25ADBB
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattleFactoryBattleRoom_MapScript2_25AE00
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattleFactoryBattleRoom_MapScript2_25AE31
.byte 0
BattleFrontier_BattleFactoryBattleRoom_MapScript1_25ADBB: @ 825ADBB
@@ -304,12 +304,12 @@ BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25B1AA:: @ 825B1AA
end
BattleFrontier_BattleFactoryBattleRoom_EventScript_25B1B4:: @ 825B1B4
- applymovement 1, BattleFrontier_BattleFactoryBattleRoom_Movement_2725A8
- applymovement 3, BattleFrontier_BattleFactoryBattleRoom_Movement_2725A8
- applymovement 4, BattleFrontier_BattleFactoryBattleRoom_Movement_2725A8
- applymovement 5, BattleFrontier_BattleFactoryBattleRoom_Movement_2725A4
- applymovement 6, BattleFrontier_BattleFactoryBattleRoom_Movement_2725A4
- applymovement 7, BattleFrontier_BattleFactoryBattleRoom_Movement_2725A4
+ applymovement 1, Common_Movement_WalkInPlaceRight
+ applymovement 3, Common_Movement_WalkInPlaceRight
+ applymovement 4, Common_Movement_WalkInPlaceRight
+ applymovement 5, Common_Movement_WalkInPlaceLeft
+ applymovement 6, Common_Movement_WalkInPlaceLeft
+ applymovement 7, Common_Movement_WalkInPlaceLeft
waitmovement 0
return
diff --git a/data/maps/BattleFrontier_BattleFactoryLobby/scripts.inc b/data/maps/BattleFrontier_BattleFactoryLobby/scripts.inc
index 39d729846..a9e57dde6 100644
--- a/data/maps/BattleFrontier_BattleFactoryLobby/scripts.inc
+++ b/data/maps/BattleFrontier_BattleFactoryLobby/scripts.inc
@@ -1,6 +1,6 @@
BattleFrontier_BattleFactoryLobby_MapScripts:: @ 82583E8
- map_script 2, BattleFrontier_BattleFactoryLobby_MapScript2_258407
- map_script 4, BattleFrontier_BattleFactoryLobby_MapScript2_2583F3
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattleFactoryLobby_MapScript2_258407
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattleFactoryLobby_MapScript2_2583F3
.byte 0
BattleFrontier_BattleFactoryLobby_MapScript2_2583F3: @ 82583F3
@@ -208,7 +208,7 @@ BattleFrontier_BattleFactoryLobby_EventScript_2586B9:: @ 82586B9
special CallFrontierUtilFunc
closemessage
delay 2
- call BattleFrontier_BattleFactoryLobby_EventScript_27134F
+ call Common_EventScript_SaveGame
setvar VAR_TEMP_0, 255
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattleFactoryLobby_EventScript_258783
diff --git a/data/maps/BattleFrontier_BattleFactoryPreBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleFactoryPreBattleRoom/scripts.inc
index 21681b70a..0049b3f58 100644
--- a/data/maps/BattleFrontier_BattleFactoryPreBattleRoom/scripts.inc
+++ b/data/maps/BattleFrontier_BattleFactoryPreBattleRoom/scripts.inc
@@ -1,6 +1,6 @@
BattleFrontier_BattleFactoryPreBattleRoom_MapScripts:: @ 8259ABA
- map_script 2, BattleFrontier_BattleFactoryPreBattleRoom_MapScript2_259AEF
- map_script 4, BattleFrontier_BattleFactoryPreBattleRoom_MapScript2_259AC5
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattleFactoryPreBattleRoom_MapScript2_259AEF
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattleFactoryPreBattleRoom_MapScript2_259AC5
.byte 0
BattleFrontier_BattleFactoryPreBattleRoom_MapScript2_259AC5: @ 8259AC5
diff --git a/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc
index 529bcd0c3..bdd4a9ff4 100644
--- a/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc
+++ b/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc
@@ -1,7 +1,7 @@
BattleFrontier_BattlePalaceBattleRoom_MapScripts:: @ 824F815
- map_script 3, BattleFrontier_BattlePalaceBattleRoom_MapScript1_24F825
- map_script 2, BattleFrontier_BattlePalaceBattleRoom_MapScript2_24F861
- map_script 4, BattleFrontier_BattlePalaceBattleRoom_MapScript2_24FE34
+ map_script MAP_SCRIPT_ON_TRANSITION, BattleFrontier_BattlePalaceBattleRoom_MapScript1_24F825
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattlePalaceBattleRoom_MapScript2_24F861
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattlePalaceBattleRoom_MapScript2_24FE34
.byte 0
BattleFrontier_BattlePalaceBattleRoom_MapScript1_24F825: @ 824F825
@@ -280,8 +280,8 @@ BattleFrontier_BattlePalaceBattleRoom_EventScript_24FCC7:: @ 824FCC7
special CallFrontierUtilFunc
applymovement 2, BattleFrontier_BattlePalaceBattleRoom_Movement_2725B6
waitmovement 0
- applymovement 1, BattleFrontier_BattlePalaceBattleRoom_Movement_2725A8
- applymovement 3, BattleFrontier_BattlePalaceBattleRoom_Movement_2725A8
+ applymovement 1, Common_Movement_WalkInPlaceRight
+ applymovement 3, Common_Movement_WalkInPlaceRight
waitmovement 0
msgbox BattleFrontier_BattlePalaceBattleRoom_Text_250412, MSGBOX_DEFAULT
goto BattleFrontier_BattlePalaceBattleRoom_EventScript_24FB28
@@ -323,8 +323,8 @@ BattleFrontier_BattlePalaceBattleRoom_EventScript_24FD84:: @ 824FD84
special CallFrontierUtilFunc
applymovement 2, BattleFrontier_BattlePalaceBattleRoom_Movement_2725B6
waitmovement 0
- applymovement 1, BattleFrontier_BattlePalaceBattleRoom_Movement_2725A8
- applymovement 3, BattleFrontier_BattlePalaceBattleRoom_Movement_2725A8
+ applymovement 1, Common_Movement_WalkInPlaceRight
+ applymovement 3, Common_Movement_WalkInPlaceRight
waitmovement 0
msgbox BattleFrontier_BattlePalaceBattleRoom_Text_2506C4, MSGBOX_DEFAULT
goto BattleFrontier_BattlePalaceBattleRoom_EventScript_24FB28
diff --git a/data/maps/BattleFrontier_BattlePalaceCorridor/scripts.inc b/data/maps/BattleFrontier_BattlePalaceCorridor/scripts.inc
index 071f61a09..d5219636c 100644
--- a/data/maps/BattleFrontier_BattlePalaceCorridor/scripts.inc
+++ b/data/maps/BattleFrontier_BattlePalaceCorridor/scripts.inc
@@ -1,5 +1,5 @@
BattleFrontier_BattlePalaceCorridor_MapScripts:: @ 824F4A3
- map_script 2, BattleFrontier_BattlePalaceCorridor_MapScript2_24F4A9
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattlePalaceCorridor_MapScript2_24F4A9
.byte 0
BattleFrontier_BattlePalaceCorridor_MapScript2_24F4A9: @ 824F4A9
diff --git a/data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc b/data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc
index 56edda8ad..40205e9b5 100644
--- a/data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc
+++ b/data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc
@@ -1,6 +1,6 @@
BattleFrontier_BattlePalaceLobby_MapScripts:: @ 824D77E
- map_script 2, BattleFrontier_BattlePalaceLobby_MapScript2_24D79D
- map_script 4, BattleFrontier_BattlePalaceLobby_MapScript2_24D789
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattlePalaceLobby_MapScript2_24D79D
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattlePalaceLobby_MapScript2_24D789
.byte 0
BattleFrontier_BattlePalaceLobby_MapScript2_24D789: @ 824D789
@@ -223,7 +223,7 @@ BattleFrontier_BattlePalaceLobby_EventScript_24DA87:: @ 824DA87
special LoadPlayerParty
closemessage
delay 2
- call BattleFrontier_BattlePalaceLobby_EventScript_27134F
+ call Common_EventScript_SaveGame
setvar VAR_TEMP_0, 255
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattlePalaceLobby_EventScript_24DB7A
diff --git a/data/maps/BattleFrontier_BattlePikeCorridor/scripts.inc b/data/maps/BattleFrontier_BattlePikeCorridor/scripts.inc
index 1155cd67b..c7421c2c8 100644
--- a/data/maps/BattleFrontier_BattlePikeCorridor/scripts.inc
+++ b/data/maps/BattleFrontier_BattlePikeCorridor/scripts.inc
@@ -1,6 +1,6 @@
BattleFrontier_BattlePikeCorridor_MapScripts:: @ 825C771
- map_script 2, BattleFrontier_BattlePikeCorridor_MapScript2_25C77C
- map_script 4, BattleFrontier_BattlePikeCorridor_MapScript2_25C7F7
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattlePikeCorridor_MapScript2_25C77C
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattlePikeCorridor_MapScript2_25C7F7
.byte 0
BattleFrontier_BattlePikeCorridor_MapScript2_25C77C: @ 825C77C
diff --git a/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc b/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc
index 70d7f3c6c..51d6023c8 100644
--- a/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc
+++ b/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc
@@ -1,6 +1,6 @@
BattleFrontier_BattlePikeLobby_MapScripts:: @ 825B6C6
- map_script 2, BattleFrontier_BattlePikeLobby_MapScript2_25B6D1
- map_script 4, BattleFrontier_BattlePikeLobby_MapScript2_25B6F3
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattlePikeLobby_MapScript2_25B6D1
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattlePikeLobby_MapScript2_25B6F3
.byte 0
BattleFrontier_BattlePikeLobby_MapScript2_25B6D1: @ 825B6D1
@@ -195,7 +195,7 @@ BattleFrontier_BattlePikeLobby_EventScript_25B95C:: @ 825B95C
special LoadPlayerParty
closemessage
delay 2
- call BattleFrontier_BattlePikeLobby_EventScript_27134F
+ call Common_EventScript_SaveGame
setvar VAR_TEMP_0, 255
setvar VAR_0x8004, 26
special CallBattlePikeFunction
diff --git a/data/maps/BattleFrontier_BattlePikeRandomRoom1/scripts.inc b/data/maps/BattleFrontier_BattlePikeRandomRoom1/scripts.inc
index 1c810900c..87f83371c 100644
--- a/data/maps/BattleFrontier_BattlePikeRandomRoom1/scripts.inc
+++ b/data/maps/BattleFrontier_BattlePikeRandomRoom1/scripts.inc
@@ -1,8 +1,8 @@
BattleFrontier_BattlePikeRandomRoom1_MapScripts:: @ 825D152
- map_script 5, BattleFrontier_BattlePikeRandomRoom1_MapScript1_2C423E
- map_script 3, BattleFrontier_BattlePikeRandomRoom1_MapScript1_2C3E25
- map_script 2, BattleFrontier_BattlePikeRandomRoom1_MapScript2_25D167
- map_script 4, BattleFrontier_BattlePikeRandomRoom1_MapScript2_2C3EDE
+ map_script MAP_SCRIPT_ON_RESUME, BattleFrontier_BattlePikeRandomRoom1_MapScript1_2C423E
+ map_script MAP_SCRIPT_ON_TRANSITION, BattleFrontier_BattlePikeRandomRoom1_MapScript1_2C3E25
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattlePikeRandomRoom1_MapScript2_25D167
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattlePikeRandomRoom1_MapScript2_2C3EDE
.byte 0
BattleFrontier_BattlePikeRandomRoom1_MapScript2_25D167: @ 825D167
diff --git a/data/maps/BattleFrontier_BattlePikeRandomRoom2/scripts.inc b/data/maps/BattleFrontier_BattlePikeRandomRoom2/scripts.inc
index f46760e17..5d438d8bd 100644
--- a/data/maps/BattleFrontier_BattlePikeRandomRoom2/scripts.inc
+++ b/data/maps/BattleFrontier_BattlePikeRandomRoom2/scripts.inc
@@ -1,6 +1,6 @@
BattleFrontier_BattlePikeRandomRoom2_MapScripts:: @ 825E392
- map_script 2, BattleFrontier_BattlePikeRandomRoom2_MapScript2_25E39D
- map_script 4, BattleFrontier_BattlePikeRandomRoom2_MapScript2_25E3DE
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattlePikeRandomRoom2_MapScript2_25E39D
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattlePikeRandomRoom2_MapScript2_25E3DE
.byte 0
BattleFrontier_BattlePikeRandomRoom2_MapScript2_25E39D: @ 825E39D
diff --git a/data/maps/BattleFrontier_BattlePikeRandomRoom3/scripts.inc b/data/maps/BattleFrontier_BattlePikeRandomRoom3/scripts.inc
index 4beb26724..9f2dfec16 100644
--- a/data/maps/BattleFrontier_BattlePikeRandomRoom3/scripts.inc
+++ b/data/maps/BattleFrontier_BattlePikeRandomRoom3/scripts.inc
@@ -1,7 +1,7 @@
BattleFrontier_BattlePikeRandomRoom3_MapScripts:: @ 825E41A
- map_script 5, BattleFrontier_BattlePikeRandomRoom3_MapScript1_25E47A
- map_script 2, BattleFrontier_BattlePikeRandomRoom3_MapScript2_25E42A
- map_script 4, BattleFrontier_BattlePikeRandomRoom3_MapScript2_25E466
+ map_script MAP_SCRIPT_ON_RESUME, BattleFrontier_BattlePikeRandomRoom3_MapScript1_25E47A
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattlePikeRandomRoom3_MapScript2_25E42A
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattlePikeRandomRoom3_MapScript2_25E466
.byte 0
BattleFrontier_BattlePikeRandomRoom3_MapScript2_25E42A: @ 825E42A
diff --git a/data/maps/BattleFrontier_BattlePikeThreePathRoom/scripts.inc b/data/maps/BattleFrontier_BattlePikeThreePathRoom/scripts.inc
index cac594516..54f11f071 100644
--- a/data/maps/BattleFrontier_BattlePikeThreePathRoom/scripts.inc
+++ b/data/maps/BattleFrontier_BattlePikeThreePathRoom/scripts.inc
@@ -1,7 +1,7 @@
BattleFrontier_BattlePikeThreePathRoom_MapScripts:: @ 825C843
- map_script 5, BattleFrontier_BattlePikeThreePathRoom_MapScript1_2C423E
- map_script 2, BattleFrontier_BattlePikeThreePathRoom_MapScript2_25C853
- map_script 4, BattleFrontier_BattlePikeThreePathRoom_MapScript2_25C87D
+ map_script MAP_SCRIPT_ON_RESUME, BattleFrontier_BattlePikeThreePathRoom_MapScript1_2C423E
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattlePikeThreePathRoom_MapScript2_25C853
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattlePikeThreePathRoom_MapScript2_25C87D
.byte 0
BattleFrontier_BattlePikeThreePathRoom_MapScript2_25C853: @ 825C853
diff --git a/data/maps/BattleFrontier_BattlePyramidEmptySquare/scripts.inc b/data/maps/BattleFrontier_BattlePyramidEmptySquare/scripts.inc
index 43586bba0..723c666d8 100644
--- a/data/maps/BattleFrontier_BattlePyramidEmptySquare/scripts.inc
+++ b/data/maps/BattleFrontier_BattlePyramidEmptySquare/scripts.inc
@@ -1,7 +1,7 @@
BattleFrontier_BattlePyramidEmptySquare_MapScripts:: @ 8252A33
- map_script 5, BattleFrontier_BattlePyramidEmptySquare_MapScript1_252AA2
- map_script 2, BattleFrontier_BattlePyramidEmptySquare_MapScript2_252A43
- map_script 3, BattleFrontier_BattlePyramidEmptySquare_MapScript1_252BCA
+ map_script MAP_SCRIPT_ON_RESUME, BattleFrontier_BattlePyramidEmptySquare_MapScript1_252AA2
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattlePyramidEmptySquare_MapScript2_252A43
+ map_script MAP_SCRIPT_ON_TRANSITION, BattleFrontier_BattlePyramidEmptySquare_MapScript1_252BCA
.byte 0
BattleFrontier_BattlePyramidEmptySquare_MapScript2_252A43: @ 8252A43
diff --git a/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc b/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc
index 686a1bfb2..667c4847e 100644
--- a/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc
+++ b/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc
@@ -1,6 +1,6 @@
BattleFrontier_BattlePyramidLobby_MapScripts:: @ 8250716
- map_script 2, BattleFrontier_BattlePyramidLobby_MapScript2_250735
- map_script 4, BattleFrontier_BattlePyramidLobby_MapScript2_2497FB
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattlePyramidLobby_MapScript2_250735
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattlePyramidLobby_MapScript2_2497FB
.byte 0
BattleFrontier_BattlePyramidLobby_MapScript2_250721: @ 8250721
@@ -200,7 +200,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_2509A5:: @ 82509A5
special LoadPlayerParty
closemessage
delay 2
- call BattleFrontier_BattlePyramidLobby_EventScript_27134F
+ call Common_EventScript_SaveGame
setvar VAR_TEMP_0, 255
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattlePyramidLobby_EventScript_250AAA
@@ -260,7 +260,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_250ACC:: @ 8250ACC
BattleFrontier_BattlePyramidLobby_EventScript_250ACE:: @ 8250ACE
lockall
- applymovement 2, BattleFrontier_BattlePyramidLobby_Movement_27259E
+ applymovement 2, Common_Movement_FacePlayer
waitmovement 0
msgbox BattleFrontier_BattlePyramidLobby_Text_251C3B, MSGBOX_DEFAULT
call BattleFrontier_BattlePyramidLobby_EventScript_250AF0
diff --git a/data/maps/BattleFrontier_BattlePyramidTop/scripts.inc b/data/maps/BattleFrontier_BattlePyramidTop/scripts.inc
index d04fe23f2..39bb39f49 100644
--- a/data/maps/BattleFrontier_BattlePyramidTop/scripts.inc
+++ b/data/maps/BattleFrontier_BattlePyramidTop/scripts.inc
@@ -1,8 +1,8 @@
BattleFrontier_BattlePyramidTop_MapScripts:: @ 82550A1
- map_script 5, BattleFrontier_BattlePyramidTop_MapScript1_2550F4
- map_script 2, BattleFrontier_BattlePyramidTop_MapScript2_25516E
- map_script 3, BattleFrontier_BattlePyramidTop_MapScript1_2550B6
- map_script 4, BattleFrontier_BattlePyramidTop_MapScript2_2550CE
+ map_script MAP_SCRIPT_ON_RESUME, BattleFrontier_BattlePyramidTop_MapScript1_2550F4
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattlePyramidTop_MapScript2_25516E
+ map_script MAP_SCRIPT_ON_TRANSITION, BattleFrontier_BattlePyramidTop_MapScript1_2550B6
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattlePyramidTop_MapScript2_2550CE
.byte 0
BattleFrontier_BattlePyramidTop_MapScript1_2550B6: @ 82550B6
diff --git a/data/maps/BattleFrontier_BattleTowerBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleTowerBattleRoom/scripts.inc
index b89d2e061..6e3f0c8fa 100644
--- a/data/maps/BattleFrontier_BattleTowerBattleRoom/scripts.inc
+++ b/data/maps/BattleFrontier_BattleTowerBattleRoom/scripts.inc
@@ -1,6 +1,6 @@
BattleFrontier_BattleTowerBattleRoom_MapScripts:: @ 8241B40
- map_script 2, BattleFrontier_BattleTowerBattleRoom_MapScript2_241B62
- map_script 4, BattleFrontier_BattleTowerBattleRoom_MapScript2_241B4B
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattleTowerBattleRoom_MapScript2_241B62
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattleTowerBattleRoom_MapScript2_241B4B
.byte 0
BattleFrontier_BattleTowerBattleRoom_MapScript2_241B4B: @ 8241B4B
@@ -233,9 +233,9 @@ BattleFrontier_BattleTowerBattleRoom_EventScript_241EC3:: @ 8241EC3
applymovement 3, BattleFrontier_BattleTowerBattleRoom_Movement_2725B6
waitmovement 0
playse SE_PIN
- applymovement 2, BattleFrontier_BattleTowerBattleRoom_Movement_272598
+ applymovement 2, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 2, BattleFrontier_BattleTowerBattleRoom_Movement_27259A
+ applymovement 2, Common_Movement_Delay48
waitmovement 0
applymovement 3, BattleFrontier_BattleTowerBattleRoom_Movement_2421A6
applymovement 2, BattleFrontier_BattleTowerBattleRoom_Movement_2421AB
diff --git a/data/maps/BattleFrontier_BattleTowerBattleRoom2/scripts.inc b/data/maps/BattleFrontier_BattleTowerBattleRoom2/scripts.inc
index 2699fe9d6..8ebb7ed25 100644
--- a/data/maps/BattleFrontier_BattleTowerBattleRoom2/scripts.inc
+++ b/data/maps/BattleFrontier_BattleTowerBattleRoom2/scripts.inc
@@ -1,7 +1,7 @@
BattleFrontier_BattleTowerBattleRoom2_MapScripts:: @ 8248EE8
- map_script 3, BattleFrontier_BattleTowerBattleRoom2_MapScript1_248EF8
- map_script 4, BattleFrontier_BattleTowerBattleRoom2_MapScript2_248F33
- map_script 2, BattleFrontier_BattleTowerBattleRoom2_MapScript2_248F43
+ map_script MAP_SCRIPT_ON_TRANSITION, BattleFrontier_BattleTowerBattleRoom2_MapScript1_248EF8
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattleTowerBattleRoom2_MapScript2_248F33
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattleTowerBattleRoom2_MapScript2_248F43
.byte 0
BattleFrontier_BattleTowerBattleRoom2_MapScript1_248EF8: @ 8248EF8
diff --git a/data/maps/BattleFrontier_BattleTowerCorridor/scripts.inc b/data/maps/BattleFrontier_BattleTowerCorridor/scripts.inc
index 55e21dedb..cf0a50e98 100644
--- a/data/maps/BattleFrontier_BattleTowerCorridor/scripts.inc
+++ b/data/maps/BattleFrontier_BattleTowerCorridor/scripts.inc
@@ -1,6 +1,6 @@
BattleFrontier_BattleTowerCorridor_MapScripts:: @ 8241AAA
- map_script 1, BattleFrontier_BattleTowerCorridor_MapScript1_241AB5
- map_script 2, BattleFrontier_BattleTowerCorridor_MapScript2_241AE6
+ map_script MAP_SCRIPT_ON_LOAD, BattleFrontier_BattleTowerCorridor_MapScript1_241AB5
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattleTowerCorridor_MapScript2_241AE6
.byte 0
BattleFrontier_BattleTowerCorridor_MapScript1_241AB5: @ 8241AB5
diff --git a/data/maps/BattleFrontier_BattleTowerCorridor2/scripts.inc b/data/maps/BattleFrontier_BattleTowerCorridor2/scripts.inc
index 73b14fc2e..efab7be70 100644
--- a/data/maps/BattleFrontier_BattleTowerCorridor2/scripts.inc
+++ b/data/maps/BattleFrontier_BattleTowerCorridor2/scripts.inc
@@ -1,7 +1,7 @@
BattleFrontier_BattleTowerCorridor2_MapScripts:: @ 8248D4A
- map_script 3, BattleFrontier_BattleTowerCorridor2_MapScript1_248D5A
- map_script 4, BattleFrontier_BattleTowerCorridor2_MapScript2_248D95
- map_script 2, BattleFrontier_BattleTowerCorridor2_MapScript2_248DB2
+ map_script MAP_SCRIPT_ON_TRANSITION, BattleFrontier_BattleTowerCorridor2_MapScript1_248D5A
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattleTowerCorridor2_MapScript2_248D95
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattleTowerCorridor2_MapScript2_248DB2
.byte 0
BattleFrontier_BattleTowerCorridor2_MapScript1_248D5A: @ 8248D5A
@@ -68,8 +68,8 @@ BattleFrontier_BattleTowerCorridor2_EventScript_248DBC:: @ 8248DBC
applymovement 2, BattleFrontier_BattleTowerCorridor2_Movement_248ED5
waitmovement 0
delay 40
- applymovement 3, BattleFrontier_BattleTowerCorridor2_Movement_2725A6
- applymovement 2, BattleFrontier_BattleTowerCorridor2_Movement_2725A6
+ applymovement 3, Common_Movement_WalkInPlaceUp
+ applymovement 2, Common_Movement_WalkInPlaceUp
waitmovement 0
opendoor 7, 1
waitdooranim
diff --git a/data/maps/BattleFrontier_BattleTowerElevator/scripts.inc b/data/maps/BattleFrontier_BattleTowerElevator/scripts.inc
index 3dbd5eca3..0d07f5be2 100644
--- a/data/maps/BattleFrontier_BattleTowerElevator/scripts.inc
+++ b/data/maps/BattleFrontier_BattleTowerElevator/scripts.inc
@@ -1,6 +1,6 @@
BattleFrontier_BattleTowerElevator_MapScripts:: @ 82419DB
- map_script 2, BattleFrontier_BattleTowerElevator_MapScript2_2419E6
- map_script 4, BattleFrontier_BattleTowerElevator_MapScript2_241A96
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattleTowerElevator_MapScript2_2419E6
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattleTowerElevator_MapScript2_241A96
.byte 0
BattleFrontier_BattleTowerElevator_MapScript2_2419E6: @ 82419E6
diff --git a/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc b/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc
index e1bec2c21..8d407ac1d 100644
--- a/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc
+++ b/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc
@@ -1,8 +1,8 @@
BattleFrontier_BattleTowerLobby_MapScripts:: @ 823E67B
- map_script 5, BattleFrontier_BattleTowerLobby_MapScript1_23E690
- map_script 3, BattleFrontier_BattleTowerLobby_MapScript1_23E694
- map_script 2, BattleFrontier_BattleTowerLobby_MapScript2_23E6DD
- map_script 4, BattleFrontier_BattleTowerLobby_MapScript2_23E6C9
+ map_script MAP_SCRIPT_ON_RESUME, BattleFrontier_BattleTowerLobby_MapScript1_23E690
+ map_script MAP_SCRIPT_ON_TRANSITION, BattleFrontier_BattleTowerLobby_MapScript1_23E694
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattleTowerLobby_MapScript2_23E6DD
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattleTowerLobby_MapScript2_23E6C9
.byte 0
BattleFrontier_BattleTowerLobby_MapScript1_23E690: @ 823E690
@@ -231,7 +231,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23E8EE:: @ 823E8EE
end
BattleFrontier_BattleTowerLobby_EventScript_23E930:: @ 823E930
- setvar VAR_0x40BC, 1
+ setvar VAR_BRAVO_TRAINER_BATTLE_TOWER_ON, 1
return
BattleFrontier_BattleTowerLobby_EventScript_23E936:: @ 823E936
@@ -300,12 +300,12 @@ BattleFrontier_BattleTowerLobby_EventScript_23EA2A:: @ 823EA2A
special LoadPlayerParty
closemessage
delay 2
- call BattleFrontier_BattleTowerLobby_EventScript_27134F
+ call Common_EventScript_SaveGame
setvar VAR_TEMP_0, 255
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23F0D0
incrementgamestat 30
- setvar VAR_0x40BC, 1
+ setvar VAR_BRAVO_TRAINER_BATTLE_TOWER_ON, 1
goto BattleFrontier_BattleTowerLobby_EventScript_23F0F3
end
@@ -380,12 +380,12 @@ BattleFrontier_BattleTowerLobby_EventScript_23EB93:: @ 823EB93
special LoadPlayerParty
closemessage
delay 2
- call BattleFrontier_BattleTowerLobby_EventScript_27134F
+ call Common_EventScript_SaveGame
setvar VAR_TEMP_0, 255
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23F0D0
incrementgamestat 30
- setvar VAR_0x40BC, 0
+ setvar VAR_BRAVO_TRAINER_BATTLE_TOWER_ON, 0
goto BattleFrontier_BattleTowerLobby_EventScript_23F0F3
end
@@ -461,12 +461,12 @@ BattleFrontier_BattleTowerLobby_EventScript_23ECFF:: @ 823ECFF
special LoadPlayerParty
closemessage
delay 2
- call BattleFrontier_BattleTowerLobby_EventScript_27134F
+ call Common_EventScript_SaveGame
setvar VAR_TEMP_0, 255
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23F0D0
incrementgamestat 30
- setvar VAR_0x40BC, 0
+ setvar VAR_BRAVO_TRAINER_BATTLE_TOWER_ON, 0
goto BattleFrontier_BattleTowerLobby_EventScript_23F0F3
end
@@ -544,7 +544,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23EE68:: @ 823EE68
setvar VAR_0x8004, 6
setvar VAR_0x8005, 0
special sub_8161F74
- call BattleFrontier_BattleTowerLobby_EventScript_27134F
+ call Common_EventScript_SaveGame
setvar VAR_TEMP_0, 255
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23F0D0
@@ -995,7 +995,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23F3A6:: @ 823F3A6
BattleFrontier_BattleTowerLobby_EventScript_23F3AF:: @ 823F3AF
incrementgamestat 30
- setvar VAR_0x40BC, 0
+ setvar VAR_BRAVO_TRAINER_BATTLE_TOWER_ON, 0
message BattleFrontier_BattleTowerLobby_Text_24144D
waitmessage
setvar VAR_0x8004, 6
@@ -1058,7 +1058,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23F463:: @ 823F463
BattleFrontier_BattleTowerLobby_EventScript_23F496:: @ 823F496
incrementgamestat 30
- setvar VAR_0x40BC, 0
+ setvar VAR_BRAVO_TRAINER_BATTLE_TOWER_ON, 0
message BattleFrontier_BattleTowerLobby_Text_24144D
waitmessage
setvar VAR_0x8004, 6
diff --git a/data/maps/BattleFrontier_BattleTowerMultiBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleTowerMultiBattleRoom/scripts.inc
index 7dbfbbc13..0bc74b1bd 100644
--- a/data/maps/BattleFrontier_BattleTowerMultiBattleRoom/scripts.inc
+++ b/data/maps/BattleFrontier_BattleTowerMultiBattleRoom/scripts.inc
@@ -1,8 +1,8 @@
BattleFrontier_BattleTowerMultiBattleRoom_MapScripts:: @ 8243D92
- map_script 5, BattleFrontier_BattleTowerMultiBattleRoom_MapScript1_243DA7
- map_script 3, BattleFrontier_BattleTowerMultiBattleRoom_MapScript1_243DB0
- map_script 4, BattleFrontier_BattleTowerMultiBattleRoom_MapScript2_243E14
- map_script 2, BattleFrontier_BattleTowerMultiBattleRoom_MapScript2_243E23
+ map_script MAP_SCRIPT_ON_RESUME, BattleFrontier_BattleTowerMultiBattleRoom_MapScript1_243DA7
+ map_script MAP_SCRIPT_ON_TRANSITION, BattleFrontier_BattleTowerMultiBattleRoom_MapScript1_243DB0
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattleTowerMultiBattleRoom_MapScript2_243E14
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattleTowerMultiBattleRoom_MapScript2_243E23
.byte 0
BattleFrontier_BattleTowerMultiBattleRoom_MapScript1_243DA7: @ 8243DA7
@@ -64,7 +64,7 @@ BattleFrontier_BattleTowerMultiBattleRoom_EventScript_243E41:: @ 8243E41
applymovement 1, BattleFrontier_BattleTowerMultiBattleRoom_Movement_243E77
waitmovement 0
moveobjectoffscreen 1
- applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattleTowerMultiBattleRoom_Movement_2725A6
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceUp
waitmovement 0
msgbox BattleFrontier_BattleTowerMultiBattleRoom_Text_244056, MSGBOX_DEFAULT
special HealPlayerParty
@@ -104,7 +104,7 @@ BattleFrontier_BattleTowerMultiBattleRoom_EventScript_243E9D:: @ 8243E9D
BattleFrontier_BattleTowerMultiBattleRoom_EventScript_243EB5:: @ 8243EB5
msgbox BattleFrontier_BattleTowerMultiBattleRoom_Text_244149, MSGBOX_DEFAULT
closemessage
- applymovement 1, BattleFrontier_BattleTowerMultiBattleRoom_Movement_2725A6
+ applymovement 1, Common_Movement_WalkInPlaceUp
waitmovement 0
opendoor 10, 1
waitdooranim
diff --git a/data/maps/BattleFrontier_Lounge3/scripts.inc b/data/maps/BattleFrontier_Lounge3/scripts.inc
index 6a817d50a..7977e75b4 100644
--- a/data/maps/BattleFrontier_Lounge3/scripts.inc
+++ b/data/maps/BattleFrontier_Lounge3/scripts.inc
@@ -198,7 +198,7 @@ BattleFrontier_Lounge3_EventScript_261FE1:: @ 8261FE1
BattleFrontier_Lounge3_EventScript_261FF1:: @ 8261FF1
closemessage
- applymovement VAR_LAST_TALKED, BattleFrontier_Lounge3_Movement_2725A2
+ applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
diff --git a/data/maps/BattleFrontier_Mart/scripts.inc b/data/maps/BattleFrontier_Mart/scripts.inc
index 725fce863..d84b2cb0a 100644
--- a/data/maps/BattleFrontier_Mart/scripts.inc
+++ b/data/maps/BattleFrontier_Mart/scripts.inc
@@ -36,7 +36,7 @@ BattleFrontier_Mart_EventScript_267B02:: @ 8267B02
BattleFrontier_Mart_EventScript_267B0B:: @ 8267B0B
lock
- applymovement 2, BattleFrontier_Mart_Movement_2725B0
+ applymovement 2, Common_Movement_FaceDown
waitmovement 0
msgbox BattleFrontier_Mart_Text_267B8F, MSGBOX_DEFAULT
release
diff --git a/data/maps/BattleFrontier_OutsideEast/map.json b/data/maps/BattleFrontier_OutsideEast/map.json
index e119f89a0..341b20321 100644
--- a/data/maps/BattleFrontier_OutsideEast/map.json
+++ b/data/maps/BattleFrontier_OutsideEast/map.json
@@ -515,7 +515,7 @@
"y": 51,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
- "script": "BattleFrontier_OutsideEast_EventScript_271E73"
+ "script": "Common_EventScript_ShowPokemonCenterSign"
},
{
"type": "sign",
@@ -523,7 +523,7 @@
"y": 51,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
- "script": "BattleFrontier_OutsideEast_EventScript_271E73"
+ "script": "Common_EventScript_ShowPokemonCenterSign"
}
]
} \ No newline at end of file
diff --git a/data/maps/BattleFrontier_OutsideEast/scripts.inc b/data/maps/BattleFrontier_OutsideEast/scripts.inc
index 9a90f23f9..5c1af6700 100644
--- a/data/maps/BattleFrontier_OutsideEast/scripts.inc
+++ b/data/maps/BattleFrontier_OutsideEast/scripts.inc
@@ -1,6 +1,6 @@
BattleFrontier_OutsideEast_MapScripts:: @ 8242C04
- map_script 5, BattleFrontier_OutsideEast_MapScript1_242C0F
- map_script 3, BattleFrontier_OutsideEast_MapScript1_242C2D
+ map_script MAP_SCRIPT_ON_RESUME, BattleFrontier_OutsideEast_MapScript1_242C0F
+ map_script MAP_SCRIPT_ON_TRANSITION, BattleFrontier_OutsideEast_MapScript1_242C2D
.byte 0
BattleFrontier_OutsideEast_MapScript1_242C0F: @ 8242C0F
@@ -10,12 +10,12 @@ BattleFrontier_OutsideEast_MapScript1_242C0F: @ 8242C0F
BattleFrontier_OutsideEast_EventScript_242C19:: @ 8242C19
specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, 7
- goto_if_ne BattleFrontier_OutsideEast_EventScript_27374E
+ goto_if_ne Common_EventScript_NopReturn
removeobject VAR_LAST_TALKED
return
BattleFrontier_OutsideEast_MapScript1_242C2D: @ 8242C2D
- setvar VAR_0x40BC, 0
+ setvar VAR_BRAVO_TRAINER_BATTLE_TOWER_ON, 0
setflag FLAG_HIDE_BATTLE_TOWER_REPORTER
call_if_unset FLAG_DEFEATED_SUDOWOODO, BattleFrontier_OutsideEast_EventScript_242C3F
end
diff --git a/data/maps/BattleFrontier_OutsideWest/map.json b/data/maps/BattleFrontier_OutsideWest/map.json
index 6f97192ed..a2972e0b4 100644
--- a/data/maps/BattleFrontier_OutsideWest/map.json
+++ b/data/maps/BattleFrontier_OutsideWest/map.json
@@ -444,7 +444,7 @@
"y": 51,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
- "script": "BattleFrontier_OutsideWest_EventScript_271E6A"
+ "script": "Common_EventScript_ShowPokemartSign"
},
{
"type": "sign",
@@ -452,7 +452,7 @@
"y": 51,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
- "script": "BattleFrontier_OutsideWest_EventScript_271E6A"
+ "script": "Common_EventScript_ShowPokemartSign"
}
]
} \ No newline at end of file
diff --git a/data/maps/BattleFrontier_OutsideWest/scripts.inc b/data/maps/BattleFrontier_OutsideWest/scripts.inc
index da5724259..2d2bdb1c0 100644
--- a/data/maps/BattleFrontier_OutsideWest/scripts.inc
+++ b/data/maps/BattleFrontier_OutsideWest/scripts.inc
@@ -1,9 +1,9 @@
BattleFrontier_OutsideWest_MapScripts:: @ 823D3E1
- map_script 3, BattleFrontier_OutsideWest_MapScript1_23D3E7
+ map_script MAP_SCRIPT_ON_TRANSITION, BattleFrontier_OutsideWest_MapScript1_23D3E7
.byte 0
BattleFrontier_OutsideWest_MapScript1_23D3E7: @ 823D3E7
- setvar VAR_0x40BC, 0
+ setvar VAR_BRAVO_TRAINER_BATTLE_TOWER_ON, 0
setflag FLAG_HIDE_BATTLE_TOWER_REPORTER
end
@@ -63,7 +63,7 @@ BattleFrontier_OutsideWest_EventScript_23D4AE:: @ 823D4AE
BattleFrontier_OutsideWest_EventScript_23D4BA:: @ 823D4BA
closemessage
- applymovement VAR_LAST_TALKED, BattleFrontier_OutsideWest_Movement_2725AA
+ applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceDown
waitmovement 0
delay 30
hideobjectat 3, MAP_BATTLE_FRONTIER_OUTSIDE_WEST
@@ -105,7 +105,7 @@ BattleFrontier_OutsideWest_EventScript_23D518:: @ 823D518
faceplayer
message BattleFrontier_OutsideWest_Text_23DA60
waitmessage
- applymovement 18, BattleFrontier_OutsideWest_Movement_2725A0
+ applymovement 18, Common_Movement_FaceAwayPlayer
waitmovement 0
waitbuttonpress
release
@@ -126,16 +126,16 @@ BattleFrontier_OutsideWest_EventScript_23D53D:: @ 823D53D
end
BattleFrontier_OutsideWest_EventScript_23D544:: @ 823D544
- applymovement 9, BattleFrontier_OutsideWest_Movement_2725A8
+ applymovement 9, Common_Movement_WalkInPlaceRight
waitmovement 0
msgbox BattleFrontier_OutsideWest_Text_23DB7D, MSGBOX_DEFAULT
- applymovement 10, BattleFrontier_OutsideWest_Movement_2725A4
+ applymovement 10, Common_Movement_WalkInPlaceLeft
waitmovement 0
msgbox BattleFrontier_OutsideWest_Text_23DBCE, MSGBOX_DEFAULT
closemessage
delay 25
- applymovement 9, BattleFrontier_OutsideWest_Movement_2725A6
- applymovement 10, BattleFrontier_OutsideWest_Movement_2725A6
+ applymovement 9, Common_Movement_WalkInPlaceUp
+ applymovement 10, Common_Movement_WalkInPlaceUp
waitmovement 0
release
end
@@ -157,7 +157,7 @@ BattleFrontier_OutsideWest_EventScript_23D57F:: @ 823D57F
end
BattleFrontier_OutsideWest_EventScript_23D5BA:: @ 823D5BA
- applymovement 14, BattleFrontier_OutsideWest_Movement_2725A6
+ applymovement 14, Common_Movement_WalkInPlaceUp
waitmovement 0
return
@@ -298,7 +298,7 @@ BattleFrontier_OutsideWest_EventScript_23D6D7:: @ 823D6D7
faceplayer
msgbox BattleFrontier_OutsideWest_Text_23E410, MSGBOX_DEFAULT
closemessage
- applymovement 23, BattleFrontier_OutsideWest_Movement_2725A2
+ applymovement 23, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
diff --git a/data/maps/BattleFrontier_PokemonCenter_1F/scripts.inc b/data/maps/BattleFrontier_PokemonCenter_1F/scripts.inc
index 42c6db053..c99a0de38 100644
--- a/data/maps/BattleFrontier_PokemonCenter_1F/scripts.inc
+++ b/data/maps/BattleFrontier_PokemonCenter_1F/scripts.inc
@@ -1,6 +1,6 @@
BattleFrontier_PokemonCenter_1F_MapScripts:: @ 82678F9
- map_script 3, BattleFrontier_PokemonCenter_1F_MapScript1_267904
- map_script 5, BattleFrontier_PokemonCenter_1F_MapScript1_277C30
+ map_script MAP_SCRIPT_ON_TRANSITION, BattleFrontier_PokemonCenter_1F_MapScript1_267904
+ map_script MAP_SCRIPT_ON_RESUME, BattleFrontier_PokemonCenter_1F_MapScript1_277C30
.byte 0
BattleFrontier_PokemonCenter_1F_MapScript1_267904: @ 8267904
diff --git a/data/maps/BattleFrontier_PokemonCenter_2F/scripts.inc b/data/maps/BattleFrontier_PokemonCenter_2F/scripts.inc
index 7d3c3a2f1..c6ae8da2a 100644
--- a/data/maps/BattleFrontier_PokemonCenter_2F/scripts.inc
+++ b/data/maps/BattleFrontier_PokemonCenter_2F/scripts.inc
@@ -1,8 +1,8 @@
BattleFrontier_PokemonCenter_2F_MapScripts:: @ 8267AA4
- map_script 2, BattleFrontier_PokemonCenter_2F_MapScript2_276C3B
- map_script 4, BattleFrontier_PokemonCenter_2F_MapScript2_276B6C
- map_script 1, BattleFrontier_PokemonCenter_2F_MapScript1_276BBE
- map_script 3, BattleFrontier_PokemonCenter_2F_MapScript1_276ACF
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_PokemonCenter_2F_MapScript2_276C3B
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_PokemonCenter_2F_MapScript2_276B6C
+ map_script MAP_SCRIPT_ON_LOAD, BattleFrontier_PokemonCenter_2F_MapScript1_276BBE
+ map_script MAP_SCRIPT_ON_TRANSITION, BattleFrontier_PokemonCenter_2F_MapScript1_276ACF
.byte 0
BattleFrontier_PokemonCenter_2F_EventScript_267AB9:: @ 8267AB9
diff --git a/data/maps/BattleFrontier_ReceptionGate/scripts.inc b/data/maps/BattleFrontier_ReceptionGate/scripts.inc
index 5ed97bd60..574415c4c 100644
--- a/data/maps/BattleFrontier_ReceptionGate/scripts.inc
+++ b/data/maps/BattleFrontier_ReceptionGate/scripts.inc
@@ -1,6 +1,6 @@
BattleFrontier_ReceptionGate_MapScripts:: @ 82661DA
- map_script 2, BattleFrontier_ReceptionGate_MapScript2_2661E9
- map_script 3, BattleFrontier_ReceptionGate_MapScript1_2661E5
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_ReceptionGate_MapScript2_2661E9
+ map_script MAP_SCRIPT_ON_TRANSITION, BattleFrontier_ReceptionGate_MapScript1_2661E5
.byte 0
BattleFrontier_ReceptionGate_MapScript1_2661E5: @ 82661E5
@@ -15,9 +15,9 @@ BattleFrontier_ReceptionGate_EventScript_2661F3:: @ 82661F3
lockall
setvar VAR_0x40D0, 1
playse SE_PIN
- applymovement 1, BattleFrontier_ReceptionGate_Movement_272598
+ applymovement 1, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 1, BattleFrontier_ReceptionGate_Movement_27259A
+ applymovement 1, Common_Movement_Delay48
waitmovement 0
msgbox BattleFrontier_ReceptionGate_Text_266580, MSGBOX_DEFAULT
closemessage
@@ -38,14 +38,14 @@ BattleFrontier_ReceptionGate_EventScript_266229:: @ 8266229
msgbox BattleFrontier_ReceptionGate_Text_2666C6, MSGBOX_DEFAULT
msgbox BattleFrontier_ReceptionGate_Text_266703, MSGBOX_DEFAULT
closemessage
- applymovement 1, BattleFrontier_ReceptionGate_Movement_2725A6
- applymovement 2, BattleFrontier_ReceptionGate_Movement_2725A6
- applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_ReceptionGate_Movement_2725A6
+ applymovement 1, Common_Movement_WalkInPlaceUp
+ applymovement 2, Common_Movement_WalkInPlaceUp
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceUp
waitmovement 0
playse SE_PIN
- applymovement 1, BattleFrontier_ReceptionGate_Movement_272598
- applymovement 2, BattleFrontier_ReceptionGate_Movement_272598
- applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_ReceptionGate_Movement_272598
+ applymovement 1, Common_Movement_ExclamationMark
+ applymovement 2, Common_Movement_ExclamationMark
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_ExclamationMark
waitmovement 0
msgbox BattleFrontier_ReceptionGate_Text_266733, MSGBOX_DEFAULT
closemessage
diff --git a/data/maps/BattleFrontier_ScottsHouse/scripts.inc b/data/maps/BattleFrontier_ScottsHouse/scripts.inc
index 6f8d6ee4b..9278252e6 100644
--- a/data/maps/BattleFrontier_ScottsHouse/scripts.inc
+++ b/data/maps/BattleFrontier_ScottsHouse/scripts.inc
@@ -181,7 +181,7 @@ BattleFrontier_ScottsHouse_EventScript_263943:: @ 8263943
compare VAR_FACING, 3
call_if_eq BattleFrontier_ScottsHouse_EventScript_263A34
msgbox BattleFrontier_ScottsHouse_Text_263B29, MSGBOX_DEFAULT
- applymovement 1, BattleFrontier_ScottsHouse_Movement_27259E
+ applymovement 1, Common_Movement_FacePlayer
waitmovement 0
msgbox BattleFrontier_ScottsHouse_Text_263BD4, MSGBOX_DEFAULT
compare VAR_0x40D1, 13
@@ -227,22 +227,22 @@ BattleFrontier_ScottsHouse_EventScript_2639F8:: @ 82639F8
end
BattleFrontier_ScottsHouse_EventScript_263A13:: @ 8263A13
- applymovement 1, BattleFrontier_ScottsHouse_Movement_2725A6
+ applymovement 1, Common_Movement_WalkInPlaceUp
waitmovement 0
return
BattleFrontier_ScottsHouse_EventScript_263A1E:: @ 8263A1E
- applymovement 1, BattleFrontier_ScottsHouse_Movement_2725AA
+ applymovement 1, Common_Movement_WalkInPlaceDown
waitmovement 0
return
BattleFrontier_ScottsHouse_EventScript_263A29:: @ 8263A29
- applymovement 1, BattleFrontier_ScottsHouse_Movement_2725A8
+ applymovement 1, Common_Movement_WalkInPlaceRight
waitmovement 0
return
BattleFrontier_ScottsHouse_EventScript_263A34:: @ 8263A34
- applymovement 1, BattleFrontier_ScottsHouse_Movement_2725A4
+ applymovement 1, Common_Movement_WalkInPlaceLeft
waitmovement 0
return
diff --git a/data/maps/BirthIsland_Exterior/scripts.inc b/data/maps/BirthIsland_Exterior/scripts.inc
index 5bff32eb6..594790ff3 100644
--- a/data/maps/BirthIsland_Exterior/scripts.inc
+++ b/data/maps/BirthIsland_Exterior/scripts.inc
@@ -1,7 +1,7 @@
BirthIsland_Exterior_MapScripts:: @ 8267F15
- map_script 3, BirthIsland_Exterior_MapScript1_267F29
- map_script 5, BirthIsland_Exterior_MapScript1_267F65
- map_script 7, BirthIsland_Exterior_MapScript1_267F25
+ map_script MAP_SCRIPT_ON_TRANSITION, BirthIsland_Exterior_MapScript1_267F29
+ map_script MAP_SCRIPT_ON_RESUME, BirthIsland_Exterior_MapScript1_267F65
+ map_script MAP_SCRIPT_ON_RETURN_TO_FIELD, BirthIsland_Exterior_MapScript1_267F25
.byte 0
BirthIsland_Exterior_MapScript1_267F25: @ 8267F25
@@ -23,7 +23,7 @@ BirthIsland_Exterior_EventScript_267F4E:: @ 8267F4E
return
BirthIsland_Exterior_EventScript_267F55:: @ 8267F55
- goto_if_set FLAG_DEFEATED_DEOXYS, BirthIsland_Exterior_EventScript_27374E
+ goto_if_set FLAG_DEFEATED_DEOXYS, Common_EventScript_NopReturn
clearflag FLAG_HIDE_BIRTH_ISLAND_DEOXYS_TRIANGLE
clearflag FLAG_DEOXYS_ROCK_COMPLETE
return
@@ -35,7 +35,7 @@ BirthIsland_Exterior_MapScript1_267F65: @ 8267F65
BirthIsland_Exterior_EventScript_267F6F:: @ 8267F6F
specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, 7
- goto_if_ne BirthIsland_Exterior_EventScript_27374E
+ goto_if_ne Common_EventScript_NopReturn
removeobject 2
return
diff --git a/data/maps/BirthIsland_Harbor/scripts.inc b/data/maps/BirthIsland_Harbor/scripts.inc
index 1a5ef87ec..5f850ed7b 100644
--- a/data/maps/BirthIsland_Harbor/scripts.inc
+++ b/data/maps/BirthIsland_Harbor/scripts.inc
@@ -9,7 +9,7 @@ BirthIsland_Harbor_EventScript_26805D:: @ 826805D
goto_if_eq BirthIsland_Harbor_EventScript_2680A2
msgbox BirthIsland_Harbor_Text_2A6A5D, MSGBOX_DEFAULT
closemessage
- applymovement VAR_LAST_TALKED, BirthIsland_Harbor_Movement_2725AA
+ applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceDown
waitmovement 0
delay 30
hideobjectat 1, MAP_BIRTH_ISLAND_HARBOR
diff --git a/data/maps/CaveOfOrigin_1F/scripts.inc b/data/maps/CaveOfOrigin_1F/scripts.inc
index 1804e58ea..e8d722dee 100644
--- a/data/maps/CaveOfOrigin_1F/scripts.inc
+++ b/data/maps/CaveOfOrigin_1F/scripts.inc
@@ -1,5 +1,5 @@
CaveOfOrigin_1F_MapScripts:: @ 8235768
- map_script 3, CaveOfOrigin_1F_MapScript1_23576E
+ map_script MAP_SCRIPT_ON_TRANSITION, CaveOfOrigin_1F_MapScript1_23576E
.byte 0
CaveOfOrigin_1F_MapScript1_23576E: @ 823576E
diff --git a/data/maps/CaveOfOrigin_B1F/scripts.inc b/data/maps/CaveOfOrigin_B1F/scripts.inc
index 371ea1ba5..c36b60111 100644
--- a/data/maps/CaveOfOrigin_B1F/scripts.inc
+++ b/data/maps/CaveOfOrigin_B1F/scripts.inc
@@ -6,16 +6,16 @@ CaveOfOrigin_B1F_EventScript_2357A9:: @ 82357A9
faceplayer
msgbox CaveOfOrigin_B1F_Text_23586E, MSGBOX_DEFAULT
closemessage
- applymovement 1, CaveOfOrigin_B1F_Movement_2725A6
+ applymovement 1, Common_Movement_WalkInPlaceUp
waitmovement 0
delay 60
playse SE_PIN
- applymovement 1, CaveOfOrigin_B1F_Movement_272598
+ applymovement 1, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 1, CaveOfOrigin_B1F_Movement_27259A
+ applymovement 1, Common_Movement_Delay48
waitmovement 0
delay 30
- applymovement 1, CaveOfOrigin_B1F_Movement_27259E
+ applymovement 1, Common_Movement_FacePlayer
waitmovement 0
message CaveOfOrigin_B1F_Text_235ACE
waitmessage
diff --git a/data/maps/CaveOfOrigin_Entrance/scripts.inc b/data/maps/CaveOfOrigin_Entrance/scripts.inc
index 1a771ae82..53228f63c 100644
--- a/data/maps/CaveOfOrigin_Entrance/scripts.inc
+++ b/data/maps/CaveOfOrigin_Entrance/scripts.inc
@@ -1,5 +1,5 @@
CaveOfOrigin_Entrance_MapScripts:: @ 8235759
- map_script 5, CaveOfOrigin_Entrance_MapScript1_23575F
+ map_script MAP_SCRIPT_ON_RESUME, CaveOfOrigin_Entrance_MapScript1_23575F
.byte 0
CaveOfOrigin_Entrance_MapScript1_23575F: @ 823575F
diff --git a/data/maps/CaveOfOrigin_UnusedRubySapphireMap1/scripts.inc b/data/maps/CaveOfOrigin_UnusedRubySapphireMap1/scripts.inc
index 79c00f28c..e3e296945 100644
--- a/data/maps/CaveOfOrigin_UnusedRubySapphireMap1/scripts.inc
+++ b/data/maps/CaveOfOrigin_UnusedRubySapphireMap1/scripts.inc
@@ -1,5 +1,5 @@
CaveOfOrigin_UnusedRubySapphireMap1_MapScripts:: @ 8235778
- map_script 3, CaveOfOrigin_UnusedRubySapphireMap1_MapScript1_23577E
+ map_script MAP_SCRIPT_ON_TRANSITION, CaveOfOrigin_UnusedRubySapphireMap1_MapScript1_23577E
.byte 0
CaveOfOrigin_UnusedRubySapphireMap1_MapScript1_23577E: @ 823577E
diff --git a/data/maps/CaveOfOrigin_UnusedRubySapphireMap2/scripts.inc b/data/maps/CaveOfOrigin_UnusedRubySapphireMap2/scripts.inc
index 6f9812c38..417a7369a 100644
--- a/data/maps/CaveOfOrigin_UnusedRubySapphireMap2/scripts.inc
+++ b/data/maps/CaveOfOrigin_UnusedRubySapphireMap2/scripts.inc
@@ -1,5 +1,5 @@
CaveOfOrigin_UnusedRubySapphireMap2_MapScripts:: @ 8235788
- map_script 3, CaveOfOrigin_UnusedRubySapphireMap2_MapScript1_23578E
+ map_script MAP_SCRIPT_ON_TRANSITION, CaveOfOrigin_UnusedRubySapphireMap2_MapScript1_23578E
.byte 0
CaveOfOrigin_UnusedRubySapphireMap2_MapScript1_23578E: @ 823578E
diff --git a/data/maps/CaveOfOrigin_UnusedRubySapphireMap3/scripts.inc b/data/maps/CaveOfOrigin_UnusedRubySapphireMap3/scripts.inc
index baa40934a..51d9b8654 100644
--- a/data/maps/CaveOfOrigin_UnusedRubySapphireMap3/scripts.inc
+++ b/data/maps/CaveOfOrigin_UnusedRubySapphireMap3/scripts.inc
@@ -1,5 +1,5 @@
CaveOfOrigin_UnusedRubySapphireMap3_MapScripts:: @ 8235798
- map_script 3, CaveOfOrigin_UnusedRubySapphireMap3_MapScript1_23579E
+ map_script MAP_SCRIPT_ON_TRANSITION, CaveOfOrigin_UnusedRubySapphireMap3_MapScript1_23579E
.byte 0
CaveOfOrigin_UnusedRubySapphireMap3_MapScript1_23579E: @ 823579E
diff --git a/data/maps/DesertRuins/scripts.inc b/data/maps/DesertRuins/scripts.inc
index 34ae21224..75fcf061c 100644
--- a/data/maps/DesertRuins/scripts.inc
+++ b/data/maps/DesertRuins/scripts.inc
@@ -1,7 +1,7 @@
DesertRuins_MapScripts:: @ 822D95B
- map_script 5, DesertRuins_MapScript1_22D96B
- map_script 1, DesertRuins_MapScript1_22D989
- map_script 3, DesertRuins_MapScript1_22D9CA
+ map_script MAP_SCRIPT_ON_RESUME, DesertRuins_MapScript1_22D96B
+ map_script MAP_SCRIPT_ON_LOAD, DesertRuins_MapScript1_22D989
+ map_script MAP_SCRIPT_ON_TRANSITION, DesertRuins_MapScript1_22D9CA
.byte 0
DesertRuins_MapScript1_22D96B: @ 822D96B
@@ -11,7 +11,7 @@ DesertRuins_MapScript1_22D96B: @ 822D96B
DesertRuins_EventScript_22D975:: @ 822D975
specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, 7
- goto_if_ne DesertRuins_EventScript_27374E
+ goto_if_ne Common_EventScript_NopReturn
removeobject VAR_LAST_TALKED
return
diff --git a/data/maps/DesertUnderpass/scripts.inc b/data/maps/DesertUnderpass/scripts.inc
index c64597d6c..9c5e83180 100644
--- a/data/maps/DesertUnderpass/scripts.inc
+++ b/data/maps/DesertUnderpass/scripts.inc
@@ -1,5 +1,5 @@
DesertUnderpass_MapScripts:: @ 823AF37
- map_script 3, DesertUnderpass_MapScript1_23AF3D
+ map_script MAP_SCRIPT_ON_TRANSITION, DesertUnderpass_MapScript1_23AF3D
.byte 0
DesertUnderpass_MapScript1_23AF3D: @ 823AF3D
diff --git a/data/maps/DewfordTown/map.json b/data/maps/DewfordTown/map.json
index 8cd863588..32fe0c313 100644
--- a/data/maps/DewfordTown/map.json
+++ b/data/maps/DewfordTown/map.json
@@ -152,7 +152,7 @@
"y": 10,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "DewfordTown_EventScript_271E73"
+ "script": "Common_EventScript_ShowPokemonCenterSign"
},
{
"type": "sign",
@@ -160,7 +160,7 @@
"y": 10,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "DewfordTown_EventScript_271E73"
+ "script": "Common_EventScript_ShowPokemonCenterSign"
},
{
"type": "sign",
diff --git a/data/maps/DewfordTown/scripts.inc b/data/maps/DewfordTown/scripts.inc
index 6c66f4860..d1f382e36 100644
--- a/data/maps/DewfordTown/scripts.inc
+++ b/data/maps/DewfordTown/scripts.inc
@@ -1,5 +1,5 @@
DewfordTown_MapScripts:: @ 81E9507
- map_script 3, DewfordTown_MapScript1_1E950D
+ map_script MAP_SCRIPT_ON_TRANSITION, DewfordTown_MapScript1_1E950D
.byte 0
DewfordTown_MapScript1_1E950D: @ 81E950D
@@ -138,10 +138,10 @@ DewfordTown_EventScript_1E9660:: @ 81E9660
clearflag FLAG_HIDE_ROUTE_104_MR_BRINEY_BOAT
setflag FLAG_HIDE_MR_BRINEY_BOAT_DEWFORD_TOWN
hideobjectat 4, MAP_DEWFORD_TOWN
- setvar VAR_0x408E, 2
+ setvar VAR_BOARD_BRINEY_BOAT_ROUTE104_STATE, 2
resetobjectpriority EVENT_OBJ_ID_PLAYER, MAP_DEWFORD_TOWN
warp MAP_ROUTE104_MR_BRINEYS_HOUSE, 255, 5, 4
- copyvar VAR_0x4096, VAR_0x8008
+ copyvar VAR_BRINEY_LOCATION, VAR_0x8008
waitstate
release
end
@@ -177,7 +177,7 @@ DewfordTown_EventScript_1E96E7:: @ 81E96E7
call_if_unset FLAG_DELIVERED_DEVON_GOODS, DewfordTown_EventScript_1E9790
call_if_set FLAG_DELIVERED_DEVON_GOODS, DewfordTown_EventScript_1E9799
closemessage
- copyvar VAR_0x4096, VAR_0x8008
+ copyvar VAR_BRINEY_LOCATION, VAR_0x8008
resetobjectpriority EVENT_OBJ_ID_PLAYER, MAP_DEWFORD_TOWN
resetobjectpriority 2, MAP_ROUTE109
moveobjectoffscreen 2
diff --git a/data/maps/DewfordTown_Gym/scripts.inc b/data/maps/DewfordTown_Gym/scripts.inc
index 90fd3d4ae..3b39fc5d0 100644
--- a/data/maps/DewfordTown_Gym/scripts.inc
+++ b/data/maps/DewfordTown_Gym/scripts.inc
@@ -1,5 +1,5 @@
DewfordTown_Gym_MapScripts:: @ 81FC63C
- map_script 3, DewfordTown_Gym_MapScript1_1FC642
+ map_script MAP_SCRIPT_ON_TRANSITION, DewfordTown_Gym_MapScript1_1FC642
.byte 0
DewfordTown_Gym_MapScript1_1FC642: @ 81FC642
@@ -169,12 +169,12 @@ DewfordTown_Gym_EventScript_1FC7F7:: @ 81FC7F7
call DewfordTown_Gym_EventScript_1FC75D
message DewfordTown_Gym_Text_1FD07D
waitmessage
- call DewfordTown_Gym_EventScript_27207E
+ call Common_EventScript_PlayGymBadgeFanfare
msgbox DewfordTown_Gym_Text_1FD0A8, MSGBOX_DEFAULT
setflag FLAG_DEFEATED_DEWFORD_GYM
setflag FLAG_BADGE02_GET
- addvar VAR_0x4085, 1
- compare VAR_0x4085, 6
+ addvar VAR_PETALBURG_GYM_STATE, 1
+ compare VAR_PETALBURG_GYM_STATE, 6
call_if_eq DewfordTown_Gym_EventScript_271E84
setvar VAR_0x8008, 2
call DewfordTown_Gym_EventScript_271F43
@@ -195,7 +195,7 @@ DewfordTown_Gym_EventScript_1FC7F7:: @ 81FC7F7
DewfordTown_Gym_EventScript_1FC855:: @ 81FC855
giveitem_std ITEM_TM08
compare VAR_RESULT, 0
- goto_if_eq DewfordTown_Gym_EventScript_27205E
+ goto_if_eq Common_EventScript_BagIsFull
msgbox DewfordTown_Gym_Text_1FD181, MSGBOX_DEFAULT
setflag FLAG_RECEIVED_TM08
return
@@ -203,7 +203,7 @@ DewfordTown_Gym_EventScript_1FC855:: @ 81FC855
DewfordTown_Gym_EventScript_1FC878:: @ 81FC878
giveitem_std ITEM_TM08
compare VAR_RESULT, 0
- goto_if_eq DewfordTown_Gym_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
msgbox DewfordTown_Gym_Text_1FD181, MSGBOX_DEFAULT
setflag FLAG_RECEIVED_TM08
release
diff --git a/data/maps/DewfordTown_Hall/scripts.inc b/data/maps/DewfordTown_Hall/scripts.inc
index 0d9cf514c..22bf5ed6a 100644
--- a/data/maps/DewfordTown_Hall/scripts.inc
+++ b/data/maps/DewfordTown_Hall/scripts.inc
@@ -53,7 +53,7 @@ DewfordTown_Hall_EventScript_1FD547:: @ 81FD547
call DewfordTown_Hall_EventScript_271E8B
msgbox DewfordTown_Hall_Text_1FDA5C, MSGBOX_DEFAULT
closemessage
- applymovement 4, DewfordTown_Hall_Movement_2725A6
+ applymovement 4, Common_Movement_WalkInPlaceUp
waitmovement 0
release
end
@@ -64,7 +64,7 @@ DewfordTown_Hall_EventScript_1FD563:: @ 81FD563
call DewfordTown_Hall_EventScript_271E8B
msgbox DewfordTown_Hall_Text_1FDA99, MSGBOX_DEFAULT
closemessage
- applymovement 5, DewfordTown_Hall_Movement_2725A6
+ applymovement 5, Common_Movement_WalkInPlaceUp
waitmovement 0
release
end
@@ -200,7 +200,7 @@ DewfordTown_Hall_EventScript_1FD73A:: @ 81FD73A
DewfordTown_Hall_EventScript_1FD75B:: @ 81FD75B
compare VAR_FACING, 4
goto_if_eq DewfordTown_Hall_EventScript_1FD739
- applymovement EVENT_OBJ_ID_PLAYER, DewfordTown_Hall_Movement_2725A8
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceRight
waitmovement 0
return
@@ -224,19 +224,19 @@ DewfordTown_Hall_EventScript_1FD793:: @ 81FD793
return
DewfordTown_Hall_EventScript_1FD7AA:: @ 81FD7AA
- applymovement EVENT_OBJ_ID_PLAYER, DewfordTown_Hall_Movement_2725A6
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceUp
waitmovement 0
return
DewfordTown_Hall_EventScript_1FD7B5:: @ 81FD7B5
- applymovement EVENT_OBJ_ID_PLAYER, DewfordTown_Hall_Movement_2725AA
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceDown
waitmovement 0
return
DewfordTown_Hall_EventScript_1FD7C0:: @ 81FD7C0
compare VAR_FACING, 3
goto_if_eq DewfordTown_Hall_EventScript_1FD739
- applymovement EVENT_OBJ_ID_PLAYER, DewfordTown_Hall_Movement_2725A4
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceLeft
waitmovement 0
return
@@ -256,7 +256,7 @@ DewfordTown_Hall_EventScript_1FD7DA:: @ 81FD7DA
msgbox DewfordTown_Hall_Text_1FE142, MSGBOX_DEFAULT
giveitem_std ITEM_TM36
compare VAR_RESULT, 0
- goto_if_eq DewfordTown_Hall_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
setflag FLAG_RECEIVED_TM36
release
end
diff --git a/data/maps/DewfordTown_PokemonCenter_1F/scripts.inc b/data/maps/DewfordTown_PokemonCenter_1F/scripts.inc
index e21fd13af..b4f5fc4c6 100644
--- a/data/maps/DewfordTown_PokemonCenter_1F/scripts.inc
+++ b/data/maps/DewfordTown_PokemonCenter_1F/scripts.inc
@@ -1,6 +1,6 @@
DewfordTown_PokemonCenter_1F_MapScripts:: @ 81FC523
- map_script 3, DewfordTown_PokemonCenter_1F_MapScript1_1FC52E
- map_script 5, DewfordTown_PokemonCenter_1F_MapScript1_277C30
+ map_script MAP_SCRIPT_ON_TRANSITION, DewfordTown_PokemonCenter_1F_MapScript1_1FC52E
+ map_script MAP_SCRIPT_ON_RESUME, DewfordTown_PokemonCenter_1F_MapScript1_277C30
.byte 0
DewfordTown_PokemonCenter_1F_MapScript1_1FC52E: @ 81FC52E
diff --git a/data/maps/DewfordTown_PokemonCenter_2F/scripts.inc b/data/maps/DewfordTown_PokemonCenter_2F/scripts.inc
index f2a30ecd2..58b0b63a1 100644
--- a/data/maps/DewfordTown_PokemonCenter_2F/scripts.inc
+++ b/data/maps/DewfordTown_PokemonCenter_2F/scripts.inc
@@ -1,8 +1,8 @@
DewfordTown_PokemonCenter_2F_MapScripts:: @ 81FC615
- map_script 2, DewfordTown_PokemonCenter_2F_MapScript2_276C3B
- map_script 4, DewfordTown_PokemonCenter_2F_MapScript2_276B6C
- map_script 1, DewfordTown_PokemonCenter_2F_MapScript1_276BBE
- map_script 3, DewfordTown_PokemonCenter_2F_MapScript1_276ACF
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, DewfordTown_PokemonCenter_2F_MapScript2_276C3B
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, DewfordTown_PokemonCenter_2F_MapScript2_276B6C
+ map_script MAP_SCRIPT_ON_LOAD, DewfordTown_PokemonCenter_2F_MapScript1_276BBE
+ map_script MAP_SCRIPT_ON_TRANSITION, DewfordTown_PokemonCenter_2F_MapScript1_276ACF
.byte 0
DewfordTown_PokemonCenter_2F_EventScript_1FC62A:: @ 81FC62A
diff --git a/data/maps/EverGrandeCity/map.json b/data/maps/EverGrandeCity/map.json
index 502aae2fc..90175db1d 100644
--- a/data/maps/EverGrandeCity/map.json
+++ b/data/maps/EverGrandeCity/map.json
@@ -166,7 +166,7 @@
"y": 48,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "EverGrandeCity_EventScript_271E73"
+ "script": "Common_EventScript_ShowPokemonCenterSign"
},
{
"type": "sign",
@@ -190,7 +190,7 @@
"y": 48,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "EverGrandeCity_EventScript_271E73"
+ "script": "Common_EventScript_ShowPokemonCenterSign"
}
]
} \ No newline at end of file
diff --git a/data/maps/EverGrandeCity/scripts.inc b/data/maps/EverGrandeCity/scripts.inc
index 75327b839..ffbf5a6cd 100644
--- a/data/maps/EverGrandeCity/scripts.inc
+++ b/data/maps/EverGrandeCity/scripts.inc
@@ -1,9 +1,9 @@
EverGrandeCity_MapScripts:: @ 81E7D1B
- map_script 3, EverGrandeCity_MapScript1_1E7D21
+ map_script MAP_SCRIPT_ON_TRANSITION, EverGrandeCity_MapScript1_1E7D21
.byte 0
EverGrandeCity_MapScript1_1E7D21: @ 81E7D21
- call_if_set FLAG_SYS_WEATHER_CTRL, EverGrandeCity_EventScript_27207A
+ call_if_set FLAG_SYS_WEATHER_CTRL, Common_EventScript_SetWeather15
end
EverGrandeCity_EventScript_1E7D2B:: @ 81E7D2B
diff --git a/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc b/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc
index 149c54cd8..49411aeb4 100644
--- a/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc
+++ b/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc
@@ -1,11 +1,11 @@
EverGrandeCity_ChampionsRoom_MapScripts:: @ 82289EF
- map_script 3, EverGrandeCity_ChampionsRoom_MapScript1_2289FF
- map_script 4, EverGrandeCity_ChampionsRoom_MapScript2_228A05
- map_script 2, EverGrandeCity_ChampionsRoom_MapScript2_228A14
+ map_script MAP_SCRIPT_ON_TRANSITION, EverGrandeCity_ChampionsRoom_MapScript1_2289FF
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, EverGrandeCity_ChampionsRoom_MapScript2_228A05
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, EverGrandeCity_ChampionsRoom_MapScript2_228A14
.byte 0
EverGrandeCity_ChampionsRoom_MapScript1_2289FF: @ 82289FF
- call EverGrandeCity_ChampionsRoom_EventScript_271ED7
+ call Common_EventScript_SetupRivalGender
end
EverGrandeCity_ChampionsRoom_MapScript2_228A05: @ 8228A05
@@ -78,9 +78,9 @@ EverGrandeCity_ChampionsRoom_EventScript_228AC6:: @ 8228AC6
msgbox EverGrandeCity_ChampionsRoom_Text_2290CA, MSGBOX_DEFAULT
delay 40
playse SE_PIN
- applymovement 2, EverGrandeCity_ChampionsRoom_Movement_272598
+ applymovement 2, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 2, EverGrandeCity_ChampionsRoom_Movement_27259A
+ applymovement 2, Common_Movement_Delay48
waitmovement 0
call EverGrandeCity_ChampionsRoom_EventScript_228C12
msgbox EverGrandeCity_ChampionsRoom_Text_22910B, MSGBOX_DEFAULT
@@ -91,9 +91,9 @@ EverGrandeCity_ChampionsRoom_EventScript_228AFB:: @ 8228AFB
msgbox EverGrandeCity_ChampionsRoom_Text_229152, MSGBOX_DEFAULT
delay 40
playse SE_PIN
- applymovement 2, EverGrandeCity_ChampionsRoom_Movement_272598
+ applymovement 2, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 2, EverGrandeCity_ChampionsRoom_Movement_27259A
+ applymovement 2, Common_Movement_Delay48
waitmovement 0
call EverGrandeCity_ChampionsRoom_EventScript_228C12
msgbox EverGrandeCity_ChampionsRoom_Text_2291A2, MSGBOX_DEFAULT
@@ -105,26 +105,26 @@ EverGrandeCity_ChampionsRoom_EventScript_228B30:: @ 8228B30
addobject 3
applymovement 3, EverGrandeCity_ChampionsRoom_Movement_228C43
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, EverGrandeCity_ChampionsRoom_Movement_2725A8
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceRight
waitmovement 0
msgbox EverGrandeCity_ChampionsRoom_Text_2291E6, MSGBOX_DEFAULT
call EverGrandeCity_ChampionsRoom_EventScript_272184
msgbox EverGrandeCity_ChampionsRoom_Text_22934D, MSGBOX_DEFAULT
- applymovement 1, EverGrandeCity_ChampionsRoom_Movement_2725A6
+ applymovement 1, Common_Movement_WalkInPlaceUp
waitmovement 0
delay 20
- applymovement 1, EverGrandeCity_ChampionsRoom_Movement_2725AA
+ applymovement 1, Common_Movement_WalkInPlaceDown
waitmovement 0
msgbox EverGrandeCity_ChampionsRoom_Text_229399, MSGBOX_DEFAULT
closemessage
delay 30
applymovement 1, EverGrandeCity_ChampionsRoom_Movement_228C3B
applymovement EVENT_OBJ_ID_PLAYER, EverGrandeCity_ChampionsRoom_Movement_228C1D
- applymovement 3, EverGrandeCity_ChampionsRoom_Movement_2725A6
+ applymovement 3, Common_Movement_WalkInPlaceUp
applymovement 2, EverGrandeCity_ChampionsRoom_Movement_228C38
waitmovement 0
delay 20
- applymovement EVENT_OBJ_ID_PLAYER, EverGrandeCity_ChampionsRoom_Movement_2725AA
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceDown
waitmovement 0
msgbox EverGrandeCity_ChampionsRoom_Text_2293EB, MSGBOX_DEFAULT
checkplayergender
@@ -153,7 +153,7 @@ EverGrandeCity_ChampionsRoom_EventScript_228BF4:: @ 8228BF4
EverGrandeCity_ChampionsRoom_EventScript_228BFD:: @ 8228BFD
applymovement 2, EverGrandeCity_ChampionsRoom_Movement_228C26
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, EverGrandeCity_ChampionsRoom_Movement_2725A4
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceLeft
waitmovement 0
return
diff --git a/data/maps/EverGrandeCity_DrakesRoom/scripts.inc b/data/maps/EverGrandeCity_DrakesRoom/scripts.inc
index 2c0949842..ed8d82be2 100644
--- a/data/maps/EverGrandeCity_DrakesRoom/scripts.inc
+++ b/data/maps/EverGrandeCity_DrakesRoom/scripts.inc
@@ -1,7 +1,7 @@
EverGrandeCity_DrakesRoom_MapScripts:: @ 822869C
- map_script 2, EverGrandeCity_DrakesRoom_MapScript2_2286BB
- map_script 1, EverGrandeCity_DrakesRoom_MapScript1_2286D2
- map_script 4, EverGrandeCity_DrakesRoom_MapScript2_227F3E
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, EverGrandeCity_DrakesRoom_MapScript2_2286BB
+ map_script MAP_SCRIPT_ON_LOAD, EverGrandeCity_DrakesRoom_MapScript1_2286D2
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, EverGrandeCity_DrakesRoom_MapScript2_227F3E
.byte 0
EverGrandeCity_DrakesRoom_MapScript2_2286AC: @ 82286AC
@@ -13,19 +13,19 @@ EverGrandeCity_DrakesRoom_EventScript_2286B6:: @ 82286B6
end
EverGrandeCity_DrakesRoom_MapScript2_2286BB: @ 82286BB
- map_script_2 VAR_0x409C, 3, EverGrandeCity_DrakesRoom_EventScript_2286C5
+ map_script_2 VAR_ELITE_4_STATE, 3, EverGrandeCity_DrakesRoom_EventScript_2286C5
.2byte 0
EverGrandeCity_DrakesRoom_EventScript_2286C5:: @ 82286C5
lockall
call EverGrandeCity_DrakesRoom_EventScript_272475
- setvar VAR_0x409C, 4
+ setvar VAR_ELITE_4_STATE, 4
releaseall
end
EverGrandeCity_DrakesRoom_MapScript1_2286D2: @ 82286D2
call_if_set FLAG_DEFEATED_ELITE_4_DRAKE, EverGrandeCity_DrakesRoom_EventScript_2286E7
- compare VAR_0x409C, 4
+ compare VAR_ELITE_4_STATE, 4
call_if_eq EverGrandeCity_DrakesRoom_EventScript_2286ED
end
diff --git a/data/maps/EverGrandeCity_GlaciasRoom/scripts.inc b/data/maps/EverGrandeCity_GlaciasRoom/scripts.inc
index 7510f468f..24960d95e 100644
--- a/data/maps/EverGrandeCity_GlaciasRoom/scripts.inc
+++ b/data/maps/EverGrandeCity_GlaciasRoom/scripts.inc
@@ -1,7 +1,7 @@
EverGrandeCity_GlaciasRoom_MapScripts:: @ 8228412
- map_script 2, EverGrandeCity_GlaciasRoom_MapScript2_228431
- map_script 1, EverGrandeCity_GlaciasRoom_MapScript1_228448
- map_script 4, EverGrandeCity_GlaciasRoom_MapScript2_228422
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, EverGrandeCity_GlaciasRoom_MapScript2_228431
+ map_script MAP_SCRIPT_ON_LOAD, EverGrandeCity_GlaciasRoom_MapScript1_228448
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, EverGrandeCity_GlaciasRoom_MapScript2_228422
.byte 0
EverGrandeCity_GlaciasRoom_MapScript2_228422: @ 8228422
@@ -13,19 +13,19 @@ EverGrandeCity_GlaciasRoom_EventScript_22842C:: @ 822842C
end
EverGrandeCity_GlaciasRoom_MapScript2_228431: @ 8228431
- map_script_2 VAR_0x409C, 2, EverGrandeCity_GlaciasRoom_EventScript_22843B
+ map_script_2 VAR_ELITE_4_STATE, 2, EverGrandeCity_GlaciasRoom_EventScript_22843B
.2byte 0
EverGrandeCity_GlaciasRoom_EventScript_22843B:: @ 822843B
lockall
call EverGrandeCity_GlaciasRoom_EventScript_272475
- setvar VAR_0x409C, 3
+ setvar VAR_ELITE_4_STATE, 3
releaseall
end
EverGrandeCity_GlaciasRoom_MapScript1_228448: @ 8228448
call_if_set FLAG_DEFEATED_ELITE_4_GLACIA, EverGrandeCity_GlaciasRoom_EventScript_22845D
- compare VAR_0x409C, 3
+ compare VAR_ELITE_4_STATE, 3
call_if_eq EverGrandeCity_GlaciasRoom_EventScript_228463
end
diff --git a/data/maps/EverGrandeCity_Hall1/scripts.inc b/data/maps/EverGrandeCity_Hall1/scripts.inc
index a5b7764d7..d9a7adfe3 100644
--- a/data/maps/EverGrandeCity_Hall1/scripts.inc
+++ b/data/maps/EverGrandeCity_Hall1/scripts.inc
@@ -1,5 +1,5 @@
EverGrandeCity_Hall1_MapScripts:: @ 8229569
- map_script 4, EverGrandeCity_Hall1_MapScript2_22956F
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, EverGrandeCity_Hall1_MapScript2_22956F
.byte 0
EverGrandeCity_Hall1_MapScript2_22956F: @ 822956F
diff --git a/data/maps/EverGrandeCity_Hall2/scripts.inc b/data/maps/EverGrandeCity_Hall2/scripts.inc
index 565d68168..b831d0fd5 100644
--- a/data/maps/EverGrandeCity_Hall2/scripts.inc
+++ b/data/maps/EverGrandeCity_Hall2/scripts.inc
@@ -1,5 +1,5 @@
EverGrandeCity_Hall2_MapScripts:: @ 822957E
- map_script 4, EverGrandeCity_Hall2_MapScript2_229584
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, EverGrandeCity_Hall2_MapScript2_229584
.byte 0
EverGrandeCity_Hall2_MapScript2_229584: @ 8229584
diff --git a/data/maps/EverGrandeCity_Hall3/scripts.inc b/data/maps/EverGrandeCity_Hall3/scripts.inc
index 85d0bb2f6..d75cf95b6 100644
--- a/data/maps/EverGrandeCity_Hall3/scripts.inc
+++ b/data/maps/EverGrandeCity_Hall3/scripts.inc
@@ -1,5 +1,5 @@
EverGrandeCity_Hall3_MapScripts:: @ 8229593
- map_script 4, EverGrandeCity_Hall3_MapScript2_229599
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, EverGrandeCity_Hall3_MapScript2_229599
.byte 0
EverGrandeCity_Hall3_MapScript2_229599: @ 8229599
diff --git a/data/maps/EverGrandeCity_Hall4/scripts.inc b/data/maps/EverGrandeCity_Hall4/scripts.inc
index 29f56829a..faf20646a 100644
--- a/data/maps/EverGrandeCity_Hall4/scripts.inc
+++ b/data/maps/EverGrandeCity_Hall4/scripts.inc
@@ -1,5 +1,5 @@
EverGrandeCity_Hall4_MapScripts:: @ 82295A8
- map_script 4, EverGrandeCity_Hall4_MapScript2_2295AE
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, EverGrandeCity_Hall4_MapScript2_2295AE
.byte 0
EverGrandeCity_Hall4_MapScript2_2295AE: @ 82295AE
diff --git a/data/maps/EverGrandeCity_Hall5/scripts.inc b/data/maps/EverGrandeCity_Hall5/scripts.inc
index d492c28d2..e586958c2 100644
--- a/data/maps/EverGrandeCity_Hall5/scripts.inc
+++ b/data/maps/EverGrandeCity_Hall5/scripts.inc
@@ -1,5 +1,5 @@
EverGrandeCity_Hall5_MapScripts:: @ 82295BD
- map_script 4, EverGrandeCity_Hall5_MapScript2_2295C3
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, EverGrandeCity_Hall5_MapScript2_2295C3
.byte 0
EverGrandeCity_Hall5_MapScript2_2295C3: @ 82295C3
diff --git a/data/maps/EverGrandeCity_HallOfFame/scripts.inc b/data/maps/EverGrandeCity_HallOfFame/scripts.inc
index ddb9ade89..f61547c14 100644
--- a/data/maps/EverGrandeCity_HallOfFame/scripts.inc
+++ b/data/maps/EverGrandeCity_HallOfFame/scripts.inc
@@ -1,6 +1,6 @@
EverGrandeCity_HallOfFame_MapScripts:: @ 822982C
- map_script 2, EverGrandeCity_HallOfFame_MapScript2_229846
- map_script 4, EverGrandeCity_HallOfFame_MapScript2_229837
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, EverGrandeCity_HallOfFame_MapScript2_229846
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, EverGrandeCity_HallOfFame_MapScript2_229837
.byte 0
EverGrandeCity_HallOfFame_MapScript2_229837: @ 8229837
@@ -20,8 +20,8 @@ EverGrandeCity_HallOfFame_EventScript_229850:: @ 8229850
applymovement 1, EverGrandeCity_HallOfFame_Movement_229901
applymovement EVENT_OBJ_ID_PLAYER, EverGrandeCity_HallOfFame_Movement_229901
waitmovement 0
- applymovement 1, EverGrandeCity_HallOfFame_Movement_2725A8
- applymovement EVENT_OBJ_ID_PLAYER, EverGrandeCity_HallOfFame_Movement_2725A4
+ applymovement 1, Common_Movement_WalkInPlaceRight
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceLeft
waitmovement 0
msgbox EverGrandeCity_HallOfFame_Text_22990E, MSGBOX_DEFAULT
closemessage
@@ -29,13 +29,13 @@ EverGrandeCity_HallOfFame_EventScript_229850:: @ 8229850
applymovement EVENT_OBJ_ID_PLAYER, EverGrandeCity_HallOfFame_Movement_229908
waitmovement 0
delay 20
- applymovement 1, EverGrandeCity_HallOfFame_Movement_2725A8
- applymovement EVENT_OBJ_ID_PLAYER, EverGrandeCity_HallOfFame_Movement_2725A4
+ applymovement 1, Common_Movement_WalkInPlaceRight
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceLeft
waitmovement 0
msgbox EverGrandeCity_HallOfFame_Text_2299A3, MSGBOX_DEFAULT
closemessage
- applymovement 1, EverGrandeCity_HallOfFame_Movement_2725A6
- applymovement EVENT_OBJ_ID_PLAYER, EverGrandeCity_HallOfFame_Movement_2725A6
+ applymovement 1, Common_Movement_WalkInPlaceUp
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceUp
waitmovement 0
delay 20
dofieldeffect 62
diff --git a/data/maps/EverGrandeCity_PhoebesRoom/scripts.inc b/data/maps/EverGrandeCity_PhoebesRoom/scripts.inc
index 77f951d76..971eff7ca 100644
--- a/data/maps/EverGrandeCity_PhoebesRoom/scripts.inc
+++ b/data/maps/EverGrandeCity_PhoebesRoom/scripts.inc
@@ -1,7 +1,7 @@
EverGrandeCity_PhoebesRoom_MapScripts:: @ 8228174
- map_script 1, EverGrandeCity_PhoebesRoom_MapScript1_2281AA
- map_script 4, EverGrandeCity_PhoebesRoom_MapScript2_228184
- map_script 2, EverGrandeCity_PhoebesRoom_MapScript2_228193
+ map_script MAP_SCRIPT_ON_LOAD, EverGrandeCity_PhoebesRoom_MapScript1_2281AA
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, EverGrandeCity_PhoebesRoom_MapScript2_228184
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, EverGrandeCity_PhoebesRoom_MapScript2_228193
.byte 0
EverGrandeCity_PhoebesRoom_MapScript2_228184: @ 8228184
@@ -13,19 +13,19 @@ EverGrandeCity_PhoebesRoom_EventScript_22818E:: @ 822818E
end
EverGrandeCity_PhoebesRoom_MapScript2_228193: @ 8228193
- map_script_2 VAR_0x409C, 1, EverGrandeCity_PhoebesRoom_EventScript_22819D
+ map_script_2 VAR_ELITE_4_STATE, 1, EverGrandeCity_PhoebesRoom_EventScript_22819D
.2byte 0
EverGrandeCity_PhoebesRoom_EventScript_22819D:: @ 822819D
lockall
call EverGrandeCity_PhoebesRoom_EventScript_272475
- setvar VAR_0x409C, 2
+ setvar VAR_ELITE_4_STATE, 2
releaseall
end
EverGrandeCity_PhoebesRoom_MapScript1_2281AA: @ 82281AA
call_if_set FLAG_DEFEATED_ELITE_4_PHOEBE, EverGrandeCity_PhoebesRoom_EventScript_2281BF
- compare VAR_0x409C, 2
+ compare VAR_ELITE_4_STATE, 2
call_if_eq EverGrandeCity_PhoebesRoom_EventScript_2281C5
end
diff --git a/data/maps/EverGrandeCity_PokemonCenter_1F/scripts.inc b/data/maps/EverGrandeCity_PokemonCenter_1F/scripts.inc
index 0ec0acbb2..827c08e54 100644
--- a/data/maps/EverGrandeCity_PokemonCenter_1F/scripts.inc
+++ b/data/maps/EverGrandeCity_PokemonCenter_1F/scripts.inc
@@ -1,6 +1,6 @@
EverGrandeCity_PokemonCenter_1F_MapScripts:: @ 8229A34
- map_script 3, EverGrandeCity_PokemonCenter_1F_MapScript1_229A3F
- map_script 5, EverGrandeCity_PokemonCenter_1F_MapScript1_277C30
+ map_script MAP_SCRIPT_ON_TRANSITION, EverGrandeCity_PokemonCenter_1F_MapScript1_229A3F
+ map_script MAP_SCRIPT_ON_RESUME, EverGrandeCity_PokemonCenter_1F_MapScript1_277C30
.byte 0
EverGrandeCity_PokemonCenter_1F_MapScript1_229A3F: @ 8229A3F
@@ -9,7 +9,7 @@ EverGrandeCity_PokemonCenter_1F_MapScript1_229A3F: @ 8229A3F
end
EverGrandeCity_PokemonCenter_1F_EventScript_229A4C:: @ 8229A4C
- goto_if_unset FLAG_BADGE06_GET, EverGrandeCity_PokemonCenter_1F_EventScript_27374E
+ goto_if_unset FLAG_BADGE06_GET, Common_EventScript_NopReturn
clearflag FLAG_HIDE_EVER_GRANDE_POKEMON_CENTER_1F_SCOTT
return
diff --git a/data/maps/EverGrandeCity_PokemonCenter_2F/scripts.inc b/data/maps/EverGrandeCity_PokemonCenter_2F/scripts.inc
index 09d382b2b..40408c1f8 100644
--- a/data/maps/EverGrandeCity_PokemonCenter_2F/scripts.inc
+++ b/data/maps/EverGrandeCity_PokemonCenter_2F/scripts.inc
@@ -1,8 +1,8 @@
EverGrandeCity_PokemonCenter_2F_MapScripts:: @ 8229CE0
- map_script 2, EverGrandeCity_PokemonCenter_2F_MapScript2_276C3B
- map_script 4, EverGrandeCity_PokemonCenter_2F_MapScript2_276B6C
- map_script 1, EverGrandeCity_PokemonCenter_2F_MapScript1_276BBE
- map_script 3, EverGrandeCity_PokemonCenter_2F_MapScript1_276ACF
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, EverGrandeCity_PokemonCenter_2F_MapScript2_276C3B
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, EverGrandeCity_PokemonCenter_2F_MapScript2_276B6C
+ map_script MAP_SCRIPT_ON_LOAD, EverGrandeCity_PokemonCenter_2F_MapScript1_276BBE
+ map_script MAP_SCRIPT_ON_TRANSITION, EverGrandeCity_PokemonCenter_2F_MapScript1_276ACF
.byte 0
EverGrandeCity_PokemonCenter_2F_EventScript_229CF5:: @ 8229CF5
diff --git a/data/maps/EverGrandeCity_PokemonLeague_1F/scripts.inc b/data/maps/EverGrandeCity_PokemonLeague_1F/scripts.inc
index ce4be66f8..95345af5c 100644
--- a/data/maps/EverGrandeCity_PokemonLeague_1F/scripts.inc
+++ b/data/maps/EverGrandeCity_PokemonLeague_1F/scripts.inc
@@ -1,6 +1,6 @@
EverGrandeCity_PokemonLeague_1F_MapScripts:: @ 82295D2
- map_script 3, EverGrandeCity_PokemonLeague_1F_MapScript1_2295DD
- map_script 5, EverGrandeCity_PokemonLeague_1F_MapScript1_277C30
+ map_script MAP_SCRIPT_ON_TRANSITION, EverGrandeCity_PokemonLeague_1F_MapScript1_2295DD
+ map_script MAP_SCRIPT_ON_RESUME, EverGrandeCity_PokemonLeague_1F_MapScript1_277C30
.byte 0
EverGrandeCity_PokemonLeague_1F_MapScript1_2295DD: @ 82295DD
@@ -90,11 +90,11 @@ EverGrandeCity_PokemonLeague_1F_EventScript_2296AE:: @ 82296AE
end
EverGrandeCity_PokemonLeague_1F_EventScript_2296BB:: @ 82296BB
- applymovement VAR_LAST_TALKED, EverGrandeCity_PokemonLeague_1F_Movement_27259E
+ applymovement VAR_LAST_TALKED, Common_Movement_FacePlayer
waitmovement 0
msgbox EverGrandeCity_PokemonLeague_1F_Text_2297EF, MSGBOX_DEFAULT
closemessage
- applymovement VAR_LAST_TALKED, EverGrandeCity_PokemonLeague_1F_Movement_2725A2
+ applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection
waitmovement 0
releaseall
end
diff --git a/data/maps/EverGrandeCity_PokemonLeague_2F/scripts.inc b/data/maps/EverGrandeCity_PokemonLeague_2F/scripts.inc
index d3a77a051..2d2d916a3 100644
--- a/data/maps/EverGrandeCity_PokemonLeague_2F/scripts.inc
+++ b/data/maps/EverGrandeCity_PokemonLeague_2F/scripts.inc
@@ -1,8 +1,8 @@
EverGrandeCity_PokemonLeague_2F_MapScripts:: @ 8229D07
- map_script 2, EverGrandeCity_PokemonLeague_2F_MapScript2_276C3B
- map_script 4, EverGrandeCity_PokemonLeague_2F_MapScript2_276B6C
- map_script 1, EverGrandeCity_PokemonLeague_2F_MapScript1_276BBE
- map_script 3, EverGrandeCity_PokemonLeague_2F_MapScript1_276ACF
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, EverGrandeCity_PokemonLeague_2F_MapScript2_276C3B
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, EverGrandeCity_PokemonLeague_2F_MapScript2_276B6C
+ map_script MAP_SCRIPT_ON_LOAD, EverGrandeCity_PokemonLeague_2F_MapScript1_276BBE
+ map_script MAP_SCRIPT_ON_TRANSITION, EverGrandeCity_PokemonLeague_2F_MapScript1_276ACF
.byte 0
EverGrandeCity_PokemonLeague_2F_EventScript_229D1C:: @ 8229D1C
diff --git a/data/maps/EverGrandeCity_SidneysRoom/scripts.inc b/data/maps/EverGrandeCity_SidneysRoom/scripts.inc
index 9152254b3..1713a6d3e 100644
--- a/data/maps/EverGrandeCity_SidneysRoom/scripts.inc
+++ b/data/maps/EverGrandeCity_SidneysRoom/scripts.inc
@@ -1,8 +1,8 @@
EverGrandeCity_SidneysRoom_MapScripts:: @ 8227F01
- map_script 1, EverGrandeCity_SidneysRoom_MapScript1_227F1D
- map_script 4, EverGrandeCity_SidneysRoom_MapScript2_227F3E
- map_script 3, EverGrandeCity_SidneysRoom_MapScript1_227F16
- map_script 2, EverGrandeCity_SidneysRoom_MapScript2_227F4D
+ map_script MAP_SCRIPT_ON_LOAD, EverGrandeCity_SidneysRoom_MapScript1_227F1D
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, EverGrandeCity_SidneysRoom_MapScript2_227F3E
+ map_script MAP_SCRIPT_ON_TRANSITION, EverGrandeCity_SidneysRoom_MapScript1_227F16
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, EverGrandeCity_SidneysRoom_MapScript2_227F4D
.byte 0
EverGrandeCity_SidneysRoom_MapScript1_227F16: @ 8227F16
@@ -12,7 +12,7 @@ EverGrandeCity_SidneysRoom_MapScript1_227F16: @ 8227F16
EverGrandeCity_SidneysRoom_MapScript1_227F1D: @ 8227F1D
call_if_set FLAG_DEFEATED_ELITE_4_SYDNEY, EverGrandeCity_SidneysRoom_EventScript_227F32
- compare VAR_0x409C, 1
+ compare VAR_ELITE_4_STATE, 1
call_if_eq EverGrandeCity_SidneysRoom_EventScript_227F38
end
@@ -34,13 +34,13 @@ EverGrandeCity_SidneysRoom_EventScript_227F48:: @ 8227F48
end
EverGrandeCity_SidneysRoom_MapScript2_227F4D: @ 8227F4D
- map_script_2 VAR_0x409C, 0, EverGrandeCity_SidneysRoom_EventScript_227F57
+ map_script_2 VAR_ELITE_4_STATE, 0, EverGrandeCity_SidneysRoom_EventScript_227F57
.2byte 0
EverGrandeCity_SidneysRoom_EventScript_227F57:: @ 8227F57
lockall
call EverGrandeCity_SidneysRoom_EventScript_272475
- setvar VAR_0x409C, 1
+ setvar VAR_ELITE_4_STATE, 1
releaseall
end
diff --git a/data/maps/FallarborTown/map.json b/data/maps/FallarborTown/map.json
index 4afffa73c..863319184 100644
--- a/data/maps/FallarborTown/map.json
+++ b/data/maps/FallarborTown/map.json
@@ -123,7 +123,7 @@
"y": 15,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "FallarborTown_EventScript_271E6A"
+ "script": "Common_EventScript_ShowPokemartSign"
},
{
"type": "sign",
@@ -131,7 +131,7 @@
"y": 7,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "FallarborTown_EventScript_271E73"
+ "script": "Common_EventScript_ShowPokemonCenterSign"
},
{
"type": "sign",
@@ -147,7 +147,7 @@
"y": 7,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "FallarborTown_EventScript_271E73"
+ "script": "Common_EventScript_ShowPokemonCenterSign"
},
{
"type": "sign",
@@ -163,7 +163,7 @@
"y": 15,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "FallarborTown_EventScript_271E6A"
+ "script": "Common_EventScript_ShowPokemartSign"
},
{
"type": "sign",
diff --git a/data/maps/FallarborTown/scripts.inc b/data/maps/FallarborTown/scripts.inc
index 5e06ed4cb..50e19cfe5 100644
--- a/data/maps/FallarborTown/scripts.inc
+++ b/data/maps/FallarborTown/scripts.inc
@@ -1,10 +1,10 @@
FallarborTown_MapScripts:: @ 81EB1FA
- map_script 3, FallarborTown_MapScript1_1EB200
+ map_script MAP_SCRIPT_ON_TRANSITION, FallarborTown_MapScript1_1EB200
.byte 0
FallarborTown_MapScript1_1EB200: @ 81EB200
setflag FLAG_VISITED_FALLARBOR_TOWN
- setvar VAR_0x4086, 0
+ setvar VAR_LINK_CONTEST_ROOM_STATE, 0
clearflag FLAG_CONTEST_SKETCH_CREATED
end
diff --git a/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc b/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc
index dff1d26e0..b376f72e4 100644
--- a/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc
+++ b/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc
@@ -1,7 +1,7 @@
FallarborTown_BattleTentBattleRoom_MapScripts:: @ 8200899
- map_script 3, FallarborTown_BattleTentBattleRoom_MapScript1_2008A9
- map_script 2, FallarborTown_BattleTentBattleRoom_MapScript2_2008DD
- map_script 4, FallarborTown_BattleTentBattleRoom_MapScript2_200BB0
+ map_script MAP_SCRIPT_ON_TRANSITION, FallarborTown_BattleTentBattleRoom_MapScript1_2008A9
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, FallarborTown_BattleTentBattleRoom_MapScript2_2008DD
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, FallarborTown_BattleTentBattleRoom_MapScript2_200BB0
.byte 0
FallarborTown_BattleTentBattleRoom_MapScript1_2008A9: @ 82008A9
diff --git a/data/maps/FallarborTown_BattleTentCorridor/scripts.inc b/data/maps/FallarborTown_BattleTentCorridor/scripts.inc
index f3d0a924e..327033829 100644
--- a/data/maps/FallarborTown_BattleTentCorridor/scripts.inc
+++ b/data/maps/FallarborTown_BattleTentCorridor/scripts.inc
@@ -1,5 +1,5 @@
FallarborTown_BattleTentCorridor_MapScripts:: @ 82006A7
- map_script 2, FallarborTown_BattleTentCorridor_MapScript2_2006AD
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, FallarborTown_BattleTentCorridor_MapScript2_2006AD
.byte 0
FallarborTown_BattleTentCorridor_MapScript2_2006AD: @ 82006AD
diff --git a/data/maps/FallarborTown_BattleTentLobby/scripts.inc b/data/maps/FallarborTown_BattleTentLobby/scripts.inc
index 5d05570cc..6d7ea6be5 100644
--- a/data/maps/FallarborTown_BattleTentLobby/scripts.inc
+++ b/data/maps/FallarborTown_BattleTentLobby/scripts.inc
@@ -1,6 +1,6 @@
FallarborTown_BattleTentLobby_MapScripts:: @ 81FFE66
- map_script 2, FallarborTown_BattleTentLobby_MapScript2_1FFE85
- map_script 4, FallarborTown_BattleTentLobby_MapScript2_1FFE71
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, FallarborTown_BattleTentLobby_MapScript2_1FFE85
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, FallarborTown_BattleTentLobby_MapScript2_1FFE71
.byte 0
FallarborTown_BattleTentLobby_MapScript2_1FFE71: @ 81FFE71
@@ -191,7 +191,7 @@ FallarborTown_BattleTentLobby_EventScript_2000E2:: @ 82000E2
special LoadPlayerParty
closemessage
delay 2
- call FallarborTown_BattleTentLobby_EventScript_27134F
+ call Common_EventScript_SaveGame
setvar VAR_TEMP_0, 255
compare VAR_RESULT, 0
goto_if_eq FallarborTown_BattleTentLobby_EventScript_2001AB
diff --git a/data/maps/FallarborTown_House1/scripts.inc b/data/maps/FallarborTown_House1/scripts.inc
index caf915e85..2255f90d3 100644
--- a/data/maps/FallarborTown_House1/scripts.inc
+++ b/data/maps/FallarborTown_House1/scripts.inc
@@ -20,7 +20,7 @@ FallarborTown_House1_EventScript_200F38:: @ 8200F38
msgbox FallarborTown_House1_Text_201159, MSGBOX_DEFAULT
giveitem_std ITEM_TM27
compare VAR_RESULT, 0
- goto_if_eq FallarborTown_House1_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
setvar VAR_0x8004, 280
call FallarborTown_House1_EventScript_2723E4
setflag FLAG_RECEIVED_TM27
diff --git a/data/maps/FallarborTown_House2/scripts.inc b/data/maps/FallarborTown_House2/scripts.inc
index 962c4f64e..2f2ec1b3f 100644
--- a/data/maps/FallarborTown_House2/scripts.inc
+++ b/data/maps/FallarborTown_House2/scripts.inc
@@ -3,7 +3,7 @@ FallarborTown_House2_MapScripts:: @ 8201382
FallarborTown_House2_EventScript_201383:: @ 8201383
lockall
- applymovement 1, FallarborTown_House2_Movement_27259E
+ applymovement 1, Common_Movement_FacePlayer
waitmovement 0
goto_if_set FLAG_TEMP_1, FallarborTown_House2_EventScript_2013A8
msgbox FallarborTown_House2_Text_20145C, MSGBOX_DEFAULT
diff --git a/data/maps/FallarborTown_PokemonCenter_1F/scripts.inc b/data/maps/FallarborTown_PokemonCenter_1F/scripts.inc
index c9a7ef27c..d34e139eb 100644
--- a/data/maps/FallarborTown_PokemonCenter_1F/scripts.inc
+++ b/data/maps/FallarborTown_PokemonCenter_1F/scripts.inc
@@ -1,6 +1,6 @@
FallarborTown_PokemonCenter_1F_MapScripts:: @ 8200BCD
- map_script 3, FallarborTown_PokemonCenter_1F_MapScript1_200BD8
- map_script 5, FallarborTown_PokemonCenter_1F_MapScript1_277C30
+ map_script MAP_SCRIPT_ON_TRANSITION, FallarborTown_PokemonCenter_1F_MapScript1_200BD8
+ map_script MAP_SCRIPT_ON_RESUME, FallarborTown_PokemonCenter_1F_MapScript1_277C30
.byte 0
FallarborTown_PokemonCenter_1F_MapScript1_200BD8: @ 8200BD8
diff --git a/data/maps/FallarborTown_PokemonCenter_2F/scripts.inc b/data/maps/FallarborTown_PokemonCenter_2F/scripts.inc
index 93482e860..8fce8e729 100644
--- a/data/maps/FallarborTown_PokemonCenter_2F/scripts.inc
+++ b/data/maps/FallarborTown_PokemonCenter_2F/scripts.inc
@@ -1,8 +1,8 @@
FallarborTown_PokemonCenter_2F_MapScripts:: @ 8200EEB
- map_script 2, FallarborTown_PokemonCenter_2F_MapScript2_276C3B
- map_script 4, FallarborTown_PokemonCenter_2F_MapScript2_276B6C
- map_script 1, FallarborTown_PokemonCenter_2F_MapScript1_276BBE
- map_script 3, FallarborTown_PokemonCenter_2F_MapScript1_276ACF
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, FallarborTown_PokemonCenter_2F_MapScript2_276C3B
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, FallarborTown_PokemonCenter_2F_MapScript2_276B6C
+ map_script MAP_SCRIPT_ON_LOAD, FallarborTown_PokemonCenter_2F_MapScript1_276BBE
+ map_script MAP_SCRIPT_ON_TRANSITION, FallarborTown_PokemonCenter_2F_MapScript1_276ACF
.byte 0
FallarborTown_PokemonCenter_2F_EventScript_200F00:: @ 8200F00
diff --git a/data/maps/FarawayIsland_Entrance/scripts.inc b/data/maps/FarawayIsland_Entrance/scripts.inc
index 37c16885f..347c89aa0 100644
--- a/data/maps/FarawayIsland_Entrance/scripts.inc
+++ b/data/maps/FarawayIsland_Entrance/scripts.inc
@@ -1,5 +1,5 @@
FarawayIsland_Entrance_MapScripts:: @ 8267C8E
- map_script 3, FarawayIsland_Entrance_MapScript1_267C94
+ map_script MAP_SCRIPT_ON_TRANSITION, FarawayIsland_Entrance_MapScript1_267C94
.byte 0
FarawayIsland_Entrance_MapScript1_267C94: @ 8267C94
@@ -24,7 +24,7 @@ FarawayIsland_Entrance_EventScript_267CA2:: @ 8267CA2
goto_if_eq FarawayIsland_Entrance_EventScript_267CE7
msgbox FarawayIsland_Entrance_Text_2A6A5D, MSGBOX_DEFAULT
closemessage
- applymovement VAR_LAST_TALKED, FarawayIsland_Entrance_Movement_2725AA
+ applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceDown
waitmovement 0
delay 30
hideobjectat 1, MAP_FARAWAY_ISLAND_ENTRANCE
diff --git a/data/maps/FarawayIsland_Interior/scripts.inc b/data/maps/FarawayIsland_Interior/scripts.inc
index a1038edac..7051d376c 100644
--- a/data/maps/FarawayIsland_Interior/scripts.inc
+++ b/data/maps/FarawayIsland_Interior/scripts.inc
@@ -1,8 +1,8 @@
FarawayIsland_Interior_MapScripts:: @ 8267CFA
- map_script 5, FarawayIsland_Interior_MapScript1_267D54
- map_script 3, FarawayIsland_Interior_MapScript1_267D72
- map_script 2, FarawayIsland_Interior_MapScript2_267D98
- map_script 7, FarawayIsland_Interior_MapScript1_267D0F
+ map_script MAP_SCRIPT_ON_RESUME, FarawayIsland_Interior_MapScript1_267D54
+ map_script MAP_SCRIPT_ON_TRANSITION, FarawayIsland_Interior_MapScript1_267D72
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, FarawayIsland_Interior_MapScript2_267D98
+ map_script MAP_SCRIPT_ON_RETURN_TO_FIELD, FarawayIsland_Interior_MapScript1_267D0F
.byte 0
FarawayIsland_Interior_MapScript1_267D0F: @ 8267D0F
@@ -33,7 +33,7 @@ FarawayIsland_Interior_MapScript1_267D54: @ 8267D54
FarawayIsland_Interior_EventScript_267D5E:: @ 8267D5E
specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, 7
- goto_if_ne FarawayIsland_Interior_EventScript_27374E
+ goto_if_ne Common_EventScript_NopReturn
removeobject VAR_LAST_TALKED
return
@@ -44,7 +44,7 @@ FarawayIsland_Interior_MapScript1_267D72: @ 8267D72
end
FarawayIsland_Interior_EventScript_267D86:: @ 8267D86
- goto_if_set FLAG_DEFEATED_MEW, FarawayIsland_Interior_EventScript_27374E
+ goto_if_set FLAG_DEFEATED_MEW, Common_EventScript_NopReturn
clearflag FLAG_HIDE_MEW
setvar VAR_TEMP_1, 0
return
@@ -56,9 +56,9 @@ FarawayIsland_Interior_MapScript2_267D98: @ 8267D98
FarawayIsland_Interior_EventScript_267DA2:: @ 8267DA2
lockall
playse SE_PIN
- applymovement 1, FarawayIsland_Interior_Movement_272598
+ applymovement 1, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 1, FarawayIsland_Interior_Movement_27259A
+ applymovement 1, Common_Movement_Delay48
waitmovement 0
applymovement 1, FarawayIsland_Interior_Movement_267DCE
waitmovement 0
diff --git a/data/maps/FieryPath/scripts.inc b/data/maps/FieryPath/scripts.inc
index 3888c61ef..ddba0dc0b 100644
--- a/data/maps/FieryPath/scripts.inc
+++ b/data/maps/FieryPath/scripts.inc
@@ -1,5 +1,5 @@
FieryPath_MapScripts:: @ 8230F24
- map_script 3, FieryPath_MapScript1_230F2A
+ map_script MAP_SCRIPT_ON_TRANSITION, FieryPath_MapScript1_230F2A
.byte 0
FieryPath_MapScript1_230F2A: @ 8230F2A
diff --git a/data/maps/FortreeCity/map.json b/data/maps/FortreeCity/map.json
index d66ec1f4b..454fc34d3 100644
--- a/data/maps/FortreeCity/map.json
+++ b/data/maps/FortreeCity/map.json
@@ -198,7 +198,7 @@
"y": 6,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "FortreeCity_EventScript_271E73"
+ "script": "Common_EventScript_ShowPokemonCenterSign"
},
{
"type": "sign",
@@ -206,7 +206,7 @@
"y": 14,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "FortreeCity_EventScript_271E6A"
+ "script": "Common_EventScript_ShowPokemartSign"
},
{
"type": "sign",
@@ -222,7 +222,7 @@
"y": 6,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "FortreeCity_EventScript_271E73"
+ "script": "Common_EventScript_ShowPokemonCenterSign"
},
{
"type": "sign",
@@ -230,7 +230,7 @@
"y": 14,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "FortreeCity_EventScript_271E6A"
+ "script": "Common_EventScript_ShowPokemartSign"
}
]
} \ No newline at end of file
diff --git a/data/maps/FortreeCity/scripts.inc b/data/maps/FortreeCity/scripts.inc
index d5c1ab29e..1c464df9d 100644
--- a/data/maps/FortreeCity/scripts.inc
+++ b/data/maps/FortreeCity/scripts.inc
@@ -1,6 +1,6 @@
FortreeCity_MapScripts:: @ 81E25A4
- map_script 3, FortreeCity_MapScript1_1E25AF
- map_script 5, FortreeCity_MapScript1_1E25B3
+ map_script MAP_SCRIPT_ON_TRANSITION, FortreeCity_MapScript1_1E25AF
+ map_script MAP_SCRIPT_ON_RESUME, FortreeCity_MapScript1_1E25B3
.byte 0
FortreeCity_MapScript1_1E25AF: @ 81E25AF
diff --git a/data/maps/FortreeCity_Gym/scripts.inc b/data/maps/FortreeCity_Gym/scripts.inc
index 17633c0d5..30cf8736a 100644
--- a/data/maps/FortreeCity_Gym/scripts.inc
+++ b/data/maps/FortreeCity_Gym/scripts.inc
@@ -1,6 +1,6 @@
FortreeCity_Gym_MapScripts:: @ 82165AB
- map_script 3, FortreeCity_Gym_MapScript1_2165B6
- map_script 4, FortreeCity_Gym_MapScript2_2165BA
+ map_script MAP_SCRIPT_ON_TRANSITION, FortreeCity_Gym_MapScript1_2165B6
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, FortreeCity_Gym_MapScript2_2165BA
.byte 0
FortreeCity_Gym_MapScript1_2165B6: @ 82165B6
@@ -28,7 +28,7 @@ FortreeCity_Gym_EventScript_2165C8:: @ 82165C8
FortreeCity_Gym_EventScript_2165FD:: @ 82165FD
message FortreeCity_Gym_Text_216EEC
waitmessage
- call FortreeCity_Gym_EventScript_27207E
+ call Common_EventScript_PlayGymBadgeFanfare
msgbox FortreeCity_Gym_Text_216F17, MSGBOX_DEFAULT
setflag FLAG_DEFEATED_FORTREE_GYM
setflag FLAG_BADGE06_GET
@@ -51,7 +51,7 @@ FortreeCity_Gym_EventScript_2165FD:: @ 82165FD
FortreeCity_Gym_EventScript_216646:: @ 8216646
giveitem_std ITEM_TM40
compare VAR_RESULT, 0
- goto_if_eq FortreeCity_Gym_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
msgbox FortreeCity_Gym_Text_216FEC, MSGBOX_DEFAULT
setflag FLAG_RECEIVED_TM40
release
@@ -60,7 +60,7 @@ FortreeCity_Gym_EventScript_216646:: @ 8216646
FortreeCity_Gym_EventScript_21666A:: @ 821666A
giveitem_std ITEM_TM40
compare VAR_RESULT, 0
- goto_if_eq FortreeCity_Gym_EventScript_27205E
+ goto_if_eq Common_EventScript_BagIsFull
msgbox FortreeCity_Gym_Text_216FEC, MSGBOX_DEFAULT
setflag FLAG_RECEIVED_TM40
return
diff --git a/data/maps/FortreeCity_House2/scripts.inc b/data/maps/FortreeCity_House2/scripts.inc
index cebd18884..34344bca3 100644
--- a/data/maps/FortreeCity_House2/scripts.inc
+++ b/data/maps/FortreeCity_House2/scripts.inc
@@ -21,7 +21,7 @@ FortreeCity_House2_EventScript_2177CB:: @ 82177CB
msgbox FortreeCity_House2_Text_217A28, MSGBOX_DEFAULT
giveitem_std ITEM_TM10
compare VAR_RESULT, 0
- goto_if_eq FortreeCity_House2_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
setflag FLAG_RECEIVED_TM10
msgbox FortreeCity_House2_Text_217A91, MSGBOX_DEFAULT
release
diff --git a/data/maps/FortreeCity_House4/scripts.inc b/data/maps/FortreeCity_House4/scripts.inc
index fe4aefe5f..5dc9d769a 100644
--- a/data/maps/FortreeCity_House4/scripts.inc
+++ b/data/maps/FortreeCity_House4/scripts.inc
@@ -21,25 +21,25 @@ FortreeCity_House4_EventScript_217C8A:: @ 8217C8A
end
FortreeCity_House4_EventScript_217CC4:: @ 8217CC4
- applymovement VAR_LAST_TALKED, FortreeCity_House4_Movement_27259E
+ applymovement VAR_LAST_TALKED, Common_Movement_FacePlayer
waitmovement 0
msgbox FortreeCity_House4_Text_217DD2, MSGBOX_DEFAULT
releaseall
end
FortreeCity_House4_EventScript_217CD8:: @ 8217CD8
- applymovement VAR_LAST_TALKED, FortreeCity_House4_Movement_27259E
+ applymovement VAR_LAST_TALKED, Common_Movement_FacePlayer
waitmovement 0
msgbox FortreeCity_House4_Text_217E05, MSGBOX_DEFAULT
giveitem_std ITEM_MENTAL_HERB
compare VAR_RESULT, 0
- goto_if_eq FortreeCity_House4_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
setflag FLAG_RECEIVED_MENTAL_HERB
releaseall
end
FortreeCity_House4_EventScript_217D06:: @ 8217D06
- applymovement VAR_LAST_TALKED, FortreeCity_House4_Movement_27259E
+ applymovement VAR_LAST_TALKED, Common_Movement_FacePlayer
waitmovement 0
msgbox FortreeCity_House4_Text_217EA8, MSGBOX_DEFAULT
releaseall
diff --git a/data/maps/FortreeCity_PokemonCenter_1F/scripts.inc b/data/maps/FortreeCity_PokemonCenter_1F/scripts.inc
index 339cae9eb..070956590 100644
--- a/data/maps/FortreeCity_PokemonCenter_1F/scripts.inc
+++ b/data/maps/FortreeCity_PokemonCenter_1F/scripts.inc
@@ -1,6 +1,6 @@
FortreeCity_PokemonCenter_1F_MapScripts:: @ 82173D8
- map_script 3, FortreeCity_PokemonCenter_1F_MapScript1_2173E3
- map_script 5, FortreeCity_PokemonCenter_1F_MapScript1_277C30
+ map_script MAP_SCRIPT_ON_TRANSITION, FortreeCity_PokemonCenter_1F_MapScript1_2173E3
+ map_script MAP_SCRIPT_ON_RESUME, FortreeCity_PokemonCenter_1F_MapScript1_277C30
.byte 0
FortreeCity_PokemonCenter_1F_MapScript1_2173E3: @ 82173E3
diff --git a/data/maps/FortreeCity_PokemonCenter_2F/scripts.inc b/data/maps/FortreeCity_PokemonCenter_2F/scripts.inc
index f631aa3c6..dbe2e31ec 100644
--- a/data/maps/FortreeCity_PokemonCenter_2F/scripts.inc
+++ b/data/maps/FortreeCity_PokemonCenter_2F/scripts.inc
@@ -1,8 +1,8 @@
FortreeCity_PokemonCenter_2F_MapScripts:: @ 821763E
- map_script 2, FortreeCity_PokemonCenter_2F_MapScript2_276C3B
- map_script 4, FortreeCity_PokemonCenter_2F_MapScript2_276B6C
- map_script 1, FortreeCity_PokemonCenter_2F_MapScript1_276BBE
- map_script 3, FortreeCity_PokemonCenter_2F_MapScript1_276ACF
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, FortreeCity_PokemonCenter_2F_MapScript2_276C3B
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, FortreeCity_PokemonCenter_2F_MapScript2_276B6C
+ map_script MAP_SCRIPT_ON_LOAD, FortreeCity_PokemonCenter_2F_MapScript1_276BBE
+ map_script MAP_SCRIPT_ON_TRANSITION, FortreeCity_PokemonCenter_2F_MapScript1_276ACF
.byte 0
FortreeCity_PokemonCenter_2F_EventScript_217653:: @ 8217653
diff --git a/data/maps/GraniteCave_B1F/scripts.inc b/data/maps/GraniteCave_B1F/scripts.inc
index 360b10a08..099e5a501 100644
--- a/data/maps/GraniteCave_B1F/scripts.inc
+++ b/data/maps/GraniteCave_B1F/scripts.inc
@@ -1,7 +1,7 @@
GraniteCave_B1F_MapScripts:: @ 822DC5E
- map_script 2, GraniteCave_B1F_MapScript2_2A8327
- map_script 3, GraniteCave_B1F_MapScript1_2A8331
- map_script 5, GraniteCave_B1F_MapScript1_22DC6E
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, GraniteCave_B1F_MapScript2_2A8327
+ map_script MAP_SCRIPT_ON_TRANSITION, GraniteCave_B1F_MapScript1_2A8331
+ map_script MAP_SCRIPT_ON_RESUME, GraniteCave_B1F_MapScript1_22DC6E
.byte 0
GraniteCave_B1F_MapScript1_22DC6E: @ 822DC6E
diff --git a/data/maps/InsideOfTruck/map.json b/data/maps/InsideOfTruck/map.json
index d6bbd2f46..eefeed365 100644
--- a/data/maps/InsideOfTruck/map.json
+++ b/data/maps/InsideOfTruck/map.json
@@ -83,7 +83,7 @@
"x": 3,
"y": 1,
"elevation": 3,
- "var": "VAR_0x4092",
+ "var": "VAR_LITTLEROOT_INTRO_STATE",
"var_value": "0",
"script": "InsideOfTruck_EventScript_23BF04"
},
@@ -92,7 +92,7 @@
"x": 3,
"y": 2,
"elevation": 3,
- "var": "VAR_0x4092",
+ "var": "VAR_LITTLEROOT_INTRO_STATE",
"var_value": "0",
"script": "InsideOfTruck_EventScript_23BF04"
},
@@ -101,7 +101,7 @@
"x": 3,
"y": 3,
"elevation": 3,
- "var": "VAR_0x4092",
+ "var": "VAR_LITTLEROOT_INTRO_STATE",
"var_value": "0",
"script": "InsideOfTruck_EventScript_23BF04"
}
diff --git a/data/maps/InsideOfTruck/scripts.inc b/data/maps/InsideOfTruck/scripts.inc
index 858975d7a..672b2003b 100644
--- a/data/maps/InsideOfTruck/scripts.inc
+++ b/data/maps/InsideOfTruck/scripts.inc
@@ -1,6 +1,6 @@
InsideOfTruck_MapScripts:: @ 823BEDA
- map_script 1, InsideOfTruck_MapScript1_23BEE5
- map_script 5, InsideOfTruck_MapScript1_23BF01
+ map_script MAP_SCRIPT_ON_LOAD, InsideOfTruck_MapScript1_23BEE5
+ map_script MAP_SCRIPT_ON_RESUME, InsideOfTruck_MapScript1_23BF01
.byte 0
InsideOfTruck_MapScript1_23BEE5: @ 823BEE5
@@ -25,26 +25,26 @@ InsideOfTruck_EventScript_23BF04:: @ 823BF04
InsideOfTruck_EventScript_23BF20:: @ 823BF20
setrespawn HEAL_LOCATION_LITTLEROOT_TOWN_BRENDANS_HOUSE_2F
- setvar VAR_0x4092, 1
+ setvar VAR_LITTLEROOT_INTRO_STATE, 1
setflag FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_MOM
setflag FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_TRUCK
setflag FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_RIVAL_MOM
setflag FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_RIVAL_SIBLING
setflag FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_2F_POKE_BALL
- setvar VAR_0x408C, 1
+ setvar VAR_LITTLEROOT_HOUSES_STATE_2, 1
setdynamicwarp MAP_LITTLEROOT_TOWN, 255, 3, 10
releaseall
end
InsideOfTruck_EventScript_23BF46:: @ 823BF46
setrespawn HEAL_LOCATION_LITTLEROOT_TOWN_MAYS_HOUSE_2F
- setvar VAR_0x4092, 2
+ setvar VAR_LITTLEROOT_INTRO_STATE, 2
setflag FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_MOM
setflag FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_TRUCK
setflag FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_RIVAL_MOM
setflag FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_RIVAL_SIBLING
setflag FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_2F_POKE_BALL
- setvar VAR_0x4082, 1
+ setvar VAR_LITTLEROOT_HOUSES_STATE, 1
setdynamicwarp MAP_LITTLEROOT_TOWN, 255, 12, 10
releaseall
end
diff --git a/data/maps/IslandCave/scripts.inc b/data/maps/IslandCave/scripts.inc
index 3d0efa1ca..cb400e817 100644
--- a/data/maps/IslandCave/scripts.inc
+++ b/data/maps/IslandCave/scripts.inc
@@ -1,7 +1,7 @@
IslandCave_MapScripts:: @ 8238E2A
- map_script 5, IslandCave_MapScript1_238E3A
- map_script 1, IslandCave_MapScript1_238E58
- map_script 3, IslandCave_MapScript1_238E99
+ map_script MAP_SCRIPT_ON_RESUME, IslandCave_MapScript1_238E3A
+ map_script MAP_SCRIPT_ON_LOAD, IslandCave_MapScript1_238E58
+ map_script MAP_SCRIPT_ON_TRANSITION, IslandCave_MapScript1_238E99
.byte 0
IslandCave_MapScript1_238E3A: @ 8238E3A
@@ -11,7 +11,7 @@ IslandCave_MapScript1_238E3A: @ 8238E3A
IslandCave_EventScript_238E44:: @ 8238E44
specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, 7
- goto_if_ne IslandCave_EventScript_27374E
+ goto_if_ne Common_EventScript_NopReturn
removeobject VAR_LAST_TALKED
return
diff --git a/data/maps/JaggedPass/scripts.inc b/data/maps/JaggedPass/scripts.inc
index 93788a703..3df62fc7d 100644
--- a/data/maps/JaggedPass/scripts.inc
+++ b/data/maps/JaggedPass/scripts.inc
@@ -1,7 +1,7 @@
JaggedPass_MapScripts:: @ 8230656
- map_script 5, JaggedPass_MapScript1_230666
- map_script 3, JaggedPass_MapScript1_23068B
- map_script 1, JaggedPass_MapScript1_23069C
+ map_script MAP_SCRIPT_ON_RESUME, JaggedPass_MapScript1_230666
+ map_script MAP_SCRIPT_ON_TRANSITION, JaggedPass_MapScript1_23068B
+ map_script MAP_SCRIPT_ON_LOAD, JaggedPass_MapScript1_23069C
.byte 0
JaggedPass_MapScript1_230666: @ 8230666
@@ -21,7 +21,7 @@ JaggedPass_EventScript_230685:: @ 8230685
return
JaggedPass_MapScript1_23068B: @ 823068B
- compare VAR_0x40BD, 1
+ compare VAR_JAGGED_PASS_ASH_WEATHER, 1
call_if_eq JaggedPass_EventScript_230697
end
@@ -71,27 +71,27 @@ JaggedPass_EventScript_230718:: @ 8230718
goto_if_set FLAG_BEAT_MAGMA_GRUNT_JAGGED_PASS, JaggedPass_EventScript_230766
waitse
playse SE_PIN
- applymovement 5, JaggedPass_Movement_272598
+ applymovement 5, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 5, JaggedPass_Movement_27259A
+ applymovement 5, Common_Movement_Delay48
waitmovement 0
- applymovement 5, JaggedPass_Movement_27259E
+ applymovement 5, Common_Movement_FacePlayer
waitmovement 0
msgbox JaggedPass_Text_230CCB, MSGBOX_DEFAULT
closemessage
trainerbattle_no_intro TRAINER_GRUNT_30, JaggedPass_Text_230D2D
setflag FLAG_BEAT_MAGMA_GRUNT_JAGGED_PASS
- applymovement 5, JaggedPass_Movement_2725A2
+ applymovement 5, Common_Movement_FaceOriginalDirection
waitmovement 0
releaseall
end
JaggedPass_EventScript_230766:: @ 8230766
- applymovement 5, JaggedPass_Movement_27259E
+ applymovement 5, Common_Movement_FacePlayer
waitmovement 0
msgbox JaggedPass_Text_230D65, MSGBOX_DEFAULT
closemessage
- applymovement 5, JaggedPass_Movement_2725A2
+ applymovement 5, Common_Movement_FaceOriginalDirection
waitmovement 0
releaseall
end
diff --git a/data/maps/LavaridgeTown/map.json b/data/maps/LavaridgeTown/map.json
index 9bec14bd1..65a6a25d3 100644
--- a/data/maps/LavaridgeTown/map.json
+++ b/data/maps/LavaridgeTown/map.json
@@ -216,7 +216,7 @@
"y": 5,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "LavaridgeTown_EventScript_271E6A"
+ "script": "Common_EventScript_ShowPokemartSign"
},
{
"type": "sign",
@@ -232,7 +232,7 @@
"y": 6,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "LavaridgeTown_EventScript_271E73"
+ "script": "Common_EventScript_ShowPokemonCenterSign"
},
{
"type": "sign",
@@ -240,7 +240,7 @@
"y": 5,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "LavaridgeTown_EventScript_271E6A"
+ "script": "Common_EventScript_ShowPokemartSign"
},
{
"type": "sign",
@@ -248,7 +248,7 @@
"y": 6,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "LavaridgeTown_EventScript_271E73"
+ "script": "Common_EventScript_ShowPokemonCenterSign"
},
{
"type": "hidden_item",
diff --git a/data/maps/LavaridgeTown/scripts.inc b/data/maps/LavaridgeTown/scripts.inc
index 899df4d2c..5c1612199 100644
--- a/data/maps/LavaridgeTown/scripts.inc
+++ b/data/maps/LavaridgeTown/scripts.inc
@@ -1,17 +1,17 @@
LavaridgeTown_MapScripts:: @ 81EA4D3
- map_script 3, LavaridgeTown_MapScript1_1EA4DE
- map_script 2, LavaridgeTown_MapScript2_1EA547
+ map_script MAP_SCRIPT_ON_TRANSITION, LavaridgeTown_MapScript1_1EA4DE
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, LavaridgeTown_MapScript2_1EA547
.byte 0
LavaridgeTown_MapScript1_1EA4DE: @ 81EA4DE
setflag FLAG_VISITED_LAVARIDGE_TOWN
call_if_set FLAG_FLANNERY_GIVES_BADGE_INFO, LavaridgeTown_EventScript_1EA514
call_if_set FLAG_DEFEATED_EVIL_TEAM_MT_CHIMNEY, LavaridgeTown_EventScript_1EA53F
- call LavaridgeTown_EventScript_271ED7
- call LavaridgeTown_EventScript_271EFB
- compare VAR_0x4053, 1
+ call Common_EventScript_SetupRivalGender
+ call Common_EventScript_SetupRivalOnBikeGender
+ compare VAR_LAVARIDGE_RIVAL_STATE, 1
call_if_eq LavaridgeTown_EventScript_1EA518
- compare VAR_0x4053, 1
+ compare VAR_LAVARIDGE_RIVAL_STATE, 1
call_if_eq LavaridgeTown_EventScript_1EA543
end
@@ -41,7 +41,7 @@ LavaridgeTown_EventScript_1EA543:: @ 81EA543
return
LavaridgeTown_MapScript2_1EA547: @ 81EA547
- map_script_2 VAR_0x4053, 1, LavaridgeTown_EventScript_1EA551
+ map_script_2 VAR_LAVARIDGE_RIVAL_STATE, 1, LavaridgeTown_EventScript_1EA551
.2byte 0
LavaridgeTown_EventScript_1EA551:: @ 81EA551
@@ -94,7 +94,7 @@ LavaridgeTown_EventScript_1EA5FF:: @ 81EA5FF
compare VAR_0x8008, 9
call_if_ne LavaridgeTown_EventScript_1EA6C9
removeobject 7
- setvar VAR_0x4053, 2
+ setvar VAR_LAVARIDGE_RIVAL_STATE, 2
clearflag FLAG_SPECIAL_FLAG_0x4000
savebgm MUS_DUMMY
fadedefaultbgm
@@ -110,12 +110,12 @@ LavaridgeTown_EventScript_1EA635:: @ 81EA635
return
LavaridgeTown_EventScript_1EA63A:: @ 81EA63A
- applymovement 8, LavaridgeTown_Movement_2725A6
+ applymovement 8, Common_Movement_WalkInPlaceUp
waitmovement 0
playse SE_PIN
- applymovement 8, LavaridgeTown_Movement_272598
+ applymovement 8, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 8, LavaridgeTown_Movement_27259A
+ applymovement 8, Common_Movement_Delay48
waitmovement 0
return
@@ -127,14 +127,14 @@ LavaridgeTown_EventScript_1EA65C:: @ 81EA65C
waitmovement 0
closedoor 12, 15
waitdooranim
- applymovement 8, LavaridgeTown_Movement_2725A4
+ applymovement 8, Common_Movement_WalkInPlaceLeft
waitmovement 0
playse SE_PIN
- applymovement 8, LavaridgeTown_Movement_272598
+ applymovement 8, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 8, LavaridgeTown_Movement_27259A
+ applymovement 8, Common_Movement_Delay48
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, LavaridgeTown_Movement_2725A8
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceRight
waitmovement 0
return
diff --git a/data/maps/LavaridgeTown_Gym_1F/scripts.inc b/data/maps/LavaridgeTown_Gym_1F/scripts.inc
index bf48225ec..bccd1dfef 100644
--- a/data/maps/LavaridgeTown_Gym_1F/scripts.inc
+++ b/data/maps/LavaridgeTown_Gym_1F/scripts.inc
@@ -1,5 +1,5 @@
LavaridgeTown_Gym_1F_MapScripts:: @ 81FE6F4
- map_script 3, LavaridgeTown_Gym_1F_MapScript1_1FE6FA
+ map_script MAP_SCRIPT_ON_TRANSITION, LavaridgeTown_Gym_1F_MapScript1_1FE6FA
.byte 0
LavaridgeTown_Gym_1F_MapScript1_1FE6FA: @ 81FE6FA
@@ -71,18 +71,18 @@ LavaridgeTown_Gym_1F_EventScript_1FE78C:: @ 81FE78C
LavaridgeTown_Gym_1F_EventScript_1FE7C1:: @ 81FE7C1
message LavaridgeTown_Gym_1F_Text_1FF32F
waitmessage
- call LavaridgeTown_Gym_1F_EventScript_27207E
+ call Common_EventScript_PlayGymBadgeFanfare
msgbox LavaridgeTown_Gym_1F_Text_1FF359, MSGBOX_DEFAULT
setflag FLAG_FLANNERY_GIVES_BADGE_INFO
setflag FLAG_DEFEATED_LAVARIDGE_GYM
setflag FLAG_BADGE04_GET
- addvar VAR_0x4085, 1
- compare VAR_0x4085, 6
+ addvar VAR_PETALBURG_GYM_STATE, 1
+ compare VAR_PETALBURG_GYM_STATE, 6
call_if_eq LavaridgeTown_Gym_1F_EventScript_271E84
setvar VAR_0x8008, 4
call LavaridgeTown_Gym_1F_EventScript_271F43
setflag FLAG_HIDE_VERDANTURF_TOWN_WANDAS_HOUSE_WALLY
- setvar VAR_0x4053, 1
+ setvar VAR_LAVARIDGE_RIVAL_STATE, 1
call LavaridgeTown_Gym_1F_EventScript_1FE841
closemessage
delay 30
@@ -98,7 +98,7 @@ LavaridgeTown_Gym_1F_EventScript_1FE7C1:: @ 81FE7C1
LavaridgeTown_Gym_1F_EventScript_1FE81D:: @ 81FE81D
giveitem_std ITEM_TM50
compare VAR_RESULT, 0
- goto_if_eq LavaridgeTown_Gym_1F_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
msgbox LavaridgeTown_Gym_1F_Text_1FF45C, MSGBOX_DEFAULT
setflag FLAG_RECEIVED_TM50
release
@@ -107,7 +107,7 @@ LavaridgeTown_Gym_1F_EventScript_1FE81D:: @ 81FE81D
LavaridgeTown_Gym_1F_EventScript_1FE841:: @ 81FE841
giveitem_std ITEM_TM50
compare VAR_RESULT, 0
- goto_if_eq LavaridgeTown_Gym_1F_EventScript_27205E
+ goto_if_eq Common_EventScript_BagIsFull
msgbox LavaridgeTown_Gym_1F_Text_1FF45C, MSGBOX_DEFAULT
setflag FLAG_RECEIVED_TM50
return
diff --git a/data/maps/LavaridgeTown_Gym_B1F/scripts.inc b/data/maps/LavaridgeTown_Gym_B1F/scripts.inc
index a8a6eaa54..d2e8d90b5 100644
--- a/data/maps/LavaridgeTown_Gym_B1F/scripts.inc
+++ b/data/maps/LavaridgeTown_Gym_B1F/scripts.inc
@@ -1,5 +1,5 @@
LavaridgeTown_Gym_B1F_MapScripts:: @ 81FF87E
- map_script 3, LavaridgeTown_Gym_B1F_MapScript1_1FF884
+ map_script MAP_SCRIPT_ON_TRANSITION, LavaridgeTown_Gym_B1F_MapScript1_1FF884
.byte 0
LavaridgeTown_Gym_B1F_MapScript1_1FF884: @ 81FF884
diff --git a/data/maps/LavaridgeTown_HerbShop/scripts.inc b/data/maps/LavaridgeTown_HerbShop/scripts.inc
index e57996318..f6ad8e26b 100644
--- a/data/maps/LavaridgeTown_HerbShop/scripts.inc
+++ b/data/maps/LavaridgeTown_HerbShop/scripts.inc
@@ -32,7 +32,7 @@ LavaridgeTown_HerbShop_EventScript_1FE505:: @ 81FE505
msgbox LavaridgeTown_HerbShop_Text_1FE584, MSGBOX_DEFAULT
giveitem_std ITEM_CHARCOAL
compare VAR_RESULT, 0
- goto_if_eq LavaridgeTown_HerbShop_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
setflag FLFLAG_RECEIVED_CHARCOAL
release
end
diff --git a/data/maps/LavaridgeTown_PokemonCenter_1F/scripts.inc b/data/maps/LavaridgeTown_PokemonCenter_1F/scripts.inc
index f4fabbf72..2a0cb4a1e 100644
--- a/data/maps/LavaridgeTown_PokemonCenter_1F/scripts.inc
+++ b/data/maps/LavaridgeTown_PokemonCenter_1F/scripts.inc
@@ -1,6 +1,6 @@
LavaridgeTown_PokemonCenter_1F_MapScripts:: @ 81FFAFA
- map_script 3, LavaridgeTown_PokemonCenter_1F_MapScript1_1FFB05
- map_script 5, LavaridgeTown_PokemonCenter_1F_MapScript1_277C30
+ map_script MAP_SCRIPT_ON_TRANSITION, LavaridgeTown_PokemonCenter_1F_MapScript1_1FFB05
+ map_script MAP_SCRIPT_ON_RESUME, LavaridgeTown_PokemonCenter_1F_MapScript1_277C30
.byte 0
LavaridgeTown_PokemonCenter_1F_MapScript1_1FFB05: @ 81FFB05
diff --git a/data/maps/LavaridgeTown_PokemonCenter_2F/scripts.inc b/data/maps/LavaridgeTown_PokemonCenter_2F/scripts.inc
index b1491f621..b022df141 100644
--- a/data/maps/LavaridgeTown_PokemonCenter_2F/scripts.inc
+++ b/data/maps/LavaridgeTown_PokemonCenter_2F/scripts.inc
@@ -1,8 +1,8 @@
LavaridgeTown_PokemonCenter_2F_MapScripts:: @ 81FFC97
- map_script 2, LavaridgeTown_PokemonCenter_2F_MapScript2_276C3B
- map_script 4, LavaridgeTown_PokemonCenter_2F_MapScript2_276B6C
- map_script 1, LavaridgeTown_PokemonCenter_2F_MapScript1_276BBE
- map_script 3, LavaridgeTown_PokemonCenter_2F_MapScript1_276ACF
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, LavaridgeTown_PokemonCenter_2F_MapScript2_276C3B
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, LavaridgeTown_PokemonCenter_2F_MapScript2_276B6C
+ map_script MAP_SCRIPT_ON_LOAD, LavaridgeTown_PokemonCenter_2F_MapScript1_276BBE
+ map_script MAP_SCRIPT_ON_TRANSITION, LavaridgeTown_PokemonCenter_2F_MapScript1_276ACF
.byte 0
LavaridgeTown_PokemonCenter_2F_EventScript_1FFCAC:: @ 81FFCAC
diff --git a/data/maps/LilycoveCity/map.json b/data/maps/LilycoveCity/map.json
index 63c5925fd..ea771c3b5 100644
--- a/data/maps/LilycoveCity/map.json
+++ b/data/maps/LilycoveCity/map.json
@@ -428,7 +428,7 @@
"y": 14,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "LilycoveCity_EventScript_271E73"
+ "script": "Common_EventScript_ShowPokemonCenterSign"
},
{
"type": "sign",
@@ -444,7 +444,7 @@
"y": 14,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "LilycoveCity_EventScript_271E73"
+ "script": "Common_EventScript_ShowPokemonCenterSign"
},
{
"type": "sign",
diff --git a/data/maps/LilycoveCity/scripts.inc b/data/maps/LilycoveCity/scripts.inc
index cfa6b3867..7f4c9e3fd 100644
--- a/data/maps/LilycoveCity/scripts.inc
+++ b/data/maps/LilycoveCity/scripts.inc
@@ -1,14 +1,14 @@
LilycoveCity_MapScripts:: @ 81E2B3C
- map_script 3, LilycoveCity_MapScript1_1E2B47
- map_script 1, LilycoveCity_MapScript1_1E2B61
+ map_script MAP_SCRIPT_ON_TRANSITION, LilycoveCity_MapScript1_1E2B47
+ map_script MAP_SCRIPT_ON_LOAD, LilycoveCity_MapScript1_1E2B61
.byte 0
LilycoveCity_MapScript1_1E2B47: @ 81E2B47
setflag FLAG_VISITED_LILYCOVE_CITY
- setvar VAR_0x4086, 0
+ setvar VAR_LINK_CONTEST_ROOM_STATE, 0
setflag FLAG_HIDE_LILYCOVE_CONTEST_HALL_REPORTER
- call_if_set FLAG_SYS_WEATHER_CTRL, LilycoveCity_EventScript_27207A
- call LilycoveCity_EventScript_271ED7
+ call_if_set FLAG_SYS_WEATHER_CTRL, Common_EventScript_SetWeather15
+ call Common_EventScript_SetupRivalGender
end
LilycoveCity_MapScript1_1E2B61: @ 81E2B61
@@ -40,7 +40,7 @@ LilycoveCity_EventScript_1E2BD8:: @ 81E2BD8
addvar VAR_RESULT, 133
giveitem_std VAR_RESULT
compare VAR_RESULT, 0
- goto_if_eq LilycoveCity_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
setflag FLAG_DAILY_LILYCOVE_RECEIVED_BERRY
msgbox LilycoveCity_Text_2A72E3, MSGBOX_DEFAULT
release
@@ -134,13 +134,13 @@ LilycoveCity_EventScript_1E2CD4:: @ 81E2CD4
LilycoveCity_EventScript_1E2CDD:: @ 81E2CDD
lockall
msgbox LilycoveCity_Text_1E494D, MSGBOX_NPC
- applymovement 20, LilycoveCity_Movement_2725A2
+ applymovement 20, Common_Movement_FaceOriginalDirection
end
LilycoveCity_EventScript_1E2CEE:: @ 81E2CEE
lockall
msgbox LilycoveCity_Text_1E49F4, MSGBOX_NPC
- applymovement 19, LilycoveCity_Movement_2725A2
+ applymovement 19, Common_Movement_FaceOriginalDirection
end
LilycoveCity_EventScript_1E2CFF:: @ 81E2CFF
@@ -197,10 +197,10 @@ LilycoveCity_EventScript_1E2D7D:: @ 81E2D7D
lockall
goto_if_set FLAG_MET_WAILMER_TRAINER, LilycoveCity_EventScript_1E2DB0
msgbox LilycoveCity_Text_1E3D1F, MSGBOX_DEFAULT
- applymovement VAR_LAST_TALKED, LilycoveCity_Movement_27259E
+ applymovement VAR_LAST_TALKED, Common_Movement_FacePlayer
waitmovement 0
msgbox LilycoveCity_Text_1E3D4A, MSGBOX_DEFAULT
- applymovement VAR_LAST_TALKED, LilycoveCity_Movement_2725A2
+ applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection
waitmovement 0
setflag FLAG_MET_WAILMER_TRAINER
releaseall
@@ -387,7 +387,7 @@ LilycoveCity_EventScript_1E2FFD:: @ 81E2FFD
LilycoveCity_EventScript_1E3006:: @ 81E3006
closemessage
- applymovement VAR_LAST_TALKED, LilycoveCity_Movement_2725AA
+ applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceDown
waitmovement 0
delay 50
setfieldeffectargument 0, 1
diff --git a/data/maps/LilycoveCity_ContestHall/scripts.inc b/data/maps/LilycoveCity_ContestHall/scripts.inc
index f6a53cc5e..5823b6da4 100644
--- a/data/maps/LilycoveCity_ContestHall/scripts.inc
+++ b/data/maps/LilycoveCity_ContestHall/scripts.inc
@@ -22,7 +22,7 @@ LilycoveCity_ContestHall_EventScript_21B4A9:: @ 821B4A9
faceplayer
msgbox LilycoveCity_ContestHall_Text_21B977, MSGBOX_DEFAULT
closemessage
- applymovement 4, LilycoveCity_ContestHall_Movement_2725A2
+ applymovement 4, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -32,7 +32,7 @@ LilycoveCity_ContestHall_EventScript_21B4C0:: @ 821B4C0
faceplayer
msgbox LilycoveCity_ContestHall_Text_21B9DC, MSGBOX_DEFAULT
closemessage
- applymovement 5, LilycoveCity_ContestHall_Movement_2725A2
+ applymovement 5, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -42,7 +42,7 @@ LilycoveCity_ContestHall_EventScript_21B4D7:: @ 821B4D7
faceplayer
msgbox LilycoveCity_ContestHall_Text_21BA44, MSGBOX_DEFAULT
closemessage
- applymovement 6, LilycoveCity_ContestHall_Movement_2725A2
+ applymovement 6, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -52,7 +52,7 @@ LilycoveCity_ContestHall_EventScript_21B4EE:: @ 821B4EE
faceplayer
msgbox LilycoveCity_ContestHall_Text_21BAD5, MSGBOX_DEFAULT
closemessage
- applymovement 7, LilycoveCity_ContestHall_Movement_2725A2
+ applymovement 7, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -62,7 +62,7 @@ LilycoveCity_ContestHall_EventScript_21B505:: @ 821B505
faceplayer
msgbox LilycoveCity_ContestHall_Text_21BB84, MSGBOX_DEFAULT
closemessage
- applymovement 8, LilycoveCity_ContestHall_Movement_2725A2
+ applymovement 8, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -72,7 +72,7 @@ LilycoveCity_ContestHall_EventScript_21B51C:: @ 821B51C
faceplayer
msgbox LilycoveCity_ContestHall_Text_21BBDD, MSGBOX_DEFAULT
closemessage
- applymovement 9, LilycoveCity_ContestHall_Movement_2725A2
+ applymovement 9, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -86,7 +86,7 @@ LilycoveCity_ContestHall_EventScript_21B53C:: @ 821B53C
faceplayer
msgbox LilycoveCity_ContestHall_Text_21BC89, MSGBOX_DEFAULT
closemessage
- applymovement 12, LilycoveCity_ContestHall_Movement_2725A2
+ applymovement 12, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -96,7 +96,7 @@ LilycoveCity_ContestHall_EventScript_21B553:: @ 821B553
faceplayer
msgbox LilycoveCity_ContestHall_Text_21BD30, MSGBOX_DEFAULT
closemessage
- applymovement 22, LilycoveCity_ContestHall_Movement_2725A2
+ applymovement 22, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -106,7 +106,7 @@ LilycoveCity_ContestHall_EventScript_21B56A:: @ 821B56A
faceplayer
msgbox LilycoveCity_ContestHall_Text_21BD70, MSGBOX_DEFAULT
closemessage
- applymovement 11, LilycoveCity_ContestHall_Movement_2725A2
+ applymovement 11, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -116,7 +116,7 @@ LilycoveCity_ContestHall_EventScript_21B581:: @ 821B581
faceplayer
msgbox LilycoveCity_ContestHall_Text_21BDDD, MSGBOX_DEFAULT
closemessage
- applymovement 13, LilycoveCity_ContestHall_Movement_2725A2
+ applymovement 13, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -126,7 +126,7 @@ LilycoveCity_ContestHall_EventScript_21B598:: @ 821B598
faceplayer
msgbox LilycoveCity_ContestHall_Text_21BE16, MSGBOX_DEFAULT
closemessage
- applymovement 14, LilycoveCity_ContestHall_Movement_2725A2
+ applymovement 14, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -136,7 +136,7 @@ LilycoveCity_ContestHall_EventScript_21B5AF:: @ 821B5AF
faceplayer
msgbox LilycoveCity_ContestHall_Text_21BE77, MSGBOX_DEFAULT
closemessage
- applymovement 15, LilycoveCity_ContestHall_Movement_2725A2
+ applymovement 15, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -146,7 +146,7 @@ LilycoveCity_ContestHall_EventScript_21B5C6:: @ 821B5C6
faceplayer
msgbox LilycoveCity_ContestHall_Text_21BEDE, MSGBOX_DEFAULT
closemessage
- applymovement 16, LilycoveCity_ContestHall_Movement_2725A2
+ applymovement 16, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -156,7 +156,7 @@ LilycoveCity_ContestHall_EventScript_21B5DD:: @ 821B5DD
faceplayer
msgbox LilycoveCity_ContestHall_Text_21BF6E, MSGBOX_DEFAULT
closemessage
- applymovement 17, LilycoveCity_ContestHall_Movement_2725A2
+ applymovement 17, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -166,7 +166,7 @@ LilycoveCity_ContestHall_EventScript_21B5F4:: @ 821B5F4
faceplayer
msgbox LilycoveCity_ContestHall_Text_21BFE3, MSGBOX_DEFAULT
closemessage
- applymovement 18, LilycoveCity_ContestHall_Movement_2725A2
+ applymovement 18, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -176,7 +176,7 @@ LilycoveCity_ContestHall_EventScript_21B60B:: @ 821B60B
faceplayer
msgbox LilycoveCity_ContestHall_Text_21C07F, MSGBOX_DEFAULT
closemessage
- applymovement 19, LilycoveCity_ContestHall_Movement_2725A2
+ applymovement 19, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -186,7 +186,7 @@ LilycoveCity_ContestHall_EventScript_21B622:: @ 821B622
faceplayer
msgbox LilycoveCity_ContestHall_Text_21C0D8, MSGBOX_DEFAULT
closemessage
- applymovement 21, LilycoveCity_ContestHall_Movement_2725A2
+ applymovement 21, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -196,7 +196,7 @@ LilycoveCity_ContestHall_EventScript_21B639:: @ 821B639
faceplayer
msgbox LilycoveCity_ContestHall_Text_21C137, MSGBOX_DEFAULT
closemessage
- applymovement 20, LilycoveCity_ContestHall_Movement_2725A2
+ applymovement 20, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -206,7 +206,7 @@ LilycoveCity_ContestHall_EventScript_21B650:: @ 821B650
faceplayer
msgbox LilycoveCity_ContestHall_Text_21C1A4, MSGBOX_DEFAULT
closemessage
- applymovement 23, LilycoveCity_ContestHall_Movement_2725A2
+ applymovement 23, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -216,7 +216,7 @@ LilycoveCity_ContestHall_EventScript_21B667:: @ 821B667
faceplayer
msgbox LilycoveCity_ContestHall_Text_21C215, MSGBOX_DEFAULT
closemessage
- applymovement 24, LilycoveCity_ContestHall_Movement_2725A2
+ applymovement 24, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -226,7 +226,7 @@ LilycoveCity_ContestHall_EventScript_21B67E:: @ 821B67E
faceplayer
msgbox LilycoveCity_ContestHall_Text_21C27F, MSGBOX_DEFAULT
closemessage
- applymovement 25, LilycoveCity_ContestHall_Movement_2725A2
+ applymovement 25, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -236,7 +236,7 @@ LilycoveCity_ContestHall_EventScript_21B695:: @ 821B695
faceplayer
msgbox LilycoveCity_ContestHall_Text_21C2BB, MSGBOX_DEFAULT
closemessage
- applymovement 26, LilycoveCity_ContestHall_Movement_2725A2
+ applymovement 26, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -246,7 +246,7 @@ LilycoveCity_ContestHall_EventScript_21B6AC:: @ 821B6AC
faceplayer
msgbox LilycoveCity_ContestHall_Text_21C307, MSGBOX_DEFAULT
closemessage
- applymovement 27, LilycoveCity_ContestHall_Movement_2725A2
+ applymovement 27, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -256,18 +256,18 @@ LilycoveCity_ContestHall_EventScript_21B6C3:: @ 821B6C3
faceplayer
msgbox LilycoveCity_ContestHall_Text_21C365, MSGBOX_DEFAULT
closemessage
- applymovement 28, LilycoveCity_ContestHall_Movement_2725A2
+ applymovement 28, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
LilycoveCity_ContestHall_EventScript_21B6DA:: @ 821B6DA
lockall
- applymovement 29, LilycoveCity_ContestHall_Movement_27259E
+ applymovement 29, Common_Movement_FacePlayer
waitmovement 0
msgbox LilycoveCity_ContestHall_Text_21C3F4, MSGBOX_DEFAULT
closemessage
- applymovement 29, LilycoveCity_ContestHall_Movement_2725A2
+ applymovement 29, Common_Movement_FaceOriginalDirection
waitmovement 0
delay 25
msgbox LilycoveCity_ContestHall_Text_21C411, MSGBOX_DEFAULT
@@ -279,7 +279,7 @@ LilycoveCity_ContestHall_EventScript_21B705:: @ 821B705
faceplayer
msgbox LilycoveCity_ContestHall_Text_21C4B1, MSGBOX_DEFAULT
closemessage
- applymovement 31, LilycoveCity_ContestHall_Movement_2725A2
+ applymovement 31, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -289,7 +289,7 @@ LilycoveCity_ContestHall_EventScript_21B71C:: @ 821B71C
faceplayer
msgbox LilycoveCity_ContestHall_Text_21C445, MSGBOX_DEFAULT
closemessage
- applymovement 30, LilycoveCity_ContestHall_Movement_2725A2
+ applymovement 30, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
diff --git a/data/maps/LilycoveCity_ContestLobby/scripts.inc b/data/maps/LilycoveCity_ContestLobby/scripts.inc
index 42ce7beeb..d5dac8bfd 100644
--- a/data/maps/LilycoveCity_ContestLobby/scripts.inc
+++ b/data/maps/LilycoveCity_ContestLobby/scripts.inc
@@ -1,6 +1,6 @@
LilycoveCity_ContestLobby_MapScripts:: @ 821A211
- map_script 3, LilycoveCity_ContestLobby_MapScript1_21A21C
- map_script 2, LilycoveCity_ContestLobby_MapScript2_21A243
+ map_script MAP_SCRIPT_ON_TRANSITION, LilycoveCity_ContestLobby_MapScript1_21A21C
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, LilycoveCity_ContestLobby_MapScript2_21A243
.byte 0
LilycoveCity_ContestLobby_MapScript1_21A21C: @ 821A21C
@@ -22,13 +22,13 @@ LilycoveCity_ContestLobby_EventScript_21A23C:: @ 821A23C
return
LilycoveCity_ContestLobby_MapScript2_21A243: @ 821A243
- map_script_2 VAR_0x4099, 1, LilycoveCity_ContestLobby_EventScript_21A255
- map_script_2 VAR_0x4099, 2, LilycoveCity_ContestLobby_EventScript_21A427
+ map_script_2 VAR_LILYCOVE_CONTEST_LOBBY_STATE, 1, LilycoveCity_ContestLobby_EventScript_21A255
+ map_script_2 VAR_LILYCOVE_CONTEST_LOBBY_STATE, 2, LilycoveCity_ContestLobby_EventScript_21A427
.2byte 0
LilycoveCity_ContestLobby_EventScript_21A255:: @ 821A255
goto_if_set FLAG_HIDE_LILYCOVE_MUSEUM_CURATOR, LilycoveCity_ContestLobby_EventScript_21A264
- setvar VAR_0x4099, 0
+ setvar VAR_LILYCOVE_CONTEST_LOBBY_STATE, 0
end
LilycoveCity_ContestLobby_EventScript_21A264:: @ 821A264
@@ -55,7 +55,7 @@ LilycoveCity_ContestLobby_EventScript_21A2AA:: @ 821A2AA
msgbox LilycoveCity_ContestLobby_Text_21AF63, MSGBOX_DEFAULT
closemessage
special sub_80F88DC
- setvar VAR_0x4099, 0
+ setvar VAR_LILYCOVE_CONTEST_LOBBY_STATE, 0
specialvar VAR_RESULT, GiveMonArtistRibbon
compare VAR_RESULT, 1
call_if_eq LilycoveCity_ContestLobby_EventScript_21A314
@@ -75,7 +75,7 @@ LilycoveCity_ContestLobby_EventScript_21A2E4:: @ 821A2E4
closemessage
applymovement 4, LilycoveCity_ContestLobby_Movement_21A40F
waitmovement 0
- setvar VAR_0x4099, 0
+ setvar VAR_LILYCOVE_CONTEST_LOBBY_STATE, 0
removeobject 4
releaseall
end
@@ -86,7 +86,7 @@ LilycoveCity_ContestLobby_EventScript_21A314:: @ 821A314
applymovement 4, LilycoveCity_ContestLobby_Movement_21A41A
waitmovement 0
playse SE_PIN
- applymovement 4, LilycoveCity_ContestLobby_Movement_272598
+ applymovement 4, Common_Movement_ExclamationMark
waitmovement 0
applymovement 4, LilycoveCity_ContestLobby_Movement_21A41E
waitmovement 0
@@ -202,7 +202,7 @@ LilycoveCity_ContestLobby_Movement_21A41E: @ 821A41E
LilycoveCity_ContestLobby_EventScript_21A427:: @ 821A427
goto_if_set FLAG_HIDE_LILYCOVE_MUSEUM_CURATOR, LilycoveCity_ContestLobby_EventScript_21A436
- setvar VAR_0x4099, 0
+ setvar VAR_LILYCOVE_CONTEST_LOBBY_STATE, 0
end
LilycoveCity_ContestLobby_EventScript_21A436:: @ 821A436
@@ -227,7 +227,7 @@ LilycoveCity_ContestLobby_EventScript_21A47A:: @ 821A47A
msgbox LilycoveCity_ContestLobby_Text_21AF63, MSGBOX_DEFAULT
closemessage
special sub_80F88DC
- setvar VAR_0x4099, 0
+ setvar VAR_LILYCOVE_CONTEST_LOBBY_STATE, 0
specialvar VAR_RESULT, GiveMonArtistRibbon
compare VAR_RESULT, 1
call_if_eq LilycoveCity_ContestLobby_EventScript_21A4E4
@@ -247,7 +247,7 @@ LilycoveCity_ContestLobby_EventScript_21A4B4:: @ 821A4B4
closemessage
applymovement 11, LilycoveCity_ContestLobby_Movement_21A53C
waitmovement 0
- setvar VAR_0x4099, 0
+ setvar VAR_LILYCOVE_CONTEST_LOBBY_STATE, 0
removeobject 11
releaseall
end
@@ -259,7 +259,7 @@ LilycoveCity_ContestLobby_EventScript_21A4E4:: @ 821A4E4
applymovement 11, LilycoveCity_ContestLobby_Movement_21A547
waitmovement 0
playse SE_PIN
- applymovement 11, LilycoveCity_ContestLobby_Movement_272598
+ applymovement 11, Common_Movement_ExclamationMark
waitmovement 0
applymovement 11, LilycoveCity_ContestLobby_Movement_21A54B
waitmovement 0
@@ -338,28 +338,28 @@ LilycoveCity_ContestLobby_EventScript_21A585:: @ 821A585
return
LilycoveCity_ContestLobby_EventScript_21A5B7:: @ 821A5B7
- setvar VAR_0x4088, 1
+ setvar VAR_CONTEST_LOCATION, 1
return
LilycoveCity_ContestLobby_EventScript_21A5BD:: @ 821A5BD
- setvar VAR_0x4088, 2
+ setvar VAR_CONTEST_LOCATION, 2
return
LilycoveCity_ContestLobby_EventScript_21A5C3:: @ 821A5C3
- setvar VAR_0x4088, 3
+ setvar VAR_CONTEST_LOCATION, 3
return
LilycoveCity_ContestLobby_EventScript_21A5C9:: @ 821A5C9
- setvar VAR_0x4088, 4
+ setvar VAR_CONTEST_LOCATION, 4
return
LilycoveCity_ContestLobby_EventScript_21A5CF:: @ 821A5CF
setflag FLAG_HIDE_LILYCOVE_MUSEUM_CURATOR
- copyvar VAR_0x4094, 0x1
+ copyvar VAR_LILYCOVE_MUSEUM_2F_STATE, 0x1
giveitem ITEM_CONTEST_PASS, 1
setvar VAR_0x800B, 8
setvar VAR_CONTEST_RANK, 3
- setvar VAR_0x4099, 1
+ setvar VAR_LILYCOVE_CONTEST_LOBBY_STATE, 1
setflag FLAG_SYS_RIBBON_GET
end
@@ -614,7 +614,7 @@ LilycoveCity_ContestLobby_EventScript_21A7E9:: @ 821A7E9
LilycoveCity_ContestLobby_EventScript_21A7F9:: @ 821A7F9
closemessage
- applymovement VAR_LAST_TALKED, LilycoveCity_ContestLobby_Movement_2725A2
+ applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -642,7 +642,7 @@ LilycoveCity_ContestLobby_EventScript_21A856:: @ 821A856
msgbox LilycoveCity_ContestLobby_Text_27BD17, MSGBOX_YESNO
compare VAR_RESULT, 0
goto_if_eq LilycoveCity_ContestLobby_EventScript_21A97F
- call LilycoveCity_ContestLobby_EventScript_27134F
+ call Common_EventScript_SaveGame
compare VAR_RESULT, 0
goto_if_eq LilycoveCity_ContestLobby_EventScript_21A97F
message LilycoveCity_ContestLobby_Text_27C8FD
@@ -833,9 +833,9 @@ LilycoveCity_ContestLobby_EventScript_21AB17:: @ 821AB17
waitmessage
subvar VAR_0x8004, 1
call LilycoveCity_ContestLobby_EventScript_21AC49
- setvar VAR_0x4086, 1
+ setvar VAR_LINK_CONTEST_ROOM_STATE, 1
special sub_80F8AFC
- setvar VAR_0x4088, 5
+ setvar VAR_CONTEST_LOCATION, 5
setvar VAR_CONTEST_RANK, 3
call LilycoveCity_ContestLobby_EventScript_21A5EF
end
diff --git a/data/maps/LilycoveCity_CoveLilyMotel_1F/scripts.inc b/data/maps/LilycoveCity_CoveLilyMotel_1F/scripts.inc
index 7ccc8b82f..87e4c0afd 100644
--- a/data/maps/LilycoveCity_CoveLilyMotel_1F/scripts.inc
+++ b/data/maps/LilycoveCity_CoveLilyMotel_1F/scripts.inc
@@ -6,33 +6,33 @@ LilycoveCity_CoveLilyMotel_1F_EventScript_218189:: @ 8218189
goto_if_set FLAG_SYS_GAME_CLEAR, LilycoveCity_CoveLilyMotel_1F_EventScript_2181EA
goto_if_set FLAG_BADGE07_GET, LilycoveCity_CoveLilyMotel_1F_EventScript_2181C3
msgbox LilycoveCity_CoveLilyMotel_1F_Text_218264, MSGBOX_DEFAULT
- applymovement 1, LilycoveCity_CoveLilyMotel_1F_Movement_27259E
+ applymovement 1, Common_Movement_FacePlayer
waitmovement 0
msgbox LilycoveCity_CoveLilyMotel_1F_Text_21831E, MSGBOX_DEFAULT
closemessage
- applymovement 1, LilycoveCity_CoveLilyMotel_1F_Movement_2725A2
+ applymovement 1, Common_Movement_FaceOriginalDirection
waitmovement 0
releaseall
end
LilycoveCity_CoveLilyMotel_1F_EventScript_2181C3:: @ 82181C3
msgbox LilycoveCity_CoveLilyMotel_1F_Text_2183C3, MSGBOX_DEFAULT
- applymovement 1, LilycoveCity_CoveLilyMotel_1F_Movement_27259E
+ applymovement 1, Common_Movement_FacePlayer
waitmovement 0
msgbox LilycoveCity_CoveLilyMotel_1F_Text_218470, MSGBOX_DEFAULT
closemessage
- applymovement 1, LilycoveCity_CoveLilyMotel_1F_Movement_2725A2
+ applymovement 1, Common_Movement_FaceOriginalDirection
waitmovement 0
releaseall
end
LilycoveCity_CoveLilyMotel_1F_EventScript_2181EA:: @ 82181EA
msgbox LilycoveCity_CoveLilyMotel_1F_Text_218544, MSGBOX_DEFAULT
- applymovement 1, LilycoveCity_CoveLilyMotel_1F_Movement_27259E
+ applymovement 1, Common_Movement_FacePlayer
waitmovement 0
msgbox LilycoveCity_CoveLilyMotel_1F_Text_2185F4, MSGBOX_DEFAULT
closemessage
- applymovement 1, LilycoveCity_CoveLilyMotel_1F_Movement_2725A2
+ applymovement 1, Common_Movement_FaceOriginalDirection
waitmovement 0
releaseall
end
@@ -40,11 +40,11 @@ LilycoveCity_CoveLilyMotel_1F_EventScript_2181EA:: @ 82181EA
LilycoveCity_CoveLilyMotel_1F_EventScript_218211:: @ 8218211
lockall
playse SE_PIN
- applymovement 1, LilycoveCity_CoveLilyMotel_1F_Movement_272598
+ applymovement 1, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 1, LilycoveCity_CoveLilyMotel_1F_Movement_27259A
+ applymovement 1, Common_Movement_Delay48
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, LilycoveCity_CoveLilyMotel_1F_Movement_2725AA
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceDown
waitmovement 0
msgbox LilycoveCity_CoveLilyMotel_1F_Text_21839B, MSGBOX_DEFAULT
closemessage
diff --git a/data/maps/LilycoveCity_CoveLilyMotel_2F/scripts.inc b/data/maps/LilycoveCity_CoveLilyMotel_2F/scripts.inc
index 03ac733f9..4a761a706 100644
--- a/data/maps/LilycoveCity_CoveLilyMotel_2F/scripts.inc
+++ b/data/maps/LilycoveCity_CoveLilyMotel_2F/scripts.inc
@@ -26,7 +26,7 @@ LilycoveCity_CoveLilyMotel_2F_EventScript_218702:: @ 8218702
LilycoveCity_CoveLilyMotel_2F_EventScript_21870F:: @ 821870F
message LilycoveCity_CoveLilyMotel_2F_Text_21881C
waitmessage
- call LilycoveCity_CoveLilyMotel_2F_EventScript_27207E
+ call Common_EventScript_PlayGymBadgeFanfare
special Special_ShowDiploma
waitstate
release
diff --git a/data/maps/LilycoveCity_DepartmentStoreElevator/scripts.inc b/data/maps/LilycoveCity_DepartmentStoreElevator/scripts.inc
index 80a93df47..18fc0404b 100644
--- a/data/maps/LilycoveCity_DepartmentStoreElevator/scripts.inc
+++ b/data/maps/LilycoveCity_DepartmentStoreElevator/scripts.inc
@@ -114,7 +114,7 @@ LilycoveCity_DepartmentStoreElevator_EventScript_2207E0:: @ 82207E0
LilycoveCity_DepartmentStoreElevator_EventScript_2207E5:: @ 82207E5
special sub_8139C10
closemessage
- applymovement VAR_LAST_TALKED, LilycoveCity_DepartmentStoreElevator_Movement_2725AA
+ applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceDown
waitmovement 0
waitse
special ShakeScreenInElevator
diff --git a/data/maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc b/data/maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc
index d5379f96a..f1c974dd9 100644
--- a/data/maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc
+++ b/data/maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc
@@ -1,5 +1,5 @@
LilycoveCity_DepartmentStoreRooftop_MapScripts:: @ 8220207
- map_script 3, LilycoveCity_DepartmentStoreRooftop_MapScript1_22020D
+ map_script MAP_SCRIPT_ON_TRANSITION, LilycoveCity_DepartmentStoreRooftop_MapScript1_22020D
.byte 0
LilycoveCity_DepartmentStoreRooftop_MapScript1_22020D: @ 822020D
diff --git a/data/maps/LilycoveCity_DepartmentStore_1F/scripts.inc b/data/maps/LilycoveCity_DepartmentStore_1F/scripts.inc
index ffa2244f4..ec1d89b66 100644
--- a/data/maps/LilycoveCity_DepartmentStore_1F/scripts.inc
+++ b/data/maps/LilycoveCity_DepartmentStore_1F/scripts.inc
@@ -22,7 +22,7 @@ LilycoveCity_DepartmentStore_1F_EventScript_21F69C:: @ 821F69C
copyvar VAR_0x8008, VAR_RESULT
special BufferLottoTicketNumber
msgbox LilycoveCity_DepartmentStore_1F_Text_2A650B, MSGBOX_DEFAULT
- applymovement 2, LilycoveCity_DepartmentStore_1F_Movement_2725A8
+ applymovement 2, Common_Movement_WalkInPlaceRight
waitmovement 0
playse SE_PC_ON
special DoLotteryCornerComputerEffect
@@ -30,7 +30,7 @@ LilycoveCity_DepartmentStore_1F_EventScript_21F69C:: @ 821F69C
delay 220
special EndLotteryCornerComputerEffect
delay 10
- applymovement 2, LilycoveCity_DepartmentStore_1F_Movement_27259E
+ applymovement 2, Common_Movement_FacePlayer
waitmovement 0
compare VAR_0x8004, 0
goto_if_eq LilycoveCity_DepartmentStore_1F_EventScript_21F7A1
diff --git a/data/maps/LilycoveCity_DepartmentStore_5F/scripts.inc b/data/maps/LilycoveCity_DepartmentStore_5F/scripts.inc
index b278d3e14..e62537422 100644
--- a/data/maps/LilycoveCity_DepartmentStore_5F/scripts.inc
+++ b/data/maps/LilycoveCity_DepartmentStore_5F/scripts.inc
@@ -1,5 +1,5 @@
LilycoveCity_DepartmentStore_5F_MapScripts:: @ 821FF7A
- map_script 4, LilycoveCity_DepartmentStore_5F_MapScript2_21FF80
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, LilycoveCity_DepartmentStore_5F_MapScript2_21FF80
.byte 0
LilycoveCity_DepartmentStore_5F_MapScript2_21FF80: @ 821FF80
@@ -123,7 +123,7 @@ LilycoveCity_DepartmentStore_5F_EventScript_22006C:: @ 822006C
LilycoveCity_DepartmentStore_5F_EventScript_220075:: @ 8220075
lockall
- applymovement 7, LilycoveCity_DepartmentStore_5F_Movement_27259E
+ applymovement 7, Common_Movement_FacePlayer
waitmovement 0
compare VAR_0x405E, 0
goto_if_eq LilycoveCity_DepartmentStore_5F_EventScript_22009C
@@ -141,7 +141,7 @@ LilycoveCity_DepartmentStore_5F_EventScript_22009C:: @ 822009C
LilycoveCity_DepartmentStore_5F_EventScript_2200A7:: @ 82200A7
msgbox LilycoveCity_DepartmentStore_5F_Text_2201C4, MSGBOX_DEFAULT
closemessage
- applymovement 7, LilycoveCity_DepartmentStore_5F_Movement_2725A6
+ applymovement 7, Common_Movement_WalkInPlaceUp
waitmovement 0
releaseall
end
diff --git a/data/maps/LilycoveCity_Harbor/scripts.inc b/data/maps/LilycoveCity_Harbor/scripts.inc
index 5e9157826..67b05c692 100644
--- a/data/maps/LilycoveCity_Harbor/scripts.inc
+++ b/data/maps/LilycoveCity_Harbor/scripts.inc
@@ -1,5 +1,5 @@
LilycoveCity_Harbor_MapScripts:: @ 821E000
- map_script 3, LilycoveCity_Harbor_MapScript1_21E006
+ map_script MAP_SCRIPT_ON_TRANSITION, LilycoveCity_Harbor_MapScript1_21E006
.byte 0
LilycoveCity_Harbor_MapScript1_21E006: @ 821E006
@@ -107,45 +107,45 @@ LilycoveCity_Harbor_EventScript_21E171:: @ 821E171
LilycoveCity_Harbor_EventScript_21E194:: @ 821E194
setvar VAR_TEMP_E, 0
- goto_if_unset FLAG_SYS_HAS_EON_TICKET, LilycoveCity_Harbor_EventScript_27374E
+ goto_if_unset FLAG_SYS_HAS_EON_TICKET, Common_EventScript_NopReturn
checkitem ITEM_EON_TICKET, 1
compare VAR_RESULT, 0
- goto_if_eq LilycoveCity_Harbor_EventScript_27374E
+ goto_if_eq Common_EventScript_NopReturn
setvar VAR_TEMP_E, 1
- goto_if_set FLAG_HAS_EON_TICKET, LilycoveCity_Harbor_EventScript_27374E
+ goto_if_set FLAG_HAS_EON_TICKET, Common_EventScript_NopReturn
setvar VAR_TEMP_E, 2
return
LilycoveCity_Harbor_EventScript_21E1C6:: @ 821E1C6
setvar VAR_TEMP_D, 0
- goto_if_unset FLAG_ENABLE_SHIP_BIRTH_ISLAND, LilycoveCity_Harbor_EventScript_27374E
+ goto_if_unset FLAG_ENABLE_SHIP_BIRTH_ISLAND, Common_EventScript_NopReturn
checkitem ITEM_AURORA_TICKET, 1
compare VAR_RESULT, 0
- goto_if_eq LilycoveCity_Harbor_EventScript_27374E
+ goto_if_eq Common_EventScript_NopReturn
setvar VAR_TEMP_D, 1
- goto_if_set FLAG_HAS_AURORA_TICKET, LilycoveCity_Harbor_EventScript_27374E
+ goto_if_set FLAG_HAS_AURORA_TICKET, Common_EventScript_NopReturn
setvar VAR_TEMP_D, 2
return
LilycoveCity_Harbor_EventScript_21E1F8:: @ 821E1F8
setvar VAR_TEMP_C, 0
- goto_if_unset FLAG_ENABLE_SHIP_FARAWAY_ISLAND, LilycoveCity_Harbor_EventScript_27374E
+ goto_if_unset FLAG_ENABLE_SHIP_FARAWAY_ISLAND, Common_EventScript_NopReturn
checkitem ITEM_OLD_SEA_MAP, 1
compare VAR_RESULT, 0
- goto_if_eq LilycoveCity_Harbor_EventScript_27374E
+ goto_if_eq Common_EventScript_NopReturn
setvar VAR_TEMP_C, 1
- goto_if_set FLAG_HAS_OLD_SEA_MAP, LilycoveCity_Harbor_EventScript_27374E
+ goto_if_set FLAG_HAS_OLD_SEA_MAP, Common_EventScript_NopReturn
setvar VAR_TEMP_C, 2
return
LilycoveCity_Harbor_EventScript_21E22A:: @ 821E22A
setvar VAR_TEMP_9, 0
- goto_if_unset FLAG_ENABLE_SHIP_NAVEL_ROCK, LilycoveCity_Harbor_EventScript_27374E
+ goto_if_unset FLAG_ENABLE_SHIP_NAVEL_ROCK, Common_EventScript_NopReturn
checkitem ITEM_MYSTIC_TICKET, 1
compare VAR_RESULT, 0
- goto_if_eq LilycoveCity_Harbor_EventScript_27374E
+ goto_if_eq Common_EventScript_NopReturn
setvar VAR_TEMP_9, 1
- goto_if_set FLAG_HAS_MYSTIC_TICKET, LilycoveCity_Harbor_EventScript_27374E
+ goto_if_set FLAG_HAS_MYSTIC_TICKET, Common_EventScript_NopReturn
setvar VAR_TEMP_9, 2
return
@@ -246,12 +246,12 @@ LilycoveCity_Harbor_EventScript_21E350:: @ 821E350
call LilycoveCity_Harbor_EventScript_21E4EE
msgbox LilycoveCity_Harbor_Text_2C68A5, MSGBOX_DEFAULT
closemessage
- applymovement 4, LilycoveCity_Harbor_Movement_2725A6
+ applymovement 4, Common_Movement_WalkInPlaceUp
waitmovement 0
playse SE_PIN
- applymovement 4, LilycoveCity_Harbor_Movement_272598
+ applymovement 4, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 4, LilycoveCity_Harbor_Movement_27259A
+ applymovement 4, Common_Movement_Delay48
waitmovement 0
compare VAR_FACING, 2
call_if_eq LilycoveCity_Harbor_EventScript_21E656
@@ -328,12 +328,12 @@ LilycoveCity_Harbor_EventScript_21E44D:: @ 821E44D
LilycoveCity_Harbor_EventScript_21E4B6:: @ 821E4B6
msgbox LilycoveCity_Harbor_Text_2A6A82, MSGBOX_DEFAULT
closemessage
- applymovement 4, LilycoveCity_Harbor_Movement_2725A6
+ applymovement 4, Common_Movement_WalkInPlaceUp
waitmovement 0
delay 30
removeobject 4
delay 30
- applymovement 1, LilycoveCity_Harbor_Movement_2725AA
+ applymovement 1, Common_Movement_WalkInPlaceDown
waitmovement 0
showobjectat 1, MAP_LILYCOVE_CITY_HARBOR
delay 30
@@ -342,19 +342,19 @@ LilycoveCity_Harbor_EventScript_21E4B6:: @ 821E4B6
end
LilycoveCity_Harbor_EventScript_21E4EE:: @ 821E4EE
- applymovement VAR_LAST_TALKED, LilycoveCity_Harbor_Movement_2725A6
+ applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceUp
waitmovement 0
delay 30
hideobjectat VAR_LAST_TALKED, MAP_LILYCOVE_CITY_HARBOR
delay 60
addobject 4
delay 30
- applymovement 4, LilycoveCity_Harbor_Movement_27259E
+ applymovement 4, Common_Movement_FacePlayer
waitmovement 0
return
LilycoveCity_Harbor_EventScript_21E514:: @ 821E514
- applymovement 4, LilycoveCity_Harbor_Movement_2725A6
+ applymovement 4, Common_Movement_WalkInPlaceUp
waitmovement 0
delay 30
removeobject 4
@@ -415,7 +415,7 @@ LilycoveCity_Harbor_EventScript_21E5C0:: @ 821E5C0
LilycoveCity_Harbor_EventScript_21E5CC:: @ 821E5CC
msgbox LilycoveCity_Harbor_Text_21E89D, MSGBOX_DEFAULT
closemessage
- applymovement VAR_LAST_TALKED, LilycoveCity_Harbor_Movement_2725A6
+ applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceUp
waitmovement 0
delay 30
hideobjectat VAR_LAST_TALKED, MAP_LILYCOVE_CITY_HARBOR
@@ -494,22 +494,22 @@ LilycoveCity_Harbor_Movement_21E671: @ 821E671
step_end
LilycoveCity_Harbor_EventScript_21E675:: @ 821E675
- applymovement 5, LilycoveCity_Harbor_Movement_2725A4
+ applymovement 5, Common_Movement_WalkInPlaceLeft
waitmovement 0
return
LilycoveCity_Harbor_EventScript_21E680:: @ 821E680
- applymovement 5, LilycoveCity_Harbor_Movement_2725AA
+ applymovement 5, Common_Movement_WalkInPlaceDown
waitmovement 0
return
LilycoveCity_Harbor_EventScript_21E68B:: @ 821E68B
- applymovement 5, LilycoveCity_Harbor_Movement_2725AA
+ applymovement 5, Common_Movement_WalkInPlaceDown
waitmovement 0
return
LilycoveCity_Harbor_EventScript_21E696:: @ 821E696
- applymovement 5, LilycoveCity_Harbor_Movement_2725A4
+ applymovement 5, Common_Movement_WalkInPlaceLeft
waitmovement 0
return
diff --git a/data/maps/LilycoveCity_House2/scripts.inc b/data/maps/LilycoveCity_House2/scripts.inc
index 92adafe5a..0a0792bfd 100644
--- a/data/maps/LilycoveCity_House2/scripts.inc
+++ b/data/maps/LilycoveCity_House2/scripts.inc
@@ -8,7 +8,7 @@ LilycoveCity_House2_EventScript_21ED75:: @ 821ED75
msgbox LilycoveCity_House2_Text_21EDB6, MSGBOX_DEFAULT
giveitem_std ITEM_TM44
compare VAR_RESULT, 0
- goto_if_eq LilycoveCity_House2_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
setflag FLAG_RECEIVED_TM44
msgbox LilycoveCity_House2_Text_21EDF9, MSGBOX_DEFAULT
release
diff --git a/data/maps/LilycoveCity_House3/scripts.inc b/data/maps/LilycoveCity_House3/scripts.inc
index 644c50113..ad8989b4c 100644
--- a/data/maps/LilycoveCity_House3/scripts.inc
+++ b/data/maps/LilycoveCity_House3/scripts.inc
@@ -1,5 +1,5 @@
LilycoveCity_House3_MapScripts:: @ 821EE3C
- map_script 3, LilycoveCity_House3_MapScript1_21EE42
+ map_script MAP_SCRIPT_ON_TRANSITION, LilycoveCity_House3_MapScript1_21EE42
.byte 0
LilycoveCity_House3_MapScript1_21EE42: @ 821EE42
@@ -15,7 +15,7 @@ LilycoveCity_House3_EventScript_21EE4B:: @ 821EE4B
goto_if_eq LilycoveCity_House3_EventScript_21EE75
msgbox LilycoveCity_House3_Text_21F0F8, MSGBOX_DEFAULT
closemessage
- applymovement VAR_LAST_TALKED, LilycoveCity_House3_Movement_2725A2
+ applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -23,7 +23,7 @@ LilycoveCity_House3_EventScript_21EE4B:: @ 821EE4B
LilycoveCity_House3_EventScript_21EE75:: @ 821EE75
msgbox LilycoveCity_House3_Text_21F0A9, MSGBOX_DEFAULT
closemessage
- applymovement VAR_LAST_TALKED, LilycoveCity_House3_Movement_2725A2
+ applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -33,7 +33,7 @@ LilycoveCity_House3_EventScript_21EE8A:: @ 821EE8A
faceplayer
msgbox LilycoveCity_House3_Text_21F430, MSGBOX_DEFAULT
closemessage
- applymovement VAR_LAST_TALKED, LilycoveCity_House3_Movement_2725A2
+ applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
diff --git a/data/maps/LilycoveCity_LilycoveMuseum_1F/scripts.inc b/data/maps/LilycoveCity_LilycoveMuseum_1F/scripts.inc
index 89ac90dc6..8f2cdde28 100644
--- a/data/maps/LilycoveCity_LilycoveMuseum_1F/scripts.inc
+++ b/data/maps/LilycoveCity_LilycoveMuseum_1F/scripts.inc
@@ -7,7 +7,7 @@ LilycoveCity_LilycoveMuseum_1F_EventScript_218CB9:: @ 8218CB9
LilycoveCity_LilycoveMuseum_1F_EventScript_218CC2:: @ 8218CC2
lockall
- applymovement 2, LilycoveCity_LilycoveMuseum_1F_Movement_27259E
+ applymovement 2, Common_Movement_FacePlayer
message LilycoveCity_LilycoveMuseum_1F_Text_218EBC
waitmessage
multichoice 20, 8, 16, 1
@@ -154,7 +154,7 @@ LilycoveCity_LilycoveMuseum_1F_EventScript_218E2B:: @ 8218E2B
faceplayer
msgbox LilycoveCity_LilycoveMuseum_1F_Text_2195FF, MSGBOX_DEFAULT
closemessage
- applymovement 8, LilycoveCity_LilycoveMuseum_1F_Movement_2725A2
+ applymovement 8, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
diff --git a/data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc b/data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc
index f73fbf092..3bbfa8a38 100644
--- a/data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc
+++ b/data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc
@@ -1,6 +1,6 @@
LilycoveCity_LilycoveMuseum_2F_MapScripts:: @ 821973A
- map_script 1, LilycoveCity_LilycoveMuseum_2F_MapScript1_219745
- map_script 2, LilycoveCity_LilycoveMuseum_2F_MapScript2_2197FE
+ map_script MAP_SCRIPT_ON_LOAD, LilycoveCity_LilycoveMuseum_2F_MapScript1_219745
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, LilycoveCity_LilycoveMuseum_2F_MapScript2_2197FE
.byte 0
LilycoveCity_LilycoveMuseum_2F_MapScript1_219745: @ 8219745
@@ -57,12 +57,12 @@ LilycoveCity_LilycoveMuseum_2F_EventScript_2197EB:: @ 82197EB
end
LilycoveCity_LilycoveMuseum_2F_MapScript2_2197FE: @ 82197FE
- map_script_2 VAR_0x4094, 0, LilycoveCity_LilycoveMuseum_2F_EventScript_219808
+ map_script_2 VAR_LILYCOVE_MUSEUM_2F_STATE, 0, LilycoveCity_LilycoveMuseum_2F_EventScript_219808
.2byte 0
LilycoveCity_LilycoveMuseum_2F_EventScript_219808:: @ 8219808
lockall
- applymovement 1, LilycoveCity_LilycoveMuseum_2F_Movement_27259E
+ applymovement 1, Common_Movement_FacePlayer
applymovement EVENT_OBJ_ID_PLAYER, LilycoveCity_LilycoveMuseum_2F_Movement_219861
waitmovement 0
msgbox LilycoveCity_LilycoveMuseum_2F_Text_2199EB, MSGBOX_SIGN
@@ -71,12 +71,12 @@ LilycoveCity_LilycoveMuseum_2F_EventScript_219808:: @ 8219808
applymovement EVENT_OBJ_ID_PLAYER, LilycoveCity_LilycoveMuseum_2F_Movement_219863
waitmovement 0
msgbox LilycoveCity_LilycoveMuseum_2F_Text_219A0D, MSGBOX_SIGN
- applymovement 1, LilycoveCity_LilycoveMuseum_2F_Movement_27259E
+ applymovement 1, Common_Movement_FacePlayer
waitmovement 0
applymovement EVENT_OBJ_ID_PLAYER, LilycoveCity_LilycoveMuseum_2F_Movement_219861
waitmovement 0
msgbox LilycoveCity_LilycoveMuseum_2F_Text_219BC4, MSGBOX_SIGN
- copyvar VAR_0x4094, 0x1
+ copyvar VAR_LILYCOVE_MUSEUM_2F_STATE, 0x1
releaseall
end
@@ -107,7 +107,7 @@ LilycoveCity_LilycoveMuseum_2F_EventScript_2198BA:: @ 82198BA
end
LilycoveCity_LilycoveMuseum_2F_EventScript_2198C3:: @ 82198C3
- applymovement 1, LilycoveCity_LilycoveMuseum_2F_Movement_27259E
+ applymovement 1, Common_Movement_FacePlayer
waitmovement 0
msgbox LilycoveCity_LilycoveMuseum_2F_Text_219DD4, MSGBOX_DEFAULT
applymovement 1, LilycoveCity_LilycoveMuseum_2F_Movement_219863
@@ -116,7 +116,7 @@ LilycoveCity_LilycoveMuseum_2F_EventScript_2198C3:: @ 82198C3
end
LilycoveCity_LilycoveMuseum_2F_EventScript_2198EA:: @ 82198EA
- applymovement 1, LilycoveCity_LilycoveMuseum_2F_Movement_27259E
+ applymovement 1, Common_Movement_FacePlayer
msgbox LilycoveCity_LilycoveMuseum_2F_Text_219EC5, MSGBOX_DEFAULT
givedecoration_std 44
compare VAR_RESULT, 0
@@ -127,7 +127,7 @@ LilycoveCity_LilycoveMuseum_2F_EventScript_2198EA:: @ 82198EA
end
LilycoveCity_LilycoveMuseum_2F_EventScript_219911:: @ 8219911
- call LilycoveCity_LilycoveMuseum_2F_EventScript_272071
+ call Common_EventScript_NoRoomLeftForAnother
msgbox LilycoveCity_LilycoveMuseum_2F_Text_219EED, MSGBOX_DEFAULT
closemessage
releaseall
diff --git a/data/maps/LilycoveCity_MoveDeletersHouse/scripts.inc b/data/maps/LilycoveCity_MoveDeletersHouse/scripts.inc
index c5c2188e5..e94fa43f1 100644
--- a/data/maps/LilycoveCity_MoveDeletersHouse/scripts.inc
+++ b/data/maps/LilycoveCity_MoveDeletersHouse/scripts.inc
@@ -3,7 +3,7 @@ LilycoveCity_MoveDeletersHouse_MapScripts:: @ 821EA0A
LilycoveCity_MoveDeletersHouse_EventScript_21EA0B:: @ 821EA0B
lockall
- applymovement 1, LilycoveCity_MoveDeletersHouse_Movement_27259E
+ applymovement 1, Common_Movement_FacePlayer
waitmovement 0
msgbox LilycoveCity_MoveDeletersHouse_Text_21EAFD, MSGBOX_YESNO
switch VAR_RESULT
diff --git a/data/maps/LilycoveCity_PokemonCenter_1F/scripts.inc b/data/maps/LilycoveCity_PokemonCenter_1F/scripts.inc
index dd0dff376..0d8da38d5 100644
--- a/data/maps/LilycoveCity_PokemonCenter_1F/scripts.inc
+++ b/data/maps/LilycoveCity_PokemonCenter_1F/scripts.inc
@@ -1,6 +1,6 @@
LilycoveCity_PokemonCenter_1F_MapScripts:: @ 821C5B2
- map_script 3, LilycoveCity_PokemonCenter_1F_MapScript1_21C5BD
- map_script 5, LilycoveCity_PokemonCenter_1F_MapScript1_277C30
+ map_script MAP_SCRIPT_ON_TRANSITION, LilycoveCity_PokemonCenter_1F_MapScript1_21C5BD
+ map_script MAP_SCRIPT_ON_RESUME, LilycoveCity_PokemonCenter_1F_MapScript1_277C30
.byte 0
LilycoveCity_PokemonCenter_1F_MapScript1_21C5BD: @ 821C5BD
diff --git a/data/maps/LilycoveCity_PokemonCenter_2F/scripts.inc b/data/maps/LilycoveCity_PokemonCenter_2F/scripts.inc
index f4a25f137..1e8035483 100644
--- a/data/maps/LilycoveCity_PokemonCenter_2F/scripts.inc
+++ b/data/maps/LilycoveCity_PokemonCenter_2F/scripts.inc
@@ -1,8 +1,8 @@
LilycoveCity_PokemonCenter_2F_MapScripts:: @ 821C75D
- map_script 2, LilycoveCity_PokemonCenter_2F_MapScript2_276C3B
- map_script 4, LilycoveCity_PokemonCenter_2F_MapScript2_276B6C
- map_script 1, LilycoveCity_PokemonCenter_2F_MapScript1_276BBE
- map_script 3, LilycoveCity_PokemonCenter_2F_MapScript1_276ACF
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, LilycoveCity_PokemonCenter_2F_MapScript2_276C3B
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, LilycoveCity_PokemonCenter_2F_MapScript2_276B6C
+ map_script MAP_SCRIPT_ON_LOAD, LilycoveCity_PokemonCenter_2F_MapScript1_276BBE
+ map_script MAP_SCRIPT_ON_TRANSITION, LilycoveCity_PokemonCenter_2F_MapScript1_276ACF
.byte 0
LilycoveCity_PokemonCenter_2F_EventScript_21C772:: @ 821C772
diff --git a/data/maps/LilycoveCity_PokemonTrainerFanClub/scripts.inc b/data/maps/LilycoveCity_PokemonTrainerFanClub/scripts.inc
index 77bc40635..f65d901bb 100644
--- a/data/maps/LilycoveCity_PokemonTrainerFanClub/scripts.inc
+++ b/data/maps/LilycoveCity_PokemonTrainerFanClub/scripts.inc
@@ -1,6 +1,6 @@
LilycoveCity_PokemonTrainerFanClub_MapScripts:: @ 821C785
- map_script 2, LilycoveCity_PokemonTrainerFanClub_MapScript2_21C790
- map_script 3, LilycoveCity_PokemonTrainerFanClub_MapScript1_21C80D
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, LilycoveCity_PokemonTrainerFanClub_MapScript2_21C790
+ map_script MAP_SCRIPT_ON_TRANSITION, LilycoveCity_PokemonTrainerFanClub_MapScript1_21C80D
.byte 0
LilycoveCity_PokemonTrainerFanClub_MapScript2_21C790: @ 821C790
@@ -9,18 +9,18 @@ LilycoveCity_PokemonTrainerFanClub_MapScript2_21C790: @ 821C790
LilycoveCity_PokemonTrainerFanClub_EventScript_21C79A:: @ 821C79A
lockall
- applymovement 1, LilycoveCity_PokemonTrainerFanClub_Movement_2725AA
+ applymovement 1, Common_Movement_WalkInPlaceDown
waitmovement 0
msgbox LilycoveCity_PokemonTrainerFanClub_Text_21CF00, MSGBOX_DEFAULT
applymovement 4, LilycoveCity_PokemonTrainerFanClub_Movement_21C7FD
applymovement 2, LilycoveCity_PokemonTrainerFanClub_Movement_21C7F5
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, LilycoveCity_PokemonTrainerFanClub_Movement_2725A8
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceRight
waitmovement 0
msgbox LilycoveCity_PokemonTrainerFanClub_Text_21CF12, MSGBOX_DEFAULT
applymovement 4, LilycoveCity_PokemonTrainerFanClub_Movement_21C804
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, LilycoveCity_PokemonTrainerFanClub_Movement_2725A4
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceLeft
waitmovement 0
applymovement 4, LilycoveCity_PokemonTrainerFanClub_Movement_21C807
waitmovement 0
diff --git a/data/maps/LinkContestRoom1/scripts.inc b/data/maps/LinkContestRoom1/scripts.inc
index e756c2bc6..b81f35834 100644
--- a/data/maps/LinkContestRoom1/scripts.inc
+++ b/data/maps/LinkContestRoom1/scripts.inc
@@ -1,9 +1,9 @@
LinkContestRoom1_MapScripts:: @ 823B781
- map_script 4, LinkContestRoom1_MapScript2_23B81F
- map_script 2, LinkContestRoom1_MapScript2_23B815
- map_script 3, LinkContestRoom1_MapScript1_23B79F
- map_script 5, LinkContestRoom1_MapScript1_23B803
- map_script 7, LinkContestRoom1_MapScript1_23B79B
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, LinkContestRoom1_MapScript2_23B81F
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, LinkContestRoom1_MapScript2_23B815
+ map_script MAP_SCRIPT_ON_TRANSITION, LinkContestRoom1_MapScript1_23B79F
+ map_script MAP_SCRIPT_ON_RESUME, LinkContestRoom1_MapScript1_23B803
+ map_script MAP_SCRIPT_ON_RETURN_TO_FIELD, LinkContestRoom1_MapScript1_23B79B
.byte 0
LinkContestRoom1_MapScript1_23B79B: @ 823B79B
@@ -61,11 +61,11 @@ LinkContestRoom1_EventScript_23B80F:: @ 823B80F
return
LinkContestRoom1_MapScript2_23B815: @ 823B815
- map_script_2 VAR_0x4086, 1, LinkContestRoom1_EventScript_23B829
+ map_script_2 VAR_LINK_CONTEST_ROOM_STATE, 1, LinkContestRoom1_EventScript_23B829
.2byte 0
LinkContestRoom1_MapScript2_23B81F: @ 823B81F
- map_script_2 VAR_0x4086, 1, LinkContestRoom1_EventScript_23B834
+ map_script_2 VAR_LINK_CONTEST_ROOM_STATE, 1, LinkContestRoom1_EventScript_23B834
.2byte 0
LinkContestRoom1_EventScript_23B829:: @ 823B829
@@ -303,7 +303,7 @@ LinkContestRoom1_EventScript_23BB2B:: @ 823BB2B
specialvar VAR_RESULT, sub_80F9160
compare VAR_RESULT, 1
goto_if_eq LinkContestRoom1_EventScript_23BD86
- switch VAR_0x4088
+ switch VAR_CONTEST_LOCATION
case 1, LinkContestRoom1_EventScript_23BB78
case 2, LinkContestRoom1_EventScript_23BB8B
case 3, LinkContestRoom1_EventScript_23BBE6
@@ -407,7 +407,7 @@ LinkContestRoom1_EventScript_23BD86:: @ 823BD86
LinkContestRoom1_EventScript_23BE44:: @ 823BE44
special sub_80F9154
- switch VAR_0x4088
+ switch VAR_CONTEST_LOCATION
case 1, LinkContestRoom1_EventScript_23BE84
case 2, LinkContestRoom1_EventScript_23BE8E
case 3, LinkContestRoom1_EventScript_23BE98
diff --git a/data/maps/LittlerootTown/scripts.inc b/data/maps/LittlerootTown/scripts.inc
index 5d9161cb4..e133169ba 100644
--- a/data/maps/LittlerootTown/scripts.inc
+++ b/data/maps/LittlerootTown/scripts.inc
@@ -1,24 +1,24 @@
LittlerootTown_MapScripts:: @ 81E7DCB
- map_script 3, LittlerootTown_MapScript1_1E7DDB
- map_script 2, LittlerootTown_MapScript2_1E7EC1
- map_script 4, LittlerootTown_MapScript2_1E7FE2
+ map_script MAP_SCRIPT_ON_TRANSITION, LittlerootTown_MapScript1_1E7DDB
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, LittlerootTown_MapScript2_1E7EC1
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, LittlerootTown_MapScript2_1E7FE2
.byte 0
LittlerootTown_MapScript1_1E7DDB: @ 81E7DDB
setflag FLAG_VISITED_LITTLEROOT_TOWN
- call LittlerootTown_EventScript_271ED7
- compare VAR_0x4092, 2
+ call Common_EventScript_SetupRivalGender
+ compare VAR_LITTLEROOT_INTRO_STATE, 2
call_if_eq LittlerootTown_EventScript_1E7E67
call_if_unset FLAG_RESCUED_BIRCH, LittlerootTown_EventScript_1E7E6F
compare VAR_0x4050, 3
call_if_eq LittlerootTown_EventScript_1E7E92
- compare VAR_0x4082, 4
+ compare VAR_LITTLEROOT_HOUSES_STATE, 4
call_if_eq LittlerootTown_EventScript_1E7E5C
- compare VAR_0x408C, 4
+ compare VAR_LITTLEROOT_HOUSES_STATE_2, 4
call_if_eq LittlerootTown_EventScript_1E7E5C
- compare VAR_0x40C7, 1
+ compare VAR_OLDALE_STATE, 1
call_if_eq LittlerootTown_EventScript_1E7E53
- compare VAR_0x408D, 3
+ compare VAR_LITTLEROOT_RIVAL_STATE, 3
call_if_eq LittlerootTown_EventScript_1E7E4F
compare VAR_0x40D3, 1
call_if_eq LittlerootTown_EventScript_1E7E4B
@@ -39,13 +39,13 @@ LittlerootTown_EventScript_1E7E4F:: @ 81E7E4F
return
LittlerootTown_EventScript_1E7E53:: @ 81E7E53
- setvar VAR_0x40C7, 2
+ setvar VAR_OLDALE_STATE, 2
setflag FLAG_HIDE_OLDALE_TOWN_RIVAL
return
LittlerootTown_EventScript_1E7E5C:: @ 81E7E5C
- setvar VAR_0x4082, 5
- setvar VAR_0x408C, 5
+ setvar VAR_LITTLEROOT_HOUSES_STATE, 5
+ setvar VAR_LITTLEROOT_HOUSES_STATE_2, 5
return
LittlerootTown_EventScript_1E7E67:: @ 81E7E67
@@ -83,8 +83,8 @@ LittlerootTown_EventScript_1E7EB9:: @ 81E7EB9
return
LittlerootTown_MapScript2_1E7EC1: @ 81E7EC1
- map_script_2 VAR_0x4092, 1, LittlerootTown_EventScript_1E7EDB
- map_script_2 VAR_0x4092, 2, LittlerootTown_EventScript_1E7EF9
+ map_script_2 VAR_LITTLEROOT_INTRO_STATE, 1, LittlerootTown_EventScript_1E7EDB
+ map_script_2 VAR_LITTLEROOT_INTRO_STATE, 2, LittlerootTown_EventScript_1E7EF9
map_script_2 VAR_0x40D3, 1, LittlerootTown_EventScript_1E7FB1
.2byte 0
@@ -136,7 +136,7 @@ LittlerootTown_EventScript_1E7F17:: @ 81E7F17
applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_Movement_1E7FA9
waitmovement 0
setflag FLAG_HIDE_LITTLEROOT_TOWN_MOM_OUTSIDE
- setvar VAR_0x4092, 3
+ setvar VAR_LITTLEROOT_INTRO_STATE, 3
hideobjectat EVENT_OBJ_ID_PLAYER, MAP_PETALBURG_CITY
closedoor VAR_0x8004, VAR_0x8005
waitdooranim
@@ -186,7 +186,7 @@ LittlerootTown_Movement_1E7FAC: @ 81E7FAC
LittlerootTown_EventScript_1E7FB1:: @ 81E7FB1
lockall
playse SE_PIN
- applymovement 8, LittlerootTown_Movement_272598
+ applymovement 8, Common_Movement_ExclamationMark
waitmovement 0
delay 80
msgbox LittlerootTown_Text_1E8DA2, MSGBOX_DEFAULT
@@ -246,7 +246,7 @@ LittlerootTown_EventScript_1E805D:: @ 81E805D
special GetPlayerBigGuyGirlString
msgbox LittlerootTown_Text_1E8C3A, MSGBOX_DEFAULT
closemessage
- applymovement 1, LittlerootTown_Movement_2725A2
+ applymovement 1, Common_Movement_FaceOriginalDirection
waitmovement 0
setvar VAR_0x4050, 2
release
@@ -357,14 +357,14 @@ LittlerootTown_Movement_1E8118: @ 81E8118
LittlerootTown_EventScript_1E811F:: @ 81E811F
lockall
- applymovement 1, LittlerootTown_Movement_2725A8
+ applymovement 1, Common_Movement_WalkInPlaceRight
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_Movement_2725A4
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceLeft
waitmovement 0
special GetPlayerBigGuyGirlString
msgbox LittlerootTown_Text_1E8C3A, MSGBOX_DEFAULT
closemessage
- applymovement 1, LittlerootTown_Movement_2725A2
+ applymovement 1, Common_Movement_FaceOriginalDirection
waitmovement 0
setvar VAR_0x4050, 2
releaseall
@@ -490,12 +490,12 @@ LittlerootTown_EventScript_1E828C:: @ 81E828C
return
LittlerootTown_EventScript_1E8297:: @ 81E8297
- applymovement 4, LittlerootTown_Movement_2725A8
+ applymovement 4, Common_Movement_WalkInPlaceRight
waitmovement 0
return
LittlerootTown_EventScript_1E82A2:: @ 81E82A2
- applymovement 4, LittlerootTown_Movement_2725A4
+ applymovement 4, Common_Movement_WalkInPlaceLeft
waitmovement 0
return
@@ -530,70 +530,70 @@ LittlerootTown_EventScript_1E82F0:: @ 81E82F0
return
LittlerootTown_EventScript_1E8333:: @ 81E8333
- applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_Movement_2725AA
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceDown
waitmovement 0
applymovement 4, LittlerootTown_Movement_1E85D1
waitmovement 0
return
LittlerootTown_EventScript_1E8348:: @ 81E8348
- applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_Movement_2725AA
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceDown
waitmovement 0
applymovement 4, LittlerootTown_Movement_1E85D8
waitmovement 0
return
LittlerootTown_EventScript_1E835D:: @ 81E835D
- applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_Movement_2725A4
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceLeft
waitmovement 0
applymovement 4, LittlerootTown_Movement_1E85DF
waitmovement 0
return
LittlerootTown_EventScript_1E8372:: @ 81E8372
- applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_Movement_2725A4
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceLeft
waitmovement 0
applymovement 4, LittlerootTown_Movement_1E85E4
waitmovement 0
return
LittlerootTown_EventScript_1E8387:: @ 81E8387
- applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_Movement_2725A4
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceLeft
waitmovement 0
applymovement 4, LittlerootTown_Movement_1E85EA
waitmovement 0
return
LittlerootTown_EventScript_1E839C:: @ 81E839C
- applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_Movement_2725A4
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceLeft
waitmovement 0
applymovement 4, LittlerootTown_Movement_1E85ED
waitmovement 0
return
LittlerootTown_EventScript_1E83B1:: @ 81E83B1
- applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_Movement_2725A8
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceRight
waitmovement 0
applymovement 4, LittlerootTown_Movement_1E85F1
waitmovement 0
return
LittlerootTown_EventScript_1E83C6:: @ 81E83C6
- applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_Movement_2725A8
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceRight
waitmovement 0
applymovement 4, LittlerootTown_Movement_1E85F5
waitmovement 0
return
LittlerootTown_EventScript_1E83DB:: @ 81E83DB
- applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_Movement_2725A8
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceRight
waitmovement 0
applymovement 4, LittlerootTown_Movement_1E85F8
waitmovement 0
return
LittlerootTown_EventScript_1E83F0:: @ 81E83F0
- applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_Movement_2725A8
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceRight
waitmovement 0
applymovement 4, LittlerootTown_Movement_1E85FE
waitmovement 0
@@ -894,7 +894,7 @@ LittlerootTown_EventScript_1E863D:: @ 81E863D
compare VAR_RESULT, FEMALE
call_if_eq LittlerootTown_EventScript_1E828C
call LittlerootTown_EventScript_1E8693
- applymovement 4, LittlerootTown_Movement_2725A6
+ applymovement 4, Common_Movement_WalkInPlaceUp
waitmovement 0
opendoor VAR_0x8009, VAR_0x800A
waitdooranim
diff --git a/data/maps/LittlerootTown_BrendansHouse_1F/map.json b/data/maps/LittlerootTown_BrendansHouse_1F/map.json
index ca5ee92de..d6d4af86c 100644
--- a/data/maps/LittlerootTown_BrendansHouse_1F/map.json
+++ b/data/maps/LittlerootTown_BrendansHouse_1F/map.json
@@ -135,7 +135,7 @@
"x": 8,
"y": 8,
"elevation": 0,
- "var": "VAR_0x4092",
+ "var": "VAR_LITTLEROOT_INTRO_STATE",
"var_value": "4",
"script": "LittlerootTown_BrendansHouse_1F_EventScript_1F78A3"
},
@@ -144,7 +144,7 @@
"x": 7,
"y": 3,
"elevation": 0,
- "var": "VAR_0x408D",
+ "var": "VAR_LITTLEROOT_RIVAL_STATE",
"var_value": "2",
"script": "LittlerootTown_BrendansHouse_1F_EventScript_1F78BE"
},
@@ -153,7 +153,7 @@
"x": 8,
"y": 4,
"elevation": 0,
- "var": "VAR_0x408D",
+ "var": "VAR_LITTLEROOT_RIVAL_STATE",
"var_value": "2",
"script": "LittlerootTown_BrendansHouse_1F_EventScript_1F78CA"
},
@@ -162,7 +162,7 @@
"x": 9,
"y": 3,
"elevation": 0,
- "var": "VAR_0x408D",
+ "var": "VAR_LITTLEROOT_RIVAL_STATE",
"var_value": "2",
"script": "LittlerootTown_BrendansHouse_1F_EventScript_1F78D6"
}
diff --git a/data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc b/data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc
index 42cfe308b..31a526a25 100644
--- a/data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc
+++ b/data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc
@@ -1,11 +1,11 @@
LittlerootTown_BrendansHouse_1F_MapScripts:: @ 81F7755
- map_script 1, LittlerootTown_BrendansHouse_1F_MapScript1_1F7765
- map_script 3, LittlerootTown_BrendansHouse_1F_MapScript1_1F77A4
- map_script 2, LittlerootTown_BrendansHouse_1F_MapScript2_1F77EA
+ map_script MAP_SCRIPT_ON_LOAD, LittlerootTown_BrendansHouse_1F_MapScript1_1F7765
+ map_script MAP_SCRIPT_ON_TRANSITION, LittlerootTown_BrendansHouse_1F_MapScript1_1F77A4
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, LittlerootTown_BrendansHouse_1F_MapScript2_1F77EA
.byte 0
LittlerootTown_BrendansHouse_1F_MapScript1_1F7765: @ 81F7765
- compare VAR_0x4092, 6
+ compare VAR_LITTLEROOT_INTRO_STATE, 6
call_if_lt LittlerootTown_BrendansHouse_1F_EventScript_1F777A
call_if_set FLAG_RECEIVED_RUNNING_SHOES, LittlerootTown_BrendansHouse_1F_EventScript_1F778D
end
@@ -26,11 +26,11 @@ LittlerootTown_BrendansHouse_1F_EventScript_1F779A:: @ 81F779A
return
LittlerootTown_BrendansHouse_1F_MapScript1_1F77A4: @ 81F77A4
- compare VAR_0x4092, 3
+ compare VAR_LITTLEROOT_INTRO_STATE, 3
call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1F77DE
- compare VAR_0x4092, 5
+ compare VAR_LITTLEROOT_INTRO_STATE, 5
call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1F77C6
- compare VAR_0x4092, 6
+ compare VAR_LITTLEROOT_INTRO_STATE, 6
call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1F77D2
end
@@ -50,11 +50,11 @@ LittlerootTown_BrendansHouse_1F_EventScript_1F77DE:: @ 81F77DE
return
LittlerootTown_BrendansHouse_1F_MapScript2_1F77EA: @ 81F77EA
- map_script_2 VAR_0x4092, 3, LittlerootTown_BrendansHouse_1F_EventScript_1F783C
- map_script_2 VAR_0x4092, 5, LittlerootTown_BrendansHouse_1F_EventScript_1F7814
- map_script_2 VAR_0x4092, 6, LittlerootTown_BrendansHouse_1F_EventScript_1F784D
- map_script_2 VAR_0x4082, 1, LittlerootTown_BrendansHouse_1F_EventScript_1F785E
- map_script_2 VAR_0x4082, 3, LittlerootTown_BrendansHouse_1F_EventScript_292AF2
+ map_script_2 VAR_LITTLEROOT_INTRO_STATE, 3, LittlerootTown_BrendansHouse_1F_EventScript_1F783C
+ map_script_2 VAR_LITTLEROOT_INTRO_STATE, 5, LittlerootTown_BrendansHouse_1F_EventScript_1F7814
+ map_script_2 VAR_LITTLEROOT_INTRO_STATE, 6, LittlerootTown_BrendansHouse_1F_EventScript_1F784D
+ map_script_2 VAR_LITTLEROOT_HOUSES_STATE, 1, LittlerootTown_BrendansHouse_1F_EventScript_1F785E
+ map_script_2 VAR_LITTLEROOT_HOUSES_STATE, 3, LittlerootTown_BrendansHouse_1F_EventScript_292AF2
.2byte 0
LittlerootTown_BrendansHouse_1F_EventScript_1F7814:: @ 81F7814
@@ -90,17 +90,17 @@ LittlerootTown_BrendansHouse_1F_EventScript_1F784D:: @ 81F784D
LittlerootTown_BrendansHouse_1F_EventScript_1F785E:: @ 81F785E
lockall
playse SE_PIN
- applymovement 4, LittlerootTown_BrendansHouse_1F_Movement_272598
+ applymovement 4, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 4, LittlerootTown_BrendansHouse_1F_Movement_27259A
+ applymovement 4, Common_Movement_Delay48
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_BrendansHouse_1F_Movement_2725A4
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceLeft
applymovement 4, LittlerootTown_BrendansHouse_1F_Movement_1F789C
waitmovement 0
special GetRivalSonDaughterString
msgbox LittlerootTown_BrendansHouse_1F_Text_1F8BC5, MSGBOX_DEFAULT
setflag FLAG_MET_RIVAL_MOM
- setvar VAR_0x4082, 2
+ setvar VAR_LITTLEROOT_HOUSES_STATE, 2
releaseall
end
@@ -117,7 +117,7 @@ LittlerootTown_BrendansHouse_1F_EventScript_1F78A3:: @ 81F78A3
lockall
setvar VAR_0x8004, 1
setvar VAR_0x8005, 0
- applymovement VAR_0x8004, LittlerootTown_BrendansHouse_1F_Movement_2725A4
+ applymovement VAR_0x8004, Common_Movement_WalkInPlaceLeft
waitmovement 0
goto LittlerootTown_BrendansHouse_1F_EventScript_292765
end
@@ -146,9 +146,9 @@ LittlerootTown_BrendansHouse_1F_EventScript_1F78E2:: @ 81F78E2
addobject 7
delay 30
playse SE_PIN
- applymovement 7, LittlerootTown_BrendansHouse_1F_Movement_272598
+ applymovement 7, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 7, LittlerootTown_BrendansHouse_1F_Movement_27259A
+ applymovement 7, Common_Movement_Delay48
waitmovement 0
compare VAR_0x8008, 1
call_if_ne LittlerootTown_BrendansHouse_1F_EventScript_1F7981
@@ -173,7 +173,7 @@ LittlerootTown_BrendansHouse_1F_EventScript_1F78E2:: @ 81F78E2
setflag FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_2F_POKE_BALL
clearflag FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_RIVAL_BEDROOM
delay 30
- setvar VAR_0x408D, 3
+ setvar VAR_LITTLEROOT_RIVAL_STATE, 3
setvar VAR_0x4050, 1
savebgm MUS_DUMMY
fadedefaultbgm
@@ -181,7 +181,7 @@ LittlerootTown_BrendansHouse_1F_EventScript_1F78E2:: @ 81F78E2
end
LittlerootTown_BrendansHouse_1F_EventScript_1F7981:: @ 81F7981
- applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_BrendansHouse_1F_Movement_2725AA
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceDown
waitmovement 0
return
diff --git a/data/maps/LittlerootTown_BrendansHouse_2F/scripts.inc b/data/maps/LittlerootTown_BrendansHouse_2F/scripts.inc
index ea00693a8..87e0e58cc 100644
--- a/data/maps/LittlerootTown_BrendansHouse_2F/scripts.inc
+++ b/data/maps/LittlerootTown_BrendansHouse_2F/scripts.inc
@@ -1,14 +1,14 @@
LittlerootTown_BrendansHouse_2F_MapScripts:: @ 81F83E3
- map_script 3, LittlerootTown_BrendansHouse_2F_MapScript1_1F83EE
- map_script 4, LittlerootTown_BrendansHouse_2F_MapScript2_1F846A
+ map_script MAP_SCRIPT_ON_TRANSITION, LittlerootTown_BrendansHouse_2F_MapScript1_1F83EE
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, LittlerootTown_BrendansHouse_2F_MapScript2_1F846A
.byte 0
LittlerootTown_BrendansHouse_2F_MapScript1_1F83EE: @ 81F83EE
- compare VAR_0x408D, 2
+ compare VAR_LITTLEROOT_RIVAL_STATE, 2
call_if_lt LittlerootTown_BrendansHouse_2F_EventScript_1F8457
- compare VAR_0x408D, 3
+ compare VAR_LITTLEROOT_RIVAL_STATE, 3
call_if_ge LittlerootTown_BrendansHouse_2F_EventScript_1F841A
- compare VAR_0x4092, 4
+ compare VAR_LITTLEROOT_INTRO_STATE, 4
call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_2926FE
call LittlerootTown_BrendansHouse_2F_EventScript_275CE1
setvar VAR_0x4089, 0
@@ -16,7 +16,7 @@ LittlerootTown_BrendansHouse_2F_MapScript1_1F83EE: @ 81F83EE
LittlerootTown_BrendansHouse_2F_EventScript_1F841A:: @ 81F841A
goto_if_set FLAG_MET_RIVAL_LILYCOVE, LittlerootTown_BrendansHouse_2F_EventScript_1F8433
- compare VAR_0x4084, 2
+ compare VAR_BIRCH_LAB_STATE, 2
goto_if_ge LittlerootTown_BrendansHouse_2F_EventScript_1F8456
goto LittlerootTown_BrendansHouse_2F_EventScript_1F8433
@@ -40,7 +40,7 @@ LittlerootTown_BrendansHouse_2F_EventScript_1F8457:: @ 81F8457
return
LittlerootTown_BrendansHouse_2F_EventScript_1F8464:: @ 81F8464
- setvar VAR_0x408D, 2
+ setvar VAR_LITTLEROOT_RIVAL_STATE, 2
return
LittlerootTown_BrendansHouse_2F_MapScript2_1F846A: @ 81F846A
@@ -55,7 +55,7 @@ LittlerootTown_BrendansHouse_2F_EventScript_1F8474:: @ 81F8474
LittlerootTown_BrendansHouse_2F_EventScript_1F8481:: @ 81F8481
lockall
- compare VAR_0x408D, 2
+ compare VAR_LITTLEROOT_RIVAL_STATE, 2
goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_1F8497
msgbox LittlerootTown_BrendansHouse_2F_Text_1F9991, MSGBOX_DEFAULT
releaseall
@@ -67,9 +67,9 @@ LittlerootTown_BrendansHouse_2F_EventScript_1F8497:: @ 81F8497
applymovement 1, LittlerootTown_BrendansHouse_2F_Movement_1F85BC
waitmovement 0
playse SE_PIN
- applymovement 1, LittlerootTown_BrendansHouse_2F_Movement_272598
+ applymovement 1, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 1, LittlerootTown_BrendansHouse_2F_Movement_27259A
+ applymovement 1, Common_Movement_Delay48
waitmovement 0
delay 10
playbgm MUS_BOY_SUP, 1
@@ -81,7 +81,7 @@ LittlerootTown_BrendansHouse_2F_EventScript_1F8497:: @ 81F8497
call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_1F8565
compare VAR_FACING, 4
call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_1F8594
- setvar VAR_0x408D, 3
+ setvar VAR_LITTLEROOT_RIVAL_STATE, 3
setflag FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_2F_POKE_BALL
clearflag FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_RIVAL_BEDROOM
setvar VAR_0x4050, 1
@@ -93,7 +93,7 @@ LittlerootTown_BrendansHouse_2F_EventScript_1F8497:: @ 81F8497
LittlerootTown_BrendansHouse_2F_EventScript_1F8507:: @ 81F8507
applymovement 1, LittlerootTown_BrendansHouse_2F_Movement_1F85C0
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_BrendansHouse_2F_Movement_2725A8
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceRight
waitmovement 0
msgbox LittlerootTown_BrendansHouse_2F_Text_1F97B4, MSGBOX_DEFAULT
closemessage
@@ -105,7 +105,7 @@ LittlerootTown_BrendansHouse_2F_EventScript_1F8507:: @ 81F8507
LittlerootTown_BrendansHouse_2F_EventScript_1F8536:: @ 81F8536
applymovement 1, LittlerootTown_BrendansHouse_2F_Movement_1F85D7
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_BrendansHouse_2F_Movement_2725A8
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceRight
waitmovement 0
msgbox LittlerootTown_BrendansHouse_2F_Text_1F97B4, MSGBOX_DEFAULT
closemessage
@@ -117,7 +117,7 @@ LittlerootTown_BrendansHouse_2F_EventScript_1F8536:: @ 81F8536
LittlerootTown_BrendansHouse_2F_EventScript_1F8565:: @ 81F8565
applymovement 1, LittlerootTown_BrendansHouse_2F_Movement_1F85E8
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_BrendansHouse_2F_Movement_2725A8
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceRight
waitmovement 0
msgbox LittlerootTown_BrendansHouse_2F_Text_1F97B4, MSGBOX_DEFAULT
closemessage
@@ -129,7 +129,7 @@ LittlerootTown_BrendansHouse_2F_EventScript_1F8565:: @ 81F8565
LittlerootTown_BrendansHouse_2F_EventScript_1F8594:: @ 81F8594
applymovement 1, LittlerootTown_BrendansHouse_2F_Movement_1F85FD
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_BrendansHouse_2F_Movement_2725A6
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceUp
waitmovement 0
msgbox LittlerootTown_BrendansHouse_2F_Text_1F97B4, MSGBOX_DEFAULT
closemessage
@@ -307,7 +307,7 @@ LittlerootTown_BrendansHouse_2F_Text_1F877F: @ 81F877F
.string "Record your progress with SAVE.\p"
.string "The remaining pages are blank…$"
-LittlerootTown_BrendansHouse_2F_Text_1F8820: @ 81F8820
+Common_Text_LookCloserAtMap: @ 81F8820
.string "{PLAYER} took a closer look at the\n"
.string "HOENN region map.$"
diff --git a/data/maps/LittlerootTown_MaysHouse_1F/map.json b/data/maps/LittlerootTown_MaysHouse_1F/map.json
index e1f7d823a..0938e6966 100644
--- a/data/maps/LittlerootTown_MaysHouse_1F/map.json
+++ b/data/maps/LittlerootTown_MaysHouse_1F/map.json
@@ -135,7 +135,7 @@
"x": 2,
"y": 8,
"elevation": 0,
- "var": "VAR_0x4092",
+ "var": "VAR_LITTLEROOT_INTRO_STATE",
"var_value": "4",
"script": "LittlerootTown_MaysHouse_1F_EventScript_1F8A4C"
},
@@ -144,7 +144,7 @@
"x": 1,
"y": 3,
"elevation": 0,
- "var": "VAR_0x408D",
+ "var": "VAR_LITTLEROOT_RIVAL_STATE",
"var_value": "2",
"script": "LittlerootTown_MaysHouse_1F_EventScript_1F8A67"
},
@@ -153,7 +153,7 @@
"x": 2,
"y": 4,
"elevation": 0,
- "var": "VAR_0x408D",
+ "var": "VAR_LITTLEROOT_RIVAL_STATE",
"var_value": "2",
"script": "LittlerootTown_MaysHouse_1F_EventScript_1F8A73"
},
@@ -162,7 +162,7 @@
"x": 3,
"y": 3,
"elevation": 0,
- "var": "VAR_0x408D",
+ "var": "VAR_LITTLEROOT_RIVAL_STATE",
"var_value": "2",
"script": "LittlerootTown_MaysHouse_1F_EventScript_1F8A7F"
}
diff --git a/data/maps/LittlerootTown_MaysHouse_1F/scripts.inc b/data/maps/LittlerootTown_MaysHouse_1F/scripts.inc
index 36bda7e03..6b226da24 100644
--- a/data/maps/LittlerootTown_MaysHouse_1F/scripts.inc
+++ b/data/maps/LittlerootTown_MaysHouse_1F/scripts.inc
@@ -1,11 +1,11 @@
LittlerootTown_MaysHouse_1F_MapScripts:: @ 81F88A5
- map_script 1, LittlerootTown_MaysHouse_1F_MapScript1_1F88B5
- map_script 3, LittlerootTown_MaysHouse_1F_MapScript1_1F88F4
- map_script 2, LittlerootTown_MaysHouse_1F_MapScript2_1F893A
+ map_script MAP_SCRIPT_ON_LOAD, LittlerootTown_MaysHouse_1F_MapScript1_1F88B5
+ map_script MAP_SCRIPT_ON_TRANSITION, LittlerootTown_MaysHouse_1F_MapScript1_1F88F4
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, LittlerootTown_MaysHouse_1F_MapScript2_1F893A
.byte 0
LittlerootTown_MaysHouse_1F_MapScript1_1F88B5: @ 81F88B5
- compare VAR_0x4092, 6
+ compare VAR_LITTLEROOT_INTRO_STATE, 6
call_if_lt LittlerootTown_MaysHouse_1F_EventScript_1F88CA
call_if_set FLAG_RECEIVED_RUNNING_SHOES, LittlerootTown_MaysHouse_1F_EventScript_1F88DD
end
@@ -26,11 +26,11 @@ LittlerootTown_MaysHouse_1F_EventScript_1F88EA:: @ 81F88EA
return
LittlerootTown_MaysHouse_1F_MapScript1_1F88F4: @ 81F88F4
- compare VAR_0x4092, 3
+ compare VAR_LITTLEROOT_INTRO_STATE, 3
call_if_eq LittlerootTown_MaysHouse_1F_EventScript_1F892E
- compare VAR_0x4092, 5
+ compare VAR_LITTLEROOT_INTRO_STATE, 5
call_if_eq LittlerootTown_MaysHouse_1F_EventScript_1F8916
- compare VAR_0x4092, 6
+ compare VAR_LITTLEROOT_INTRO_STATE, 6
call_if_eq LittlerootTown_MaysHouse_1F_EventScript_1F8922
end
@@ -50,11 +50,11 @@ LittlerootTown_MaysHouse_1F_EventScript_1F892E:: @ 81F892E
return
LittlerootTown_MaysHouse_1F_MapScript2_1F893A: @ 81F893A
- map_script_2 VAR_0x4092, 3, LittlerootTown_MaysHouse_1F_EventScript_1F898C
- map_script_2 VAR_0x4092, 5, LittlerootTown_MaysHouse_1F_EventScript_1F8964
- map_script_2 VAR_0x4092, 6, LittlerootTown_MaysHouse_1F_EventScript_1F899D
- map_script_2 VAR_0x408C, 1, LittlerootTown_MaysHouse_1F_EventScript_1F89AE
- map_script_2 VAR_0x4082, 3, LittlerootTown_MaysHouse_1F_EventScript_292AF2
+ map_script_2 VAR_LITTLEROOT_INTRO_STATE, 3, LittlerootTown_MaysHouse_1F_EventScript_1F898C
+ map_script_2 VAR_LITTLEROOT_INTRO_STATE, 5, LittlerootTown_MaysHouse_1F_EventScript_1F8964
+ map_script_2 VAR_LITTLEROOT_INTRO_STATE, 6, LittlerootTown_MaysHouse_1F_EventScript_1F899D
+ map_script_2 VAR_LITTLEROOT_HOUSES_STATE_2, 1, LittlerootTown_MaysHouse_1F_EventScript_1F89AE
+ map_script_2 VAR_LITTLEROOT_HOUSES_STATE, 3, LittlerootTown_MaysHouse_1F_EventScript_292AF2
.2byte 0
LittlerootTown_MaysHouse_1F_EventScript_1F8964:: @ 81F8964
@@ -90,17 +90,17 @@ LittlerootTown_MaysHouse_1F_EventScript_1F899D:: @ 81F899D
LittlerootTown_MaysHouse_1F_EventScript_1F89AE:: @ 81F89AE
lockall
playse SE_PIN
- applymovement 4, LittlerootTown_MaysHouse_1F_Movement_272598
+ applymovement 4, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 4, LittlerootTown_MaysHouse_1F_Movement_27259A
+ applymovement 4, Common_Movement_Delay48
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_MaysHouse_1F_Movement_2725A8
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceRight
applymovement 4, LittlerootTown_MaysHouse_1F_Movement_1F89EC
waitmovement 0
special GetRivalSonDaughterString
msgbox LittlerootTown_MaysHouse_1F_Text_1F8BC5, MSGBOX_DEFAULT
setflag FLAG_MET_RIVAL_MOM
- setvar VAR_0x408C, 2
+ setvar VAR_LITTLEROOT_HOUSES_STATE_2, 2
releaseall
end
@@ -119,7 +119,7 @@ LittlerootTown_MaysHouse_1F_EventScript_1F89F3:: @ 81F89F3
faceplayer
goto_if_set FLAG_DEFEATED_RIVAL_ROUTE103, LittlerootTown_BrendansHouse_1F_EventScript_1F8A33
goto_if_set FLAG_SYS_POKEMON_GET, LittlerootTown_BrendansHouse_1F_EventScript_1F8A29
- compare VAR_0x408D, 3
+ compare VAR_LITTLEROOT_RIVAL_STATE, 3
goto_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1F8A1F
special GetRivalSonDaughterString
msgbox LittlerootTown_BrendansHouse_1F_Text_1F8CA5, MSGBOX_DEFAULT
@@ -154,7 +154,7 @@ LittlerootTown_MaysHouse_1F_EventScript_1F8A4C:: @ 81F8A4C
lockall
setvar VAR_0x8004, 1
setvar VAR_0x8005, 1
- applymovement VAR_0x8004, LittlerootTown_MaysHouse_1F_Movement_2725A8
+ applymovement VAR_0x8004, Common_Movement_WalkInPlaceRight
waitmovement 0
goto LittlerootTown_MaysHouse_1F_EventScript_292765
end
@@ -183,9 +183,9 @@ LittlerootTown_MaysHouse_1F_EventScript_1F8A8B:: @ 81F8A8B
addobject 7
delay 30
playse SE_PIN
- applymovement 7, LittlerootTown_MaysHouse_1F_Movement_272598
+ applymovement 7, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 7, LittlerootTown_MaysHouse_1F_Movement_27259A
+ applymovement 7, Common_Movement_Delay48
waitmovement 0
compare VAR_0x8008, 1
call_if_ne LittlerootTown_MaysHouse_1F_EventScript_1F8B2A
@@ -210,7 +210,7 @@ LittlerootTown_MaysHouse_1F_EventScript_1F8A8B:: @ 81F8A8B
setflag FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_2F_POKE_BALL
clearflag FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_RIVAL_BEDROOM
delay 30
- setvar VAR_0x408D, 3
+ setvar VAR_LITTLEROOT_RIVAL_STATE, 3
setvar VAR_0x4050, 1
savebgm MUS_DUMMY
fadedefaultbgm
@@ -218,7 +218,7 @@ LittlerootTown_MaysHouse_1F_EventScript_1F8A8B:: @ 81F8A8B
end
LittlerootTown_MaysHouse_1F_EventScript_1F8B2A:: @ 81F8B2A
- applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_MaysHouse_1F_Movement_2725AA
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceDown
waitmovement 0
return
diff --git a/data/maps/LittlerootTown_MaysHouse_2F/scripts.inc b/data/maps/LittlerootTown_MaysHouse_2F/scripts.inc
index 353437ad4..e11d2a991 100644
--- a/data/maps/LittlerootTown_MaysHouse_2F/scripts.inc
+++ b/data/maps/LittlerootTown_MaysHouse_2F/scripts.inc
@@ -1,14 +1,14 @@
LittlerootTown_MaysHouse_2F_MapScripts:: @ 81F9296
- map_script 3, LittlerootTown_MaysHouse_2F_MapScript1_1F92A1
- map_script 4, LittlerootTown_MaysHouse_2F_MapScript2_1F931D
+ map_script MAP_SCRIPT_ON_TRANSITION, LittlerootTown_MaysHouse_2F_MapScript1_1F92A1
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, LittlerootTown_MaysHouse_2F_MapScript2_1F931D
.byte 0
LittlerootTown_MaysHouse_2F_MapScript1_1F92A1: @ 81F92A1
- compare VAR_0x408D, 2
+ compare VAR_LITTLEROOT_RIVAL_STATE, 2
call_if_lt LittlerootTown_MaysHouse_2F_EventScript_1F930A
- compare VAR_0x408D, 3
+ compare VAR_LITTLEROOT_RIVAL_STATE, 3
call_if_ge LittlerootTown_MaysHouse_2F_EventScript_1F92CD
- compare VAR_0x4092, 4
+ compare VAR_LITTLEROOT_INTRO_STATE, 4
call_if_eq LittlerootTown_MaysHouse_2F_EventScript_2926FE
call LittlerootTown_MaysHouse_2F_EventScript_275CE1
setvar VAR_0x4089, 0
@@ -16,7 +16,7 @@ LittlerootTown_MaysHouse_2F_MapScript1_1F92A1: @ 81F92A1
LittlerootTown_MaysHouse_2F_EventScript_1F92CD:: @ 81F92CD
goto_if_set FLAG_MET_RIVAL_LILYCOVE, LittlerootTown_MaysHouse_2F_EventScript_1F92E6
- compare VAR_0x4084, 2
+ compare VAR_BIRCH_LAB_STATE, 2
goto_if_ge LittlerootTown_MaysHouse_2F_EventScript_1F9309
goto LittlerootTown_MaysHouse_2F_EventScript_1F92E6
@@ -41,7 +41,7 @@ LittlerootTown_MaysHouse_2F_EventScript_1F930A:: @ 81F930A
return
LittlerootTown_MaysHouse_2F_EventScript_1F9317:: @ 81F9317
- setvar VAR_0x408D, 2
+ setvar VAR_LITTLEROOT_RIVAL_STATE, 2
return
LittlerootTown_MaysHouse_2F_MapScript2_1F931D: @ 81F931D
@@ -56,7 +56,7 @@ LittlerootTown_MaysHouse_2F_EventScript_1F9327:: @ 81F9327
LittlerootTown_MaysHouse_2F_EventScript_1F9334:: @ 81F9334
lockall
- compare VAR_0x408D, 2
+ compare VAR_LITTLEROOT_RIVAL_STATE, 2
goto_if_eq LittlerootTown_MaysHouse_2F_EventScript_1F934A
msgbox LittlerootTown_MaysHouse_2F_Text_1F9991, MSGBOX_DEFAULT
releaseall
@@ -68,9 +68,9 @@ LittlerootTown_MaysHouse_2F_EventScript_1F934A:: @ 81F934A
applymovement 1, LittlerootTown_MaysHouse_2F_Movement_1F946F
waitmovement 0
playse SE_PIN
- applymovement 1, LittlerootTown_MaysHouse_2F_Movement_272598
+ applymovement 1, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 1, LittlerootTown_MaysHouse_2F_Movement_27259A
+ applymovement 1, Common_Movement_Delay48
waitmovement 0
delay 10
playbgm MUS_GIRL_SUP, 1
@@ -82,7 +82,7 @@ LittlerootTown_MaysHouse_2F_EventScript_1F934A:: @ 81F934A
call_if_eq LittlerootTown_MaysHouse_2F_EventScript_1F9418
compare VAR_FACING, 4
call_if_eq LittlerootTown_MaysHouse_2F_EventScript_1F9440
- setvar VAR_0x408D, 3
+ setvar VAR_LITTLEROOT_RIVAL_STATE, 3
setflag FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_2F_POKE_BALL
clearflag FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_RIVAL_BEDROOM
setvar VAR_0x4050, 1
@@ -94,7 +94,7 @@ LittlerootTown_MaysHouse_2F_EventScript_1F934A:: @ 81F934A
LittlerootTown_MaysHouse_2F_EventScript_1F93BA:: @ 81F93BA
applymovement 1, LittlerootTown_MaysHouse_2F_Movement_1F9473
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_MaysHouse_2F_Movement_2725A4
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceLeft
waitmovement 0
msgbox LittlerootTown_MaysHouse_2F_Text_1F959C, MSGBOX_DEFAULT
closemessage
@@ -106,7 +106,7 @@ LittlerootTown_MaysHouse_2F_EventScript_1F93BA:: @ 81F93BA
LittlerootTown_MaysHouse_2F_EventScript_1F93E9:: @ 81F93E9
applymovement 1, LittlerootTown_MaysHouse_2F_Movement_1F948B
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_MaysHouse_2F_Movement_2725A4
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceLeft
waitmovement 0
msgbox LittlerootTown_MaysHouse_2F_Text_1F959C, MSGBOX_DEFAULT
closemessage
@@ -118,7 +118,7 @@ LittlerootTown_MaysHouse_2F_EventScript_1F93E9:: @ 81F93E9
LittlerootTown_MaysHouse_2F_EventScript_1F9418:: @ 81F9418
applymovement 1, LittlerootTown_MaysHouse_2F_Movement_1F949D
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_MaysHouse_2F_Movement_2725A6
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceUp
waitmovement 0
msgbox LittlerootTown_MaysHouse_2F_Text_1F959C, MSGBOX_DEFAULT
closemessage
@@ -129,7 +129,7 @@ LittlerootTown_MaysHouse_2F_EventScript_1F9418:: @ 81F9418
LittlerootTown_MaysHouse_2F_EventScript_1F9440:: @ 81F9440
applymovement 1, LittlerootTown_MaysHouse_2F_Movement_1F94AD
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_MaysHouse_2F_Movement_2725A4
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceLeft
waitmovement 0
msgbox LittlerootTown_MaysHouse_2F_Text_1F959C, MSGBOX_DEFAULT
closemessage
@@ -268,7 +268,7 @@ LittlerootTown_BrendansHouse_2F_EventScript_1F94ED:: @ 81F94ED
end
LittlerootTown_BrendansHouse_2F_EventScript_1F94F7:: @ 81F94F7
- applymovement VAR_LAST_TALKED, LittlerootTown_BrendansHouse_2F_Movement_27259E
+ applymovement VAR_LAST_TALKED, Common_Movement_FacePlayer
waitmovement 0
checkplayergender
compare VAR_RESULT, MALE
diff --git a/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc b/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc
index 5c762743c..88b1c6929 100644
--- a/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc
+++ b/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc
@@ -1,11 +1,11 @@
LittlerootTown_ProfessorBirchsLab_MapScripts:: @ 81F9C91
- map_script 3, LittlerootTown_ProfessorBirchsLab_MapScript1_1F9CA1
- map_script 4, LittlerootTown_ProfessorBirchsLab_MapScript2_1F9D06
- map_script 2, LittlerootTown_ProfessorBirchsLab_MapScript2_1F9DB9
+ map_script MAP_SCRIPT_ON_TRANSITION, LittlerootTown_ProfessorBirchsLab_MapScript1_1F9CA1
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, LittlerootTown_ProfessorBirchsLab_MapScript2_1F9D06
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, LittlerootTown_ProfessorBirchsLab_MapScript2_1F9DB9
.byte 0
LittlerootTown_ProfessorBirchsLab_MapScript1_1F9CA1: @ 81F9CA1
- call LittlerootTown_ProfessorBirchsLab_EventScript_271ED7
+ call Common_EventScript_SetupRivalGender
call LittlerootTown_ProfessorBirchsLab_EventScript_2720AD
compare VAR_0x40D3, 6
goto_if_ge LittlerootTown_ProfessorBirchsLab_EventScript_1F9CF7
@@ -38,7 +38,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_1F9CF7:: @ 81F9CF7
end
LittlerootTown_ProfessorBirchsLab_MapScript2_1F9D06: @ 81F9D06
- map_script_2 VAR_0x4084, 2, LittlerootTown_ProfessorBirchsLab_EventScript_1F9D40
+ map_script_2 VAR_BIRCH_LAB_STATE, 2, LittlerootTown_ProfessorBirchsLab_EventScript_1F9D40
map_script_2 VAR_0x40D3, 1, LittlerootTown_ProfessorBirchsLab_EventScript_1F9D45
map_script_2 VAR_0x40D3, 2, LittlerootTown_ProfessorBirchsLab_EventScript_1F9D45
map_script_2 VAR_0x40D3, 3, LittlerootTown_ProfessorBirchsLab_EventScript_1F9D71
@@ -85,8 +85,8 @@ LittlerootTown_ProfessorBirchsLab_EventScript_1F9D75:: @ 81F9D75
end
LittlerootTown_ProfessorBirchsLab_MapScript2_1F9DB9: @ 81F9DB9
- map_script_2 VAR_0x4084, 2, LittlerootTown_ProfessorBirchsLab_EventScript_1F9DDB
- map_script_2 VAR_0x4084, 4, LittlerootTown_ProfessorBirchsLab_EventScript_1F9E67
+ map_script_2 VAR_BIRCH_LAB_STATE, 2, LittlerootTown_ProfessorBirchsLab_EventScript_1F9DDB
+ map_script_2 VAR_BIRCH_LAB_STATE, 4, LittlerootTown_ProfessorBirchsLab_EventScript_1F9E67
map_script_2 VAR_0x40D3, 1, LittlerootTown_ProfessorBirchsLab_EventScript_1F9E80
map_script_2 VAR_0x40D3, 4, LittlerootTown_ProfessorBirchsLab_EventScript_1F9F62
.2byte 0
@@ -107,7 +107,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_1F9DDB:: @ 81F9DDB
LittlerootTown_ProfessorBirchsLab_EventScript_1F9E07:: @ 81F9E07
setvar VAR_0x8004, 0
- call LittlerootTown_ProfessorBirchsLab_EventScript_2723DD
+ call Common_EventScript_NameReceivedPokemon
goto LittlerootTown_ProfessorBirchsLab_EventScript_1F9E17
end
@@ -122,7 +122,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_1F9E17:: @ 81F9E17
LittlerootTown_ProfessorBirchsLab_EventScript_1F9E36:: @ 81F9E36
msgbox LittlerootTown_ProfessorBirchsLab_Text_1FA9D5, MSGBOX_DEFAULT
clearflag FLAG_HIDE_ROUTE_101_BOY
- setvar VAR_0x4084, 3
+ setvar VAR_BIRCH_LAB_STATE, 3
releaseall
end
@@ -167,8 +167,8 @@ LittlerootTown_ProfessorBirchsLab_EventScript_1F9E80:: @ 81F9E80
delay 10
playse SE_TK_KASYA
delay 20
- applymovement 3, LittlerootTown_ProfessorBirchsLab_Movement_2725A8
- applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_ProfessorBirchsLab_Movement_2725A4
+ applymovement 3, Common_Movement_WalkInPlaceRight
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceLeft
waitmovement 0
checkplayergender
compare VAR_RESULT, MALE
@@ -180,8 +180,8 @@ LittlerootTown_ProfessorBirchsLab_EventScript_1F9E80:: @ 81F9E80
delay 20
applymovement 2, LittlerootTown_ProfessorBirchsLab_Movement_1F9F58
waitmovement 0
- applymovement 3, LittlerootTown_ProfessorBirchsLab_Movement_2725A6
- applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_ProfessorBirchsLab_Movement_2725A6
+ applymovement 3, Common_Movement_WalkInPlaceUp
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceUp
waitmovement 0
msgbox LittlerootTown_ProfessorBirchsLab_Text_1FB419, MSGBOX_DEFAULT
playfanfare MUS_FANFA4
@@ -264,7 +264,7 @@ LittlerootTown_ProfessorBirchsLab_Movement_1F9F7C: @ 81F9F7C
LittlerootTown_ProfessorBirchsLab_EventScript_1F9F84:: @ 81F9F84
lock
faceplayer
- compare VAR_0x4084, 3
+ compare VAR_BIRCH_LAB_STATE, 3
goto_if_ge LittlerootTown_ProfessorBirchsLab_EventScript_1F9FB1
goto_if_set FLAG_BIRCH_AIDE_MET, LittlerootTown_ProfessorBirchsLab_EventScript_1F9FA7
msgbox LittlerootTown_ProfessorBirchsLab_Text_1FA4E2, MSGBOX_DEFAULT
@@ -286,7 +286,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_1F9FBB:: @ 81F9FBB
release
compare VAR_0x40D3, 6
goto_if_ge LittlerootTown_ProfessorBirchsLab_EventScript_1FA057
- applymovement 2, LittlerootTown_ProfessorBirchsLab_Movement_2725A8
+ applymovement 2, Common_Movement_WalkInPlaceRight
waitmovement 0
drawmonpic SPECIES_CYNDAQUIL, 10, 3
msgbox LittlerootTown_ProfessorBirchsLab_Text_1FB7F6, MSGBOX_YESNO
@@ -299,7 +299,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_1F9FEF:: @ 81F9FEF
release
compare VAR_0x40D3, 6
goto_if_ge LittlerootTown_ProfessorBirchsLab_EventScript_1FA057
- applymovement 2, LittlerootTown_ProfessorBirchsLab_Movement_2725A8
+ applymovement 2, Common_Movement_WalkInPlaceRight
waitmovement 0
drawmonpic SPECIES_TOTODILE, 10, 3
msgbox LittlerootTown_ProfessorBirchsLab_Text_1FB869, MSGBOX_YESNO
@@ -312,7 +312,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_1FA023:: @ 81FA023
release
compare VAR_0x40D3, 6
goto_if_ge LittlerootTown_ProfessorBirchsLab_EventScript_1FA057
- applymovement 2, LittlerootTown_ProfessorBirchsLab_Movement_2725A8
+ applymovement 2, Common_Movement_WalkInPlaceRight
waitmovement 0
drawmonpic SPECIES_CHIKORITA, 10, 3
msgbox LittlerootTown_ProfessorBirchsLab_Text_1FB8E0, MSGBOX_YESNO
@@ -351,7 +351,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_1FA0A1:: @ 81FA0A1
compare VAR_RESULT, 0
goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_1FA0FD
call LittlerootTown_ProfessorBirchsLab_EventScript_27378B
- call LittlerootTown_ProfessorBirchsLab_EventScript_2723DD
+ call Common_EventScript_NameReceivedPokemon
goto LittlerootTown_ProfessorBirchsLab_EventScript_1FA0FD
end
@@ -396,7 +396,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_1FA142:: @ 81FA142
compare VAR_RESULT, 0
goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_1FA19E
call LittlerootTown_ProfessorBirchsLab_EventScript_27378B
- call LittlerootTown_ProfessorBirchsLab_EventScript_2723DD
+ call Common_EventScript_NameReceivedPokemon
goto LittlerootTown_ProfessorBirchsLab_EventScript_1FA19E
end
@@ -441,7 +441,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_1FA1E3:: @ 81FA1E3
compare VAR_RESULT, 0
goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_1FA23F
call LittlerootTown_ProfessorBirchsLab_EventScript_27378B
- call LittlerootTown_ProfessorBirchsLab_EventScript_2723DD
+ call Common_EventScript_NameReceivedPokemon
goto LittlerootTown_ProfessorBirchsLab_EventScript_1FA23F
end
@@ -502,7 +502,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_1FA29E:: @ 81FA29E
goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_272141
compare VAR_0x40D3, 6
goto_if_ge LittlerootTown_ProfessorBirchsLab_EventScript_272141
- compare VAR_0x4084, 5
+ compare VAR_BIRCH_LAB_STATE, 5
goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_1FA3C4
msgbox LittlerootTown_ProfessorBirchsLab_Text_1FAA74, MSGBOX_DEFAULT
release
@@ -530,17 +530,17 @@ LittlerootTown_ProfessorBirchsLab_EventScript_1FA2F8:: @ 81FA2F8
closemessage
applymovement 3, LittlerootTown_ProfessorBirchsLab_Movement_1FA3E0
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_ProfessorBirchsLab_Movement_2725A8
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceRight
waitmovement 0
checkplayergender
compare VAR_RESULT, MALE
call_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_1FA352
compare VAR_RESULT, FEMALE
call_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_1FA37F
- setvar VAR_0x4084, 5
+ setvar VAR_BIRCH_LAB_STATE, 5
setflag FLAG_ADVENTURE_STARTED
- setvar VAR_0x4051, 1
- setvar VAR_0x408D, 4
+ setvar VAR_ROUTE102_ACCESSIBLE, 1
+ setvar VAR_LITTLEROOT_RIVAL_STATE, 4
setvar VAR_0x4050, 3
releaseall
end
diff --git a/data/maps/MagmaHideout_1F/scripts.inc b/data/maps/MagmaHideout_1F/scripts.inc
index 56ad204a9..0e0360990 100644
--- a/data/maps/MagmaHideout_1F/scripts.inc
+++ b/data/maps/MagmaHideout_1F/scripts.inc
@@ -1,9 +1,9 @@
MagmaHideout_1F_MapScripts:: @ 8239880
- map_script 3, MagmaHideout_1F_MapScript1_239886
+ map_script MAP_SCRIPT_ON_TRANSITION, MagmaHideout_1F_MapScript1_239886
.byte 0
MagmaHideout_1F_MapScript1_239886: @ 8239886
- setvar VAR_0x40BD, 0
+ setvar VAR_JAGGED_PASS_ASH_WEATHER, 0
end
MagmaHideout_1F_EventScript_23988C:: @ 823988C
diff --git a/data/maps/MagmaHideout_4F/scripts.inc b/data/maps/MagmaHideout_4F/scripts.inc
index ba585c98a..77c339b11 100644
--- a/data/maps/MagmaHideout_4F/scripts.inc
+++ b/data/maps/MagmaHideout_4F/scripts.inc
@@ -18,7 +18,7 @@ MagmaHideout_4F_EventScript_23A560:: @ 823A560
playfanfare MUS_ME_TAMA
playse SE_TAMA
special sub_80B0534
- applymovement EVENT_OBJ_ID_PLAYER, MagmaHideout_4F_Movement_2725A6
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceUp
waitmovement 0
delay 150
removeobject 7
@@ -50,10 +50,10 @@ MagmaHideout_4F_EventScript_23A560:: @ 823A560
waitmovement 0
msgbox MagmaHideout_4F_Text_23AADA, MSGBOX_DEFAULT
closemessage
- applymovement EVENT_OBJ_ID_PLAYER, MagmaHideout_4F_Movement_2725A8
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceRight
waitmovement 0
delay 30
- applymovement 6, MagmaHideout_4F_Movement_27259E
+ applymovement 6, Common_Movement_FacePlayer
waitmovement 0
msgbox MagmaHideout_4F_Text_23AB33, MSGBOX_DEFAULT
closemessage
@@ -62,9 +62,9 @@ MagmaHideout_4F_EventScript_23A560:: @ 823A560
closemessage
clearflag FLAG_HIDE_SLATEPORT_CITY_CAPTAIN_STERN
clearflag FLAG_HIDE_SLATEPORT_CITY_GABBY_AND_TY
- setvar VAR_0x4058, 1
+ setvar VAR_SLATEPORT_STATE, 1
setflag FLAG_GROUDON_AWAKENED_MAGMA_HIDEOUT
- setvar VAR_0x40A0, 1
+ setvar VAR_SLATEPORT_HARBOR_STATE, 1
fadescreen 1
removeobject 6
removeobject 2
diff --git a/data/maps/MarineCave_End/scripts.inc b/data/maps/MarineCave_End/scripts.inc
index aae89cb8a..036fa7724 100644
--- a/data/maps/MarineCave_End/scripts.inc
+++ b/data/maps/MarineCave_End/scripts.inc
@@ -1,6 +1,6 @@
MarineCave_End_MapScripts:: @ 823AFDF
- map_script 5, MarineCave_End_MapScript1_23AFEA
- map_script 3, MarineCave_End_MapScript1_23B008
+ map_script MAP_SCRIPT_ON_RESUME, MarineCave_End_MapScript1_23AFEA
+ map_script MAP_SCRIPT_ON_TRANSITION, MarineCave_End_MapScript1_23B008
.byte 0
MarineCave_End_MapScript1_23AFEA: @ 823AFEA
@@ -10,7 +10,7 @@ MarineCave_End_MapScript1_23AFEA: @ 823AFEA
MarineCave_End_EventScript_23AFF4:: @ 823AFF4
specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, 7
- goto_if_ne MarineCave_End_EventScript_27374E
+ goto_if_ne Common_EventScript_NopReturn
removeobject 1
return
@@ -25,7 +25,7 @@ MarineCave_End_EventScript_23B012:: @ 823B012
MarineCave_End_EventScript_23B01B:: @ 823B01B
lockall
- applymovement EVENT_OBJ_ID_PLAYER, MarineCave_End_Movement_2725B2
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_FaceUp
waitmovement 0
applymovement 1, MarineCave_End_Movement_23B09D
waitmovement 0
diff --git a/data/maps/MarineCave_Entrance/scripts.inc b/data/maps/MarineCave_Entrance/scripts.inc
index 24b288050..82ff756e1 100644
--- a/data/maps/MarineCave_Entrance/scripts.inc
+++ b/data/maps/MarineCave_Entrance/scripts.inc
@@ -1,5 +1,5 @@
MarineCave_Entrance_MapScripts:: @ 823AFD0
- map_script 5, MarineCave_Entrance_MapScript1_23AFD6
+ map_script MAP_SCRIPT_ON_RESUME, MarineCave_Entrance_MapScript1_23AFD6
.byte 0
MarineCave_Entrance_MapScript1_23AFD6: @ 823AFD6
diff --git a/data/maps/MauvilleCity/map.json b/data/maps/MauvilleCity/map.json
index f3bde6eb9..e44bc78dd 100644
--- a/data/maps/MauvilleCity/map.json
+++ b/data/maps/MauvilleCity/map.json
@@ -238,7 +238,7 @@
"y": 5,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "MauvilleCity_EventScript_271E73"
+ "script": "Common_EventScript_ShowPokemonCenterSign"
},
{
"type": "sign",
@@ -254,7 +254,7 @@
"y": 14,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "MauvilleCity_EventScript_271E6A"
+ "script": "Common_EventScript_ShowPokemartSign"
},
{
"type": "sign",
@@ -262,7 +262,7 @@
"y": 14,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "MauvilleCity_EventScript_271E6A"
+ "script": "Common_EventScript_ShowPokemartSign"
},
{
"type": "sign",
@@ -270,7 +270,7 @@
"y": 5,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "MauvilleCity_EventScript_271E73"
+ "script": "Common_EventScript_ShowPokemonCenterSign"
},
{
"type": "sign",
diff --git a/data/maps/MauvilleCity/scripts.inc b/data/maps/MauvilleCity/scripts.inc
index 21f654888..120fc9f51 100644
--- a/data/maps/MauvilleCity/scripts.inc
+++ b/data/maps/MauvilleCity/scripts.inc
@@ -1,5 +1,5 @@
MauvilleCity_MapScripts:: @ 81DF385
- map_script 3, MauvilleCity_MapScript1_1DF38B
+ map_script MAP_SCRIPT_ON_TRANSITION, MauvilleCity_MapScript1_1DF38B
.byte 0
MauvilleCity_MapScript1_1DF38B: @ 81DF38B
@@ -8,7 +8,7 @@ MauvilleCity_MapScript1_1DF38B: @ 81DF38B
clearflag FLAG_HIDE_SLATEPORT_MUSEUM_POPULATION
setflag FLAG_SYS_TV_START
clearflag FLAG_MAUVILLE_GYM_BARRIERS_STATE
- setvar VAR_0x4093, 0
+ setvar VAR_MAUVILLE_GYM_STATE, 0
call_if_set FLAG_GOT_TM24_FROM_WATTSON, MauvilleCity_EventScript_1DF3A9
end
@@ -70,7 +70,7 @@ MauvilleCity_EventScript_1DF41D:: @ 81DF41D
goto_if_set FLAG_DECLINED_WALLY_BATTLE_MAUVILLE, MauvilleCity_EventScript_1DF43D
msgbox MauvilleCity_Text_1DF7DC, MSGBOX_DEFAULT
closemessage
- applymovement 7, MauvilleCity_Movement_2725A2
+ applymovement 7, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -78,7 +78,7 @@ MauvilleCity_EventScript_1DF41D:: @ 81DF41D
MauvilleCity_EventScript_1DF43D:: @ 81DF43D
msgbox MauvilleCity_Text_1DFAA5, MSGBOX_DEFAULT
closemessage
- applymovement 7, MauvilleCity_Movement_2725A2
+ applymovement 7, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -86,17 +86,17 @@ MauvilleCity_EventScript_1DF43D:: @ 81DF43D
MauvilleCity_EventScript_1DF452:: @ 81DF452
lockall
goto_if_set FLAG_DECLINED_WALLY_BATTLE_MAUVILLE, MauvilleCity_EventScript_1DF690
- applymovement 6, MauvilleCity_Movement_2725A8
+ applymovement 6, Common_Movement_WalkInPlaceRight
waitmovement 0
msgbox MauvilleCity_Text_1DF845, MSGBOX_DEFAULT
msgbox MauvilleCity_Text_1DF8B9, MSGBOX_DEFAULT
msgbox MauvilleCity_Text_1DF963, MSGBOX_DEFAULT
- applymovement 6, MauvilleCity_Movement_27259E
+ applymovement 6, Common_Movement_FacePlayer
waitmovement 0
playse SE_PIN
- applymovement 6, MauvilleCity_Movement_272598
+ applymovement 6, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 6, MauvilleCity_Movement_27259A
+ applymovement 6, Common_Movement_Delay48
waitmovement 0
msgbox MauvilleCity_Text_1DF9B2, MSGBOX_YESNO
goto MauvilleCity_EventScript_1DF4AD
@@ -118,7 +118,7 @@ MauvilleCity_EventScript_1DF4E0:: @ 81DF4E0
applymovement 6, MauvilleCity_Movement_1DF6A8
applymovement 7, MauvilleCity_Movement_1DF6E2
waitmovement 0
- applymovement 6, MauvilleCity_Movement_2725A8
+ applymovement 6, Common_Movement_WalkInPlaceRight
waitmovement 0
delay 30
applymovement EVENT_OBJ_ID_PLAYER, MauvilleCity_Movement_1DF6EE
@@ -138,7 +138,7 @@ MauvilleCity_EventScript_1DF53D:: @ 81DF53D
applymovement 6, MauvilleCity_Movement_1DF6AE
applymovement 7, MauvilleCity_Movement_1DF6E8
waitmovement 0
- applymovement 6, MauvilleCity_Movement_2725A8
+ applymovement 6, Common_Movement_WalkInPlaceRight
waitmovement 0
delay 30
applymovement 7, MauvilleCity_Movement_1DF6F7
@@ -164,7 +164,7 @@ MauvilleCity_EventScript_1DF593:: @ 81DF593
call_if_eq MauvilleCity_EventScript_1DF5F3
compare VAR_FACING, 4
call_if_eq MauvilleCity_EventScript_1DF601
- applymovement EVENT_OBJ_ID_PLAYER, MauvilleCity_Movement_2725AA
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceDown
waitmovement 0
msgbox MauvilleCity_Text_1DFED5, MSGBOX_DEFAULT
closemessage
@@ -205,13 +205,13 @@ MauvilleCity_EventScript_1DF628:: @ 81DF628
MauvilleCity_EventScript_1DF63A:: @ 81DF63A
msgbox MauvilleCity_Text_1DFB6D, MSGBOX_DEFAULT
trainerbattle_no_intro TRAINER_WALLY_2, MauvilleCity_Text_1DFB96
- applymovement 6, MauvilleCity_Movement_2725A8
+ applymovement 6, Common_Movement_WalkInPlaceRight
waitmovement 0
msgbox MauvilleCity_Text_1DFBC3, MSGBOX_DEFAULT
- applymovement 6, MauvilleCity_Movement_27259E
+ applymovement 6, Common_Movement_FacePlayer
waitmovement 0
msgbox MauvilleCity_Text_1DFBED, MSGBOX_DEFAULT
- applymovement 6, MauvilleCity_Movement_2725A8
+ applymovement 6, Common_Movement_WalkInPlaceRight
waitmovement 0
msgbox MauvilleCity_Text_1DFC8A, MSGBOX_DEFAULT
return
@@ -223,7 +223,7 @@ MauvilleCity_EventScript_1DF683:: @ 81DF683
end
MauvilleCity_EventScript_1DF690:: @ 81DF690
- applymovement 6, MauvilleCity_Movement_27259E
+ applymovement 6, Common_Movement_FacePlayer
waitmovement 0
msgbox MauvilleCity_Text_1DFB42, MSGBOX_YESNO
goto MauvilleCity_EventScript_1DF4AD
@@ -421,7 +421,7 @@ MauvilleCity_EventScript_1DF73A:: @ 81DF73A
lock
faceplayer
goto_if_set FLAG_GOT_TM24_FROM_WATTSON, MauvilleCity_EventScript_1DF7B0
- compare VAR_0x40BA, 2
+ compare VAR_NEW_MAUVILLE_STATE, 2
goto_if_eq MauvilleCity_EventScript_1DF784
goto_if_set FLAG_GOT_BASEMENT_KEY_FROM_WATTSON, MauvilleCity_EventScript_1DF77A
msgbox MauvilleCity_Text_1DFFE4, MSGBOX_DEFAULT
@@ -440,7 +440,7 @@ MauvilleCity_EventScript_1DF784:: @ 81DF784
msgbox MauvilleCity_Text_1E020E, MSGBOX_DEFAULT
giveitem_std ITEM_TM24
compare VAR_RESULT, 0
- goto_if_eq MauvilleCity_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
setflag FLAG_GOT_TM24_FROM_WATTSON
msgbox MauvilleCity_Text_1E02AA, MSGBOX_DEFAULT
release
diff --git a/data/maps/MauvilleCity_GameCorner/scripts.inc b/data/maps/MauvilleCity_GameCorner/scripts.inc
index 34125b421..88b1ded16 100644
--- a/data/maps/MauvilleCity_GameCorner/scripts.inc
+++ b/data/maps/MauvilleCity_GameCorner/scripts.inc
@@ -215,7 +215,7 @@ MauvilleCity_GameCorner_EventScript_20FE79:: @ 820FE79
end
MauvilleCity_GameCorner_EventScript_20FE87:: @ 820FE87
- call MauvilleCity_GameCorner_EventScript_272071
+ call Common_EventScript_NoRoomLeftForAnother
goto MauvilleCity_GameCorner_EventScript_20FD20
end
@@ -383,7 +383,7 @@ MauvilleCity_GameCorner_EventScript_2100FF:: @ 82100FF
end
MauvilleCity_GameCorner_EventScript_21010D:: @ 821010D
- call MauvilleCity_GameCorner_EventScript_27205E
+ call Common_EventScript_BagIsFull
goto MauvilleCity_GameCorner_EventScript_20FECE
end
@@ -448,7 +448,7 @@ MauvilleCity_GameCorner_EventScript_2101D0:: @ 82101D0
end
MauvilleCity_GameCorner_EventScript_2101FA:: @ 82101FA
- call MauvilleCity_GameCorner_EventScript_272071
+ call Common_EventScript_NoRoomLeftForAnother
msgbox MauvilleCity_GameCorner_Text_2107A9, MSGBOX_DEFAULT
release
end
@@ -513,7 +513,7 @@ MauvilleCity_GameCorner_EventScript_210299:: @ 8210299
MauvilleCity_GameCorner_EventScript_2102A9:: @ 82102A9
closemessage
- applymovement VAR_LAST_TALKED, MauvilleCity_GameCorner_Movement_2725A2
+ applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
diff --git a/data/maps/MauvilleCity_Gym/scripts.inc b/data/maps/MauvilleCity_Gym/scripts.inc
index 76bceae56..de4bd0ddf 100644
--- a/data/maps/MauvilleCity_Gym/scripts.inc
+++ b/data/maps/MauvilleCity_Gym/scripts.inc
@@ -1,10 +1,10 @@
MauvilleCity_Gym_MapScripts:: @ 820DD6E
- map_script 1, MauvilleCity_Gym_MapScript1_20DD74
+ map_script MAP_SCRIPT_ON_LOAD, MauvilleCity_Gym_MapScript1_20DD74
.byte 0
MauvilleCity_Gym_MapScript1_20DD74: @ 820DD74
goto_if_set FLAG_DEFEATED_MAUVILLE_GYM, MauvilleCity_Gym_EventScript_20DEE7
- switch VAR_0x4093
+ switch VAR_MAUVILLE_GYM_STATE
case 0, MauvilleCity_Gym_EventScript_20DDBA
case 1, MauvilleCity_Gym_EventScript_20DEAF
case 2, MauvilleCity_Gym_EventScript_20DEBD
@@ -79,7 +79,7 @@ MauvilleCity_Gym_EventScript_20DEEB:: @ 820DEEB
compare VAR_RESULT, 1
goto_if_eq MauvilleCity_Gym_EventScript_20DFDE
goto_if_unset FLAG_RECEIVED_TM34, MauvilleCity_Gym_EventScript_20DF8D
- compare VAR_0x40BA, 2
+ compare VAR_NEW_MAUVILLE_STATE, 2
goto_if_eq MauvilleCity_Gym_EventScript_20DFD4
msgbox MauvilleCity_Gym_Text_20E8E3, MSGBOX_DEFAULT
release
@@ -88,14 +88,14 @@ MauvilleCity_Gym_EventScript_20DEEB:: @ 820DEEB
MauvilleCity_Gym_EventScript_20DF2B:: @ 820DF2B
message MauvilleCity_Gym_Text_20E77F
waitmessage
- call MauvilleCity_Gym_EventScript_27207E
+ call Common_EventScript_PlayGymBadgeFanfare
msgbox MauvilleCity_Gym_Text_20E7AA, MSGBOX_DEFAULT
setvar VAR_0x40D2, 3
clearflag FLAG_HIDE_VERDANTURF_TOWN_SCOTT
setflag FLAG_DEFEATED_MAUVILLE_GYM
setflag FLAG_BADGE03_GET
- addvar VAR_0x4085, 1
- compare VAR_0x4085, 6
+ addvar VAR_PETALBURG_GYM_STATE, 1
+ compare VAR_PETALBURG_GYM_STATE, 6
call_if_eq MauvilleCity_Gym_EventScript_271E84
setvar VAR_0x8008, 3
call MauvilleCity_Gym_EventScript_271F43
@@ -117,7 +117,7 @@ MauvilleCity_Gym_EventScript_20DF2B:: @ 820DF2B
MauvilleCity_Gym_EventScript_20DF8D:: @ 820DF8D
giveitem_std ITEM_TM34
compare VAR_RESULT, 0
- goto_if_eq MauvilleCity_Gym_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
msgbox MauvilleCity_Gym_Text_20E844, MSGBOX_DEFAULT
setflag FLAG_RECEIVED_TM34
release
@@ -126,7 +126,7 @@ MauvilleCity_Gym_EventScript_20DF8D:: @ 820DF8D
MauvilleCity_Gym_EventScript_20DFB1:: @ 820DFB1
giveitem_std ITEM_TM34
compare VAR_RESULT, 0
- goto_if_eq MauvilleCity_Gym_EventScript_27205E
+ goto_if_eq Common_EventScript_BagIsFull
msgbox MauvilleCity_Gym_Text_20E844, MSGBOX_DEFAULT
setflag FLAG_RECEIVED_TM34
return
@@ -144,9 +144,9 @@ MauvilleCity_Gym_EventScript_20DFDE:: @ 820DFDE
MauvilleCity_Gym_EventScript_20DFF9:: @ 820DFF9
lockall
goto_if_set FLAG_DEFEATED_MAUVILLE_GYM, MauvilleCity_Gym_EventScript_20E0AD
- compare VAR_0x4093, 1
+ compare VAR_MAUVILLE_GYM_STATE, 1
goto_if_eq MauvilleCity_Gym_EventScript_20E0AD
- setvar VAR_0x4093, 1
+ setvar VAR_MAUVILLE_GYM_STATE, 1
setvar VAR_0x8004, 0
goto MauvilleCity_Gym_EventScript_20E08D
end
@@ -154,9 +154,9 @@ MauvilleCity_Gym_EventScript_20DFF9:: @ 820DFF9
MauvilleCity_Gym_EventScript_20E01E:: @ 820E01E
lockall
goto_if_set FLAG_DEFEATED_MAUVILLE_GYM, MauvilleCity_Gym_EventScript_20E0AD
- compare VAR_0x4093, 2
+ compare VAR_MAUVILLE_GYM_STATE, 2
goto_if_eq MauvilleCity_Gym_EventScript_20E0AD
- setvar VAR_0x4093, 2
+ setvar VAR_MAUVILLE_GYM_STATE, 2
setvar VAR_0x8004, 1
goto MauvilleCity_Gym_EventScript_20E08D
end
@@ -164,9 +164,9 @@ MauvilleCity_Gym_EventScript_20E01E:: @ 820E01E
MauvilleCity_Gym_EventScript_20E043:: @ 820E043
lockall
goto_if_set FLAG_DEFEATED_MAUVILLE_GYM, MauvilleCity_Gym_EventScript_20E0AD
- compare VAR_0x4093, 3
+ compare VAR_MAUVILLE_GYM_STATE, 3
goto_if_eq MauvilleCity_Gym_EventScript_20E0AD
- setvar VAR_0x4093, 3
+ setvar VAR_MAUVILLE_GYM_STATE, 3
setvar VAR_0x8004, 2
goto MauvilleCity_Gym_EventScript_20E08D
end
@@ -174,9 +174,9 @@ MauvilleCity_Gym_EventScript_20E043:: @ 820E043
MauvilleCity_Gym_EventScript_20E068:: @ 820E068
lockall
goto_if_set FLAG_DEFEATED_MAUVILLE_GYM, MauvilleCity_Gym_EventScript_20E0AD
- compare VAR_0x4093, 4
+ compare VAR_MAUVILLE_GYM_STATE, 4
goto_if_eq MauvilleCity_Gym_EventScript_20E0AD
- setvar VAR_0x4093, 4
+ setvar VAR_MAUVILLE_GYM_STATE, 4
setvar VAR_0x8004, 3
goto MauvilleCity_Gym_EventScript_20E08D
end
diff --git a/data/maps/MauvilleCity_House2/scripts.inc b/data/maps/MauvilleCity_House2/scripts.inc
index c49052914..b683b8c15 100644
--- a/data/maps/MauvilleCity_House2/scripts.inc
+++ b/data/maps/MauvilleCity_House2/scripts.inc
@@ -14,9 +14,9 @@ MauvilleCity_House2_EventScript_210C5D:: @ 8210C5D
MauvilleCity_House2_EventScript_210C82:: @ 8210C82
playse SE_PIN
- applymovement VAR_LAST_TALKED, MauvilleCity_House2_Movement_272598
+ applymovement VAR_LAST_TALKED, Common_Movement_ExclamationMark
waitmovement 0
- applymovement VAR_LAST_TALKED, MauvilleCity_House2_Movement_27259A
+ applymovement VAR_LAST_TALKED, Common_Movement_Delay48
waitmovement 0
msgbox MauvilleCity_House2_Text_210D76, MSGBOX_YESNO
compare VAR_RESULT, 1
diff --git a/data/maps/MauvilleCity_PokemonCenter_1F/scripts.inc b/data/maps/MauvilleCity_PokemonCenter_1F/scripts.inc
index 1eac0efc9..a866e6aa4 100644
--- a/data/maps/MauvilleCity_PokemonCenter_1F/scripts.inc
+++ b/data/maps/MauvilleCity_PokemonCenter_1F/scripts.inc
@@ -1,6 +1,6 @@
MauvilleCity_PokemonCenter_1F_MapScripts:: @ 8210E5B
- map_script 3, MauvilleCity_PokemonCenter_1F_MapScript1_210E66
- map_script 5, MauvilleCity_PokemonCenter_1F_MapScript1_277C30
+ map_script MAP_SCRIPT_ON_TRANSITION, MauvilleCity_PokemonCenter_1F_MapScript1_210E66
+ map_script MAP_SCRIPT_ON_RESUME, MauvilleCity_PokemonCenter_1F_MapScript1_277C30
.byte 0
MauvilleCity_PokemonCenter_1F_MapScript1_210E66: @ 8210E66
diff --git a/data/maps/MauvilleCity_PokemonCenter_2F/scripts.inc b/data/maps/MauvilleCity_PokemonCenter_2F/scripts.inc
index 196d49a26..a289886a3 100644
--- a/data/maps/MauvilleCity_PokemonCenter_2F/scripts.inc
+++ b/data/maps/MauvilleCity_PokemonCenter_2F/scripts.inc
@@ -1,8 +1,8 @@
MauvilleCity_PokemonCenter_2F_MapScripts:: @ 8211008
- map_script 2, MauvilleCity_PokemonCenter_2F_MapScript2_276C3B
- map_script 4, MauvilleCity_PokemonCenter_2F_MapScript2_276B6C
- map_script 1, MauvilleCity_PokemonCenter_2F_MapScript1_276BBE
- map_script 3, MauvilleCity_PokemonCenter_2F_MapScript1_276ACF
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, MauvilleCity_PokemonCenter_2F_MapScript2_276C3B
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, MauvilleCity_PokemonCenter_2F_MapScript2_276B6C
+ map_script MAP_SCRIPT_ON_LOAD, MauvilleCity_PokemonCenter_2F_MapScript1_276BBE
+ map_script MAP_SCRIPT_ON_TRANSITION, MauvilleCity_PokemonCenter_2F_MapScript1_276ACF
.byte 0
MauvilleCity_PokemonCenter_2F_EventScript_21101D:: @ 821101D
diff --git a/data/maps/MeteorFalls_1F_1R/map.json b/data/maps/MeteorFalls_1F_1R/map.json
index 3492e05bc..586de013f 100644
--- a/data/maps/MeteorFalls_1F_1R/map.json
+++ b/data/maps/MeteorFalls_1F_1R/map.json
@@ -195,7 +195,7 @@
"x": 14,
"y": 18,
"elevation": 4,
- "var": "VAR_0x40BF",
+ "var": "VAR_METEOR_FALLS_STATE",
"var_value": "0",
"script": "MeteorFalls_1F_1R_EventScript_22BD5F"
}
diff --git a/data/maps/MeteorFalls_1F_1R/scripts.inc b/data/maps/MeteorFalls_1F_1R/scripts.inc
index ea161ba23..bd1b8d090 100644
--- a/data/maps/MeteorFalls_1F_1R/scripts.inc
+++ b/data/maps/MeteorFalls_1F_1R/scripts.inc
@@ -1,5 +1,5 @@
MeteorFalls_1F_1R_MapScripts:: @ 822BD2A
- map_script 1, MeteorFalls_1F_1R_MapScript1_22BD30
+ map_script MAP_SCRIPT_ON_LOAD, MeteorFalls_1F_1R_MapScript1_22BD30
.byte 0
MeteorFalls_1F_1R_MapScript1_22BD30: @ 822BD30
@@ -16,20 +16,20 @@ MeteorFalls_1F_1R_EventScript_22BD3A:: @ 822BD3A
MeteorFalls_1F_1R_EventScript_22BD5F:: @ 822BD5F
lockall
playbgm MUS_MGM0, 0
- applymovement EVENT_OBJ_ID_PLAYER, MeteorFalls_1F_1R_Movement_2725B0
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_FaceDown
waitmovement 0
delay 30
applymovement 5, MeteorFalls_1F_1R_Movement_2725B4
waitmovement 0
msgbox MeteorFalls_1F_1R_Text_22BF47, MSGBOX_DEFAULT
closemessage
- applymovement 5, MeteorFalls_1F_1R_Movement_2725A6
- applymovement 6, MeteorFalls_1F_1R_Movement_2725A6
+ applymovement 5, Common_Movement_WalkInPlaceUp
+ applymovement 6, Common_Movement_WalkInPlaceUp
waitmovement 0
playse SE_PIN
- applymovement 5, MeteorFalls_1F_1R_Movement_272598
+ applymovement 5, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 5, MeteorFalls_1F_1R_Movement_27259A
+ applymovement 5, Common_Movement_Delay48
waitmovement 0
msgbox MeteorFalls_1F_1R_Text_22BF84, MSGBOX_DEFAULT
closemessage
@@ -37,9 +37,9 @@ MeteorFalls_1F_1R_EventScript_22BD5F:: @ 822BD5F
waitmovement 0
msgbox MeteorFalls_1F_1R_Text_22BFE4, MSGBOX_DEFAULT
closemessage
- applymovement EVENT_OBJ_ID_PLAYER, MeteorFalls_1F_1R_Movement_2725A4
- applymovement 5, MeteorFalls_1F_1R_Movement_2725A4
- applymovement 6, MeteorFalls_1F_1R_Movement_2725A4
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceLeft
+ applymovement 5, Common_Movement_WalkInPlaceLeft
+ applymovement 6, Common_Movement_WalkInPlaceLeft
waitmovement 0
addobject 7
addobject 8
@@ -49,8 +49,8 @@ MeteorFalls_1F_1R_EventScript_22BD5F:: @ 822BD5F
applymovement 8, MeteorFalls_1F_1R_Movement_22BEE0
applymovement 9, MeteorFalls_1F_1R_Movement_22BEE8
waitmovement 0
- applymovement 5, MeteorFalls_1F_1R_Movement_2725A4
- applymovement 6, MeteorFalls_1F_1R_Movement_2725A4
+ applymovement 5, Common_Movement_WalkInPlaceLeft
+ applymovement 6, Common_Movement_WalkInPlaceLeft
waitmovement 0
msgbox MeteorFalls_1F_1R_Text_22C04E, MSGBOX_DEFAULT
closemessage
@@ -68,10 +68,10 @@ MeteorFalls_1F_1R_EventScript_22BD5F:: @ 822BD5F
applymovement 9, MeteorFalls_1F_1R_Movement_22BF18
waitmovement 0
msgbox MeteorFalls_1F_1R_Text_22C268, MSGBOX_DEFAULT
- applymovement 7, MeteorFalls_1F_1R_Movement_2725AA
+ applymovement 7, Common_Movement_WalkInPlaceDown
waitmovement 0
msgbox MeteorFalls_1F_1R_Text_22C292, MSGBOX_DEFAULT
- applymovement 7, MeteorFalls_1F_1R_Movement_2725A4
+ applymovement 7, Common_Movement_WalkInPlaceLeft
waitmovement 0
msgbox MeteorFalls_1F_1R_Text_22C2FC, MSGBOX_DEFAULT
closemessage
@@ -86,7 +86,7 @@ MeteorFalls_1F_1R_EventScript_22BD5F:: @ 822BD5F
setflag FLAG_HIDE_ROUTE_112_TEAM_MAGMA
setflag FLAG_MET_ARCHIE_METEOR_FALLS
setflag FLAG_HIDE_FALLORBOR_TOWN_BATTLE_TENT_SCOTT
- setvar VAR_0x40BF, 1
+ setvar VAR_METEOR_FALLS_STATE, 1
releaseall
end
diff --git a/data/maps/MeteorFalls_StevensCave/scripts.inc b/data/maps/MeteorFalls_StevensCave/scripts.inc
index ba8d807c5..31baad43c 100644
--- a/data/maps/MeteorFalls_StevensCave/scripts.inc
+++ b/data/maps/MeteorFalls_StevensCave/scripts.inc
@@ -6,11 +6,11 @@ MeteorFalls_StevensCave_EventScript_23B182:: @ 823B182
goto_if_set FLAG_DEFEATED_METEOR_FALLS_STEVEN, MeteorFalls_StevensCave_EventScript_23B1CD
waitse
playse SE_PIN
- applymovement 1, MeteorFalls_StevensCave_Movement_272598
+ applymovement 1, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 1, MeteorFalls_StevensCave_Movement_27259A
+ applymovement 1, Common_Movement_Delay48
waitmovement 0
- applymovement 1, MeteorFalls_StevensCave_Movement_27259E
+ applymovement 1, Common_Movement_FacePlayer
waitmovement 0
msgbox MeteorFalls_StevensCave_Text_23B1E1, MSGBOX_DEFAULT
trainerbattle_no_intro TRAINER_STEVEN, MeteorFalls_StevensCave_Text_23B32D
@@ -20,7 +20,7 @@ MeteorFalls_StevensCave_EventScript_23B182:: @ 823B182
end
MeteorFalls_StevensCave_EventScript_23B1CD:: @ 823B1CD
- applymovement 1, MeteorFalls_StevensCave_Movement_27259E
+ applymovement 1, Common_Movement_FacePlayer
waitmovement 0
msgbox MeteorFalls_StevensCave_Text_23B358, MSGBOX_DEFAULT
release
diff --git a/data/maps/MirageTower_1F/scripts.inc b/data/maps/MirageTower_1F/scripts.inc
index 94aed55d0..9f6c35a84 100644
--- a/data/maps/MirageTower_1F/scripts.inc
+++ b/data/maps/MirageTower_1F/scripts.inc
@@ -1,5 +1,5 @@
MirageTower_1F_MapScripts:: @ 823AD01
- map_script 3, MirageTower_1F_MapScript1_23AD07
+ map_script MAP_SCRIPT_ON_TRANSITION, MirageTower_1F_MapScript1_23AD07
.byte 0
MirageTower_1F_MapScript1_23AD07: @ 823AD07
diff --git a/data/maps/MirageTower_2F/scripts.inc b/data/maps/MirageTower_2F/scripts.inc
index 79f3cce2a..d22a7c6ff 100644
--- a/data/maps/MirageTower_2F/scripts.inc
+++ b/data/maps/MirageTower_2F/scripts.inc
@@ -1,7 +1,7 @@
MirageTower_2F_MapScripts:: @ 823AD11
- map_script 2, MirageTower_2F_MapScript2_2A8327
- map_script 3, MirageTower_2F_MapScript1_2A8331
- map_script 5, MirageTower_2F_MapScript1_23AD21
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, MirageTower_2F_MapScript2_2A8327
+ map_script MAP_SCRIPT_ON_TRANSITION, MirageTower_2F_MapScript1_2A8331
+ map_script MAP_SCRIPT_ON_RESUME, MirageTower_2F_MapScript1_23AD21
.byte 0
MirageTower_2F_MapScript1_23AD21: @ 823AD21
diff --git a/data/maps/MirageTower_3F/scripts.inc b/data/maps/MirageTower_3F/scripts.inc
index 1ec82de55..f29f542fc 100644
--- a/data/maps/MirageTower_3F/scripts.inc
+++ b/data/maps/MirageTower_3F/scripts.inc
@@ -1,7 +1,7 @@
MirageTower_3F_MapScripts:: @ 823AD2C
- map_script 2, MirageTower_3F_MapScript2_2A8327
- map_script 3, MirageTower_3F_MapScript1_2A8331
- map_script 5, MirageTower_3F_MapScript1_23AD3C
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, MirageTower_3F_MapScript2_2A8327
+ map_script MAP_SCRIPT_ON_TRANSITION, MirageTower_3F_MapScript1_2A8331
+ map_script MAP_SCRIPT_ON_RESUME, MirageTower_3F_MapScript1_23AD3C
.byte 0
MirageTower_3F_MapScript1_23AD3C: @ 823AD3C
diff --git a/data/maps/MossdeepCity/map.json b/data/maps/MossdeepCity/map.json
index 767a99584..952ff253c 100644
--- a/data/maps/MossdeepCity/map.json
+++ b/data/maps/MossdeepCity/map.json
@@ -439,7 +439,7 @@
"y": 16,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "MossdeepCity_EventScript_271E73"
+ "script": "Common_EventScript_ShowPokemonCenterSign"
},
{
"type": "sign",
@@ -447,7 +447,7 @@
"y": 18,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "MossdeepCity_EventScript_271E6A"
+ "script": "Common_EventScript_ShowPokemartSign"
},
{
"type": "sign",
@@ -463,7 +463,7 @@
"y": 16,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "MossdeepCity_EventScript_271E73"
+ "script": "Common_EventScript_ShowPokemonCenterSign"
},
{
"type": "sign",
@@ -471,7 +471,7 @@
"y": 18,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "MossdeepCity_EventScript_271E6A"
+ "script": "Common_EventScript_ShowPokemartSign"
},
{
"type": "sign",
diff --git a/data/maps/MossdeepCity/scripts.inc b/data/maps/MossdeepCity/scripts.inc
index b504d7004..b01e9cae8 100644
--- a/data/maps/MossdeepCity/scripts.inc
+++ b/data/maps/MossdeepCity/scripts.inc
@@ -1,5 +1,5 @@
MossdeepCity_MapScripts:: @ 81E4A96
- map_script 3, MossdeepCity_MapScript1_1E4A9C
+ map_script MAP_SCRIPT_ON_TRANSITION, MossdeepCity_MapScript1_1E4A9C
.byte 0
MossdeepCity_MapScript1_1E4A9C: @ 81E4A9C
@@ -7,7 +7,7 @@ MossdeepCity_MapScript1_1E4A9C: @ 81E4A9C
clearflag FLAG_MOSSDEEP_GYM_SWITCH_2
clearflag FLAG_MOSSDEEP_GYM_SWITCH_3
clearflag FLAG_MOSSDEEP_GYM_SWITCH_4
- call_if_set FLAG_SYS_WEATHER_CTRL, MossdeepCity_EventScript_27207A
+ call_if_set FLAG_SYS_WEATHER_CTRL, Common_EventScript_SetWeather15
end
MossdeepCity_EventScript_1E4AB2:: @ 81E4AB2
@@ -216,7 +216,7 @@ MossdeepCity_EventScript_1E4C10:: @ 81E4C10
lock
faceplayer
msgbox MossdeepCity_Text_1E5213, MSGBOX_DEFAULT
- applymovement VAR_LAST_TALKED, MossdeepCity_Movement_2725A2
+ applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -231,7 +231,7 @@ MossdeepCity_EventScript_1E4C26:: @ 81E4C26
msgbox MossdeepCity_Text_1E4D5B, MSGBOX_DEFAULT
giveitem_std ITEM_KINGS_ROCK
compare VAR_RESULT, 0
- goto_if_eq MossdeepCity_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
setflag FLAG_RECEIVED_KINGS_ROCK
release
end
diff --git a/data/maps/MossdeepCity_GameCorner_1F/scripts.inc b/data/maps/MossdeepCity_GameCorner_1F/scripts.inc
index ed10a8309..db9a1f854 100644
--- a/data/maps/MossdeepCity_GameCorner_1F/scripts.inc
+++ b/data/maps/MossdeepCity_GameCorner_1F/scripts.inc
@@ -1,15 +1,15 @@
MossdeepCity_GameCorner_1F_MapScripts:: @ 8224B27
- map_script 2, MossdeepCity_GameCorner_1F_MapScript2_224B41
- map_script 4, MossdeepCity_GameCorner_1F_MapScript2_224B37
- map_script 1, MossdeepCity_GameCorner_1F_MapScript1_276BBE
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, MossdeepCity_GameCorner_1F_MapScript2_224B41
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, MossdeepCity_GameCorner_1F_MapScript2_224B37
+ map_script MAP_SCRIPT_ON_LOAD, MossdeepCity_GameCorner_1F_MapScript1_276BBE
.byte 0
MossdeepCity_GameCorner_1F_MapScript2_224B37: @ 8224B37
- map_script_2 VAR_0x4087, 8, MossdeepCity_GameCorner_1F_EventScript_276BAE
+ map_script_2 VAR_CABLE_CLUB_STATE, 8, MossdeepCity_GameCorner_1F_EventScript_276BAE
.2byte 0
MossdeepCity_GameCorner_1F_MapScript2_224B41: @ 8224B41
- map_script_2 VAR_0x4087, 8, MossdeepCity_GameCorner_1F_EventScript_276C9D
+ map_script_2 VAR_CABLE_CLUB_STATE, 8, MossdeepCity_GameCorner_1F_EventScript_276C9D
.2byte 0
MossdeepCity_GameCorner_1F_EventScript_224B4B:: @ 8224B4B
diff --git a/data/maps/MossdeepCity_Gym/scripts.inc b/data/maps/MossdeepCity_Gym/scripts.inc
index fc1a73b4d..7638f6119 100644
--- a/data/maps/MossdeepCity_Gym/scripts.inc
+++ b/data/maps/MossdeepCity_Gym/scripts.inc
@@ -1,5 +1,5 @@
MossdeepCity_Gym_MapScripts:: @ 8220800
- map_script 1, MossdeepCity_Gym_MapScript1_220806
+ map_script MAP_SCRIPT_ON_LOAD, MossdeepCity_Gym_MapScript1_220806
.byte 0
MossdeepCity_Gym_MapScript1_220806: @ 8220806
@@ -57,7 +57,7 @@ MossdeepCity_Gym_EventScript_220898:: @ 8220898
MossdeepCity_Gym_EventScript_2208D1:: @ 82208D1
message MossdeepCity_Gym_Text_22196A
waitmessage
- call MossdeepCity_Gym_EventScript_27207E
+ call Common_EventScript_PlayGymBadgeFanfare
msgbox MossdeepCity_Gym_Text_221999, MSGBOX_DEFAULT
setflag FLAG_DEFEATED_MOSSDEEP_GYM
setflag FLAG_BADGE07_GET
@@ -89,7 +89,7 @@ MossdeepCity_Gym_EventScript_2208D1:: @ 82208D1
MossdeepCity_Gym_EventScript_220937:: @ 8220937
giveitem_std ITEM_TM04
compare VAR_RESULT, 0
- goto_if_eq MossdeepCity_Gym_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
msgbox MossdeepCity_Gym_Text_221A40, MSGBOX_DEFAULT
setflag FLAG_RECEIVED_TM04
release
@@ -98,7 +98,7 @@ MossdeepCity_Gym_EventScript_220937:: @ 8220937
MossdeepCity_Gym_EventScript_22095B:: @ 822095B
giveitem_std ITEM_TM04
compare VAR_RESULT, 0
- goto_if_eq MossdeepCity_Gym_EventScript_27205E
+ goto_if_eq Common_EventScript_BagIsFull
msgbox MossdeepCity_Gym_Text_221A40, MSGBOX_DEFAULT
setflag FLAG_RECEIVED_TM04
return
diff --git a/data/maps/MossdeepCity_PokemonCenter_1F/scripts.inc b/data/maps/MossdeepCity_PokemonCenter_1F/scripts.inc
index 28573a3c1..9dbead25e 100644
--- a/data/maps/MossdeepCity_PokemonCenter_1F/scripts.inc
+++ b/data/maps/MossdeepCity_PokemonCenter_1F/scripts.inc
@@ -1,6 +1,6 @@
MossdeepCity_PokemonCenter_1F_MapScripts:: @ 822223F
- map_script 3, MossdeepCity_PokemonCenter_1F_MapScript1_22224A
- map_script 5, MossdeepCity_PokemonCenter_1F_MapScript1_277C30
+ map_script MAP_SCRIPT_ON_TRANSITION, MossdeepCity_PokemonCenter_1F_MapScript1_22224A
+ map_script MAP_SCRIPT_ON_RESUME, MossdeepCity_PokemonCenter_1F_MapScript1_277C30
.byte 0
MossdeepCity_PokemonCenter_1F_MapScript1_22224A: @ 822224A
diff --git a/data/maps/MossdeepCity_PokemonCenter_2F/scripts.inc b/data/maps/MossdeepCity_PokemonCenter_2F/scripts.inc
index e8fbb6e02..922c9a064 100644
--- a/data/maps/MossdeepCity_PokemonCenter_2F/scripts.inc
+++ b/data/maps/MossdeepCity_PokemonCenter_2F/scripts.inc
@@ -1,8 +1,8 @@
MossdeepCity_PokemonCenter_2F_MapScripts:: @ 8222334
- map_script 2, MossdeepCity_PokemonCenter_2F_MapScript2_276C3B
- map_script 4, MossdeepCity_PokemonCenter_2F_MapScript2_276B6C
- map_script 1, MossdeepCity_PokemonCenter_2F_MapScript1_276BBE
- map_script 3, MossdeepCity_PokemonCenter_2F_MapScript1_276ACF
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, MossdeepCity_PokemonCenter_2F_MapScript2_276C3B
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, MossdeepCity_PokemonCenter_2F_MapScript2_276B6C
+ map_script MAP_SCRIPT_ON_LOAD, MossdeepCity_PokemonCenter_2F_MapScript1_276BBE
+ map_script MAP_SCRIPT_ON_TRANSITION, MossdeepCity_PokemonCenter_2F_MapScript1_276ACF
.byte 0
MossdeepCity_PokemonCenter_2F_EventScript_222349:: @ 8222349
diff --git a/data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc b/data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc
index 6d9022065..43bd56d3a 100644
--- a/data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc
+++ b/data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc
@@ -1,6 +1,6 @@
MossdeepCity_SpaceCenter_1F_MapScripts:: @ 8222F41
- map_script 1, MossdeepCity_SpaceCenter_1F_MapScript1_222FC2
- map_script 3, MossdeepCity_SpaceCenter_1F_MapScript1_222F4C
+ map_script MAP_SCRIPT_ON_LOAD, MossdeepCity_SpaceCenter_1F_MapScript1_222FC2
+ map_script MAP_SCRIPT_ON_TRANSITION, MossdeepCity_SpaceCenter_1F_MapScript1_222F4C
.byte 0
MossdeepCity_SpaceCenter_1F_MapScript1_222F4C: @ 8222F4C
@@ -60,7 +60,7 @@ MossdeepCity_SpaceCenter_1F_EventScript_222FD8:: @ 8222FD8
compare VAR_RESULT, 1
call_if_ge MossdeepCity_SpaceCenter_1F_EventScript_22301B
closemessage
- applymovement VAR_LAST_TALKED, MossdeepCity_SpaceCenter_1F_Movement_2725A2
+ applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -82,7 +82,7 @@ MossdeepCity_SpaceCenter_1F_EventScript_223024:: @ 8223024
compare VAR_RESULT, 1
call_if_ge MossdeepCity_SpaceCenter_1F_EventScript_22305A
closemessage
- applymovement VAR_LAST_TALKED, MossdeepCity_SpaceCenter_1F_Movement_2725A8
+ applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceRight
waitmovement 0
release
end
@@ -106,7 +106,7 @@ MossdeepCity_SpaceCenter_1F_EventScript_223063:: @ 8223063
MossdeepCity_SpaceCenter_1F_EventScript_22307A:: @ 822307A
msgbox MossdeepCity_SpaceCenter_1F_Text_2234B7, MSGBOX_DEFAULT
- applymovement VAR_LAST_TALKED, MossdeepCity_SpaceCenter_1F_Movement_2725A8
+ applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceRight
waitmovement 0
release
end
@@ -120,7 +120,7 @@ MossdeepCity_SpaceCenter_1F_EventScript_22308E:: @ 822308E
msgbox MossdeepCity_SpaceCenter_1F_Text_223540, MSGBOX_DEFAULT
giveitem_std ITEM_SUN_STONE
compare VAR_RESULT, 0
- goto_if_eq MossdeepCity_SpaceCenter_1F_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
setflag FLAG_RECEIVED_SUN_STONE_MOSSDEEP
msgbox MossdeepCity_SpaceCenter_1F_Text_2235A6, MSGBOX_DEFAULT
release
@@ -136,17 +136,17 @@ MossdeepCity_SpaceCenter_1F_EventScript_2230DA:: @ 82230DA
msgbox MossdeepCity_SpaceCenter_1F_Text_2235F0, MSGBOX_DEFAULT
giveitem_std ITEM_SUN_STONE
compare VAR_RESULT, 0
- goto_if_eq MossdeepCity_SpaceCenter_1F_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
setflag FLAG_RECEIVED_SUN_STONE_MOSSDEEP
msgbox MossdeepCity_SpaceCenter_1F_Text_223664, MSGBOX_DEFAULT
- applymovement VAR_LAST_TALKED, MossdeepCity_SpaceCenter_1F_Movement_2725A8
+ applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceRight
waitmovement 0
release
end
MossdeepCity_SpaceCenter_1F_EventScript_223119:: @ 8223119
msgbox MossdeepCity_SpaceCenter_1F_Text_223664, MSGBOX_DEFAULT
- applymovement VAR_LAST_TALKED, MossdeepCity_SpaceCenter_1F_Movement_2725A8
+ applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceRight
waitmovement 0
release
end
@@ -186,7 +186,7 @@ MossdeepCity_SpaceCenter_1F_EventScript_223168:: @ 8223168
MossdeepCity_SpaceCenter_1F_EventScript_22318F:: @ 822318F
msgbox MossdeepCity_SpaceCenter_1F_Text_22375B, MSGBOX_DEFAULT
closemessage
- applymovement VAR_LAST_TALKED, MossdeepCity_SpaceCenter_1F_Movement_2725A2
+ applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -194,7 +194,7 @@ MossdeepCity_SpaceCenter_1F_EventScript_22318F:: @ 822318F
MossdeepCity_SpaceCenter_1F_EventScript_2231A4:: @ 82231A4
msgbox MossdeepCity_SpaceCenter_1F_Text_2237B5, MSGBOX_DEFAULT
closemessage
- applymovement VAR_LAST_TALKED, MossdeepCity_SpaceCenter_1F_Movement_2725A2
+ applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -203,7 +203,7 @@ MossdeepCity_SpaceCenter_1F_EventScript_2231B9:: @ 82231B9
lock
faceplayer
msgbox MossdeepCity_SpaceCenter_1F_Text_223849, MSGBOX_DEFAULT
- applymovement VAR_LAST_TALKED, MossdeepCity_SpaceCenter_1F_Movement_2725A2
+ applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
diff --git a/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc b/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc
index 0602c9dad..d9727235f 100644
--- a/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc
+++ b/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc
@@ -1,6 +1,6 @@
MossdeepCity_SpaceCenter_2F_MapScripts:: @ 8223D58
- map_script 3, MossdeepCity_SpaceCenter_2F_MapScript1_223D63
- map_script 2, MossdeepCity_SpaceCenter_2F_MapScript2_223DB5
+ map_script MAP_SCRIPT_ON_TRANSITION, MossdeepCity_SpaceCenter_2F_MapScript1_223D63
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, MossdeepCity_SpaceCenter_2F_MapScript2_223DB5
.byte 0
MossdeepCity_SpaceCenter_2F_MapScript1_223D63: @ 8223D63
@@ -32,9 +32,9 @@ MossdeepCity_SpaceCenter_2F_MapScript2_223DB5: @ 8223DB5
MossdeepCity_SpaceCenter_2F_EventScript_223DBF:: @ 8223DBF
playse SE_PIN
- applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_SpaceCenter_2F_Movement_272598
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_ExclamationMark
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_SpaceCenter_2F_Movement_27259A
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_Delay48
waitmovement 0
msgbox MossdeepCity_SpaceCenter_2F_Text_2243A4, MSGBOX_YESNO
compare VAR_RESULT, 1
@@ -57,13 +57,13 @@ MossdeepCity_SpaceCenter_2F_EventScript_223E09:: @ 8223E09
trainerbattle_no_intro TRAINER_GRUNT_34, MossdeepCity_SpaceCenter_2F_Text_224461
applymovement 6, MossdeepCity_SpaceCenter_2F_Movement_223E85
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_SpaceCenter_2F_Movement_2725A4
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceLeft
waitmovement 0
msgbox MossdeepCity_SpaceCenter_2F_Text_22446E, MSGBOX_DEFAULT
trainerbattle_no_intro TRAINER_GRUNT_35, MossdeepCity_SpaceCenter_2F_Text_224499
applymovement 5, MossdeepCity_SpaceCenter_2F_Movement_223E81
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, MossdeepCity_SpaceCenter_2F_Movement_2725A8
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceRight
waitmovement 0
msgbox MossdeepCity_SpaceCenter_2F_Text_2244AB, MSGBOX_DEFAULT
trainerbattle_no_intro TRAINER_GRUNT_36, MossdeepCity_SpaceCenter_2F_Text_2244F1
@@ -173,7 +173,7 @@ MossdeepCity_SpaceCenter_2F_EventScript_223F59:: @ 8223F59
lock
faceplayer
msgbox MossdeepCity_SpaceCenter_2F_Text_2245D9, MSGBOX_DEFAULT
- applymovement VAR_LAST_TALKED, MossdeepCity_SpaceCenter_2F_Movement_2725A2
+ applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -231,20 +231,20 @@ MossdeepCity_SpaceCenter_2F_Movement_223FCF: @ 8223FCF
step_end
MossdeepCity_SpaceCenter_2F_EventScript_223FDA:: @ 8223FDA
- applymovement VAR_LAST_TALKED, MossdeepCity_SpaceCenter_2F_Movement_27259E
+ applymovement VAR_LAST_TALKED, Common_Movement_FacePlayer
waitmovement 0
msgbox MossdeepCity_SpaceCenter_2F_Text_2247FF, MSGBOX_YESNO
compare VAR_RESULT, 1
goto_if_eq MossdeepCity_SpaceCenter_2F_EventScript_22400C
msgbox MossdeepCity_SpaceCenter_2F_Text_224854, MSGBOX_DEFAULT
closemessage
- applymovement VAR_LAST_TALKED, MossdeepCity_SpaceCenter_2F_Movement_2725AA
+ applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceDown
waitmovement 0
releaseall
end
MossdeepCity_SpaceCenter_2F_EventScript_22400C:: @ 822400C
- applymovement VAR_LAST_TALKED, MossdeepCity_SpaceCenter_2F_Movement_2725AA
+ applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceDown
waitmovement 0
special SavePlayerParty
fadescreen 1
@@ -277,12 +277,12 @@ MossdeepCity_SpaceCenter_2F_EventScript_224071:: @ 8224071
msgbox MossdeepCity_SpaceCenter_2F_Text_2248C2, MSGBOX_DEFAULT
closemessage
delay 20
- applymovement 9, MossdeepCity_SpaceCenter_2F_Movement_2725A4
- applymovement 8, MossdeepCity_SpaceCenter_2F_Movement_2725AA
+ applymovement 9, Common_Movement_WalkInPlaceLeft
+ applymovement 8, Common_Movement_WalkInPlaceDown
waitmovement 0
delay 60
- applymovement 9, MossdeepCity_SpaceCenter_2F_Movement_2725A6
- applymovement 8, MossdeepCity_SpaceCenter_2F_Movement_2725A8
+ applymovement 9, Common_Movement_WalkInPlaceUp
+ applymovement 8, Common_Movement_WalkInPlaceRight
waitmovement 0
delay 20
msgbox MossdeepCity_SpaceCenter_2F_Text_2249DC, MSGBOX_DEFAULT
@@ -315,7 +315,7 @@ MossdeepCity_SpaceCenter_2F_EventScript_224071:: @ 8224071
removeobject 4
setflag FLAG_HIDE_MOSSDEEP_CITY_SPACE_CENTER_INVISIBLE_NINJA_BOY
clearflag FLAG_HIDE_MOSSDEEP_CITY_STEVENS_HOUSE_STEVEN
- setvar VAR_0x40C6, 1
+ setvar VAR_STEVENS_HOUSE_STATE, 1
setflag FLAG_HIDE_MOSSDEEP_CITY_SCOTT
removeobject 3
setobjectxyperm 3, 5, 6
diff --git a/data/maps/MossdeepCity_StevensHouse/scripts.inc b/data/maps/MossdeepCity_StevensHouse/scripts.inc
index 51f1ac16e..15b94133d 100644
--- a/data/maps/MossdeepCity_StevensHouse/scripts.inc
+++ b/data/maps/MossdeepCity_StevensHouse/scripts.inc
@@ -1,7 +1,7 @@
MossdeepCity_StevensHouse_MapScripts:: @ 8222784
- map_script 1, MossdeepCity_StevensHouse_MapScript1_222794
- map_script 3, MossdeepCity_StevensHouse_MapScript1_2227A8
- map_script 2, MossdeepCity_StevensHouse_MapScript2_2227C0
+ map_script MAP_SCRIPT_ON_LOAD, MossdeepCity_StevensHouse_MapScript1_222794
+ map_script MAP_SCRIPT_ON_TRANSITION, MossdeepCity_StevensHouse_MapScript1_2227A8
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, MossdeepCity_StevensHouse_MapScript2_2227C0
.byte 0
MossdeepCity_StevensHouse_MapScript1_222794: @ 8222794
@@ -13,7 +13,7 @@ MossdeepCity_StevensHouse_EventScript_22279E:: @ 822279E
return
MossdeepCity_StevensHouse_MapScript1_2227A8: @ 82227A8
- compare VAR_0x40C6, 2
+ compare VAR_STEVENS_HOUSE_STATE, 2
call_if_eq MossdeepCity_StevensHouse_EventScript_2227B4
end
@@ -23,17 +23,17 @@ MossdeepCity_StevensHouse_EventScript_2227B4:: @ 82227B4
return
MossdeepCity_StevensHouse_MapScript2_2227C0: @ 82227C0
- map_script_2 VAR_0x40C6, 1, MossdeepCity_StevensHouse_EventScript_2227CA
+ map_script_2 VAR_STEVENS_HOUSE_STATE, 1, MossdeepCity_StevensHouse_EventScript_2227CA
.2byte 0
MossdeepCity_StevensHouse_EventScript_2227CA:: @ 82227CA
lockall
- applymovement 1, MossdeepCity_StevensHouse_Movement_2725A4
+ applymovement 1, Common_Movement_WalkInPlaceLeft
waitmovement 0
playse SE_PIN
- applymovement 1, MossdeepCity_StevensHouse_Movement_272598
+ applymovement 1, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 1, MossdeepCity_StevensHouse_Movement_27259A
+ applymovement 1, Common_Movement_Delay48
waitmovement 0
applymovement 1, MossdeepCity_StevensHouse_Movement_222833
waitmovement 0
@@ -48,7 +48,7 @@ MossdeepCity_StevensHouse_EventScript_2227CA:: @ 82227CA
waitmovement 0
setflag FLAG_HIDE_MOSSDEEP_CITY_SCOTT
setflag FLAG_HIDE_SEAFLOOR_CAVERN_ENTRANCE_AQUA_GRUNT
- setvar VAR_0x40C6, 2
+ setvar VAR_STEVENS_HOUSE_STATE, 2
releaseall
end
@@ -99,7 +99,7 @@ MossdeepCity_StevensHouse_EventScript_222895:: @ 8222895
compare VAR_RESULT, 0
goto_if_eq MossdeepCity_StevensHouse_EventScript_222901
call MossdeepCity_StevensHouse_EventScript_27378B
- call MossdeepCity_StevensHouse_EventScript_2723DD
+ call Common_EventScript_NameReceivedPokemon
goto MossdeepCity_StevensHouse_EventScript_222901
end
diff --git a/data/maps/MtChimney/scripts.inc b/data/maps/MtChimney/scripts.inc
index 3bfc33f6a..db1fd59ef 100644
--- a/data/maps/MtChimney/scripts.inc
+++ b/data/maps/MtChimney/scripts.inc
@@ -1,10 +1,10 @@
MtChimney_MapScripts:: @ 822EDC1
- map_script 5, MtChimney_MapScript1_22EDD2
- map_script 3, MtChimney_MapScript1_22EDCC
+ map_script MAP_SCRIPT_ON_RESUME, MtChimney_MapScript1_22EDD2
+ map_script MAP_SCRIPT_ON_TRANSITION, MtChimney_MapScript1_22EDCC
.byte 0
MtChimney_MapScript1_22EDCC: @ 822EDCC
- setvar VAR_0x40BD, 1
+ setvar VAR_JAGGED_PASS_ASH_WEATHER, 1
end
MtChimney_MapScript1_22EDD2: @ 822EDD2
@@ -17,7 +17,7 @@ MtChimney_EventScript_22EDD5:: @ 822EDD5
call_if_unset FLAG_EVIL_LEADER_PLEASE_STOP, MtChimney_EventScript_22EDF9
call_if_set FLAG_EVIL_LEADER_PLEASE_STOP, MtChimney_EventScript_22EE02
closemessage
- applymovement 1, MtChimney_Movement_2725A2
+ applymovement 1, Common_Movement_FaceOriginalDirection
waitmovement 0
setflag FLAG_EVIL_LEADER_PLEASE_STOP
release
@@ -35,12 +35,12 @@ MtChimney_EventScript_22EE0B:: @ 822EE0B
lockall
playbgm MUS_MGM0, 0
msgbox MtChimney_Text_22F26A, MSGBOX_DEFAULT
- applymovement 2, MtChimney_Movement_27259E
+ applymovement 2, Common_Movement_FacePlayer
waitmovement 0
playse SE_PIN
- applymovement 2, MtChimney_Movement_272598
+ applymovement 2, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 2, MtChimney_Movement_27259A
+ applymovement 2, Common_Movement_Delay48
waitmovement 0
msgbox MtChimney_Text_22F32E, MSGBOX_DEFAULT
trainerbattle_no_intro TRAINER_MAXIE_2, MtChimney_Text_22F5CF
@@ -60,7 +60,7 @@ MtChimney_EventScript_22EE0B:: @ 822EE0B
call_if_eq MtChimney_EventScript_22EEC7
compare VAR_FACING, 2
call_if_eq MtChimney_EventScript_22EED2
- applymovement EVENT_OBJ_ID_PLAYER, MtChimney_Movement_2725A4
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceLeft
waitmovement 0
msgbox MtChimney_Text_22FC3D, MSGBOX_DEFAULT
closemessage
@@ -121,7 +121,7 @@ MtChimney_EventScript_22EEF3:: @ 822EEF3
end
MtChimney_EventScript_22EF51:: @ 822EF51
- msgbox gUnknown_08272AD0, MSGBOX_DEFAULT
+ msgbox gText_TooBadBagIsFull, MSGBOX_DEFAULT
hidemoneybox
nop
nop
diff --git a/data/maps/MtChimney_CableCarStation/scripts.inc b/data/maps/MtChimney_CableCarStation/scripts.inc
index 6c389e2ad..057001111 100644
--- a/data/maps/MtChimney_CableCarStation/scripts.inc
+++ b/data/maps/MtChimney_CableCarStation/scripts.inc
@@ -1,10 +1,10 @@
MtChimney_CableCarStation_MapScripts:: @ 822ABFA
- map_script 3, MtChimney_CableCarStation_MapScript1_22AC05
- map_script 2, MtChimney_CableCarStation_MapScript2_22AC1D
+ map_script MAP_SCRIPT_ON_TRANSITION, MtChimney_CableCarStation_MapScript1_22AC05
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, MtChimney_CableCarStation_MapScript2_22AC1D
.byte 0
MtChimney_CableCarStation_MapScript1_22AC05: @ 822AC05
- compare VAR_0x40A3, 1
+ compare VAR_CABLE_CAR_STATION_STATE, 1
call_if_eq MtChimney_CableCarStation_EventScript_22AC11
end
@@ -14,7 +14,7 @@ MtChimney_CableCarStation_EventScript_22AC11:: @ 822AC11
return
MtChimney_CableCarStation_MapScript2_22AC1D: @ 822AC1D
- map_script_2 VAR_0x40A3, 1, MtChimney_CableCarStation_EventScript_22AC27
+ map_script_2 VAR_CABLE_CAR_STATION_STATE, 1, MtChimney_CableCarStation_EventScript_22AC27
.2byte 0
MtChimney_CableCarStation_EventScript_22AC27:: @ 822AC27
@@ -22,7 +22,7 @@ MtChimney_CableCarStation_EventScript_22AC27:: @ 822AC27
applymovement EVENT_OBJ_ID_PLAYER, MtChimney_CableCarStation_Movement_22ACB4
applymovement 1, MtChimney_CableCarStation_Movement_22ACAA
waitmovement 0
- setvar VAR_0x40A3, 0
+ setvar VAR_CABLE_CAR_STATION_STATE, 0
setobjectxyperm 1, 6, 7
setobjectmovementtype 1, MOVEMENT_TYPE_FACE_DOWN
releaseall
@@ -45,7 +45,7 @@ MtChimney_CableCarStation_EventScript_22AC6C:: @ 822AC6C
applymovement EVENT_OBJ_ID_PLAYER, MtChimney_CableCarStation_Movement_22ACAF
waitmovement 0
setvar VAR_0x8004, 1
- setvar VAR_0x40A3, 2
+ setvar VAR_CABLE_CAR_STATION_STATE, 2
incrementgamestat 48
special CableCarWarp
special CableCar
diff --git a/data/maps/MtPyre_1F/scripts.inc b/data/maps/MtPyre_1F/scripts.inc
index 676df4aee..a06f34a29 100644
--- a/data/maps/MtPyre_1F/scripts.inc
+++ b/data/maps/MtPyre_1F/scripts.inc
@@ -8,7 +8,7 @@ MtPyre_1F_EventScript_230F3F:: @ 8230F3F
msgbox MtPyre_1F_Text_230F8A, MSGBOX_DEFAULT
giveitem_std ITEM_CLEANSE_TAG
compare VAR_RESULT, 0
- goto_if_eq MtPyre_1F_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
setflag FLAG_RECEIVED_CLEANSE_TAG
release
end
diff --git a/data/maps/MtPyre_2F/scripts.inc b/data/maps/MtPyre_2F/scripts.inc
index cdf2cb98b..150c08df4 100644
--- a/data/maps/MtPyre_2F/scripts.inc
+++ b/data/maps/MtPyre_2F/scripts.inc
@@ -1,7 +1,7 @@
MtPyre_2F_MapScripts:: @ 82310FB
- map_script 2, MtPyre_2F_MapScript2_2A8327
- map_script 3, MtPyre_2F_MapScript1_2A8331
- map_script 5, MtPyre_2F_MapScript1_23110B
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, MtPyre_2F_MapScript2_2A8327
+ map_script MAP_SCRIPT_ON_TRANSITION, MtPyre_2F_MapScript1_2A8331
+ map_script MAP_SCRIPT_ON_RESUME, MtPyre_2F_MapScript1_23110B
.byte 0
MtPyre_2F_MapScript1_23110B: @ 823110B
diff --git a/data/maps/MtPyre_Exterior/scripts.inc b/data/maps/MtPyre_Exterior/scripts.inc
index fe51946dc..e24f8ea68 100644
--- a/data/maps/MtPyre_Exterior/scripts.inc
+++ b/data/maps/MtPyre_Exterior/scripts.inc
@@ -1,5 +1,5 @@
MtPyre_Exterior_MapScripts:: @ 8231FCC
- map_script 3, MtPyre_Exterior_MapScript1_231FD2
+ map_script MAP_SCRIPT_ON_TRANSITION, MtPyre_Exterior_MapScript1_231FD2
.byte 0
MtPyre_Exterior_MapScript1_231FD2: @ 8231FD2
diff --git a/data/maps/MtPyre_Summit/map.json b/data/maps/MtPyre_Summit/map.json
index fedde68e8..78780ba19 100644
--- a/data/maps/MtPyre_Summit/map.json
+++ b/data/maps/MtPyre_Summit/map.json
@@ -148,7 +148,7 @@
"x": 22,
"y": 7,
"elevation": 3,
- "var": "VAR_0x40B9",
+ "var": "VAR_MT_PYRE_STATE",
"var_value": "0",
"script": "MtPyre_Summit_EventScript_232018"
},
@@ -157,7 +157,7 @@
"x": 23,
"y": 7,
"elevation": 3,
- "var": "VAR_0x40B9",
+ "var": "VAR_MT_PYRE_STATE",
"var_value": "0",
"script": "MtPyre_Summit_EventScript_232024"
},
@@ -166,7 +166,7 @@
"x": 24,
"y": 7,
"elevation": 3,
- "var": "VAR_0x40B9",
+ "var": "VAR_MT_PYRE_STATE",
"var_value": "0",
"script": "MtPyre_Summit_EventScript_232030"
},
@@ -175,7 +175,7 @@
"x": 22,
"y": 9,
"elevation": 3,
- "var": "VAR_0x40B9",
+ "var": "VAR_MT_PYRE_STATE",
"var_value": "2",
"script": "MtPyre_Summit_EventScript_2321EC"
},
@@ -184,7 +184,7 @@
"x": 23,
"y": 9,
"elevation": 3,
- "var": "VAR_0x40B9",
+ "var": "VAR_MT_PYRE_STATE",
"var_value": "2",
"script": "MtPyre_Summit_EventScript_2321F8"
},
@@ -193,7 +193,7 @@
"x": 24,
"y": 9,
"elevation": 3,
- "var": "VAR_0x40B9",
+ "var": "VAR_MT_PYRE_STATE",
"var_value": "2",
"script": "MtPyre_Summit_EventScript_232204"
}
diff --git a/data/maps/MtPyre_Summit/scripts.inc b/data/maps/MtPyre_Summit/scripts.inc
index 6eaf6265f..a0da7e907 100644
--- a/data/maps/MtPyre_Summit/scripts.inc
+++ b/data/maps/MtPyre_Summit/scripts.inc
@@ -1,9 +1,9 @@
MtPyre_Summit_MapScripts:: @ 8231FF7
- map_script 3, MtPyre_Summit_MapScript1_231FFD
+ map_script MAP_SCRIPT_ON_TRANSITION, MtPyre_Summit_MapScript1_231FFD
.byte 0
MtPyre_Summit_MapScript1_231FFD: @ 8231FFD
- compare VAR_0x40B9, 2
+ compare VAR_MT_PYRE_STATE, 2
call_if_eq MtPyre_Summit_EventScript_232009
end
@@ -32,9 +32,9 @@ MtPyre_Summit_EventScript_232030:: @ 8232030
MtPyre_Summit_EventScript_23203C:: @ 823203C
playbgm MUS_AQA_0, 0
- applymovement EVENT_OBJ_ID_PLAYER, MtPyre_Summit_Movement_2725B2
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_FaceUp
waitmovement 0
- applymovement 2, MtPyre_Summit_Movement_2725AA
+ applymovement 2, Common_Movement_WalkInPlaceDown
waitmovement 0
delay 50
compare VAR_0x8008, 0
@@ -56,7 +56,7 @@ MtPyre_Summit_EventScript_23203C:: @ 823203C
fadedefaultbgm
fadescreen 0
delay 20
- setvar VAR_0x40B9, 1
+ setvar VAR_MT_PYRE_STATE, 1
compare VAR_0x8008, 0
call_if_eq MtPyre_Summit_EventScript_2320F7
compare VAR_0x8008, 1
@@ -86,7 +86,7 @@ MtPyre_Summit_EventScript_2320EC:: @ 82320EC
MtPyre_Summit_EventScript_2320F7:: @ 82320F7
applymovement 3, MtPyre_Summit_Movement_23212C
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, MtPyre_Summit_Movement_2725A8
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceRight
waitmovement 0
return
@@ -98,7 +98,7 @@ MtPyre_Summit_EventScript_23210C:: @ 823210C
MtPyre_Summit_EventScript_232117:: @ 8232117
applymovement 3, MtPyre_Summit_Movement_232132
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, MtPyre_Summit_Movement_2725A4
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceLeft
waitmovement 0
return
@@ -165,7 +165,7 @@ MtPyre_Summit_EventScript_2321A2:: @ 82321A2
lock
faceplayer
goto_if_set FLAG_RETURNED_RED_OR_BLUE_ORB, MtPyre_Summit_EventScript_2321E2
- compare VAR_0x40B9, 3
+ compare VAR_MT_PYRE_STATE, 3
call_if_ge MtPyre_Summit_EventScript_2321CB
goto_if_set FLAG_KYOGRE_ESCAPED_SEAFLOOR_CAVERN, MtPyre_Summit_EventScript_2321D8
msgbox MtPyre_Summit_Text_232AD8, MSGBOX_DEFAULT
@@ -207,7 +207,7 @@ MtPyre_Summit_EventScript_232204:: @ 8232204
end
MtPyre_Summit_EventScript_232210:: @ 8232210
- applymovement EVENT_OBJ_ID_PLAYER, MtPyre_Summit_Movement_2725A6
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceUp
waitmovement 0
delay 60
compare VAR_0x8008, 0
@@ -217,9 +217,9 @@ MtPyre_Summit_EventScript_232210:: @ 8232210
compare VAR_0x8008, 2
call_if_eq MtPyre_Summit_EventScript_2322F6
playse SE_PIN
- applymovement 8, MtPyre_Summit_Movement_272598
+ applymovement 8, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 8, MtPyre_Summit_Movement_27259A
+ applymovement 8, Common_Movement_Delay48
waitmovement 0
delay 30
compare VAR_0x8008, 0
@@ -242,7 +242,7 @@ MtPyre_Summit_EventScript_232210:: @ 8232210
waitmovement 0
removeobject 2
removeobject 8
- setvar VAR_0x40B9, 3
+ setvar VAR_MT_PYRE_STATE, 3
releaseall
end
@@ -292,7 +292,7 @@ MtPyre_Summit_EventScript_23235A:: @ 823235A
applymovement EVENT_OBJ_ID_PLAYER, MtPyre_Summit_Movement_2323EA
applymovement 8, MtPyre_Summit_Movement_2323ED
waitmovement 0
- applymovement 2, MtPyre_Summit_Movement_2725A8
+ applymovement 2, Common_Movement_WalkInPlaceRight
waitmovement 0
return
@@ -300,7 +300,7 @@ MtPyre_Summit_EventScript_232376:: @ 8232376
applymovement EVENT_OBJ_ID_PLAYER, MtPyre_Summit_Movement_2323EA
applymovement 8, MtPyre_Summit_Movement_2323F3
waitmovement 0
- applymovement 2, MtPyre_Summit_Movement_2725A8
+ applymovement 2, Common_Movement_WalkInPlaceRight
waitmovement 0
return
@@ -308,7 +308,7 @@ MtPyre_Summit_EventScript_232392:: @ 8232392
applymovement EVENT_OBJ_ID_PLAYER, MtPyre_Summit_Movement_2323EA
applymovement 8, MtPyre_Summit_Movement_2323F8
waitmovement 0
- applymovement 2, MtPyre_Summit_Movement_2725A8
+ applymovement 2, Common_Movement_WalkInPlaceRight
waitmovement 0
return
diff --git a/data/maps/NavelRock_Bottom/scripts.inc b/data/maps/NavelRock_Bottom/scripts.inc
index cd26de91d..8a617236c 100644
--- a/data/maps/NavelRock_Bottom/scripts.inc
+++ b/data/maps/NavelRock_Bottom/scripts.inc
@@ -1,6 +1,6 @@
NavelRock_Bottom_MapScripts:: @ 8269255
- map_script 3, NavelRock_Bottom_MapScript1_269260
- map_script 5, NavelRock_Bottom_MapScript1_269284
+ map_script MAP_SCRIPT_ON_TRANSITION, NavelRock_Bottom_MapScript1_269260
+ map_script MAP_SCRIPT_ON_RESUME, NavelRock_Bottom_MapScript1_269284
.byte 0
NavelRock_Bottom_MapScript1_269260: @ 8269260
@@ -13,7 +13,7 @@ NavelRock_Bottom_EventScript_269273:: @ 8269273
return
NavelRock_Bottom_EventScript_269277:: @ 8269277
- goto_if_set FLAG_DEFEATED_LUGIA, NavelRock_Bottom_EventScript_27374E
+ goto_if_set FLAG_DEFEATED_LUGIA, Common_EventScript_NopReturn
clearflag FLAG_HIDE_LUGIA
return
@@ -24,7 +24,7 @@ NavelRock_Bottom_MapScript1_269284: @ 8269284
NavelRock_Bottom_EventScript_26928E:: @ 826928E
specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, 7
- goto_if_ne NavelRock_Bottom_EventScript_27374E
+ goto_if_ne Common_EventScript_NopReturn
removeobject 1
return
diff --git a/data/maps/NavelRock_Exterior/scripts.inc b/data/maps/NavelRock_Exterior/scripts.inc
index 21034a4e0..33bbb6391 100644
--- a/data/maps/NavelRock_Exterior/scripts.inc
+++ b/data/maps/NavelRock_Exterior/scripts.inc
@@ -1,5 +1,5 @@
NavelRock_Exterior_MapScripts:: @ 82690B2
- map_script 3, NavelRock_Exterior_MapScript1_2690B8
+ map_script MAP_SCRIPT_ON_TRANSITION, NavelRock_Exterior_MapScript1_2690B8
.byte 0
NavelRock_Exterior_MapScript1_2690B8: @ 82690B8
diff --git a/data/maps/NavelRock_Harbor/scripts.inc b/data/maps/NavelRock_Harbor/scripts.inc
index 4df8343fb..332e6dbea 100644
--- a/data/maps/NavelRock_Harbor/scripts.inc
+++ b/data/maps/NavelRock_Harbor/scripts.inc
@@ -9,7 +9,7 @@ NavelRock_Harbor_EventScript_2690BD:: @ 82690BD
goto_if_eq NavelRock_Harbor_EventScript_269102
msgbox NavelRock_Harbor_Text_2A6A5D, MSGBOX_DEFAULT
closemessage
- applymovement VAR_LAST_TALKED, NavelRock_Harbor_Movement_2725AA
+ applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceDown
waitmovement 0
delay 30
hideobjectat 1, MAP_NAVEL_ROCK_HARBOR
diff --git a/data/maps/NavelRock_Top/scripts.inc b/data/maps/NavelRock_Top/scripts.inc
index 423d998a7..af011e058 100644
--- a/data/maps/NavelRock_Top/scripts.inc
+++ b/data/maps/NavelRock_Top/scripts.inc
@@ -1,6 +1,6 @@
NavelRock_Top_MapScripts:: @ 8269113
- map_script 3, NavelRock_Top_MapScript1_26911E
- map_script 5, NavelRock_Top_MapScript1_269151
+ map_script MAP_SCRIPT_ON_TRANSITION, NavelRock_Top_MapScript1_26911E
+ map_script MAP_SCRIPT_ON_RESUME, NavelRock_Top_MapScript1_269151
.byte 0
NavelRock_Top_MapScript1_26911E: @ 826911E
@@ -15,7 +15,7 @@ NavelRock_Top_EventScript_269131:: @ 8269131
NavelRock_Top_EventScript_26913A:: @ 826913A
setvar VAR_TEMP_1, 1
- goto_if_set FLAG_DEFEATED_HO_OH, NavelRock_Top_EventScript_27374E
+ goto_if_set FLAG_DEFEATED_HO_OH, Common_EventScript_NopReturn
setvar VAR_TEMP_1, 0
clearflag FLAG_HIDE_HO_OH
return
@@ -27,7 +27,7 @@ NavelRock_Top_MapScript1_269151: @ 8269151
NavelRock_Top_EventScript_26915B:: @ 826915B
specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, 7
- goto_if_ne NavelRock_Top_EventScript_27374E
+ goto_if_ne Common_EventScript_NopReturn
removeobject 1
return
diff --git a/data/maps/NewMauville_Entrance/map.json b/data/maps/NewMauville_Entrance/map.json
index 00467c1d9..d36763350 100644
--- a/data/maps/NewMauville_Entrance/map.json
+++ b/data/maps/NewMauville_Entrance/map.json
@@ -36,7 +36,7 @@
"x": 4,
"y": 2,
"elevation": 3,
- "var": "VAR_0x40BA",
+ "var": "VAR_NEW_MAUVILLE_STATE",
"var_value": "0",
"script": "NewMauville_Entrance_EventScript_2372FF"
}
diff --git a/data/maps/NewMauville_Entrance/scripts.inc b/data/maps/NewMauville_Entrance/scripts.inc
index d841f0374..c3ed930a5 100644
--- a/data/maps/NewMauville_Entrance/scripts.inc
+++ b/data/maps/NewMauville_Entrance/scripts.inc
@@ -1,10 +1,10 @@
NewMauville_Entrance_MapScripts:: @ 82372AD
- map_script 1, NewMauville_Entrance_MapScript1_2372B8
- map_script 3, NewMauville_Entrance_MapScript1_2372FB
+ map_script MAP_SCRIPT_ON_LOAD, NewMauville_Entrance_MapScript1_2372B8
+ map_script MAP_SCRIPT_ON_TRANSITION, NewMauville_Entrance_MapScript1_2372FB
.byte 0
NewMauville_Entrance_MapScript1_2372B8: @ 82372B8
- compare VAR_0x40BA, 0
+ compare VAR_NEW_MAUVILLE_STATE, 0
call_if_eq NewMauville_Entrance_EventScript_2372C4
end
@@ -23,7 +23,7 @@ NewMauville_Entrance_MapScript1_2372FB: @ 82372FB
NewMauville_Entrance_EventScript_2372FF:: @ 82372FF
lockall
- applymovement EVENT_OBJ_ID_PLAYER, NewMauville_Entrance_Movement_2725A6
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceUp
waitmovement 0
msgbox NewMauville_Entrance_Text_237382, MSGBOX_DEFAULT
checkitem ITEM_BASEMENT_KEY, 1
@@ -41,7 +41,7 @@ NewMauville_Entrance_EventScript_2372FF:: @ 82372FF
setmetatile 5, 1, 717, 1
special DrawWholeMapView
playse SE_BAN
- setvar VAR_0x40BA, 1
+ setvar VAR_NEW_MAUVILLE_STATE, 1
releaseall
end
diff --git a/data/maps/NewMauville_Inside/map.json b/data/maps/NewMauville_Inside/map.json
index fe7959703..b13d6059d 100644
--- a/data/maps/NewMauville_Inside/map.json
+++ b/data/maps/NewMauville_Inside/map.json
@@ -215,7 +215,7 @@
"x": 33,
"y": 6,
"elevation": 3,
- "var": "VAR_0x40BA",
+ "var": "VAR_NEW_MAUVILLE_STATE",
"var_value": "1",
"script": "NewMauville_Inside_EventScript_237725"
}
diff --git a/data/maps/NewMauville_Inside/scripts.inc b/data/maps/NewMauville_Inside/scripts.inc
index b3d9d868f..15d2cb02a 100644
--- a/data/maps/NewMauville_Inside/scripts.inc
+++ b/data/maps/NewMauville_Inside/scripts.inc
@@ -1,7 +1,7 @@
NewMauville_Inside_MapScripts:: @ 82373D7
- map_script 5, NewMauville_Inside_MapScript1_2373E7
- map_script 3, NewMauville_Inside_MapScript1_23741B
- map_script 1, NewMauville_Inside_MapScript1_23744D
+ map_script MAP_SCRIPT_ON_RESUME, NewMauville_Inside_MapScript1_2373E7
+ map_script MAP_SCRIPT_ON_TRANSITION, NewMauville_Inside_MapScript1_23741B
+ map_script MAP_SCRIPT_ON_LOAD, NewMauville_Inside_MapScript1_23744D
.byte 0
NewMauville_Inside_MapScript1_2373E7: @ 82373E7
@@ -15,7 +15,7 @@ NewMauville_Inside_MapScript1_2373E7: @ 82373E7
NewMauville_Inside_EventScript_237407:: @ 8237407
specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, 7
- goto_if_ne NewMauville_Inside_EventScript_27374E
+ goto_if_ne Common_EventScript_NopReturn
removeobject VAR_LAST_TALKED
return
@@ -40,7 +40,7 @@ NewMauville_Inside_EventScript_237449:: @ 8237449
return
NewMauville_Inside_MapScript1_23744D: @ 823744D
- compare VAR_0x40BA, 2
+ compare VAR_NEW_MAUVILLE_STATE, 2
call_if_eq NewMauville_Inside_EventScript_23773A
end
@@ -148,7 +148,7 @@ NewMauville_Inside_EventScript_237725:: @ 8237725
lockall
msgbox NewMauville_Inside_Text_237932, MSGBOX_DEFAULT
call NewMauville_Inside_EventScript_23773A
- setvar VAR_0x40BA, 2
+ setvar VAR_NEW_MAUVILLE_STATE, 2
releaseall
end
@@ -167,7 +167,7 @@ NewMauville_Inside_EventScript_23773A:: @ 823773A
NewMauville_Inside_EventScript_23778F:: @ 823778F
lockall
- compare VAR_0x40BA, 2
+ compare VAR_NEW_MAUVILLE_STATE, 2
goto_if_eq NewMauville_Inside_EventScript_2377A5
msgbox NewMauville_Inside_Text_237896, MSGBOX_DEFAULT
releaseall
diff --git a/data/maps/OldaleTown/map.json b/data/maps/OldaleTown/map.json
index 164cd3eae..37b6105f2 100644
--- a/data/maps/OldaleTown/map.json
+++ b/data/maps/OldaleTown/map.json
@@ -119,7 +119,7 @@
"x": 0,
"y": 10,
"elevation": 3,
- "var": "VAR_0x4051",
+ "var": "VAR_ROUTE102_ACCESSIBLE",
"var_value": "0",
"script": "OldaleTown_EventScript_1E903F"
},
@@ -128,7 +128,7 @@
"x": 8,
"y": 19,
"elevation": 3,
- "var": "VAR_0x40C7",
+ "var": "VAR_OLDALE_STATE",
"var_value": "1",
"script": "OldaleTown_EventScript_1E9086"
},
@@ -137,7 +137,7 @@
"x": 9,
"y": 19,
"elevation": 3,
- "var": "VAR_0x40C7",
+ "var": "VAR_OLDALE_STATE",
"var_value": "1",
"script": "OldaleTown_EventScript_1E90A6"
},
@@ -146,7 +146,7 @@
"x": 10,
"y": 19,
"elevation": 3,
- "var": "VAR_0x40C7",
+ "var": "VAR_OLDALE_STATE",
"var_value": "1",
"script": "OldaleTown_EventScript_1E90C6"
}
@@ -166,7 +166,7 @@
"y": 16,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "OldaleTown_EventScript_271E73"
+ "script": "Common_EventScript_ShowPokemonCenterSign"
},
{
"type": "sign",
@@ -174,7 +174,7 @@
"y": 6,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "OldaleTown_EventScript_271E6A"
+ "script": "Common_EventScript_ShowPokemartSign"
},
{
"type": "sign",
@@ -182,7 +182,7 @@
"y": 16,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "OldaleTown_EventScript_271E73"
+ "script": "Common_EventScript_ShowPokemonCenterSign"
},
{
"type": "sign",
@@ -190,7 +190,7 @@
"y": 6,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "OldaleTown_EventScript_271E6A"
+ "script": "Common_EventScript_ShowPokemartSign"
}
]
} \ No newline at end of file
diff --git a/data/maps/OldaleTown/scripts.inc b/data/maps/OldaleTown/scripts.inc
index 7431cbf2a..c68ecbd08 100644
--- a/data/maps/OldaleTown/scripts.inc
+++ b/data/maps/OldaleTown/scripts.inc
@@ -1,9 +1,9 @@
OldaleTown_MapScripts:: @ 81E8EA2
- map_script 3, OldaleTown_MapScript1_1E8EA8
+ map_script MAP_SCRIPT_ON_TRANSITION, OldaleTown_MapScript1_1E8EA8
.byte 0
OldaleTown_MapScript1_1E8EA8: @ 81E8EA8
- call OldaleTown_EventScript_271ED7
+ call Common_EventScript_SetupRivalGender
setflag FLAG_VISITED_OLDALE_TOWN
call_if_unset FLAG_ADVENTURE_STARTED, OldaleTown_EventScript_1E8ED2
call_if_unset FLAG_RECEIVED_POTION_OLDALE, OldaleTown_EventScript_1E8EDE
@@ -11,7 +11,7 @@ OldaleTown_MapScript1_1E8EA8: @ 81E8EA8
end
OldaleTown_EventScript_1E8ECC:: @ 81E8ECC
- setvar VAR_0x4051, 1
+ setvar VAR_ROUTE102_ACCESSIBLE, 1
return
OldaleTown_EventScript_1E8ED2:: @ 81E8ED2
@@ -85,7 +85,7 @@ OldaleTown_EventScript_1E8FB9:: @ 81E8FB9
end
OldaleTown_EventScript_1E8FC3:: @ 81E8FC3
- msgbox gUnknown_08272AD0, MSGBOX_DEFAULT
+ msgbox gText_TooBadBagIsFull, MSGBOX_DEFAULT
fadedefaultbgm
release
end
@@ -193,7 +193,7 @@ OldaleTown_EventScript_1E901F:: @ 81E901F
goto_if_set FLAG_ADVENTURE_STARTED, OldaleTown_EventScript_1E9066
msgbox OldaleTown_Text_1E939A, MSGBOX_DEFAULT
closemessage
- applymovement 3, OldaleTown_Movement_2725A2
+ applymovement 3, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -217,7 +217,7 @@ OldaleTown_EventScript_1E9066:: @ 81E9066
OldaleTown_EventScript_1E9070:: @ 81E9070
lockall
- applymovement 4, OldaleTown_Movement_27259E
+ applymovement 4, Common_Movement_FacePlayer
waitmovement 0
setvar VAR_0x8009, 0
goto OldaleTown_EventScript_1E90E6
@@ -227,7 +227,7 @@ OldaleTown_EventScript_1E9086:: @ 81E9086
lockall
applymovement 4, OldaleTown_Movement_1E9170
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, OldaleTown_Movement_2725A8
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceRight
waitmovement 0
setvar VAR_0x8009, 1
goto OldaleTown_EventScript_1E90E6
@@ -237,7 +237,7 @@ OldaleTown_EventScript_1E90A6:: @ 81E90A6
lockall
applymovement 4, OldaleTown_Movement_1E9173
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, OldaleTown_Movement_2725A8
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceRight
waitmovement 0
setvar VAR_0x8009, 1
goto OldaleTown_EventScript_1E90E6
@@ -247,7 +247,7 @@ OldaleTown_EventScript_1E90C6:: @ 81E90C6
lockall
applymovement 4, OldaleTown_Movement_1E9175
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, OldaleTown_Movement_2725A8
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceRight
waitmovement 0
setvar VAR_0x8009, 1
goto OldaleTown_EventScript_1E90E6
@@ -280,7 +280,7 @@ OldaleTown_EventScript_1E911A:: @ 81E911A
applymovement 4, OldaleTown_Movement_1E9177
waitmovement 0
removeobject 4
- setvar VAR_0x40C7, 2
+ setvar VAR_OLDALE_STATE, 2
setflag FLAG_HIDE_OLDALE_TOWN_RIVAL
releaseall
end
diff --git a/data/maps/OldaleTown_PokemonCenter_1F/scripts.inc b/data/maps/OldaleTown_PokemonCenter_1F/scripts.inc
index 19f7d8f67..49452da71 100644
--- a/data/maps/OldaleTown_PokemonCenter_1F/scripts.inc
+++ b/data/maps/OldaleTown_PokemonCenter_1F/scripts.inc
@@ -1,6 +1,6 @@
OldaleTown_PokemonCenter_1F_MapScripts:: @ 81FC006
- map_script 3, OldaleTown_PokemonCenter_1F_MapScript1_1FC011
- map_script 5, OldaleTown_PokemonCenter_1F_MapScript1_277C30
+ map_script MAP_SCRIPT_ON_TRANSITION, OldaleTown_PokemonCenter_1F_MapScript1_1FC011
+ map_script MAP_SCRIPT_ON_RESUME, OldaleTown_PokemonCenter_1F_MapScript1_277C30
.byte 0
OldaleTown_PokemonCenter_1F_MapScript1_1FC011: @ 81FC011
diff --git a/data/maps/OldaleTown_PokemonCenter_2F/scripts.inc b/data/maps/OldaleTown_PokemonCenter_2F/scripts.inc
index 788157beb..b6795876b 100644
--- a/data/maps/OldaleTown_PokemonCenter_2F/scripts.inc
+++ b/data/maps/OldaleTown_PokemonCenter_2F/scripts.inc
@@ -1,8 +1,8 @@
OldaleTown_PokemonCenter_2F_MapScripts:: @ 81FC218
- map_script 2, OldaleTown_PokemonCenter_2F_MapScript2_276C3B
- map_script 4, OldaleTown_PokemonCenter_2F_MapScript2_276B6C
- map_script 1, OldaleTown_PokemonCenter_2F_MapScript1_276BBE
- map_script 3, OldaleTown_PokemonCenter_2F_MapScript1_276ACF
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, OldaleTown_PokemonCenter_2F_MapScript2_276C3B
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, OldaleTown_PokemonCenter_2F_MapScript2_276B6C
+ map_script MAP_SCRIPT_ON_LOAD, OldaleTown_PokemonCenter_2F_MapScript1_276BBE
+ map_script MAP_SCRIPT_ON_TRANSITION, OldaleTown_PokemonCenter_2F_MapScript1_276ACF
.byte 0
OldaleTown_PokemonCenter_2F_EventScript_1FC22D:: @ 81FC22D
diff --git a/data/maps/PacifidlogTown/map.json b/data/maps/PacifidlogTown/map.json
index 971bf5b86..3070d9c07 100644
--- a/data/maps/PacifidlogTown/map.json
+++ b/data/maps/PacifidlogTown/map.json
@@ -117,7 +117,7 @@
"y": 15,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "PacifidlogTown_EventScript_271E73"
+ "script": "Common_EventScript_ShowPokemonCenterSign"
},
{
"type": "sign",
@@ -133,7 +133,7 @@
"y": 15,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "PacifidlogTown_EventScript_271E73"
+ "script": "Common_EventScript_ShowPokemonCenterSign"
}
]
} \ No newline at end of file
diff --git a/data/maps/PacifidlogTown/scripts.inc b/data/maps/PacifidlogTown/scripts.inc
index 6125ed386..0ae0a53a8 100644
--- a/data/maps/PacifidlogTown/scripts.inc
+++ b/data/maps/PacifidlogTown/scripts.inc
@@ -1,6 +1,6 @@
PacifidlogTown_MapScripts:: @ 81EBAB1
- map_script 3, PacifidlogTown_MapScript1_1EBABC
- map_script 5, PacifidlogTown_MapScript1_1EBAC0
+ map_script MAP_SCRIPT_ON_TRANSITION, PacifidlogTown_MapScript1_1EBABC
+ map_script MAP_SCRIPT_ON_RESUME, PacifidlogTown_MapScript1_1EBAC0
.byte 0
PacifidlogTown_MapScript1_1EBABC: @ 81EBABC
diff --git a/data/maps/PacifidlogTown_House2/scripts.inc b/data/maps/PacifidlogTown_House2/scripts.inc
index c7c04c0bd..4f646ff43 100644
--- a/data/maps/PacifidlogTown_House2/scripts.inc
+++ b/data/maps/PacifidlogTown_House2/scripts.inc
@@ -20,7 +20,7 @@ PacifidlogTown_House2_EventScript_203792:: @ 8203792
end
PacifidlogTown_House2_EventScript_2037DE:: @ 82037DE
- goto_if_unset FLAG_RECEIVED_FANCLUB_TM_THIS_WEEK, PacifidlogTown_House2_EventScript_27374E
+ goto_if_unset FLAG_RECEIVED_FANCLUB_TM_THIS_WEEK, Common_EventScript_NopReturn
specialvar VAR_RESULT, GetDaysUntilPacifidlogTMAvailable
compare VAR_RESULT, 0
call_if_eq PacifidlogTown_House2_EventScript_203812
@@ -43,7 +43,7 @@ PacifidlogTown_House2_EventScript_203816:: @ 8203816
msgbox PacifidlogTown_House2_Text_20396D, MSGBOX_DEFAULT
giveitem_std ITEM_TM27
compare VAR_RESULT, 0
- goto_if_eq PacifidlogTown_House2_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
setflag FLAG_RECEIVED_FANCLUB_TM_THIS_WEEK
special SetPacifidlogTMReceivedDay
msgbox PacifidlogTown_House2_Text_203A85, MSGBOX_DEFAULT
@@ -59,7 +59,7 @@ PacifidlogTown_House2_EventScript_20384F:: @ 820384F
msgbox PacifidlogTown_House2_Text_203A2F, MSGBOX_DEFAULT
giveitem_std ITEM_TM21
compare VAR_RESULT, 0
- goto_if_eq PacifidlogTown_House2_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
setflag FLAG_RECEIVED_FANCLUB_TM_THIS_WEEK
special SetPacifidlogTMReceivedDay
msgbox PacifidlogTown_House2_Text_203A85, MSGBOX_DEFAULT
diff --git a/data/maps/PacifidlogTown_PokemonCenter_1F/scripts.inc b/data/maps/PacifidlogTown_PokemonCenter_1F/scripts.inc
index ddad843fb..89fec7f6b 100644
--- a/data/maps/PacifidlogTown_PokemonCenter_1F/scripts.inc
+++ b/data/maps/PacifidlogTown_PokemonCenter_1F/scripts.inc
@@ -1,6 +1,6 @@
PacifidlogTown_PokemonCenter_1F_MapScripts:: @ 82034A7
- map_script 3, PacifidlogTown_PokemonCenter_1F_MapScript1_2034B2
- map_script 5, PacifidlogTown_PokemonCenter_1F_MapScript1_277C30
+ map_script MAP_SCRIPT_ON_TRANSITION, PacifidlogTown_PokemonCenter_1F_MapScript1_2034B2
+ map_script MAP_SCRIPT_ON_RESUME, PacifidlogTown_PokemonCenter_1F_MapScript1_277C30
.byte 0
PacifidlogTown_PokemonCenter_1F_MapScript1_2034B2: @ 82034B2
diff --git a/data/maps/PacifidlogTown_PokemonCenter_2F/scripts.inc b/data/maps/PacifidlogTown_PokemonCenter_2F/scripts.inc
index 0199c2215..cb28d577e 100644
--- a/data/maps/PacifidlogTown_PokemonCenter_2F/scripts.inc
+++ b/data/maps/PacifidlogTown_PokemonCenter_2F/scripts.inc
@@ -1,8 +1,8 @@
PacifidlogTown_PokemonCenter_2F_MapScripts:: @ 8203635
- map_script 2, PacifidlogTown_PokemonCenter_2F_MapScript2_276C3B
- map_script 4, PacifidlogTown_PokemonCenter_2F_MapScript2_276B6C
- map_script 1, PacifidlogTown_PokemonCenter_2F_MapScript1_276BBE
- map_script 3, PacifidlogTown_PokemonCenter_2F_MapScript1_276ACF
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, PacifidlogTown_PokemonCenter_2F_MapScript2_276C3B
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, PacifidlogTown_PokemonCenter_2F_MapScript2_276B6C
+ map_script MAP_SCRIPT_ON_LOAD, PacifidlogTown_PokemonCenter_2F_MapScript1_276BBE
+ map_script MAP_SCRIPT_ON_TRANSITION, PacifidlogTown_PokemonCenter_2F_MapScript1_276ACF
.byte 0
PacifidlogTown_PokemonCenter_2F_EventScript_20364A:: @ 820364A
diff --git a/data/maps/PetalburgCity/map.json b/data/maps/PetalburgCity/map.json
index d8f77168b..3d09ae706 100644
--- a/data/maps/PetalburgCity/map.json
+++ b/data/maps/PetalburgCity/map.json
@@ -193,7 +193,7 @@
"x": 8,
"y": 10,
"elevation": 3,
- "var": "VAR_0x4057",
+ "var": "VAR_PETALBURG_STATE",
"var_value": "0",
"script": "PetalburgCity_EventScript_1DC49A"
},
@@ -202,7 +202,7 @@
"x": 8,
"y": 11,
"elevation": 3,
- "var": "VAR_0x4057",
+ "var": "VAR_PETALBURG_STATE",
"var_value": "0",
"script": "PetalburgCity_EventScript_1DC4A6"
},
@@ -211,7 +211,7 @@
"x": 8,
"y": 12,
"elevation": 3,
- "var": "VAR_0x4057",
+ "var": "VAR_PETALBURG_STATE",
"var_value": "0",
"script": "PetalburgCity_EventScript_1DC4B2"
},
@@ -220,7 +220,7 @@
"x": 8,
"y": 13,
"elevation": 3,
- "var": "VAR_0x4057",
+ "var": "VAR_PETALBURG_STATE",
"var_value": "0",
"script": "PetalburgCity_EventScript_1DC4BE"
},
@@ -276,7 +276,7 @@
"y": 12,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "PetalburgCity_EventScript_271E6A"
+ "script": "Common_EventScript_ShowPokemartSign"
},
{
"type": "sign",
@@ -284,7 +284,7 @@
"y": 16,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "PetalburgCity_EventScript_271E73"
+ "script": "Common_EventScript_ShowPokemonCenterSign"
},
{
"type": "sign",
@@ -300,7 +300,7 @@
"y": 16,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "PetalburgCity_EventScript_271E73"
+ "script": "Common_EventScript_ShowPokemonCenterSign"
},
{
"type": "sign",
@@ -308,7 +308,7 @@
"y": 12,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "PetalburgCity_EventScript_271E6A"
+ "script": "Common_EventScript_ShowPokemartSign"
},
{
"type": "sign",
diff --git a/data/maps/PetalburgCity/scripts.inc b/data/maps/PetalburgCity/scripts.inc
index f69eb3a3a..e2f5d2a86 100644
--- a/data/maps/PetalburgCity/scripts.inc
+++ b/data/maps/PetalburgCity/scripts.inc
@@ -1,17 +1,17 @@
PetalburgCity_MapScripts::
- map_script 3, PetalburgCity_MapScript1_1DC2D7
- map_script 2, PetalburgCity_MapScript2_1DC31C
+ map_script MAP_SCRIPT_ON_TRANSITION, PetalburgCity_MapScript1_1DC2D7
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, PetalburgCity_MapScript2_1DC31C
.byte 0
PetalburgCity_MapScript1_1DC2D7: @ 81DC2D7
setflag FLAG_VISITED_PETALBURG_CITY
- compare VAR_0x4057, 0
+ compare VAR_PETALBURG_STATE, 0
call_if_eq PetalburgCity_EventScript_1DC307
- compare VAR_0x4057, 2
+ compare VAR_PETALBURG_STATE, 2
call_if_eq PetalburgCity_EventScript_1DC30F
- compare VAR_0x4057, 4
+ compare VAR_PETALBURG_STATE, 4
call_if_eq PetalburgCity_EventScript_1DC30F
- compare VAR_0x4085, 8
+ compare VAR_PETALBURG_GYM_STATE, 8
call_if_eq PetalburgCity_EventScript_1DC316
end
@@ -25,12 +25,12 @@ PetalburgCity_EventScript_1DC30F:: @ 81DC30F
return
PetalburgCity_EventScript_1DC316:: @ 81DC316
- setvar VAR_0x4085, 7
+ setvar VAR_PETALBURG_GYM_STATE, 7
return
PetalburgCity_MapScript2_1DC31C: @ 81DC31C
- map_script_2 VAR_0x4057, 2, PetalburgCity_EventScript_1DC32E
- map_script_2 VAR_0x4057, 4, PetalburgCity_EventScript_1DC390
+ map_script_2 VAR_PETALBURG_STATE, 2, PetalburgCity_EventScript_1DC32E
+ map_script_2 VAR_PETALBURG_STATE, 4, PetalburgCity_EventScript_1DC390
.2byte 0
PetalburgCity_EventScript_1DC32E:: @ 81DC32E
@@ -44,16 +44,16 @@ PetalburgCity_EventScript_1DC32E:: @ 81DC32E
special StartWallyTutorialBattle
waitstate
msgbox PetalburgCity_Text_1EC271, MSGBOX_DEFAULT
- applymovement 2, PetalburgCity_Movement_2725A4, MAP_PETALBURG_CITY
+ applymovement 2, Common_Movement_WalkInPlaceLeft, MAP_PETALBURG_CITY
waitmovement 2, MAP_PETALBURG_CITY
msgbox PetalburgCity_Text_1EC297, MSGBOX_DEFAULT
closemessage
clearflag FLAG_SPECIAL_FLAG_0x4000
- setvar VAR_0x4057, 3
+ setvar VAR_PETALBURG_STATE, 3
fadedefaultbgm
clearflag FLAG_SPECIAL_FLAG_0x4001
special LoadPlayerParty
- setvar VAR_0x4085, 1
+ setvar VAR_PETALBURG_GYM_STATE, 1
warp MAP_PETALBURG_CITY_GYM, 255, 4, 108
waitstate
releaseall
@@ -89,7 +89,7 @@ PetalburgCity_EventScript_1DC3E6:: @ 81DC3E6
faceplayer
msgbox PetalburgCity_Text_1DC985, MSGBOX_DEFAULT
closemessage
- applymovement 3, PetalburgCity_Movement_2725A2
+ applymovement 3, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -263,13 +263,13 @@ PetalburgCity_EventScript_1DC4BE:: @ 81DC4BE
end
PetalburgCity_EventScript_1DC4CA:: @ 81DC4CA
- applymovement 8, PetalburgCity_Movement_27259E
+ applymovement 8, Common_Movement_FacePlayer
waitmovement 0
playbgm MUS_TSURETEK, 0
playse SE_PIN
- applymovement 8, PetalburgCity_Movement_272598
+ applymovement 8, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 8, PetalburgCity_Movement_27259A
+ applymovement 8, Common_Movement_Delay48
waitmovement 0
compare VAR_0x8008, 0
call_if_eq PetalburgCity_EventScript_1DC57F
@@ -290,8 +290,8 @@ PetalburgCity_EventScript_1DC4CA:: @ 81DC4CA
compare VAR_0x8008, 3
call_if_eq PetalburgCity_EventScript_1DC5FF
msgbox PetalburgCity_Text_1DC91B, MSGBOX_DEFAULT
- applymovement 8, PetalburgCity_Movement_2725A8
- applymovement EVENT_OBJ_ID_PLAYER, PetalburgCity_Movement_2725A8
+ applymovement 8, Common_Movement_WalkInPlaceRight
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceRight
waitmovement 0
msgbox PetalburgCity_Text_1DC93E, MSGBOX_DEFAULT
closemessage
@@ -304,7 +304,7 @@ PetalburgCity_EventScript_1DC4CA:: @ 81DC4CA
PetalburgCity_EventScript_1DC57F:: @ 81DC57F
applymovement 8, PetalburgCity_Movement_1DC615
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, PetalburgCity_Movement_2725AA
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceDown
waitmovement 0
return
@@ -316,14 +316,14 @@ PetalburgCity_EventScript_1DC594:: @ 81DC594
PetalburgCity_EventScript_1DC59F:: @ 81DC59F
applymovement 8, PetalburgCity_Movement_1DC61D
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, PetalburgCity_Movement_2725A6
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceUp
waitmovement 0
return
PetalburgCity_EventScript_1DC5B4:: @ 81DC5B4
applymovement 8, PetalburgCity_Movement_1DC622
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, PetalburgCity_Movement_2725A6
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceUp
waitmovement 0
return
@@ -543,23 +543,23 @@ PetalburgCity_EventScript_1DC6E9:: @ 81DC6E9
applymovement 9, PetalburgCity_Movement_1DC7D6
waitmovement 0
playse SE_PIN
- applymovement 9, PetalburgCity_Movement_272598
+ applymovement 9, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 9, PetalburgCity_Movement_27259A
+ applymovement 9, Common_Movement_Delay48
waitmovement 0
applymovement 9, PetalburgCity_Movement_1DC7DB
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, PetalburgCity_Movement_2725A8
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceRight
waitmovement 0
setvar VAR_0x40D1, 1
msgbox PetalburgCity_Text_1DCB31, MSGBOX_DEFAULT
closemessage
- applymovement 9, PetalburgCity_Movement_2725A8
+ applymovement 9, Common_Movement_WalkInPlaceRight
waitmovement 0
delay 30
msgbox PetalburgCity_Text_1DCB82, MSGBOX_DEFAULT
closemessage
- applymovement 9, PetalburgCity_Movement_2725A4
+ applymovement 9, Common_Movement_WalkInPlaceLeft
waitmovement 0
delay 30
msgbox PetalburgCity_Text_1DCC09, MSGBOX_DEFAULT
diff --git a/data/maps/PetalburgCity_Gym/scripts.inc b/data/maps/PetalburgCity_Gym/scripts.inc
index 915cdc93e..1f0fdd91c 100644
--- a/data/maps/PetalburgCity_Gym/scripts.inc
+++ b/data/maps/PetalburgCity_Gym/scripts.inc
@@ -1,14 +1,14 @@
PetalburgCity_Gym_MapScripts:: @ 8204889
- map_script 1, PetalburgCity_Gym_MapScript1_20489E
- map_script 3, PetalburgCity_Gym_MapScript1_20492D
- map_script 4, PetalburgCity_Gym_MapScript2_20498B
- map_script 2, PetalburgCity_Gym_MapScript2_20499A
+ map_script MAP_SCRIPT_ON_LOAD, PetalburgCity_Gym_MapScript1_20489E
+ map_script MAP_SCRIPT_ON_TRANSITION, PetalburgCity_Gym_MapScript1_20492D
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, PetalburgCity_Gym_MapScript2_20498B
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, PetalburgCity_Gym_MapScript2_20499A
.byte 0
PetalburgCity_Gym_MapScript1_20489E: @ 820489E
- compare VAR_0x4085, 6
+ compare VAR_PETALBURG_GYM_STATE, 6
goto_if_eq PetalburgCity_Gym_EventScript_2048B5
- compare VAR_0x4085, 7
+ compare VAR_PETALBURG_GYM_STATE, 7
call_if_ge PetalburgCity_Gym_EventScript_2048FF
end
@@ -44,9 +44,9 @@ PetalburgCity_Gym_EventScript_2048FF:: @ 82048FF
return
PetalburgCity_Gym_MapScript1_20492D: @ 820492D
- compare VAR_0x4085, 1
+ compare VAR_PETALBURG_GYM_STATE, 1
call_if_eq PetalburgCity_Gym_EventScript_20494D
- compare VAR_0x4085, 6
+ compare VAR_PETALBURG_GYM_STATE, 6
call_if_lt PetalburgCity_Gym_EventScript_204955
call_if_set FLAG_SYS_GAME_CLEAR, PetalburgCity_Gym_EventScript_20495D
end
@@ -64,17 +64,17 @@ PetalburgCity_Gym_EventScript_20495D:: @ 820495D
specialvar VAR_RESULT, IsTrainerReadyForRematch
compare VAR_RESULT, 1
goto_if_eq PetalburgCity_Gym_EventScript_204985
- compare VAR_0x4085, 8
+ compare VAR_PETALBURG_GYM_STATE, 8
goto_if_eq PetalburgCity_Gym_EventScript_204985
setobjectxyperm 1, 4, 107
return
PetalburgCity_Gym_EventScript_204985:: @ 8204985
- setvar VAR_0x4085, 8
+ setvar VAR_PETALBURG_GYM_STATE, 8
end
PetalburgCity_Gym_MapScript2_20498B: @ 820498B
- map_script_2 VAR_0x4085, 1, PetalburgCity_Gym_EventScript_204995
+ map_script_2 VAR_PETALBURG_GYM_STATE, 1, PetalburgCity_Gym_EventScript_204995
.2byte 0
PetalburgCity_Gym_EventScript_204995:: @ 8204995
@@ -82,7 +82,7 @@ PetalburgCity_Gym_EventScript_204995:: @ 8204995
end
PetalburgCity_Gym_MapScript2_20499A: @ 820499A
- map_script_2 VAR_0x4085, 1, PetalburgCity_Gym_EventScript_2049A4
+ map_script_2 VAR_PETALBURG_GYM_STATE, 1, PetalburgCity_Gym_EventScript_2049A4
.2byte 0
PetalburgCity_Gym_EventScript_2049A4:: @ 82049A4
@@ -90,17 +90,17 @@ PetalburgCity_Gym_EventScript_2049A4:: @ 82049A4
msgbox PetalburgCity_Gym_Text_205B32, MSGBOX_DEFAULT
msgbox PetalburgCity_Gym_Text_205B4C, MSGBOX_DEFAULT
closemessage
- applymovement EVENT_OBJ_ID_PLAYER, PetalburgCity_Gym_Movement_2725AA
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceDown
applymovement 10, PetalburgCity_Gym_Movement_2049EC
waitmovement 0
playse SE_KAIDAN
removeobject 10
setflag FLAG_HIDE_PETALBURG_CITY_WALLY
delay 30
- applymovement EVENT_OBJ_ID_PLAYER, PetalburgCity_Gym_Movement_2725A6
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceUp
waitmovement 0
msgbox PetalburgCity_Gym_Text_205C40, MSGBOX_DEFAULT
- setvar VAR_0x4085, 2
+ setvar VAR_PETALBURG_GYM_STATE, 2
releaseall
end
@@ -114,7 +114,7 @@ PetalburgCity_Gym_Movement_2049EC: @ 82049EC
PetalburgCity_Gym_EventScript_2049F1:: @ 82049F1
lock
faceplayer
- switch VAR_0x4085
+ switch VAR_PETALBURG_GYM_STATE
case 2, PetalburgCity_Gym_EventScript_204D4A
case 3, PetalburgCity_Gym_EventScript_204D54
case 4, PetalburgCity_Gym_EventScript_204D5E
@@ -216,8 +216,8 @@ PetalburgCity_Gym_EventScript_204AAC:: @ 8204AAC
call_if_eq PetalburgCity_Gym_EventScript_204CB5
removeobject 10
setflag FLAG_HIDE_PETALBURG_CITY_WALLYS_AUNT
- setvar VAR_0x4085, 1
- setvar VAR_0x4057, 2
+ setvar VAR_PETALBURG_GYM_STATE, 1
+ setvar VAR_PETALBURG_STATE, 2
clearflag FLAG_HIDE_PETALBURG_CITY_WALLY
clearflag FLAG_HIDE_PETALBURG_GYM_WALLY
setflag FLAG_HIDE_LITTLEROOT_TOWN_BIRCHS_LAB_RIVAL
@@ -228,7 +228,7 @@ PetalburgCity_Gym_EventScript_204AAC:: @ 8204AAC
end
PetalburgCity_Gym_EventScript_204C31:: @ 8204C31
- applymovement 1, PetalburgCity_Gym_Movement_2725AA
+ applymovement 1, Common_Movement_WalkInPlaceDown
applymovement 10, PetalburgCity_Gym_Movement_2050EB
waitmovement 0
return
@@ -236,20 +236,20 @@ PetalburgCity_Gym_EventScript_204C31:: @ 8204C31
PetalburgCity_Gym_EventScript_204C43:: @ 8204C43
applymovement 10, PetalburgCity_Gym_Movement_2050E1
waitmovement 0
- applymovement 1, PetalburgCity_Gym_Movement_2725A8
- applymovement EVENT_OBJ_ID_PLAYER, PetalburgCity_Gym_Movement_2725A8
+ applymovement 1, Common_Movement_WalkInPlaceRight
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceRight
waitmovement 0
return
PetalburgCity_Gym_EventScript_204C5F:: @ 8204C5F
- applymovement 1, PetalburgCity_Gym_Movement_2725AA
- applymovement EVENT_OBJ_ID_PLAYER, PetalburgCity_Gym_Movement_2725AA
+ applymovement 1, Common_Movement_WalkInPlaceDown
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceDown
applymovement 10, PetalburgCity_Gym_Movement_2050EB
waitmovement 0
return
PetalburgCity_Gym_EventScript_204C78:: @ 8204C78
- applymovement 1, PetalburgCity_Gym_Movement_2725AA
+ applymovement 1, Common_Movement_WalkInPlaceDown
applymovement 10, PetalburgCity_Gym_Movement_205102
applymovement EVENT_OBJ_ID_PLAYER, PetalburgCity_Gym_Movement_205111
waitmovement 0
@@ -274,55 +274,55 @@ PetalburgCity_Gym_EventScript_204CB5:: @ 8204CB5
return
PetalburgCity_Gym_EventScript_204CC7:: @ 8204CC7
- applymovement 1, PetalburgCity_Gym_Movement_2725A6
+ applymovement 1, Common_Movement_WalkInPlaceUp
waitmovement 0
return
PetalburgCity_Gym_EventScript_204CD2:: @ 8204CD2
- applymovement 1, PetalburgCity_Gym_Movement_2725AA
- applymovement EVENT_OBJ_ID_PLAYER, PetalburgCity_Gym_Movement_2725A6
+ applymovement 1, Common_Movement_WalkInPlaceDown
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceUp
waitmovement 0
return
PetalburgCity_Gym_EventScript_204CE4:: @ 8204CE4
- applymovement 1, PetalburgCity_Gym_Movement_2725A8
- applymovement EVENT_OBJ_ID_PLAYER, PetalburgCity_Gym_Movement_2725A4
+ applymovement 1, Common_Movement_WalkInPlaceRight
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceLeft
waitmovement 0
return
PetalburgCity_Gym_EventScript_204CF6:: @ 8204CF6
- applymovement 1, PetalburgCity_Gym_Movement_2725A4
- applymovement EVENT_OBJ_ID_PLAYER, PetalburgCity_Gym_Movement_2725A8
+ applymovement 1, Common_Movement_WalkInPlaceLeft
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceRight
waitmovement 0
return
PetalburgCity_Gym_EventScript_204D08:: @ 8204D08
- applymovement 1, PetalburgCity_Gym_Movement_2725AA
+ applymovement 1, Common_Movement_WalkInPlaceDown
waitmovement 0
return
PetalburgCity_Gym_EventScript_204D13:: @ 8204D13
- applymovement 1, PetalburgCity_Gym_Movement_2725A8
+ applymovement 1, Common_Movement_WalkInPlaceRight
waitmovement 0
return
PetalburgCity_Gym_EventScript_204D1E:: @ 8204D1E
- applymovement 1, PetalburgCity_Gym_Movement_2725AA
+ applymovement 1, Common_Movement_WalkInPlaceDown
waitmovement 0
return
PetalburgCity_Gym_EventScript_204D29:: @ 8204D29
- applymovement 1, PetalburgCity_Gym_Movement_2725AA
+ applymovement 1, Common_Movement_WalkInPlaceDown
waitmovement 0
return
PetalburgCity_Gym_EventScript_204D34:: @ 8204D34
- applymovement 10, PetalburgCity_Gym_Movement_27259E
+ applymovement 10, Common_Movement_FacePlayer
waitmovement 0
return
PetalburgCity_Gym_EventScript_204D3F:: @ 8204D3F
- applymovement 10, PetalburgCity_Gym_Movement_2725AA
+ applymovement 10, Common_Movement_WalkInPlaceDown
waitmovement 0
return
@@ -350,7 +350,7 @@ PetalburgCity_Gym_EventScript_204D72:: @ 8204D72
return
PetalburgCity_Gym_EventScript_204D73:: @ 8204D73
- applymovement 1, PetalburgCity_Gym_Movement_2725AA
+ applymovement 1, Common_Movement_WalkInPlaceDown
waitmovement 0
return
@@ -403,7 +403,7 @@ PetalburgCity_Gym_EventScript_204E17:: @ 8204E17
PetalburgCity_Gym_EventScript_204E1D:: @ 8204E1D
giveitem_std ITEM_ENIGMA_BERRY
compare VAR_RESULT, 0
- goto_if_eq PetalburgCity_Gym_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
setvar VAR_ENIGMA_BERRY_AVAILABLE, 0
release
end
@@ -413,10 +413,10 @@ PetalburgCity_Gym_EventScript_204E3B:: @ 8204E3B
trainerbattle_no_intro TRAINER_NORMAN_1, PetalburgCity_Gym_Text_206107
message PetalburgCity_Gym_Text_206162
waitmessage
- call PetalburgCity_Gym_EventScript_27207E
+ call Common_EventScript_PlayGymBadgeFanfare
msgbox PetalburgCity_Gym_Text_20618A, MSGBOX_DEFAULT
setflag FLAG_DEFEATED_PETALBURG_GYM
- setvar VAR_0x4085, 7
+ setvar VAR_PETALBURG_GYM_STATE, 7
setflag FLAG_BADGE05_GET
special sub_813B9A0
call PetalburgCity_Gym_EventScript_2721F8
@@ -444,7 +444,7 @@ PetalburgCity_Gym_EventScript_204E3B:: @ 8204E3B
PetalburgCity_Gym_EventScript_204ED2:: @ 8204ED2
giveitem_std ITEM_TM42
compare VAR_RESULT, 0
- goto_if_eq PetalburgCity_Gym_EventScript_27205E
+ goto_if_eq Common_EventScript_BagIsFull
setflag FLAG_RECEIVED_TM42
msgbox PetalburgCity_Gym_Text_206254, MSGBOX_DEFAULT
return
@@ -465,9 +465,9 @@ PetalburgCity_Gym_EventScript_204F13:: @ 8204F13
applymovement 11, PetalburgCity_Gym_Movement_2050BB
waitmovement 0
playse SE_PIN
- applymovement 11, PetalburgCity_Gym_Movement_272598
+ applymovement 11, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 11, PetalburgCity_Gym_Movement_27259A
+ applymovement 11, Common_Movement_Delay48
waitmovement 0
delay 10
compare VAR_0x8008, 1
@@ -496,7 +496,7 @@ PetalburgCity_Gym_EventScript_204F13:: @ 8204F13
compare VAR_0x8008, 3
call_if_eq PetalburgCity_Gym_EventScript_20506C
removeobject 11
- setvar VAR_0x4057, 4
+ setvar VAR_PETALBURG_STATE, 4
clearflag FLAG_HIDE_PETALBURG_CITY_WALLYS_UNCLE
warp MAP_PETALBURG_CITY, 255, 15, 8
waitstate
@@ -504,47 +504,47 @@ PetalburgCity_Gym_EventScript_204F13:: @ 8204F13
end
PetalburgCity_Gym_EventScript_204FCC:: @ 8204FCC
- applymovement 11, PetalburgCity_Gym_Movement_2725A6
+ applymovement 11, Common_Movement_WalkInPlaceUp
waitmovement 0
return
PetalburgCity_Gym_EventScript_204FD7:: @ 8204FD7
- applymovement 11, PetalburgCity_Gym_Movement_2725A8
+ applymovement 11, Common_Movement_WalkInPlaceRight
waitmovement 0
return
PetalburgCity_Gym_EventScript_204FE2:: @ 8204FE2
- applymovement 11, PetalburgCity_Gym_Movement_2725A4
+ applymovement 11, Common_Movement_WalkInPlaceLeft
waitmovement 0
return
PetalburgCity_Gym_EventScript_204FED:: @ 8204FED
applymovement 11, PetalburgCity_Gym_Movement_2050C3
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, PetalburgCity_Gym_Movement_2725A4
- applymovement 1, PetalburgCity_Gym_Movement_2725A4
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceLeft
+ applymovement 1, Common_Movement_WalkInPlaceLeft
waitmovement 0
return
PetalburgCity_Gym_EventScript_205009:: @ 8205009
applymovement 11, PetalburgCity_Gym_Movement_2050CA
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, PetalburgCity_Gym_Movement_2725AA
- applymovement 1, PetalburgCity_Gym_Movement_2725AA
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceDown
+ applymovement 1, Common_Movement_WalkInPlaceDown
waitmovement 0
return
PetalburgCity_Gym_EventScript_205025:: @ 8205025
applymovement 11, PetalburgCity_Gym_Movement_2050D0
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, PetalburgCity_Gym_Movement_2725AA
- applymovement 1, PetalburgCity_Gym_Movement_2725AA
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceDown
+ applymovement 1, Common_Movement_WalkInPlaceDown
waitmovement 0
return
PetalburgCity_Gym_EventScript_205041:: @ 8205041
applymovement 11, PetalburgCity_Gym_Movement_20507E
- applymovement 1, PetalburgCity_Gym_Movement_2725AA
+ applymovement 1, Common_Movement_WalkInPlaceDown
applymovement EVENT_OBJ_ID_PLAYER, PetalburgCity_Gym_Movement_2050A1
waitmovement 0
return
@@ -783,7 +783,7 @@ PetalburgCity_Gym_EventScript_20512D:: @ 820512D
PetalburgCity_Gym_EventScript_205137:: @ 8205137
lockall
- compare VAR_0x4085, 6
+ compare VAR_PETALBURG_GYM_STATE, 6
goto_if_lt PetalburgCity_Gym_EventScript_20517D
setvar VAR_0x8008, 7
setvar VAR_0x8009, 85
@@ -813,7 +813,7 @@ PetalburgCity_Gym_EventScript_20517D:: @ 820517D
PetalburgCity_Gym_EventScript_205187:: @ 8205187
lockall
- compare VAR_0x4085, 6
+ compare VAR_PETALBURG_GYM_STATE, 6
goto_if_lt PetalburgCity_Gym_EventScript_20517D
setvar VAR_0x8008, 1
setvar VAR_0x8009, 98
diff --git a/data/maps/PetalburgCity_PokemonCenter_1F/scripts.inc b/data/maps/PetalburgCity_PokemonCenter_1F/scripts.inc
index 1bbeb8fad..382847bc7 100644
--- a/data/maps/PetalburgCity_PokemonCenter_1F/scripts.inc
+++ b/data/maps/PetalburgCity_PokemonCenter_1F/scripts.inc
@@ -1,6 +1,6 @@
PetalburgCity_PokemonCenter_1F_MapScripts:: @ 82079E8
- map_script 3, PetalburgCity_PokemonCenter_1F_MapScript1_2079F3
- map_script 5, PetalburgCity_PokemonCenter_1F_MapScript1_277C30
+ map_script MAP_SCRIPT_ON_TRANSITION, PetalburgCity_PokemonCenter_1F_MapScript1_2079F3
+ map_script MAP_SCRIPT_ON_RESUME, PetalburgCity_PokemonCenter_1F_MapScript1_277C30
.byte 0
PetalburgCity_PokemonCenter_1F_MapScript1_2079F3: @ 82079F3
diff --git a/data/maps/PetalburgCity_PokemonCenter_2F/scripts.inc b/data/maps/PetalburgCity_PokemonCenter_2F/scripts.inc
index 38d01972a..7b5f5af55 100644
--- a/data/maps/PetalburgCity_PokemonCenter_2F/scripts.inc
+++ b/data/maps/PetalburgCity_PokemonCenter_2F/scripts.inc
@@ -1,8 +1,8 @@
PetalburgCity_PokemonCenter_2F_MapScripts:: @ 8207D41
- map_script 2, PetalburgCity_PokemonCenter_2F_MapScript2_276C3B
- map_script 4, PetalburgCity_PokemonCenter_2F_MapScript2_276B6C
- map_script 1, PetalburgCity_PokemonCenter_2F_MapScript1_276BBE
- map_script 3, PetalburgCity_PokemonCenter_2F_MapScript1_276ACF
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, PetalburgCity_PokemonCenter_2F_MapScript2_276C3B
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, PetalburgCity_PokemonCenter_2F_MapScript2_276B6C
+ map_script MAP_SCRIPT_ON_LOAD, PetalburgCity_PokemonCenter_2F_MapScript1_276BBE
+ map_script MAP_SCRIPT_ON_TRANSITION, PetalburgCity_PokemonCenter_2F_MapScript1_276ACF
.byte 0
PetalburgCity_PokemonCenter_2F_EventScript_207D56:: @ 8207D56
diff --git a/data/maps/PetalburgCity_WallysHouse/scripts.inc b/data/maps/PetalburgCity_WallysHouse/scripts.inc
index ac41aaa28..8b1421abb 100644
--- a/data/maps/PetalburgCity_WallysHouse/scripts.inc
+++ b/data/maps/PetalburgCity_WallysHouse/scripts.inc
@@ -1,10 +1,10 @@
PetalburgCity_WallysHouse_MapScripts:: @ 8204229
- map_script 2, PetalburgCity_WallysHouse_MapScript2_204247
- map_script 4, PetalburgCity_WallysHouse_MapScript2_204234
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, PetalburgCity_WallysHouse_MapScript2_204247
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, PetalburgCity_WallysHouse_MapScript2_204234
.byte 0
PetalburgCity_WallysHouse_MapScript2_204234: @ 8204234
- map_script_2 VAR_0x4057, 4, PetalburgCity_WallysHouse_EventScript_20423E
+ map_script_2 VAR_PETALBURG_STATE, 4, PetalburgCity_WallysHouse_EventScript_20423E
.2byte 0
PetalburgCity_WallysHouse_EventScript_20423E:: @ 820423E
@@ -13,7 +13,7 @@ PetalburgCity_WallysHouse_EventScript_20423E:: @ 820423E
end
PetalburgCity_WallysHouse_MapScript2_204247: @ 8204247
- map_script_2 VAR_0x4057, 4, PetalburgCity_WallysHouse_EventScript_204251
+ map_script_2 VAR_PETALBURG_STATE, 4, PetalburgCity_WallysHouse_EventScript_204251
.2byte 0
PetalburgCity_WallysHouse_EventScript_204251:: @ 8204251
@@ -22,7 +22,7 @@ PetalburgCity_WallysHouse_EventScript_204251:: @ 8204251
giveitem_std ITEM_HM03
setflag FLAG_RECEIVED_HM03
msgbox PetalburgCity_WallysHouse_Text_20461A, MSGBOX_DEFAULT
- setvar VAR_0x4057, 5
+ setvar VAR_PETALBURG_STATE, 5
releaseall
end
diff --git a/data/maps/PetalburgWoods/map.json b/data/maps/PetalburgWoods/map.json
index 4921b88ae..4bca7bb5e 100644
--- a/data/maps/PetalburgWoods/map.json
+++ b/data/maps/PetalburgWoods/map.json
@@ -234,7 +234,7 @@
"x": 26,
"y": 23,
"elevation": 3,
- "var": "VAR_0x4098",
+ "var": "VAR_PETALBURG_WOODS_STATE",
"var_value": "0",
"script": "PetalburgWoods_EventScript_22DFD7"
},
@@ -243,7 +243,7 @@
"x": 27,
"y": 23,
"elevation": 3,
- "var": "VAR_0x4098",
+ "var": "VAR_PETALBURG_WOODS_STATE",
"var_value": "0",
"script": "PetalburgWoods_EventScript_22E079"
}
diff --git a/data/maps/PetalburgWoods/scripts.inc b/data/maps/PetalburgWoods/scripts.inc
index eec9100f1..423d4c432 100644
--- a/data/maps/PetalburgWoods/scripts.inc
+++ b/data/maps/PetalburgWoods/scripts.inc
@@ -15,7 +15,7 @@ PetalburgWoods_EventScript_22DFD7:: @ 822DFD7
closemessage
applymovement 3, PetalburgWoods_Movement_22E1F6
waitmovement 0
- applymovement 4, PetalburgWoods_Movement_2725A6
+ applymovement 4, Common_Movement_WalkInPlaceUp
waitmovement 0
msgbox PetalburgWoods_Text_22E428, MSGBOX_DEFAULT
closemessage
@@ -41,7 +41,7 @@ PetalburgWoods_EventScript_22E079:: @ 822E079
call PetalburgWoods_EventScript_22E124
applymovement 4, PetalburgWoods_Movement_22E1D0
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, PetalburgWoods_Movement_2725A4
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceLeft
waitmovement 0
msgbox PetalburgWoods_Text_22E34F, MSGBOX_DEFAULT
closemessage
@@ -52,14 +52,14 @@ PetalburgWoods_EventScript_22E079:: @ 822E079
closemessage
applymovement 3, PetalburgWoods_Movement_22E205
waitmovement 0
- applymovement 4, PetalburgWoods_Movement_2725A6
+ applymovement 4, Common_Movement_WalkInPlaceUp
waitmovement 0
msgbox PetalburgWoods_Text_22E428, MSGBOX_DEFAULT
closemessage
applymovement 4, PetalburgWoods_Movement_22E1EA
waitmovement 0
msgbox PetalburgWoods_Text_22E457, MSGBOX_DEFAULT
- applymovement EVENT_OBJ_ID_PLAYER, PetalburgWoods_Movement_2725A6
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceUp
waitmovement 0
msgbox PetalburgWoods_Text_22E4A5, MSGBOX_DEFAULT
trainerbattle_no_intro TRAINER_GRUNT_8, PetalburgWoods_Text_22E542
@@ -85,7 +85,7 @@ PetalburgWoods_EventScript_22E138:: @ 822E138
applymovement 3, PetalburgWoods_Movement_22E1FD
waitmovement 0
removeobject 3
- applymovement EVENT_OBJ_ID_PLAYER, PetalburgWoods_Movement_2725AA
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceDown
waitmovement 0
msgbox PetalburgWoods_Text_22E63D, MSGBOX_DEFAULT
giveitem_std ITEM_GREAT_BALL
@@ -109,7 +109,7 @@ PetalburgWoods_EventScript_22E18B:: @ 822E18B
PetalburgWoods_EventScript_22E1A7:: @ 822E1A7
removeobject 4
- setvar VAR_0x4098, 1
+ setvar VAR_PETALBURG_WOODS_STATE, 1
releaseall
end
@@ -253,7 +253,7 @@ PetalburgWoods_EventScript_22E222:: @ 822E222
msgbox PetalburgWoods_Text_22EAFE, MSGBOX_DEFAULT
giveitem_std ITEM_MIRACLE_SEED
compare VAR_RESULT, 0
- goto_if_eq PetalburgWoods_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
setflag FLAG_RECEIVED_MIRACLE_SEED
release
end
diff --git a/data/maps/Route101/map.json b/data/maps/Route101/map.json
index 97c303c1c..44d8b2137 100644
--- a/data/maps/Route101/map.json
+++ b/data/maps/Route101/map.json
@@ -111,7 +111,7 @@
"x": 10,
"y": 19,
"elevation": 3,
- "var": "VAR_0x4060",
+ "var": "VAR_ROUTE101_STATE",
"var_value": "1",
"script": "Route101_EventScript_1EBCDE"
},
@@ -120,7 +120,7 @@
"x": 11,
"y": 19,
"elevation": 3,
- "var": "VAR_0x4060",
+ "var": "VAR_ROUTE101_STATE",
"var_value": "1",
"script": "Route101_EventScript_1EBCDE"
},
@@ -129,7 +129,7 @@
"x": 10,
"y": 18,
"elevation": 3,
- "var": "VAR_0x4060",
+ "var": "VAR_ROUTE101_STATE",
"var_value": "2",
"script": "Route101_EventScript_1EBD4E"
},
@@ -138,7 +138,7 @@
"x": 11,
"y": 18,
"elevation": 3,
- "var": "VAR_0x4060",
+ "var": "VAR_ROUTE101_STATE",
"var_value": "2",
"script": "Route101_EventScript_1EBD4E"
},
@@ -147,7 +147,7 @@
"x": 6,
"y": 16,
"elevation": 3,
- "var": "VAR_0x4060",
+ "var": "VAR_ROUTE101_STATE",
"var_value": "2",
"script": "Route101_EventScript_1EBD64"
},
@@ -156,7 +156,7 @@
"x": 6,
"y": 15,
"elevation": 3,
- "var": "VAR_0x4060",
+ "var": "VAR_ROUTE101_STATE",
"var_value": "2",
"script": "Route101_EventScript_1EBD64"
},
@@ -165,7 +165,7 @@
"x": 6,
"y": 17,
"elevation": 3,
- "var": "VAR_0x4060",
+ "var": "VAR_ROUTE101_STATE",
"var_value": "2",
"script": "Route101_EventScript_1EBD64"
},
@@ -174,7 +174,7 @@
"x": 6,
"y": 18,
"elevation": 3,
- "var": "VAR_0x4060",
+ "var": "VAR_ROUTE101_STATE",
"var_value": "2",
"script": "Route101_EventScript_1EBD64"
},
@@ -183,7 +183,7 @@
"x": 7,
"y": 13,
"elevation": 3,
- "var": "VAR_0x4060",
+ "var": "VAR_ROUTE101_STATE",
"var_value": "2",
"script": "Route101_EventScript_1EBD7A"
}
diff --git a/data/maps/Route101/scripts.inc b/data/maps/Route101/scripts.inc
index 15722a3f3..aa20ba2da 100644
--- a/data/maps/Route101/scripts.inc
+++ b/data/maps/Route101/scripts.inc
@@ -1,6 +1,6 @@
Route101_MapScripts:: @ 81EBCBA
- map_script 3, Route101_MapScript1_1EBCC5
- map_script 2, Route101_MapScript2_1EBCCB
+ map_script MAP_SCRIPT_ON_TRANSITION, Route101_MapScript1_1EBCC5
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, Route101_MapScript2_1EBCCB
.byte 0
Route101_MapScript1_1EBCC5: @ 81EBCC5
@@ -8,12 +8,12 @@ Route101_MapScript1_1EBCC5: @ 81EBCC5
end
Route101_MapScript2_1EBCCB: @ 81EBCCB
- map_script_2 VAR_0x4060, 0, Route101_EventScript_1EBCD5
+ map_script_2 VAR_ROUTE101_STATE, 0, Route101_EventScript_1EBCD5
.2byte 0
Route101_EventScript_1EBCD5:: @ 81EBCD5
setflag FLAG_SPECIAL_FLAG_0x4000
- setvar VAR_0x4060, 1
+ setvar VAR_ROUTE101_STATE, 1
end
Route101_EventScript_1EBCDE:: @ 81EBCDE
@@ -30,14 +30,14 @@ Route101_EventScript_1EBCDE:: @ 81EBCDE
applymovement 4, Route101_Movement_1EBD96
applymovement 2, Route101_Movement_1EBDC8
waitmovement 0
- applymovement 2, Route101_Movement_2725A8
+ applymovement 2, Common_Movement_WalkInPlaceRight
waitmovement 0
applymovement 4, Route101_Movement_1EBDBD
applymovement 2, Route101_Movement_1EBDEF
waitmovement 0
msgbox Route101_Text_1EBE9A, MSGBOX_DEFAULT
closemessage
- setvar VAR_0x4060, 2
+ setvar VAR_ROUTE101_STATE, 2
releaseall
end
@@ -223,7 +223,7 @@ Route101_EventScript_1EBE16:: @ 81EBE16
fadescreen 1
removeobject 4
setobjectxy EVENT_OBJ_ID_PLAYER, 6, 13
- applymovement EVENT_OBJ_ID_PLAYER, Route101_Movement_2725A4
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceLeft
waitmovement 0
special ChooseStarter
waitstate
@@ -234,8 +234,8 @@ Route101_EventScript_1EBE16:: @ 81EBE16
setflag FLAG_HIDE_ROUTE_101_BIRCH_ZIGZAGOON_BATTLE
clearflag FLAG_HIDE_LITTLEROOT_TOWN_BIRCHS_LAB_BIRCH
setflag FLAG_HIDE_ROUTE_101_BIRCH_STARTERS_BAG
- setvar VAR_0x4084, 2
- setvar VAR_0x4060, 3
+ setvar VAR_BIRCH_LAB_STATE, 2
+ setvar VAR_ROUTE101_STATE, 3
clearflag FLAG_SPECIAL_FLAG_0x4000
checkplayergender
compare VAR_RESULT, MALE
diff --git a/data/maps/Route103/scripts.inc b/data/maps/Route103/scripts.inc
index e13bad76d..f711416fd 100644
--- a/data/maps/Route103/scripts.inc
+++ b/data/maps/Route103/scripts.inc
@@ -1,10 +1,10 @@
Route103_MapScripts:: @ 81EC38E
- map_script 3, Route103_MapScript1_1EC399
- map_script 1, Route103_MapScript1_1EC3A4
+ map_script MAP_SCRIPT_ON_TRANSITION, Route103_MapScript1_1EC399
+ map_script MAP_SCRIPT_ON_LOAD, Route103_MapScript1_1EC3A4
.byte 0
Route103_MapScript1_1EC399: @ 81EC399
- call Route103_EventScript_271ED7
+ call Common_EventScript_SetupRivalGender
call Route103_EventScript_2720AD
end
@@ -30,11 +30,11 @@ Route103_EventScript_1EC3DA:: @ 81EC3DA
msgbox Route103_Text_1EC7A6, MSGBOX_DEFAULT
closemessage
playbgm MUS_GIRL_SUP, 1
- applymovement 2, Route103_Movement_27259E
+ applymovement 2, Common_Movement_FacePlayer
waitmovement 0
- applymovement 2, Route103_Movement_272598
+ applymovement 2, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 2, Route103_Movement_27259A
+ applymovement 2, Common_Movement_Delay48
waitmovement 0
msgbox Route103_Text_1EC7DE, MSGBOX_DEFAULT
switch VAR_STARTER_MON
@@ -47,11 +47,11 @@ Route103_EventScript_1EC434:: @ 81EC434
msgbox Route103_Text_1EC989, MSGBOX_DEFAULT
closemessage
playbgm MUS_BOY_SUP, 1
- applymovement 2, Route103_Movement_27259E
+ applymovement 2, Common_Movement_FacePlayer
waitmovement 0
- applymovement 2, Route103_Movement_272598
+ applymovement 2, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 2, Route103_Movement_27259A
+ applymovement 2, Common_Movement_Delay48
waitmovement 0
msgbox Route103_Text_1EC9CE, MSGBOX_DEFAULT
switch VAR_STARTER_MON
@@ -140,10 +140,10 @@ Route103_EventScript_1EC585:: @ 81EC585
Route103_EventScript_1EC5A2:: @ 81EC5A2
removeobject 2
- setvar VAR_0x4084, 4
+ setvar VAR_BIRCH_LAB_STATE, 4
clearflag FLAG_HIDE_LITTLEROOT_TOWN_BIRCHS_LAB_RIVAL
setflag FLAG_DEFEATED_RIVAL_ROUTE103
- setvar VAR_0x40C7, 1
+ setvar VAR_OLDALE_STATE, 1
clearflag FLAG_HIDE_OLDALE_TOWN_RIVAL
savebgm MUS_DUMMY
fadedefaultbgm
diff --git a/data/maps/Route104/scripts.inc b/data/maps/Route104/scripts.inc
index e904f69b7..1daa9e52c 100644
--- a/data/maps/Route104/scripts.inc
+++ b/data/maps/Route104/scripts.inc
@@ -1,10 +1,10 @@
Route104_MapScripts:: @ 81ECC32
- map_script 2, Route104_MapScript2_1ECC3D
- map_script 3, Route104_MapScript1_1ECC4E
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, Route104_MapScript2_1ECC3D
+ map_script MAP_SCRIPT_ON_TRANSITION, Route104_MapScript1_1ECC4E
.byte 0
Route104_MapScript2_1ECC3D: @ 81ECC3D
- map_script_2 VAR_0x408E, 1, Route104_EventScript_1ECC47
+ map_script_2 VAR_BOARD_BRINEY_BOAT_ROUTE104_STATE, 1, Route104_EventScript_1ECC47
.2byte 0
Route104_EventScript_1ECC47:: @ 81ECC47
@@ -13,7 +13,7 @@ Route104_EventScript_1ECC47:: @ 81ECC47
end
Route104_MapScript1_1ECC4E: @ 81ECC4E
- call Route104_EventScript_271ED7
+ call Common_EventScript_SetupRivalGender
call Route104_EventScript_1ECC78
call Route104_EventScript_1ECC5E
end
@@ -29,7 +29,7 @@ Route104_EventScript_1ECC74:: @ 81ECC74
return
Route104_EventScript_1ECC78:: @ 81ECC78
- compare VAR_0x408E, 1
+ compare VAR_BOARD_BRINEY_BOAT_ROUTE104_STATE, 1
goto_if_ge Route104_EventScript_1ECC9D
goto_if_set FLAG_MET_RIVAL_RUSTBORO, Route104_EventScript_1ECC9D
goto_if_unset FLAG_REGISTER_RIVAL_POKENAV, Route104_EventScript_1ECC9D
@@ -42,16 +42,16 @@ Route104_EventScript_1ECC9D:: @ 81ECC9D
Route104_EventScript_1ECC9E:: @ 81ECC9E
lockall
setvar VAR_0x8008, 1
- applymovement 34, Route104_Movement_27259E
+ applymovement 34, Common_Movement_FacePlayer
waitmovement 0
goto Route104_EventScript_1ECD33
Route104_EventScript_1ECCB3:: @ 81ECCB3
lockall
setflag FLAG_HIDE_RUSBORO_CITY_RIVAL
- setvar VAR_0x405A, 8
+ setvar VAR_RUSTBORO_STATE, 8
setvar VAR_0x4063, 2
- applymovement EVENT_OBJ_ID_PLAYER, Route104_Movement_2725A6
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceUp
waitmovement 0
delay 10
addobject 34
@@ -64,9 +64,9 @@ Route104_EventScript_1ECCB3:: @ 81ECCB3
setvar VAR_0x8008, 0
call Route104_EventScript_1E0DD1
playse SE_PIN
- applymovement 34, Route104_Movement_272598
+ applymovement 34, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 34, Route104_Movement_27259A
+ applymovement 34, Common_Movement_Delay48
waitmovement 0
goto Route104_EventScript_1ECD33
@@ -270,7 +270,7 @@ Route104_EventScript_1ECF8C:: @ 81ECF8C
msgbox Route104_Text_2A6D86, MSGBOX_DEFAULT
giveitem_std ITEM_CHESTO_BERRY
compare VAR_RESULT, 0
- goto_if_eq Route104_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
setflag FLAG_RECEIVED_CHESTO_BERRY_ROUTE_104
msgbox Route104_Text_2A6E32, MSGBOX_DEFAULT
release
@@ -288,7 +288,7 @@ Route104_EventScript_1ECFCD:: @ 81ECFCD
msgbox Route104_Text_1ED96A, MSGBOX_DEFAULT
giveitem_std ITEM_WHITE_HERB
compare VAR_RESULT, 0
- goto_if_eq Route104_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
setflag FLAG_RECEIVED_WHITE_HERB
release
end
@@ -341,7 +341,7 @@ Route104_EventScript_1ED057:: @ 81ED057
msgbox Route104_Text_1ED838, MSGBOX_DEFAULT
giveitem_std ITEM_TM09
compare VAR_RESULT, 0
- goto_if_eq Route104_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
setflag FLAG_RECEIVED_TM09
release
end
@@ -413,11 +413,11 @@ Route104_EventScript_1ED139:: @ 81ED139
call Route104_EventScript_2720A8
setflag FLAG_HIDE_ROUTE_104_MR_BRINEY_BOAT
hideobjectat 7, MAP_ROUTE104
- copyvar VAR_0x4096, VAR_0x8008
+ copyvar VAR_BRINEY_LOCATION, VAR_0x8008
resetobjectpriority EVENT_OBJ_ID_PLAYER, MAP_ROUTE104
resetobjectpriority 2, MAP_DEWFORD_TOWN
moveobjectoffscreen 2
- setvar VAR_0x408E, 0
+ setvar VAR_BOARD_BRINEY_BOAT_ROUTE104_STATE, 0
goto_if_unset FLAG_DELIVERED_STEVEN_LETTER, Route104_EventScript_1ED1B4
goto_if_set FLAG_DELIVERED_STEVEN_LETTER, Route104_EventScript_1ED1BE
end
diff --git a/data/maps/Route104_MrBrineysHouse/scripts.inc b/data/maps/Route104_MrBrineysHouse/scripts.inc
index 17ed47206..8a4af48cd 100644
--- a/data/maps/Route104_MrBrineysHouse/scripts.inc
+++ b/data/maps/Route104_MrBrineysHouse/scripts.inc
@@ -1,10 +1,10 @@
Route104_MrBrineysHouse_MapScripts:: @ 8229D2E
- map_script 3, Route104_MrBrineysHouse_MapScript1_229D34
+ map_script MAP_SCRIPT_ON_TRANSITION, Route104_MrBrineysHouse_MapScript1_229D34
.byte 0
Route104_MrBrineysHouse_MapScript1_229D34: @ 8229D34
setflag FLAG_LANDMARK_MR_BRINEY_HOUSE
- compare VAR_0x4090, 1
+ compare VAR_BRINEY_HOUSE_STATE, 1
call_if_eq Route104_MrBrineysHouse_EventScript_229D50
call_if_set FLAG_RECEIVED_POKENAV, Route104_MrBrineysHouse_EventScript_229D4C
end
@@ -75,11 +75,11 @@ Route104_MrBrineysHouse_EventScript_229E1D:: @ 8229E1D
Route104_MrBrineysHouse_EventScript_229E27:: @ 8229E27
msgbox Route104_MrBrineysHouse_Text_229FE9, MSGBOX_DEFAULT
call Route104_MrBrineysHouse_EventScript_271E95
- setvar VAR_0x408E, 1
+ setvar VAR_BOARD_BRINEY_BOAT_ROUTE104_STATE, 1
clearflag FLAG_HIDE_ROUTE_104_MR_BRINEY
setflag FLAG_HIDE_BRINEYS_HOUSE_MR_BRINEY
setflag FLAG_HIDE_BRINEYS_HOUSE_PEEKO
- setvar VAR_0x405A, 8
+ setvar VAR_RUSTBORO_STATE, 8
setvar VAR_0x4063, 2
setflag FLAG_HIDE_RUSBORO_CITY_RIVAL
setflag FLAG_HIDE_ROUTE_104_RIVAL
diff --git a/data/maps/Route104_PrettyPetalFlowerShop/scripts.inc b/data/maps/Route104_PrettyPetalFlowerShop/scripts.inc
index 7f5e35287..26dfe7f8a 100644
--- a/data/maps/Route104_PrettyPetalFlowerShop/scripts.inc
+++ b/data/maps/Route104_PrettyPetalFlowerShop/scripts.inc
@@ -1,5 +1,5 @@
Route104_PrettyPetalFlowerShop_MapScripts:: @ 822A34C
- map_script 3, Route104_PrettyPetalFlowerShop_MapScript1_22A352
+ map_script MAP_SCRIPT_ON_TRANSITION, Route104_PrettyPetalFlowerShop_MapScript1_22A352
.byte 0
Route104_PrettyPetalFlowerShop_MapScript1_22A352: @ 822A352
@@ -91,7 +91,7 @@ Route104_PrettyPetalFlowerShop_EventScript_22A442:: @ 822A442
addvar VAR_RESULT, 133
giveitem_std VAR_RESULT
compare VAR_RESULT, 0
- goto_if_eq Route104_PrettyPetalFlowerShop_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
setflag FLAG_DAILY_FLOWER_SHOP_RECEIVED_BERRY
msgbox Route104_PrettyPetalFlowerShop_Text_2A7AF3, MSGBOX_DEFAULT
release
diff --git a/data/maps/Route105/scripts.inc b/data/maps/Route105/scripts.inc
index b4213af5b..6ad11bc52 100644
--- a/data/maps/Route105/scripts.inc
+++ b/data/maps/Route105/scripts.inc
@@ -1,7 +1,7 @@
Route105_MapScripts:: @ 81EE1DB
- map_script 1, Route105_MapScript1_1EE1EB
- map_script 3, Route105_MapScript1_1EE21E
- map_script 2, Route105_MapScript2_1EE240
+ map_script MAP_SCRIPT_ON_LOAD, Route105_MapScript1_1EE1EB
+ map_script MAP_SCRIPT_ON_TRANSITION, Route105_MapScript1_1EE21E
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, Route105_MapScript2_1EE240
.byte 0
Route105_MapScript1_1EE1EB: @ 81EE1EB
diff --git a/data/maps/Route109/scripts.inc b/data/maps/Route109/scripts.inc
index ebf9398d1..a036296e3 100644
--- a/data/maps/Route109/scripts.inc
+++ b/data/maps/Route109/scripts.inc
@@ -55,7 +55,7 @@ Route109_EventScript_1EE7D5:: @ 81EE7D5
hideobjectat 1, MAP_ROUTE109
msgbox Route109_Text_1E9C1D, MSGBOX_DEFAULT
closemessage
- copyvar VAR_0x4096, VAR_0x8008
+ copyvar VAR_BRINEY_LOCATION, VAR_0x8008
resetobjectpriority EVENT_OBJ_ID_PLAYER, MAP_ROUTE109
resetobjectpriority 2, MAP_DEWFORD_TOWN
moveobjectoffscreen 2
@@ -319,7 +319,7 @@ Route109_EventScript_1EE99E:: @ 81EE99E
faceplayer
msgbox Route109_Text_1EEFB0, MSGBOX_DEFAULT
closemessage
- applymovement VAR_LAST_TALKED, Route109_Movement_2725A2
+ applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -332,9 +332,9 @@ Route109_EventScript_1EE9B5:: @ 81EE9B5
msgbox Route109_Text_1EEFDE, MSGBOX_DEFAULT
giveitem_std ITEM_SOFT_SAND
compare VAR_RESULT, 0
- goto_if_eq Route109_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
closemessage
- applymovement VAR_LAST_TALKED, Route109_Movement_2725A2
+ applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection
waitmovement 0
setflag FLAG_RECEIVED_SOFT_SAND
release
@@ -342,7 +342,7 @@ Route109_EventScript_1EE9B5:: @ 81EE9B5
Route109_EventScript_1EE9F2:: @ 81EE9F2
msgbox Route109_Text_1EEFF1, MSGBOX_DEFAULT
- applymovement VAR_LAST_TALKED, Route109_Movement_2725A2
+ applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
diff --git a/data/maps/Route109_SeashoreHouse/scripts.inc b/data/maps/Route109_SeashoreHouse/scripts.inc
index 951356409..ed27e32ff 100644
--- a/data/maps/Route109_SeashoreHouse/scripts.inc
+++ b/data/maps/Route109_SeashoreHouse/scripts.inc
@@ -1,5 +1,5 @@
Route109_SeashoreHouse_MapScripts:: @ 82693F4
- map_script 3, Route109_SeashoreHouse_MapScript1_2693FA
+ map_script MAP_SCRIPT_ON_TRANSITION, Route109_SeashoreHouse_MapScript1_2693FA
.byte 0
Route109_SeashoreHouse_MapScript1_2693FA: @ 82693FA
@@ -75,7 +75,7 @@ Route109_SeashoreHouse_EventScript_2694C8:: @ 82694C8
end
Route109_SeashoreHouse_EventScript_2694D5:: @ 82694D5
- msgbox gUnknown_08272AD0, MSGBOX_DEFAULT
+ msgbox gText_TooBadBagIsFull, MSGBOX_DEFAULT
hidemoneybox
nop
nop
diff --git a/data/maps/Route110/map.json b/data/maps/Route110/map.json
index 404155652..a9ac7796a 100644
--- a/data/maps/Route110/map.json
+++ b/data/maps/Route110/map.json
@@ -567,7 +567,7 @@
"x": 33,
"y": 56,
"elevation": 3,
- "var": "VAR_0x4069",
+ "var": "VAR_ROUTE110_STATE",
"var_value": "0",
"script": "Route110_EventScript_1EF74D"
},
@@ -576,7 +576,7 @@
"x": 34,
"y": 56,
"elevation": 3,
- "var": "VAR_0x4069",
+ "var": "VAR_ROUTE110_STATE",
"var_value": "0",
"script": "Route110_EventScript_1EF758"
},
@@ -585,7 +585,7 @@
"x": 35,
"y": 56,
"elevation": 3,
- "var": "VAR_0x4069",
+ "var": "VAR_ROUTE110_STATE",
"var_value": "0",
"script": "Route110_EventScript_1EF763"
},
diff --git a/data/maps/Route110/scripts.inc b/data/maps/Route110/scripts.inc
index 7c98cc603..cddfbebcc 100644
--- a/data/maps/Route110/scripts.inc
+++ b/data/maps/Route110/scripts.inc
@@ -1,7 +1,7 @@
Route110_MapScripts:: @ 81EF269
- map_script 5, Route110_MapScript1_1EF279
- map_script 3, Route110_MapScript1_1EF27D
- map_script 2, Route110_MapScript2_1EF297
+ map_script MAP_SCRIPT_ON_RESUME, Route110_MapScript1_1EF279
+ map_script MAP_SCRIPT_ON_TRANSITION, Route110_MapScript1_1EF27D
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, Route110_MapScript2_1EF297
.byte 0
Route110_MapScript1_1EF279: @ 81EF279
@@ -9,8 +9,8 @@ Route110_MapScript1_1EF279: @ 81EF279
end
Route110_MapScript1_1EF27D: @ 81EF27D
- call Route110_EventScript_271ED7
- call Route110_EventScript_271EFB
+ call Common_EventScript_SetupRivalGender
+ call Common_EventScript_SetupRivalOnBikeGender
compare VAR_CYCLING_CHALLENGE_STATE, 1
call_if_eq Route110_EventScript_1EF293
end
@@ -32,7 +32,7 @@ Route110_EventScript_1EF2AA:: @ 81EF2AA
lock
faceplayer
msgbox Route110_Text_1EFB5D, MSGBOX_DEFAULT
- applymovement VAR_LAST_TALKED, Route110_Movement_2725A2
+ applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -41,7 +41,7 @@ Route110_EventScript_1EF2C0:: @ 81EF2C0
lock
faceplayer
msgbox Route110_Text_1EFB93, MSGBOX_DEFAULT
- applymovement VAR_LAST_TALKED, Route110_Movement_2725A2
+ applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -50,7 +50,7 @@ Route110_EventScript_1EF2D6:: @ 81EF2D6
lock
faceplayer
msgbox Route110_Text_1EFBCA, MSGBOX_DEFAULT
- applymovement VAR_LAST_TALKED, Route110_Movement_2725A2
+ applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -59,7 +59,7 @@ Route110_EventScript_1EF2EC:: @ 81EF2EC
lock
faceplayer
msgbox Route110_Text_1EFC0D, MSGBOX_DEFAULT
- applymovement VAR_LAST_TALKED, Route110_Movement_2725A2
+ applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -307,7 +307,7 @@ Route110_EventScript_1EF64A:: @ 81EF64A
Route110_EventScript_1EF661:: @ 81EF661
lockall
- applymovement 21, Route110_Movement_2725A8
+ applymovement 21, Common_Movement_WalkInPlaceRight
waitmovement 0
call Route110_EventScript_1EF673
releaseall
@@ -383,11 +383,11 @@ Route110_EventScript_1EF76E:: @ 81EF76E
call_if_eq Route110_EventScript_1EF7E1
compare VAR_RESULT, FEMALE
call_if_eq Route110_EventScript_1EF7E6
- applymovement 28, Route110_Movement_2725AA
+ applymovement 28, Common_Movement_WalkInPlaceDown
waitmovement 0
- applymovement 28, Route110_Movement_272598
+ applymovement 28, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 28, Route110_Movement_27259A
+ applymovement 28, Common_Movement_Delay48
waitmovement 0
delay 30
compare VAR_0x8008, 1
@@ -496,7 +496,7 @@ Route110_EventScript_1EF8EC:: @ 81EF8EC
compare VAR_0x8008, 3
call_if_eq Route110_EventScript_1EF985
removeobject 29
- setvar VAR_0x4069, 1
+ setvar VAR_ROUTE110_STATE, 1
savebgm MUS_DUMMY
fadedefaultbgm
releaseall
@@ -616,9 +616,9 @@ Route110_EventScript_1EF9F7:: @ 81EF9F7
applymovement 36, Route110_Movement_1EFB30
waitmovement 0
playse SE_PIN
- applymovement 36, Route110_Movement_272598
+ applymovement 36, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 36, Route110_Movement_27259A
+ applymovement 36, Common_Movement_Delay48
waitmovement 0
compare VAR_0x8008, 1
call_if_eq Route110_EventScript_1EFAD8
@@ -631,13 +631,13 @@ Route110_EventScript_1EF9F7:: @ 81EF9F7
msgbox Route110_Text_1F0AB5, MSGBOX_DEFAULT
closemessage
delay 20
- applymovement 36, Route110_Movement_2725A4
+ applymovement 36, Common_Movement_WalkInPlaceLeft
waitmovement 0
delay 10
- applymovement 36, Route110_Movement_2725A8
+ applymovement 36, Common_Movement_WalkInPlaceRight
waitmovement 0
delay 20
- applymovement 36, Route110_Movement_2725AA
+ applymovement 36, Common_Movement_WalkInPlaceDown
waitmovement 0
delay 30
msgbox Route110_Text_1F0AFF, MSGBOX_DEFAULT
diff --git a/data/maps/Route110_SeasideCyclingRoadSouthEntrance/scripts.inc b/data/maps/Route110_SeasideCyclingRoadSouthEntrance/scripts.inc
index a993364e6..1d353dcdd 100644
--- a/data/maps/Route110_SeasideCyclingRoadSouthEntrance/scripts.inc
+++ b/data/maps/Route110_SeasideCyclingRoadSouthEntrance/scripts.inc
@@ -1,5 +1,5 @@
Route110_SeasideCyclingRoadSouthEntrance_MapScripts:: @ 826EBA1
- map_script 3, Route110_SeasideCyclingRoadSouthEntrance_MapScript1_26EBA7
+ map_script MAP_SCRIPT_ON_TRANSITION, Route110_SeasideCyclingRoadSouthEntrance_MapScript1_26EBA7
.byte 0
Route110_SeasideCyclingRoadSouthEntrance_MapScript1_26EBA7: @ 826EBA7
diff --git a/data/maps/Route110_TrickHouseCorridor/scripts.inc b/data/maps/Route110_TrickHouseCorridor/scripts.inc
index cf520c81f..996f9d605 100644
--- a/data/maps/Route110_TrickHouseCorridor/scripts.inc
+++ b/data/maps/Route110_TrickHouseCorridor/scripts.inc
@@ -1,8 +1,8 @@
Route110_TrickHouseCorridor_MapScripts:: @ 826B903
- map_script 3, Route110_TrickHouseCorridor_MapScript1_26B909
+ map_script MAP_SCRIPT_ON_TRANSITION, Route110_TrickHouseCorridor_MapScript1_26B909
.byte 0
Route110_TrickHouseCorridor_MapScript1_26B909: @ 826B909
- setvar VAR_0x40B5, 1
+ setvar VAR_TRICK_HOUSE_STATE, 1
end
diff --git a/data/maps/Route110_TrickHouseEnd/scripts.inc b/data/maps/Route110_TrickHouseEnd/scripts.inc
index 8326a7c02..7902cb95d 100644
--- a/data/maps/Route110_TrickHouseEnd/scripts.inc
+++ b/data/maps/Route110_TrickHouseEnd/scripts.inc
@@ -1,8 +1,8 @@
Route110_TrickHouseEnd_MapScripts:: @ 826ACAF
- map_script 5, Route110_TrickHouseEnd_MapScript1_26ACC4
- map_script 3, Route110_TrickHouseEnd_MapScript1_26ACD0
- map_script 2, Route110_TrickHouseEnd_MapScript2_26ACF5
- map_script 4, Route110_TrickHouseEnd_MapScript2_26ACDE
+ map_script MAP_SCRIPT_ON_RESUME, Route110_TrickHouseEnd_MapScript1_26ACC4
+ map_script MAP_SCRIPT_ON_TRANSITION, Route110_TrickHouseEnd_MapScript1_26ACD0
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, Route110_TrickHouseEnd_MapScript2_26ACF5
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, Route110_TrickHouseEnd_MapScript2_26ACDE
.byte 0
Route110_TrickHouseEnd_MapScript1_26ACC4: @ 826ACC4
@@ -59,7 +59,7 @@ Route110_TrickHouseEnd_EventScript_26AD17:: @ 826AD17
Route110_TrickHouseEnd_EventScript_26AD84:: @ 826AD84
msgbox Route110_TrickHouseEnd_Text_26B0BC, MSGBOX_DEFAULT
msgbox Route110_TrickHouseEnd_Text_26B73D, MSGBOX_DEFAULT
- setvar VAR_0x40C1, 0
+ setvar VAR_TRICK_HOUSE_PRIZE_PICKUP, 0
giveitem_std ITEM_RARE_CANDY
compare VAR_RESULT, 0
call_if_eq Route110_TrickHouseEnd_EventScript_26AFEF
@@ -72,7 +72,7 @@ Route110_TrickHouseEnd_EventScript_26AD84:: @ 826AD84
Route110_TrickHouseEnd_EventScript_26ADC0:: @ 826ADC0
msgbox Route110_TrickHouseEnd_Text_26B13B, MSGBOX_DEFAULT
msgbox Route110_TrickHouseEnd_Text_26B73D, MSGBOX_DEFAULT
- setvar VAR_0x40C1, 0
+ setvar VAR_TRICK_HOUSE_PRIZE_PICKUP, 0
giveitem_std ITEM_TIMER_BALL
compare VAR_RESULT, 0
call_if_eq Route110_TrickHouseEnd_EventScript_26AFEF
@@ -85,7 +85,7 @@ Route110_TrickHouseEnd_EventScript_26ADC0:: @ 826ADC0
Route110_TrickHouseEnd_EventScript_26ADFC:: @ 826ADFC
msgbox Route110_TrickHouseEnd_Text_26B1AD, MSGBOX_DEFAULT
msgbox Route110_TrickHouseEnd_Text_26B73D, MSGBOX_DEFAULT
- setvar VAR_0x40C1, 0
+ setvar VAR_TRICK_HOUSE_PRIZE_PICKUP, 0
giveitem_std ITEM_HARD_STONE
compare VAR_RESULT, 0
call_if_eq Route110_TrickHouseEnd_EventScript_26AFEF
@@ -98,7 +98,7 @@ Route110_TrickHouseEnd_EventScript_26ADFC:: @ 826ADFC
Route110_TrickHouseEnd_EventScript_26AE38:: @ 826AE38
msgbox Route110_TrickHouseEnd_Text_26B223, MSGBOX_DEFAULT
msgbox Route110_TrickHouseEnd_Text_26B73D, MSGBOX_DEFAULT
- setvar VAR_0x40C1, 0
+ setvar VAR_TRICK_HOUSE_PRIZE_PICKUP, 0
giveitem_std ITEM_SMOKE_BALL
compare VAR_RESULT, 0
call_if_eq Route110_TrickHouseEnd_EventScript_26AFEF
@@ -111,7 +111,7 @@ Route110_TrickHouseEnd_EventScript_26AE38:: @ 826AE38
Route110_TrickHouseEnd_EventScript_26AE74:: @ 826AE74
msgbox Route110_TrickHouseEnd_Text_26B293, MSGBOX_DEFAULT
msgbox Route110_TrickHouseEnd_Text_26B73D, MSGBOX_DEFAULT
- setvar VAR_0x40C1, 0
+ setvar VAR_TRICK_HOUSE_PRIZE_PICKUP, 0
giveitem_std ITEM_TM12
compare VAR_RESULT, 0
call_if_eq Route110_TrickHouseEnd_EventScript_26AFEF
@@ -124,7 +124,7 @@ Route110_TrickHouseEnd_EventScript_26AE74:: @ 826AE74
Route110_TrickHouseEnd_EventScript_26AEB0:: @ 826AEB0
msgbox Route110_TrickHouseEnd_Text_26B315, MSGBOX_DEFAULT
msgbox Route110_TrickHouseEnd_Text_26B73D, MSGBOX_DEFAULT
- setvar VAR_0x40C1, 0
+ setvar VAR_TRICK_HOUSE_PRIZE_PICKUP, 0
giveitem_std ITEM_MAGNET
compare VAR_RESULT, 0
call_if_eq Route110_TrickHouseEnd_EventScript_26AFEF
@@ -137,7 +137,7 @@ Route110_TrickHouseEnd_EventScript_26AEB0:: @ 826AEB0
Route110_TrickHouseEnd_EventScript_26AEEC:: @ 826AEEC
msgbox Route110_TrickHouseEnd_Text_26B365, MSGBOX_DEFAULT
msgbox Route110_TrickHouseEnd_Text_26B73D, MSGBOX_DEFAULT
- setvar VAR_0x40C1, 0
+ setvar VAR_TRICK_HOUSE_PRIZE_PICKUP, 0
giveitem_std ITEM_PP_MAX
compare VAR_RESULT, 0
call_if_eq Route110_TrickHouseEnd_EventScript_26AFEF
@@ -161,11 +161,11 @@ Route110_TrickHouseEnd_EventScript_26AF28:: @ 826AF28
delay 30
msgbox Route110_TrickHouseEnd_Text_26B3FA, MSGBOX_DEFAULT
closemessage
- applymovement 1, Route110_TrickHouseEnd_Movement_27259E
+ applymovement 1, Common_Movement_FacePlayer
waitmovement 0
delay 30
msgbox Route110_TrickHouseEnd_Text_26B485, MSGBOX_DEFAULT
- setvar VAR_0x40C1, 0
+ setvar VAR_TRICK_HOUSE_PRIZE_PICKUP, 0
call Route110_TrickHouseEnd_EventScript_26AFA5
compare VAR_RESULT, 0
call_if_eq Route110_TrickHouseEnd_EventScript_26B002
@@ -200,34 +200,34 @@ Route110_TrickHouseEnd_EventScript_26AFCF:: @ 826AFCF
return
Route110_TrickHouseEnd_EventScript_26AFEF:: @ 826AFEF
- call Route110_TrickHouseEnd_EventScript_27205E
+ call Common_EventScript_BagIsFull
msgbox Route110_TrickHouseEnd_Text_26B760, MSGBOX_DEFAULT
- setvar VAR_0x40C1, 1
+ setvar VAR_TRICK_HOUSE_PRIZE_PICKUP, 1
return
Route110_TrickHouseEnd_EventScript_26B002:: @ 826B002
- call Route110_TrickHouseEnd_EventScript_272071
+ call Common_EventScript_NoRoomLeftForAnother
msgbox Route110_TrickHouseEnd_Text_26B615, MSGBOX_DEFAULT
- setvar VAR_0x40C1, 1
+ setvar VAR_TRICK_HOUSE_PRIZE_PICKUP, 1
return
Route110_TrickHouseEnd_EventScript_26B015:: @ 826B015
- applymovement 1, Route110_TrickHouseEnd_Movement_2725AA
+ applymovement 1, Common_Movement_WalkInPlaceDown
waitmovement 0
return
Route110_TrickHouseEnd_EventScript_26B020:: @ 826B020
- applymovement 1, Route110_TrickHouseEnd_Movement_2725A6
+ applymovement 1, Common_Movement_WalkInPlaceUp
waitmovement 0
return
Route110_TrickHouseEnd_EventScript_26B02B:: @ 826B02B
- applymovement 1, Route110_TrickHouseEnd_Movement_2725A4
+ applymovement 1, Common_Movement_WalkInPlaceLeft
waitmovement 0
return
Route110_TrickHouseEnd_EventScript_26B036:: @ 826B036
- applymovement 1, Route110_TrickHouseEnd_Movement_2725A8
+ applymovement 1, Common_Movement_WalkInPlaceRight
waitmovement 0
return
@@ -235,13 +235,13 @@ Route110_TrickHouseEnd_EventScript_26B041:: @ 826B041
lockall
turnobject 1, 3
playse SE_PIN
- applymovement 1, Route110_TrickHouseEnd_Movement_272598
+ applymovement 1, Common_Movement_ExclamationMark
waitmovement 0
delay 20
applymovement 1, Route110_TrickHouseEnd_Movement_26B08B
waitmovement 0
playse SE_W153
- applymovement EVENT_OBJ_ID_PLAYER, Route110_TrickHouseEnd_Movement_2725AA
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceDown
waitmovement 0
msgbox Route110_TrickHouseEnd_Text_26B8BD, MSGBOX_DEFAULT
closemessage
diff --git a/data/maps/Route110_TrickHouseEntrance/map.json b/data/maps/Route110_TrickHouseEntrance/map.json
index 59280848e..ce188feec 100644
--- a/data/maps/Route110_TrickHouseEntrance/map.json
+++ b/data/maps/Route110_TrickHouseEntrance/map.json
@@ -57,7 +57,7 @@
"x": 4,
"y": 7,
"elevation": 3,
- "var": "VAR_0x40A5",
+ "var": "VAR_TRICK_HOUSE_ENTRANCE_STATE_1",
"var_value": "0",
"script": "Route110_TrickHouseEntrance_EventScript_26A3F8"
},
@@ -66,7 +66,7 @@
"x": 5,
"y": 6,
"elevation": 3,
- "var": "VAR_0x40A5",
+ "var": "VAR_TRICK_HOUSE_ENTRANCE_STATE_1",
"var_value": "0",
"script": "Route110_TrickHouseEntrance_EventScript_26A3F8"
},
@@ -75,7 +75,7 @@
"x": 6,
"y": 6,
"elevation": 3,
- "var": "VAR_0x40A5",
+ "var": "VAR_TRICK_HOUSE_ENTRANCE_STATE_1",
"var_value": "0",
"script": "Route110_TrickHouseEntrance_EventScript_26A3F8"
},
@@ -84,7 +84,7 @@
"x": 7,
"y": 7,
"elevation": 3,
- "var": "VAR_0x40A5",
+ "var": "VAR_TRICK_HOUSE_ENTRANCE_STATE_1",
"var_value": "0",
"script": "Route110_TrickHouseEntrance_EventScript_26A3F8"
}
diff --git a/data/maps/Route110_TrickHouseEntrance/scripts.inc b/data/maps/Route110_TrickHouseEntrance/scripts.inc
index b2aa22f6c..a83d50dc3 100644
--- a/data/maps/Route110_TrickHouseEntrance/scripts.inc
+++ b/data/maps/Route110_TrickHouseEntrance/scripts.inc
@@ -1,24 +1,24 @@
Route110_TrickHouseEntrance_MapScripts:: @ 8269A50
- map_script 3, Route110_TrickHouseEntrance_MapScript1_269A60
- map_script 2, Route110_TrickHouseEntrance_MapScript2_269CEE
- map_script 4, Route110_TrickHouseEntrance_MapScript2_269BD3
+ map_script MAP_SCRIPT_ON_TRANSITION, Route110_TrickHouseEntrance_MapScript1_269A60
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, Route110_TrickHouseEntrance_MapScript2_269CEE
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, Route110_TrickHouseEntrance_MapScript2_269BD3
.byte 0
Route110_TrickHouseEntrance_MapScript1_269A60: @ 8269A60
setflag FLAG_LANDMARK_TRICK_HOUSE
- compare VAR_0x40B5, 1
+ compare VAR_TRICK_HOUSE_STATE, 1
goto_if_eq Route110_TrickHouseEntrance_EventScript_269AF3
- compare VAR_0x40C1, 1
+ compare VAR_TRICK_HOUSE_PRIZE_PICKUP, 1
goto_if_eq Route110_TrickHouseEntrance_EventScript_269AD7
- compare VAR_0x40A6, 1
+ compare VAR_TRICK_HOUSE_ENTRANCE_STATE_2, 1
goto_if_eq Route110_TrickHouseEntrance_EventScript_269BB3
- compare VAR_0x40A7, 5
+ compare VAR_TRICK_HOUSE_ENTRANCE_STATE_3, 5
call_if_eq Route110_TrickHouseEntrance_EventScript_269B03
- compare VAR_0x40A7, 3
+ compare VAR_TRICK_HOUSE_ENTRANCE_STATE_3, 3
call_if_eq Route110_TrickHouseEntrance_EventScript_269B03
- compare VAR_0x40A7, 0
+ compare VAR_TRICK_HOUSE_ENTRANCE_STATE_3, 0
call_if_eq Route110_TrickHouseEntrance_EventScript_269B03
- switch VAR_0x40A7
+ switch VAR_TRICK_HOUSE_ENTRANCE_STATE_3
case 0, Route110_TrickHouseEntrance_EventScript_269BBB
case 1, Route110_TrickHouseEntrance_EventScript_269BC1
case 3, Route110_TrickHouseEntrance_EventScript_269BC7
@@ -26,24 +26,24 @@ Route110_TrickHouseEntrance_MapScript1_269A60: @ 8269A60
end
Route110_TrickHouseEntrance_EventScript_269AD7:: @ 8269AD7
- setvar VAR_0x40A5, 1
+ setvar VAR_TRICK_HOUSE_ENTRANCE_STATE_1, 1
compare VAR_0x4044, 8
goto_if_eq Route110_TrickHouseEntrance_EventScript_269AED
- setvar VAR_0x40A7, 2
+ setvar VAR_TRICK_HOUSE_ENTRANCE_STATE_3, 2
end
Route110_TrickHouseEntrance_EventScript_269AED:: @ 8269AED
- setvar VAR_0x40A7, 6
+ setvar VAR_TRICK_HOUSE_ENTRANCE_STATE_3, 6
end
Route110_TrickHouseEntrance_EventScript_269AF3:: @ 8269AF3
- setvar VAR_0x40B5, 0
- setvar VAR_0x40A7, 5
- setvar VAR_0x40A5, 1
+ setvar VAR_TRICK_HOUSE_STATE, 0
+ setvar VAR_TRICK_HOUSE_ENTRANCE_STATE_3, 5
+ setvar VAR_TRICK_HOUSE_ENTRANCE_STATE_1, 1
end
Route110_TrickHouseEntrance_EventScript_269B03:: @ 8269B03
- setvar VAR_0x40A7, 0
+ setvar VAR_TRICK_HOUSE_ENTRANCE_STATE_3, 0
compare VAR_0x4044, 1
call_if_eq Route110_TrickHouseEntrance_EventScript_269B61
compare VAR_0x4044, 2
@@ -91,11 +91,11 @@ Route110_TrickHouseEntrance_EventScript_269B9D:: @ 8269B9D
return
Route110_TrickHouseEntrance_EventScript_269BA7:: @ 8269BA7
- setvar VAR_0x40A7, 4
+ setvar VAR_TRICK_HOUSE_ENTRANCE_STATE_3, 4
return
Route110_TrickHouseEntrance_EventScript_269BAD:: @ 8269BAD
- setvar VAR_0x40A7, 3
+ setvar VAR_TRICK_HOUSE_ENTRANCE_STATE_3, 3
return
Route110_TrickHouseEntrance_EventScript_269BB3:: @ 8269BB3
@@ -103,30 +103,30 @@ Route110_TrickHouseEntrance_EventScript_269BB3:: @ 8269BB3
end
Route110_TrickHouseEntrance_EventScript_269BBB:: @ 8269BBB
- setvar VAR_0x40A5, 0
+ setvar VAR_TRICK_HOUSE_ENTRANCE_STATE_1, 0
end
Route110_TrickHouseEntrance_EventScript_269BC1:: @ 8269BC1
- setvar VAR_0x40A5, 1
+ setvar VAR_TRICK_HOUSE_ENTRANCE_STATE_1, 1
end
Route110_TrickHouseEntrance_EventScript_269BC7:: @ 8269BC7
- setvar VAR_0x40A5, 1
+ setvar VAR_TRICK_HOUSE_ENTRANCE_STATE_1, 1
end
Route110_TrickHouseEntrance_EventScript_269BCD:: @ 8269BCD
- setvar VAR_0x40A5, 1
+ setvar VAR_TRICK_HOUSE_ENTRANCE_STATE_1, 1
end
Route110_TrickHouseEntrance_MapScript2_269BD3: @ 8269BD3
- map_script_2 VAR_0x40A6, 1, Route110_TrickHouseEntrance_EventScript_269C15
- map_script_2 VAR_0x40A7, 0, Route110_TrickHouseEntrance_EventScript_269C26
- map_script_2 VAR_0x40A7, 1, Route110_TrickHouseEntrance_EventScript_269CCC
- map_script_2 VAR_0x40A7, 2, Route110_TrickHouseEntrance_EventScript_269CD0
- map_script_2 VAR_0x40A7, 3, Route110_TrickHouseEntrance_EventScript_269CD0
- map_script_2 VAR_0x40A7, 4, Route110_TrickHouseEntrance_EventScript_269CCC
- map_script_2 VAR_0x40A7, 5, Route110_TrickHouseEntrance_EventScript_269CCC
- map_script_2 VAR_0x40A7, 6, Route110_TrickHouseEntrance_EventScript_269CDF
+ map_script_2 VAR_TRICK_HOUSE_ENTRANCE_STATE_2, 1, Route110_TrickHouseEntrance_EventScript_269C15
+ map_script_2 VAR_TRICK_HOUSE_ENTRANCE_STATE_3, 0, Route110_TrickHouseEntrance_EventScript_269C26
+ map_script_2 VAR_TRICK_HOUSE_ENTRANCE_STATE_3, 1, Route110_TrickHouseEntrance_EventScript_269CCC
+ map_script_2 VAR_TRICK_HOUSE_ENTRANCE_STATE_3, 2, Route110_TrickHouseEntrance_EventScript_269CD0
+ map_script_2 VAR_TRICK_HOUSE_ENTRANCE_STATE_3, 3, Route110_TrickHouseEntrance_EventScript_269CD0
+ map_script_2 VAR_TRICK_HOUSE_ENTRANCE_STATE_3, 4, Route110_TrickHouseEntrance_EventScript_269CCC
+ map_script_2 VAR_TRICK_HOUSE_ENTRANCE_STATE_3, 5, Route110_TrickHouseEntrance_EventScript_269CCC
+ map_script_2 VAR_TRICK_HOUSE_ENTRANCE_STATE_3, 6, Route110_TrickHouseEntrance_EventScript_269CDF
.2byte 0
Route110_TrickHouseEntrance_EventScript_269C15:: @ 8269C15
@@ -199,7 +199,7 @@ Route110_TrickHouseEntrance_EventScript_269CDF:: @ 8269CDF
end
Route110_TrickHouseEntrance_MapScript2_269CEE: @ 8269CEE
- map_script_2 VAR_0x40A6, 1, Route110_TrickHouseEntrance_EventScript_269CF8
+ map_script_2 VAR_TRICK_HOUSE_ENTRANCE_STATE_2, 1, Route110_TrickHouseEntrance_EventScript_269CF8
.2byte 0
Route110_TrickHouseEntrance_EventScript_269CF8:: @ 8269CF8
@@ -216,8 +216,8 @@ Route110_TrickHouseEntrance_EventScript_269CF8:: @ 8269CF8
applymovement 1, Route110_TrickHouseEntrance_Movement_269E3F
waitmovement 0
removeobject 1
- setvar VAR_0x40A7, 1
- setvar VAR_0x40A6, 0
+ setvar VAR_TRICK_HOUSE_ENTRANCE_STATE_3, 1
+ setvar VAR_TRICK_HOUSE_ENTRANCE_STATE_2, 0
releaseall
end
@@ -227,7 +227,7 @@ Route110_TrickHouseEntrance_EventScript_269D39:: @ 8269D39
Route110_TrickHouseEntrance_EventScript_269D3B:: @ 8269D3B
lockall
- switch VAR_0x40A7
+ switch VAR_TRICK_HOUSE_ENTRANCE_STATE_3
case 0, Route110_TrickHouseEntrance_EventScript_269D6E
case 2, Route110_TrickHouseEntrance_EventScript_269E8F
case 3, Route110_TrickHouseEntrance_EventScript_269E51
@@ -236,9 +236,9 @@ Route110_TrickHouseEntrance_EventScript_269D3B:: @ 8269D3B
Route110_TrickHouseEntrance_EventScript_269D6E:: @ 8269D6E
playse SE_PIN
- applymovement EVENT_OBJ_ID_PLAYER, Route110_TrickHouseEntrance_Movement_272598
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_ExclamationMark
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, Route110_TrickHouseEntrance_Movement_27259A
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_Delay48
waitmovement 0
compare VAR_0x4044, 0
call_if_eq Route110_TrickHouseEntrance_EventScript_269DEE
@@ -257,7 +257,7 @@ Route110_TrickHouseEntrance_EventScript_269D6E:: @ 8269D6E
compare VAR_0x4044, 7
call_if_eq Route110_TrickHouseEntrance_EventScript_269E2D
closemessage
- setvar VAR_0x40A6, 1
+ setvar VAR_TRICK_HOUSE_ENTRANCE_STATE_2, 1
warpsilent MAP_ROUTE110_TRICK_HOUSE_ENTRANCE, 255, 6, 2
waitstate
releaseall
@@ -326,21 +326,21 @@ Route110_TrickHouseEntrance_EventScript_269E48:: @ 8269E48
Route110_TrickHouseEntrance_EventScript_269E51:: @ 8269E51
msgbox Route110_TrickHouseEntrance_Text_26A921, MSGBOX_DEFAULT
closemessage
- applymovement 1, Route110_TrickHouseEntrance_Movement_27259E
+ applymovement 1, Common_Movement_FacePlayer
waitmovement 0
playse SE_PIN
- applymovement 1, Route110_TrickHouseEntrance_Movement_272598
+ applymovement 1, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 1, Route110_TrickHouseEntrance_Movement_27259A
+ applymovement 1, Common_Movement_Delay48
waitmovement 0
msgbox Route110_TrickHouseEntrance_Text_26A9AF, MSGBOX_DEFAULT
- applymovement 1, Route110_TrickHouseEntrance_Movement_2725A6
+ applymovement 1, Common_Movement_WalkInPlaceUp
waitmovement 0
releaseall
end
Route110_TrickHouseEntrance_EventScript_269E8F:: @ 8269E8F
- applymovement 1, Route110_TrickHouseEntrance_Movement_27259E
+ applymovement 1, Common_Movement_FacePlayer
waitmovement 0
msgbox Route110_TrickHouseEntrance_Text_26AA82, MSGBOX_DEFAULT
compare VAR_0x4044, 1
@@ -364,7 +364,7 @@ Route110_TrickHouseEntrance_EventScript_269EEF:: @ 8269EEF
compare VAR_RESULT, 1
goto_if_eq Route110_TrickHouseEntrance_EventScript_26A023
compare VAR_RESULT, 0
- call_if_eq Route110_TrickHouseEntrance_EventScript_27205E
+ call_if_eq Common_EventScript_BagIsFull
msgbox Route110_TrickHouseEntrance_Text_26AB00, MSGBOX_DEFAULT
releaseall
end
@@ -374,7 +374,7 @@ Route110_TrickHouseEntrance_EventScript_269F1B:: @ 8269F1B
compare VAR_RESULT, 1
goto_if_eq Route110_TrickHouseEntrance_EventScript_26A023
compare VAR_RESULT, 0
- call_if_eq Route110_TrickHouseEntrance_EventScript_27205E
+ call_if_eq Common_EventScript_BagIsFull
msgbox Route110_TrickHouseEntrance_Text_26AB00, MSGBOX_DEFAULT
releaseall
end
@@ -384,7 +384,7 @@ Route110_TrickHouseEntrance_EventScript_269F47:: @ 8269F47
compare VAR_RESULT, 1
goto_if_eq Route110_TrickHouseEntrance_EventScript_26A023
compare VAR_RESULT, 0
- call_if_eq Route110_TrickHouseEntrance_EventScript_27205E
+ call_if_eq Common_EventScript_BagIsFull
msgbox Route110_TrickHouseEntrance_Text_26AB00, MSGBOX_DEFAULT
releaseall
end
@@ -394,7 +394,7 @@ Route110_TrickHouseEntrance_EventScript_269F73:: @ 8269F73
compare VAR_RESULT, 1
goto_if_eq Route110_TrickHouseEntrance_EventScript_26A023
compare VAR_RESULT, 0
- call_if_eq Route110_TrickHouseEntrance_EventScript_27205E
+ call_if_eq Common_EventScript_BagIsFull
msgbox Route110_TrickHouseEntrance_Text_26AB00, MSGBOX_DEFAULT
releaseall
end
@@ -404,7 +404,7 @@ Route110_TrickHouseEntrance_EventScript_269F9F:: @ 8269F9F
compare VAR_RESULT, 1
goto_if_eq Route110_TrickHouseEntrance_EventScript_26A023
compare VAR_RESULT, 0
- call_if_eq Route110_TrickHouseEntrance_EventScript_27205E
+ call_if_eq Common_EventScript_BagIsFull
msgbox Route110_TrickHouseEntrance_Text_26AB00, MSGBOX_DEFAULT
releaseall
end
@@ -414,7 +414,7 @@ Route110_TrickHouseEntrance_EventScript_269FCB:: @ 8269FCB
compare VAR_RESULT, 1
goto_if_eq Route110_TrickHouseEntrance_EventScript_26A023
compare VAR_RESULT, 0
- call_if_eq Route110_TrickHouseEntrance_EventScript_27205E
+ call_if_eq Common_EventScript_BagIsFull
msgbox Route110_TrickHouseEntrance_Text_26AB00, MSGBOX_DEFAULT
releaseall
end
@@ -424,28 +424,28 @@ Route110_TrickHouseEntrance_EventScript_269FF7:: @ 8269FF7
compare VAR_RESULT, 1
goto_if_eq Route110_TrickHouseEntrance_EventScript_26A023
compare VAR_RESULT, 0
- call_if_eq Route110_TrickHouseEntrance_EventScript_27205E
+ call_if_eq Common_EventScript_BagIsFull
msgbox Route110_TrickHouseEntrance_Text_26AB00, MSGBOX_DEFAULT
releaseall
end
Route110_TrickHouseEntrance_EventScript_26A023:: @ 826A023
- setvar VAR_0x40C1, 0
- setvar VAR_0x40A7, 3
- applymovement 1, Route110_TrickHouseEntrance_Movement_2725A6
+ setvar VAR_TRICK_HOUSE_PRIZE_PICKUP, 0
+ setvar VAR_TRICK_HOUSE_ENTRANCE_STATE_3, 3
+ applymovement 1, Common_Movement_WalkInPlaceUp
waitmovement 0
releaseall
end
Route110_TrickHouseEntrance_EventScript_26A039:: @ 826A039
- applymovement 1, Route110_TrickHouseEntrance_Movement_27259E
+ applymovement 1, Common_Movement_FacePlayer
waitmovement 0
msgbox Route110_TrickHouseEntrance_Text_26AB2C, MSGBOX_DEFAULT
call Route110_TrickHouseEntrance_EventScript_26A070
compare VAR_RESULT, 1
goto_if_eq Route110_TrickHouseEntrance_EventScript_26A09A
compare VAR_RESULT, 0
- call_if_eq Route110_TrickHouseEntrance_EventScript_272071
+ call_if_eq Common_EventScript_NoRoomLeftForAnother
msgbox Route110_TrickHouseEntrance_Text_26ABBD, MSGBOX_DEFAULT
releaseall
end
@@ -475,14 +475,14 @@ Route110_TrickHouseEntrance_EventScript_26A09A:: @ 826A09A
applymovement 1, Route110_TrickHouseEntrance_Movement_269E3F
waitmovement 0
removeobject 1
- setvar VAR_0x40C1, 0
- setvar VAR_0x40A7, 5
+ setvar VAR_TRICK_HOUSE_PRIZE_PICKUP, 0
+ setvar VAR_TRICK_HOUSE_ENTRANCE_STATE_3, 5
releaseall
end
Route110_TrickHouseEntrance_EventScript_26A0D3:: @ 826A0D3
lockall
- switch VAR_0x40A7
+ switch VAR_TRICK_HOUSE_ENTRANCE_STATE_3
case 0, Route110_TrickHouseEntrance_EventScript_26A106
case 1, Route110_TrickHouseEntrance_EventScript_26A110
case 4, Route110_TrickHouseEntrance_EventScript_26A201
@@ -604,88 +604,88 @@ Route110_TrickHouseEntrance_EventScript_26A22A:: @ 826A22A
end
Route110_TrickHouseEntrance_EventScript_26A289:: @ 826A289
- compare VAR_0x40AB, 0
+ compare VAR_TRICK_HOUSE_PUZZLE_1_STATE, 0
goto_if_eq Route110_TrickHouseEntrance_EventScript_26A3D1
msgbox Route110_TrickHousePuzzle1_Text_26B98D, MSGBOX_DEFAULT
playse SE_PIN
- setvar VAR_0x40AB, 2
+ setvar VAR_TRICK_HOUSE_PUZZLE_1_STATE, 2
setmetatile 13, 1, 523, 0
special DrawWholeMapView
releaseall
end
Route110_TrickHouseEntrance_EventScript_26A2B2:: @ 826A2B2
- compare VAR_0x40AC, 0
+ compare VAR_TRICK_HOUSE_PUZZLE_2_STATE, 0
goto_if_eq Route110_TrickHouseEntrance_EventScript_26A3D1
msgbox Route110_TrickHousePuzzle2_Text_26BCBA, MSGBOX_DEFAULT
playse SE_PIN
- setvar VAR_0x40AC, 2
+ setvar VAR_TRICK_HOUSE_PUZZLE_2_STATE, 2
setmetatile 13, 1, 523, 0
special DrawWholeMapView
releaseall
end
Route110_TrickHouseEntrance_EventScript_26A2DB:: @ 826A2DB
- compare VAR_0x40AD, 0
+ compare VAR_TRICK_HOUSE_PUZZLE_3_STATE, 0
goto_if_eq Route110_TrickHouseEntrance_EventScript_26A3D1
msgbox Route110_TrickHousePuzzle3_Text_26C609, MSGBOX_DEFAULT
playse SE_PIN
- setvar VAR_0x40AD, 2
+ setvar VAR_TRICK_HOUSE_PUZZLE_3_STATE, 2
setmetatile 13, 1, 523, 0
special DrawWholeMapView
releaseall
end
Route110_TrickHouseEntrance_EventScript_26A304:: @ 826A304
- compare VAR_0x40AE, 0
+ compare VAR_TRICK_HOUSE_PUZZLE_4_STATE, 0
goto_if_eq Route110_TrickHouseEntrance_EventScript_26A3D1
msgbox Route110_TrickHousePuzzle4_Text_26C8C3, MSGBOX_DEFAULT
playse SE_PIN
- setvar VAR_0x40AE, 2
+ setvar VAR_TRICK_HOUSE_PUZZLE_4_STATE, 2
setmetatile 13, 1, 523, 0
special DrawWholeMapView
releaseall
end
Route110_TrickHouseEntrance_EventScript_26A32D:: @ 826A32D
- compare VAR_0x40AF, 0
+ compare VAR_TRICK_HOUSE_PUZZLE_5_STATE, 0
goto_if_eq Route110_TrickHouseEntrance_EventScript_26A3D1
msgbox Route110_TrickHousePuzzle5_Text_26D660, MSGBOX_DEFAULT
playse SE_PIN
- setvar VAR_0x40AF, 2
+ setvar VAR_TRICK_HOUSE_PUZZLE_5_STATE, 2
setmetatile 13, 1, 523, 0
special DrawWholeMapView
releaseall
end
Route110_TrickHouseEntrance_EventScript_26A356:: @ 826A356
- compare VAR_0x40B0, 0
+ compare VAR_TRICK_HOUSE_PUZZLE_6_STATE, 0
goto_if_eq Route110_TrickHouseEntrance_EventScript_26A3D1
msgbox Route110_TrickHousePuzzle6_Text_26DE26, MSGBOX_DEFAULT
playse SE_PIN
- setvar VAR_0x40B0, 2
+ setvar VAR_TRICK_HOUSE_PUZZLE_6_STATE, 2
setmetatile 13, 1, 523, 0
special DrawWholeMapView
releaseall
end
Route110_TrickHouseEntrance_EventScript_26A37F:: @ 826A37F
- compare VAR_0x40B1, 0
+ compare VAR_TRICK_HOUSE_PUZZLE_7_STATE, 0
goto_if_eq Route110_TrickHouseEntrance_EventScript_26A3D1
msgbox Route110_TrickHousePuzzle7_EventScript_26E413, MSGBOX_DEFAULT
playse SE_PIN
- setvar VAR_0x40B1, 2
+ setvar VAR_TRICK_HOUSE_PUZZLE_7_STATE, 2
setmetatile 13, 1, 523, 0
special DrawWholeMapView
releaseall
end
Route110_TrickHouseEntrance_EventScript_26A3A8:: @ 826A3A8
- compare VAR_0x40B2, 0
+ compare VAR_TRICK_HOUSE_PUZZLE_8_STATE, 0
goto_if_eq Route110_TrickHouseEntrance_EventScript_26A3D1
msgbox Route110_TrickHousePuzzle8_EventScript_26E864, MSGBOX_DEFAULT
playse SE_PIN
- setvar VAR_0x40B2, 2
+ setvar VAR_TRICK_HOUSE_PUZZLE_8_STATE, 2
setmetatile 13, 1, 523, 0
special DrawWholeMapView
releaseall
@@ -733,7 +733,7 @@ Route110_TrickHouseEntrance_EventScript_26A3F8:: @ 826A3F8
call_if_eq Route110_TrickHouseEntrance_EventScript_26A439
compare VAR_0x4044, 2
call_if_eq Route110_TrickHouseEntrance_EventScript_26A449
- setvar VAR_0x40A5, 1
+ setvar VAR_TRICK_HOUSE_ENTRANCE_STATE_1, 1
end
Route110_TrickHouseEntrance_EventScript_26A429:: @ 826A429
diff --git a/data/maps/Route110_TrickHousePuzzle1/scripts.inc b/data/maps/Route110_TrickHousePuzzle1/scripts.inc
index b34a9d555..73526d3ee 100644
--- a/data/maps/Route110_TrickHousePuzzle1/scripts.inc
+++ b/data/maps/Route110_TrickHousePuzzle1/scripts.inc
@@ -1,9 +1,9 @@
Route110_TrickHousePuzzle1_MapScripts:: @ 826B90F
- map_script 1, Route110_TrickHousePuzzle1_MapScript1_26B915
+ map_script MAP_SCRIPT_ON_LOAD, Route110_TrickHousePuzzle1_MapScript1_26B915
.byte 0
Route110_TrickHousePuzzle1_MapScript1_26B915: @ 826B915
- compare VAR_0x40AB, 2
+ compare VAR_TRICK_HOUSE_PUZZLE_1_STATE, 2
goto_if_eq Route110_TrickHousePuzzle1_EventScript_26B921
end
@@ -13,13 +13,13 @@ Route110_TrickHousePuzzle1_EventScript_26B921:: @ 826B921
Route110_TrickHousePuzzle1_EventScript_26B92B:: @ 826B92B
lockall
- compare VAR_0x40AB, 0
+ compare VAR_TRICK_HOUSE_PUZZLE_1_STATE, 0
goto_if_eq Route110_TrickHousePuzzle1_EventScript_26B93D
goto Route110_TrickHousePuzzle1_EventScript_26A3DB
end
Route110_TrickHousePuzzle1_EventScript_26B93D:: @ 826B93D
- setvar VAR_0x40AB, 1
+ setvar VAR_TRICK_HOUSE_PUZZLE_1_STATE, 1
goto Route110_TrickHousePuzzle1_EventScript_26A3E5
end
diff --git a/data/maps/Route110_TrickHousePuzzle2/scripts.inc b/data/maps/Route110_TrickHousePuzzle2/scripts.inc
index 560d10060..2c8ef8cb0 100644
--- a/data/maps/Route110_TrickHousePuzzle2/scripts.inc
+++ b/data/maps/Route110_TrickHousePuzzle2/scripts.inc
@@ -1,6 +1,6 @@
Route110_TrickHousePuzzle2_MapScripts:: @ 826BB73
- map_script 5, Route110_TrickHousePuzzle2_MapScript1_26BB7E
- map_script 3, Route110_TrickHousePuzzle2_MapScript1_26BBAB
+ map_script MAP_SCRIPT_ON_RESUME, Route110_TrickHousePuzzle2_MapScript1_26BB7E
+ map_script MAP_SCRIPT_ON_TRANSITION, Route110_TrickHousePuzzle2_MapScript1_26BBAB
.byte 0
Route110_TrickHousePuzzle2_MapScript1_26BB7E: @ 826BB7E
@@ -23,13 +23,13 @@ Route110_TrickHousePuzzle2_MapScript1_26BBAB: @ 826BBAB
Route110_TrickHousePuzzle2_EventScript_26BBC0:: @ 826BBC0
lockall
- compare VAR_0x40AC, 0
+ compare VAR_TRICK_HOUSE_PUZZLE_2_STATE, 0
goto_if_eq Route110_TrickHousePuzzle2_EventScript_26BBD2
goto Route110_TrickHousePuzzle2_EventScript_26A3DB
end
Route110_TrickHousePuzzle2_EventScript_26BBD2:: @ 826BBD2
- setvar VAR_0x40AC, 1
+ setvar VAR_TRICK_HOUSE_PUZZLE_2_STATE, 1
goto Route110_TrickHousePuzzle2_EventScript_26A3E5
end
diff --git a/data/maps/Route110_TrickHousePuzzle3/scripts.inc b/data/maps/Route110_TrickHousePuzzle3/scripts.inc
index b26c5473d..d93ef95e8 100644
--- a/data/maps/Route110_TrickHousePuzzle3/scripts.inc
+++ b/data/maps/Route110_TrickHousePuzzle3/scripts.inc
@@ -1,6 +1,6 @@
Route110_TrickHousePuzzle3_MapScripts:: @ 826BED8
- map_script 5, Route110_TrickHousePuzzle3_MapScript1_26BEE3
- map_script 3, Route110_TrickHousePuzzle3_MapScript1_26BEFF
+ map_script MAP_SCRIPT_ON_RESUME, Route110_TrickHousePuzzle3_MapScript1_26BEE3
+ map_script MAP_SCRIPT_ON_TRANSITION, Route110_TrickHousePuzzle3_MapScript1_26BEFF
.byte 0
Route110_TrickHousePuzzle3_MapScript1_26BEE3: @ 826BEE3
@@ -291,13 +291,13 @@ Route110_TrickHousePuzzle3_EventScript_26C5A0:: @ 826C5A0
Route110_TrickHousePuzzle3_EventScript_26C5A7:: @ 826C5A7
lockall
- compare VAR_0x40AD, 0
+ compare VAR_TRICK_HOUSE_PUZZLE_3_STATE, 0
goto_if_eq Route110_TrickHousePuzzle3_EventScript_26C5B9
goto Route110_TrickHousePuzzle3_EventScript_26A3DB
end
Route110_TrickHousePuzzle3_EventScript_26C5B9:: @ 826C5B9
- setvar VAR_0x40AD, 1
+ setvar VAR_TRICK_HOUSE_PUZZLE_3_STATE, 1
goto Route110_TrickHousePuzzle3_EventScript_26A3E5
end
diff --git a/data/maps/Route110_TrickHousePuzzle4/scripts.inc b/data/maps/Route110_TrickHousePuzzle4/scripts.inc
index 71bb32db8..fcb10b3ab 100644
--- a/data/maps/Route110_TrickHousePuzzle4/scripts.inc
+++ b/data/maps/Route110_TrickHousePuzzle4/scripts.inc
@@ -3,13 +3,13 @@ Route110_TrickHousePuzzle4_MapScripts:: @ 826C860
Route110_TrickHousePuzzle4_EventScript_26C861:: @ 826C861
lockall
- compare VAR_0x40AE, 0
+ compare VAR_TRICK_HOUSE_PUZZLE_4_STATE, 0
goto_if_eq Route110_TrickHousePuzzle4_EventScript_26C873
goto Route110_TrickHousePuzzle4_EventScript_26A3DB
end
Route110_TrickHousePuzzle4_EventScript_26C873:: @ 826C873
- setvar VAR_0x40AE, 1
+ setvar VAR_TRICK_HOUSE_PUZZLE_4_STATE, 1
goto Route110_TrickHousePuzzle4_EventScript_26A3E5
end
diff --git a/data/maps/Route110_TrickHousePuzzle5/scripts.inc b/data/maps/Route110_TrickHousePuzzle5/scripts.inc
index 4c199a993..86b950e8a 100644
--- a/data/maps/Route110_TrickHousePuzzle5/scripts.inc
+++ b/data/maps/Route110_TrickHousePuzzle5/scripts.inc
@@ -1,5 +1,5 @@
Route110_TrickHousePuzzle5_MapScripts:: @ 826CAF0
- map_script 3, Route110_TrickHousePuzzle5_MapScript1_26CAF6
+ map_script MAP_SCRIPT_ON_TRANSITION, Route110_TrickHousePuzzle5_MapScript1_26CAF6
.byte 0
Route110_TrickHousePuzzle5_MapScript1_26CAF6: @ 826CAF6
@@ -13,19 +13,19 @@ Route110_TrickHousePuzzle5_MapScript1_26CAF6: @ 826CAF6
Route110_TrickHousePuzzle5_EventScript_26CB15:: @ 826CB15
lockall
- compare VAR_0x40AF, 0
+ compare VAR_TRICK_HOUSE_PUZZLE_5_STATE, 0
goto_if_eq Route110_TrickHousePuzzle5_EventScript_26CB27
goto Route110_TrickHousePuzzle5_EventScript_26A3DB
end
Route110_TrickHousePuzzle5_EventScript_26CB27:: @ 826CB27
- setvar VAR_0x40AF, 1
+ setvar VAR_TRICK_HOUSE_PUZZLE_5_STATE, 1
goto Route110_TrickHousePuzzle5_EventScript_26A3E5
end
Route110_TrickHousePuzzle5_EventScript_26CB32:: @ 826CB32
lockall
- applymovement 1, Route110_TrickHousePuzzle5_Movement_27259E
+ applymovement 1, Common_Movement_FacePlayer
waitmovement 0
compare VAR_TEMP_1, 1
goto_if_eq Route110_TrickHousePuzzle5_EventScript_26D1AA
@@ -35,7 +35,7 @@ Route110_TrickHousePuzzle5_EventScript_26CB32:: @ 826CB32
Route110_TrickHousePuzzle5_EventScript_26CB53:: @ 826CB53
lockall
- applymovement 2, Route110_TrickHousePuzzle5_Movement_27259E
+ applymovement 2, Common_Movement_FacePlayer
waitmovement 0
compare VAR_TEMP_2, 1
goto_if_eq Route110_TrickHousePuzzle5_EventScript_26D1AA
@@ -45,7 +45,7 @@ Route110_TrickHousePuzzle5_EventScript_26CB53:: @ 826CB53
Route110_TrickHousePuzzle5_EventScript_26CB74:: @ 826CB74
lockall
- applymovement 3, Route110_TrickHousePuzzle5_Movement_27259E
+ applymovement 3, Common_Movement_FacePlayer
waitmovement 0
compare VAR_TEMP_3, 1
goto_if_eq Route110_TrickHousePuzzle5_EventScript_26D1AA
@@ -55,7 +55,7 @@ Route110_TrickHousePuzzle5_EventScript_26CB74:: @ 826CB74
Route110_TrickHousePuzzle5_EventScript_26CB95:: @ 826CB95
lockall
- applymovement 4, Route110_TrickHousePuzzle5_Movement_27259E
+ applymovement 4, Common_Movement_FacePlayer
waitmovement 0
compare VAR_TEMP_4, 1
goto_if_eq Route110_TrickHousePuzzle5_EventScript_26D1AA
@@ -65,7 +65,7 @@ Route110_TrickHousePuzzle5_EventScript_26CB95:: @ 826CB95
Route110_TrickHousePuzzle5_EventScript_26CBB6:: @ 826CBB6
lockall
- applymovement 5, Route110_TrickHousePuzzle5_Movement_27259E
+ applymovement 5, Common_Movement_FacePlayer
waitmovement 0
compare VAR_TEMP_5, 1
goto_if_eq Route110_TrickHousePuzzle5_EventScript_26D1AA
@@ -215,9 +215,9 @@ Route110_TrickHousePuzzle5_EventScript_26CCEB:: @ 826CCEB
setvar VAR_TEMP_1, 1
setvar VAR_TEMP_8, 1
playse SE_PIN
- applymovement 1, Route110_TrickHousePuzzle5_Movement_272598
+ applymovement 1, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 1, Route110_TrickHousePuzzle5_Movement_27259A
+ applymovement 1, Common_Movement_Delay48
waitmovement 0
compare VAR_TEMP_9, 1
call_if_eq Route110_TrickHousePuzzle5_EventScript_26D1B4
@@ -239,9 +239,9 @@ Route110_TrickHousePuzzle5_EventScript_26CD6A:: @ 826CD6A
setvar VAR_TEMP_2, 1
setvar VAR_TEMP_8, 2
playse SE_PIN
- applymovement 2, Route110_TrickHousePuzzle5_Movement_272598
+ applymovement 2, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 2, Route110_TrickHousePuzzle5_Movement_27259A
+ applymovement 2, Common_Movement_Delay48
waitmovement 0
compare VAR_TEMP_9, 1
call_if_eq Route110_TrickHousePuzzle5_EventScript_26D2CC
@@ -265,9 +265,9 @@ Route110_TrickHousePuzzle5_EventScript_26CDF4:: @ 826CDF4
setvar VAR_TEMP_3, 1
setvar VAR_TEMP_8, 3
playse SE_PIN
- applymovement 3, Route110_TrickHousePuzzle5_Movement_272598
+ applymovement 3, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 3, Route110_TrickHousePuzzle5_Movement_27259A
+ applymovement 3, Common_Movement_Delay48
waitmovement 0
compare VAR_TEMP_9, 1
call_if_eq Route110_TrickHousePuzzle5_EventScript_26D1B4
@@ -289,9 +289,9 @@ Route110_TrickHousePuzzle5_EventScript_26CE73:: @ 826CE73
setvar VAR_TEMP_4, 1
setvar VAR_TEMP_8, 4
playse SE_PIN
- applymovement 4, Route110_TrickHousePuzzle5_Movement_272598
+ applymovement 4, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 4, Route110_TrickHousePuzzle5_Movement_27259A
+ applymovement 4, Common_Movement_Delay48
waitmovement 0
compare VAR_TEMP_9, 1
call_if_eq Route110_TrickHousePuzzle5_EventScript_26D1B4
@@ -313,9 +313,9 @@ Route110_TrickHousePuzzle5_EventScript_26CEF2:: @ 826CEF2
setvar VAR_TEMP_5, 1
setvar VAR_TEMP_8, 5
playse SE_PIN
- applymovement 5, Route110_TrickHousePuzzle5_Movement_272598
+ applymovement 5, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 5, Route110_TrickHousePuzzle5_Movement_27259A
+ applymovement 5, Common_Movement_Delay48
waitmovement 0
msgbox Route110_TrickHousePuzzle5_Text_26DC78, MSGBOX_DEFAULT
random 3
diff --git a/data/maps/Route110_TrickHousePuzzle6/scripts.inc b/data/maps/Route110_TrickHousePuzzle6/scripts.inc
index 2cb784b50..a5b433d13 100644
--- a/data/maps/Route110_TrickHousePuzzle6/scripts.inc
+++ b/data/maps/Route110_TrickHousePuzzle6/scripts.inc
@@ -1,6 +1,6 @@
Route110_TrickHousePuzzle6_MapScripts:: @ 826DDA7
- map_script 3, Route110_TrickHousePuzzle6_MapScript1_26DDB2
- map_script 4, Route110_TrickHousePuzzle6_MapScript2_26DDB6
+ map_script MAP_SCRIPT_ON_TRANSITION, Route110_TrickHousePuzzle6_MapScript1_26DDB2
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, Route110_TrickHousePuzzle6_MapScript2_26DDB6
.byte 0
Route110_TrickHousePuzzle6_MapScript1_26DDB2: @ 826DDB2
@@ -17,13 +17,13 @@ Route110_TrickHousePuzzle6_EventScript_26DDC0:: @ 826DDC0
Route110_TrickHousePuzzle6_EventScript_26DDC4:: @ 826DDC4
lockall
- compare VAR_0x40B0, 0
+ compare VAR_TRICK_HOUSE_PUZZLE_6_STATE, 0
goto_if_eq Route110_TrickHousePuzzle6_EventScript_26DDD6
goto Route110_TrickHousePuzzle6_EventScript_26A3DB
end
Route110_TrickHousePuzzle6_EventScript_26DDD6:: @ 826DDD6
- setvar VAR_0x40B0, 1
+ setvar VAR_TRICK_HOUSE_PUZZLE_6_STATE, 1
goto Route110_TrickHousePuzzle6_EventScript_26A3E5
end
diff --git a/data/maps/Route110_TrickHousePuzzle7/scripts.inc b/data/maps/Route110_TrickHousePuzzle7/scripts.inc
index 3babdbd45..b4bd782cf 100644
--- a/data/maps/Route110_TrickHousePuzzle7/scripts.inc
+++ b/data/maps/Route110_TrickHousePuzzle7/scripts.inc
@@ -1,8 +1,8 @@
Route110_TrickHousePuzzle7_MapScripts:: @ 826E091
- map_script 5, Route110_TrickHousePuzzle7_MapScript1_26E0A6
- map_script 3, Route110_TrickHousePuzzle7_MapScript1_26E198
- map_script 1, Route110_TrickHousePuzzle7_MapScript1_26E1B4
- map_script 2, Route110_TrickHousePuzzle7_MapScript2_26E1C0
+ map_script MAP_SCRIPT_ON_RESUME, Route110_TrickHousePuzzle7_MapScript1_26E0A6
+ map_script MAP_SCRIPT_ON_TRANSITION, Route110_TrickHousePuzzle7_MapScript1_26E198
+ map_script MAP_SCRIPT_ON_LOAD, Route110_TrickHousePuzzle7_MapScript1_26E1B4
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, Route110_TrickHousePuzzle7_MapScript2_26E1C0
.byte 0
Route110_TrickHousePuzzle7_MapScript1_26E0A6: @ 826E0A6
@@ -68,7 +68,7 @@ Route110_TrickHousePuzzle7_EventScript_26E185:: @ 826E185
return
Route110_TrickHousePuzzle7_MapScript1_26E198: @ 826E198
- compare VAR_0x40B6, 1
+ compare VAR_TRICK_HOUSE_PUZZLE_7_STATE_2, 1
goto_if_eq Route110_TrickHousePuzzle7_EventScript_26E1B3
clearflag FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_1
clearflag FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_2
@@ -81,33 +81,33 @@ Route110_TrickHousePuzzle7_EventScript_26E1B3:: @ 826E1B3
end
Route110_TrickHousePuzzle7_MapScript1_26E1B4: @ 826E1B4
- compare VAR_0x40B6, 1
+ compare VAR_TRICK_HOUSE_PUZZLE_7_STATE_2, 1
call_if_eq Route110_TrickHousePuzzle7_EventScript_26E0AC
end
Route110_TrickHousePuzzle7_MapScript2_26E1C0: @ 826E1C0
- map_script_2 VAR_0x40B6, 1, Route110_TrickHousePuzzle7_EventScript_26E1CA
+ map_script_2 VAR_TRICK_HOUSE_PUZZLE_7_STATE_2, 1, Route110_TrickHousePuzzle7_EventScript_26E1CA
.2byte 0
Route110_TrickHousePuzzle7_EventScript_26E1CA:: @ 826E1CA
- setvar VAR_0x40B6, 0
+ setvar VAR_TRICK_HOUSE_PUZZLE_7_STATE_2, 0
end
Route110_TrickHousePuzzle7_EventScript_26E1D0:: @ 826E1D0
lockall
- compare VAR_0x40B1, 0
+ compare VAR_TRICK_HOUSE_PUZZLE_7_STATE, 0
goto_if_eq Route110_TrickHousePuzzle7_EventScript_26E1E2
goto Route110_TrickHousePuzzle7_EventScript_26A3DB
end
Route110_TrickHousePuzzle7_EventScript_26E1E2:: @ 826E1E2
- setvar VAR_0x40B1, 1
+ setvar VAR_TRICK_HOUSE_PUZZLE_7_STATE, 1
goto Route110_TrickHousePuzzle7_EventScript_26A3E5
end
Route110_TrickHousePuzzle7_EventScript_26E1ED:: @ 826E1ED
lockall
- setvar VAR_0x40B6, 1
+ setvar VAR_TRICK_HOUSE_PUZZLE_7_STATE_2, 1
warpteleport MAP_ROUTE110_TRICK_HOUSE_PUZZLE7, 255, 3, 19
waitstate
releaseall
diff --git a/data/maps/Route110_TrickHousePuzzle8/scripts.inc b/data/maps/Route110_TrickHousePuzzle8/scripts.inc
index 7efb9f67b..dcb12e366 100644
--- a/data/maps/Route110_TrickHousePuzzle8/scripts.inc
+++ b/data/maps/Route110_TrickHousePuzzle8/scripts.inc
@@ -3,13 +3,13 @@ Route110_TrickHousePuzzle8_MapScripts:: @ 826E801
Route110_TrickHousePuzzle8_EventScript_26E802:: @ 826E802
lockall
- compare VAR_0x40B2, 0
+ compare VAR_TRICK_HOUSE_PUZZLE_8_STATE, 0
goto_if_eq Route110_TrickHousePuzzle8_EventScript_26E814
goto Route110_TrickHousePuzzle8_EventScript_26A3DB
end
Route110_TrickHousePuzzle8_EventScript_26E814:: @ 826E814
- setvar VAR_0x40B2, 1
+ setvar VAR_TRICK_HOUSE_PUZZLE_8_STATE, 1
goto Route110_TrickHousePuzzle8_EventScript_26A3E5
end
diff --git a/data/maps/Route111/scripts.inc b/data/maps/Route111/scripts.inc
index 74ee42c64..754369014 100644
--- a/data/maps/Route111/scripts.inc
+++ b/data/maps/Route111/scripts.inc
@@ -1,8 +1,8 @@
Route111_MapScripts:: @ 81F0CA7
- map_script 1, Route111_MapScript1_1F0CBC
- map_script 3, Route111_MapScript1_1F0D87
- map_script 4, Route111_MapScript2_1F0E46
- map_script 2, Route111_MapScript2_1F0E56
+ map_script MAP_SCRIPT_ON_LOAD, Route111_MapScript1_1F0CBC
+ map_script MAP_SCRIPT_ON_TRANSITION, Route111_MapScript1_1F0D87
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, Route111_MapScript2_1F0E46
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, Route111_MapScript2_1F0E56
.byte 0
Route111_MapScript1_1F0CBC: @ 81F0CBC
@@ -164,7 +164,7 @@ Route111_EventScript_1F0EB9:: @ 81F0EB9
msgbox Route111_Text_2A6EBD, MSGBOX_DEFAULT
giveitem_std ITEM_RAZZ_BERRY
compare VAR_RESULT, 0
- goto_if_eq Route111_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
setflag FLAG_DAILY_ROUTE_111_RECEIVED_BERRY
special GetPlayerBigGuyGirlString
msgbox Route111_Text_2A6F3D, MSGBOX_DEFAULT
@@ -285,7 +285,7 @@ Route111_EventScript_1F0FC5:: @ 81F0FC5
Route111_EventScript_1F0FE7:: @ 81F0FE7
msgbox Route111_Text_1F1523, MSGBOX_DEFAULT
trainerbattle_no_intro TRAINER_VICTOR, Route111_Text_1F1542
- applymovement 1, Route111_Movement_2725A6
+ applymovement 1, Common_Movement_WalkInPlaceUp
waitmovement 0
call Route111_EventScript_1F113C
msgbox Route111_Text_1F156F, MSGBOX_DEFAULT
@@ -303,7 +303,7 @@ Route111_EventScript_1F0FE7:: @ 81F0FE7
call Route111_EventScript_1F1143
msgbox Route111_Text_1F159D, MSGBOX_DEFAULT
trainerbattle_no_intro TRAINER_VICTORIA, Route111_Text_1F1616
- applymovement 2, Route111_Movement_2725A6
+ applymovement 2, Common_Movement_WalkInPlaceUp
waitmovement 0
call Route111_EventScript_1F113C
msgbox Route111_Text_1F1645, MSGBOX_DEFAULT
@@ -321,7 +321,7 @@ Route111_EventScript_1F0FE7:: @ 81F0FE7
call Route111_EventScript_1F1143
msgbox Route111_Text_1F167E, MSGBOX_DEFAULT
trainerbattle_no_intro TRAINER_VIVI, Route111_Text_1F16C6
- applymovement 3, Route111_Movement_2725A6
+ applymovement 3, Common_Movement_WalkInPlaceUp
waitmovement 0
call Route111_EventScript_1F113C
msgbox Route111_Text_1F16DC, MSGBOX_DEFAULT
@@ -341,7 +341,7 @@ Route111_EventScript_1F0FE7:: @ 81F0FE7
trainerbattle_no_intro TRAINER_VICKY, Route111_Text_1F1756
msgbox Route111_Text_1F1788, MSGBOX_DEFAULT
closemessage
- applymovement 4, Route111_Movement_2725A6
+ applymovement 4, Common_Movement_WalkInPlaceUp
waitmovement 0
call Route111_EventScript_1F113C
applymovement 4, Route111_Movement_1F114A
@@ -437,11 +437,11 @@ Route111_EventScript_1F11DA:: @ 81F11DA
Route111_EventScript_1F11E4:: @ 81F11E4
lockall
- applymovement 46, Route111_Movement_27259E
+ applymovement 46, Common_Movement_FacePlayer
waitmovement 0
msgbox Route111_Text_1F1CCA, MSGBOX_DEFAULT
closemessage
- applymovement 46, Route111_Movement_2725A2
+ applymovement 46, Common_Movement_FaceOriginalDirection
waitmovement 0
releaseall
end
diff --git a/data/maps/Route111_OldLadysRestStop/scripts.inc b/data/maps/Route111_OldLadysRestStop/scripts.inc
index 5a89f40ed..9427e8692 100644
--- a/data/maps/Route111_OldLadysRestStop/scripts.inc
+++ b/data/maps/Route111_OldLadysRestStop/scripts.inc
@@ -1,5 +1,5 @@
Route111_OldLadysRestStop_MapScripts:: @ 822A916
- map_script 3, Route111_OldLadysRestStop_MapScript1_22A91C
+ map_script MAP_SCRIPT_ON_TRANSITION, Route111_OldLadysRestStop_MapScript1_22A91C
.byte 0
Route111_OldLadysRestStop_MapScript1_22A91C: @ 822A91C
@@ -19,7 +19,7 @@ Route111_OldLadysRestStop_EventScript_22A920:: @ 822A920
Route111_OldLadysRestStop_EventScript_22A941:: @ 822A941
msgbox Route111_OldLadysRestStop_Text_22A9EC, MSGBOX_DEFAULT
closemessage
- call Route111_OldLadysRestStop_EventScript_272083
+ call Common_EventScript_OutOfCenterPartyHeal
msgbox Route111_OldLadysRestStop_Text_22AA16, MSGBOX_YESNO
compare VAR_RESULT, 1
goto_if_eq Route111_OldLadysRestStop_EventScript_22A941
diff --git a/data/maps/Route111_WinstrateFamilysHouse/scripts.inc b/data/maps/Route111_WinstrateFamilysHouse/scripts.inc
index b54fe564e..312bf739f 100644
--- a/data/maps/Route111_WinstrateFamilysHouse/scripts.inc
+++ b/data/maps/Route111_WinstrateFamilysHouse/scripts.inc
@@ -17,7 +17,7 @@ Route111_WinstrateFamilysHouse_EventScript_22A4A2:: @ 822A4A2
msgbox Route111_WinstrateFamilysHouse_Text_22A5F4, MSGBOX_DEFAULT
giveitem_std ITEM_MACHO_BRACE
compare VAR_RESULT, 0
- goto_if_eq Route111_WinstrateFamilysHouse_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
setflag FLAG_RECEIVED_MACHO_BRACE
goto Route111_WinstrateFamilysHouse_EventScript_22A52C
end
@@ -52,7 +52,7 @@ Route111_WinstrateFamilysHouse_EventScript_22A51E:: @ 822A51E
Route111_WinstrateFamilysHouse_EventScript_22A52C:: @ 822A52C
closemessage
- applymovement VAR_0x8008, Route111_WinstrateFamilysHouse_Movement_2725A2
+ applymovement VAR_0x8008, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
diff --git a/data/maps/Route112/scripts.inc b/data/maps/Route112/scripts.inc
index 995102fe7..abc3ca4cd 100644
--- a/data/maps/Route112/scripts.inc
+++ b/data/maps/Route112/scripts.inc
@@ -1,45 +1,45 @@
Route112_MapScripts:: @ 81F1DA8
- map_script 3, Route112_MapScript1_1F1DAE
+ map_script MAP_SCRIPT_ON_TRANSITION, Route112_MapScript1_1F1DAE
.byte 0
Route112_MapScript1_1F1DAE: @ 81F1DAE
clearflag FLAG_FORCE_MIRAGE_TOWER_VISIBLE
- setvar VAR_0x40BD, 0
+ setvar VAR_JAGGED_PASS_ASH_WEATHER, 0
end
Route112_EventScript_1F1DB7:: @ 81F1DB7
lockall
delay 40
- applymovement 1, Route112_Movement_2725A8
+ applymovement 1, Common_Movement_WalkInPlaceRight
waitmovement 0
delay 20
msgbox Route112_Text_1F1F3F, MSGBOX_DEFAULT
closemessage
- applymovement 1, Route112_Movement_2725A2
+ applymovement 1, Common_Movement_FaceOriginalDirection
waitmovement 0
delay 40
- applymovement 6, Route112_Movement_2725A4
+ applymovement 6, Common_Movement_WalkInPlaceLeft
waitmovement 0
delay 20
msgbox Route112_Text_1F1F7A, MSGBOX_DEFAULT
closemessage
- applymovement 6, Route112_Movement_2725A2
+ applymovement 6, Common_Movement_FaceOriginalDirection
waitmovement 0
delay 40
- applymovement 1, Route112_Movement_2725A8
+ applymovement 1, Common_Movement_WalkInPlaceRight
waitmovement 0
delay 20
msgbox Route112_Text_1F1FBA, MSGBOX_DEFAULT
closemessage
- applymovement 1, Route112_Movement_2725A2
+ applymovement 1, Common_Movement_FaceOriginalDirection
waitmovement 0
delay 40
- applymovement 6, Route112_Movement_2725A4
+ applymovement 6, Common_Movement_WalkInPlaceLeft
waitmovement 0
delay 20
msgbox Route112_Text_1F2003, MSGBOX_DEFAULT
closemessage
- applymovement 6, Route112_Movement_2725A2
+ applymovement 6, Common_Movement_FaceOriginalDirection
waitmovement 0
releaseall
end
diff --git a/data/maps/Route112_CableCarStation/scripts.inc b/data/maps/Route112_CableCarStation/scripts.inc
index a430a497e..f3cdae8f9 100644
--- a/data/maps/Route112_CableCarStation/scripts.inc
+++ b/data/maps/Route112_CableCarStation/scripts.inc
@@ -1,11 +1,11 @@
Route112_CableCarStation_MapScripts:: @ 822AABE
- map_script 3, Route112_CableCarStation_MapScript1_22AAC9
- map_script 2, Route112_CableCarStation_MapScript2_22AAE9
+ map_script MAP_SCRIPT_ON_TRANSITION, Route112_CableCarStation_MapScript1_22AAC9
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, Route112_CableCarStation_MapScript2_22AAE9
.byte 0
Route112_CableCarStation_MapScript1_22AAC9: @ 822AAC9
setescapewarp MAP_ROUTE112, 255, 28, 28
- compare VAR_0x40A3, 2
+ compare VAR_CABLE_CAR_STATION_STATE, 2
call_if_eq Route112_CableCarStation_EventScript_22AADD
end
@@ -15,7 +15,7 @@ Route112_CableCarStation_EventScript_22AADD:: @ 822AADD
return
Route112_CableCarStation_MapScript2_22AAE9: @ 822AAE9
- map_script_2 VAR_0x40A3, 2, Route112_CableCarStation_EventScript_22AAF3
+ map_script_2 VAR_CABLE_CAR_STATION_STATE, 2, Route112_CableCarStation_EventScript_22AAF3
.2byte 0
Route112_CableCarStation_EventScript_22AAF3:: @ 822AAF3
@@ -23,7 +23,7 @@ Route112_CableCarStation_EventScript_22AAF3:: @ 822AAF3
applymovement EVENT_OBJ_ID_PLAYER, Route112_CableCarStation_Movement_22AB80
applymovement 1, Route112_CableCarStation_Movement_22AB76
waitmovement 0
- setvar VAR_0x40A3, 0
+ setvar VAR_CABLE_CAR_STATION_STATE, 0
setobjectxyperm 1, 6, 7
setobjectmovementtype 1, MOVEMENT_TYPE_FACE_DOWN
releaseall
@@ -46,7 +46,7 @@ Route112_CableCarStation_EventScript_22AB38:: @ 822AB38
applymovement EVENT_OBJ_ID_PLAYER, Route112_CableCarStation_Movement_22AB7B
waitmovement 0
setvar VAR_0x8004, 0
- setvar VAR_0x40A3, 1
+ setvar VAR_CABLE_CAR_STATION_STATE, 1
incrementgamestat 48
special CableCarWarp
special CableCar
diff --git a/data/maps/Route113/scripts.inc b/data/maps/Route113/scripts.inc
index ac27784da..6efd05d6e 100644
--- a/data/maps/Route113/scripts.inc
+++ b/data/maps/Route113/scripts.inc
@@ -1,6 +1,6 @@
Route113_MapScripts:: @ 81F2153
- map_script 5, Route113_MapScript1_1F215E
- map_script 3, Route113_MapScript1_1F2161
+ map_script MAP_SCRIPT_ON_RESUME, Route113_MapScript1_1F215E
+ map_script MAP_SCRIPT_ON_TRANSITION, Route113_MapScript1_1F2161
.byte 0
Route113_MapScript1_1F215E: @ 81F215E
diff --git a/data/maps/Route113_GlassWorkshop/scripts.inc b/data/maps/Route113_GlassWorkshop/scripts.inc
index 959c27799..46134a3d5 100644
--- a/data/maps/Route113_GlassWorkshop/scripts.inc
+++ b/data/maps/Route113_GlassWorkshop/scripts.inc
@@ -1,29 +1,29 @@
Route113_GlassWorkshop_MapScripts:: @ 826ED03
- map_script 3, Route113_GlassWorkshop_MapScript1_26ED09
+ map_script MAP_SCRIPT_ON_TRANSITION, Route113_GlassWorkshop_MapScript1_26ED09
.byte 0
Route113_GlassWorkshop_MapScript1_26ED09: @ 826ED09
setflag FLAG_LANDMARK_GLASS_WORKSHOP
- compare VAR_0x40BE, 1
+ compare VAR_GLASS_WORKSHOP_STATE, 1
call_if_eq Route113_GlassWorkshop_EventScript_26ED18
end
Route113_GlassWorkshop_EventScript_26ED18:: @ 826ED18
- setvar VAR_0x40BE, 2
+ setvar VAR_GLASS_WORKSHOP_STATE, 2
return
Route113_GlassWorkshop_EventScript_26ED1E:: @ 826ED1E
lock
faceplayer
- compare VAR_0x40BE, 10
+ compare VAR_GLASS_WORKSHOP_STATE, 10
goto_if_ge Route113_GlassWorkshop_EventScript_26F090
- compare VAR_0x40BE, 2
+ compare VAR_GLASS_WORKSHOP_STATE, 2
goto_if_eq Route113_GlassWorkshop_EventScript_26ED6E
- compare VAR_0x40BE, 1
+ compare VAR_GLASS_WORKSHOP_STATE, 1
goto_if_eq Route113_GlassWorkshop_EventScript_26ED64
msgbox Route113_GlassWorkshop_Text_26F19D, MSGBOX_DEFAULT
giveitem_std ITEM_SOOT_SACK
- setvar VAR_0x40BE, 1
+ setvar VAR_GLASS_WORKSHOP_STATE, 1
msgbox Route113_GlassWorkshop_Text_26F252, MSGBOX_DEFAULT
release
end
@@ -76,7 +76,7 @@ Route113_GlassWorkshop_EventScript_26EE1E:: @ 826EE1E
msgbox Route113_GlassWorkshop_Text_26F480, MSGBOX_YESNO
compare VAR_RESULT, 0
goto_if_eq Route113_GlassWorkshop_EventScript_26F003
- setvar VAR_0x40BE, 10
+ setvar VAR_GLASS_WORKSHOP_STATE, 10
subvar VAR_ASH_GATHER_COUNT, 250
goto Route113_GlassWorkshop_EventScript_26F00F
end
@@ -90,7 +90,7 @@ Route113_GlassWorkshop_EventScript_26EE5A:: @ 826EE5A
msgbox Route113_GlassWorkshop_Text_26F480, MSGBOX_YESNO
compare VAR_RESULT, 0
goto_if_eq Route113_GlassWorkshop_EventScript_26F003
- setvar VAR_0x40BE, 11
+ setvar VAR_GLASS_WORKSHOP_STATE, 11
subvar VAR_ASH_GATHER_COUNT, 500
goto Route113_GlassWorkshop_EventScript_26F00F
end
@@ -104,7 +104,7 @@ Route113_GlassWorkshop_EventScript_26EE96:: @ 826EE96
msgbox Route113_GlassWorkshop_Text_26F480, MSGBOX_YESNO
compare VAR_RESULT, 0
goto_if_eq Route113_GlassWorkshop_EventScript_26F003
- setvar VAR_0x40BE, 12
+ setvar VAR_GLASS_WORKSHOP_STATE, 12
subvar VAR_ASH_GATHER_COUNT, 500
goto Route113_GlassWorkshop_EventScript_26F00F
end
@@ -118,7 +118,7 @@ Route113_GlassWorkshop_EventScript_26EED2:: @ 826EED2
msgbox Route113_GlassWorkshop_Text_26F480, MSGBOX_YESNO
compare VAR_RESULT, 0
goto_if_eq Route113_GlassWorkshop_EventScript_26F003
- setvar VAR_0x40BE, 13
+ setvar VAR_GLASS_WORKSHOP_STATE, 13
subvar VAR_ASH_GATHER_COUNT, 1000
goto Route113_GlassWorkshop_EventScript_26F00F
end
@@ -132,7 +132,7 @@ Route113_GlassWorkshop_EventScript_26EF0E:: @ 826EF0E
msgbox Route113_GlassWorkshop_Text_26F480, MSGBOX_YESNO
compare VAR_RESULT, 0
goto_if_eq Route113_GlassWorkshop_EventScript_26F003
- setvar VAR_0x40BE, 14
+ setvar VAR_GLASS_WORKSHOP_STATE, 14
subvar VAR_ASH_GATHER_COUNT, 1000
goto Route113_GlassWorkshop_EventScript_26F00F
end
@@ -147,7 +147,7 @@ Route113_GlassWorkshop_EventScript_26EF4A:: @ 826EF4A
msgbox Route113_GlassWorkshop_Text_26F480, MSGBOX_YESNO
compare VAR_RESULT, 0
goto_if_eq Route113_GlassWorkshop_EventScript_26F003
- setvar VAR_0x40BE, 15
+ setvar VAR_GLASS_WORKSHOP_STATE, 15
subvar VAR_ASH_GATHER_COUNT, 6000
goto Route113_GlassWorkshop_EventScript_26F00F
end
@@ -162,7 +162,7 @@ Route113_GlassWorkshop_EventScript_26EF8B:: @ 826EF8B
msgbox Route113_GlassWorkshop_Text_26F480, MSGBOX_YESNO
compare VAR_RESULT, 0
goto_if_eq Route113_GlassWorkshop_EventScript_26F003
- setvar VAR_0x40BE, 16
+ setvar VAR_GLASS_WORKSHOP_STATE, 16
subvar VAR_ASH_GATHER_COUNT, 8000
goto Route113_GlassWorkshop_EventScript_26F00F
end
@@ -206,7 +206,7 @@ Route113_GlassWorkshop_EventScript_26F00F:: @ 826F00F
call_if_eq Route113_GlassWorkshop_EventScript_26F047
compare VAR_0x8009, 1
call_if_eq Route113_GlassWorkshop_EventScript_26F05F
- setvar VAR_0x40BE, 2
+ setvar VAR_GLASS_WORKSHOP_STATE, 2
release
end
@@ -223,19 +223,19 @@ Route113_GlassWorkshop_EventScript_26F05F:: @ 826F05F
return
Route113_GlassWorkshop_EventScript_26F072:: @ 826F072
- call Route113_GlassWorkshop_EventScript_27205E
+ call Common_EventScript_BagIsFull
msgbox Route113_GlassWorkshop_Text_26F6B7, MSGBOX_DEFAULT
release
end
Route113_GlassWorkshop_EventScript_26F081:: @ 826F081
- call Route113_GlassWorkshop_EventScript_272071
+ call Common_EventScript_NoRoomLeftForAnother
msgbox Route113_GlassWorkshop_Text_26F715, MSGBOX_DEFAULT
release
end
Route113_GlassWorkshop_EventScript_26F090:: @ 826F090
- switch VAR_0x40BE
+ switch VAR_GLASS_WORKSHOP_STATE
case 10, Route113_GlassWorkshop_EventScript_26F0E3
case 11, Route113_GlassWorkshop_EventScript_26F0F7
case 12, Route113_GlassWorkshop_EventScript_26F10B
@@ -300,7 +300,7 @@ Route113_GlassWorkshop_EventScript_26F16F:: @ 826F16F
call_if_eq Route113_GlassWorkshop_EventScript_26F047
compare VAR_0x8009, 1
call_if_eq Route113_GlassWorkshop_EventScript_26F05F
- setvar VAR_0x40BE, 2
+ setvar VAR_GLASS_WORKSHOP_STATE, 2
release
end
diff --git a/data/maps/Route114/scripts.inc b/data/maps/Route114/scripts.inc
index cccc8de5f..d4327a2f4 100644
--- a/data/maps/Route114/scripts.inc
+++ b/data/maps/Route114/scripts.inc
@@ -1,7 +1,7 @@
Route114_MapScripts:: @ 81F252F
- map_script 3, Route114_MapScript1_1F253F
- map_script 1, Route114_MapScript1_1F2561
- map_script 2, Route114_MapScript2_1F2578
+ map_script MAP_SCRIPT_ON_TRANSITION, Route114_MapScript1_1F253F
+ map_script MAP_SCRIPT_ON_LOAD, Route114_MapScript1_1F2561
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, Route114_MapScript2_1F2578
.byte 0
Route114_MapScript1_1F253F: @ 81F253F
@@ -35,7 +35,7 @@ Route114_EventScript_1F2582:: @ 81F2582
addvar VAR_RESULT, 133
giveitem_std VAR_RESULT
compare VAR_RESULT, 0
- goto_if_eq Route114_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
setflag FLAG_DAILY_ROUTE_114_RECEIVED_BERRY
msgbox Route114_Text_2A7034, MSGBOX_DEFAULT
release
@@ -53,7 +53,7 @@ Route114_EventScript_1F25D1:: @ 81F25D1
msgbox Route114_Text_1F2809, MSGBOX_DEFAULT
giveitem_std ITEM_TM05
compare VAR_RESULT, 0
- goto_if_eq Route114_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
setflag FLAG_RECEIVED_TM05
msgbox Route114_Text_1F2872, MSGBOX_DEFAULT
release
diff --git a/data/maps/Route114_FossilManiacsHouse/scripts.inc b/data/maps/Route114_FossilManiacsHouse/scripts.inc
index e229c756d..c6b63d8da 100644
--- a/data/maps/Route114_FossilManiacsHouse/scripts.inc
+++ b/data/maps/Route114_FossilManiacsHouse/scripts.inc
@@ -1,5 +1,5 @@
Route114_FossilManiacsHouse_MapScripts:: @ 822AD30
- map_script 3, Route114_FossilManiacsHouse_MapScript1_22AD36
+ map_script MAP_SCRIPT_ON_TRANSITION, Route114_FossilManiacsHouse_MapScript1_22AD36
.byte 0
Route114_FossilManiacsHouse_MapScript1_22AD36: @ 822AD36
@@ -13,7 +13,7 @@ Route114_FossilManiacsHouse_EventScript_22AD3A:: @ 822AD3A
msgbox Route114_FossilManiacsHouse_Text_22AD85, MSGBOX_DEFAULT
giveitem_std ITEM_TM28
compare VAR_RESULT, 0
- goto_if_eq Route114_FossilManiacsHouse_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
setflag FLAG_RECEIVED_TM28
release
end
diff --git a/data/maps/Route114_FossilManiacsTunnel/scripts.inc b/data/maps/Route114_FossilManiacsTunnel/scripts.inc
index 96d591d2d..1a84082ab 100644
--- a/data/maps/Route114_FossilManiacsTunnel/scripts.inc
+++ b/data/maps/Route114_FossilManiacsTunnel/scripts.inc
@@ -1,6 +1,6 @@
Route114_FossilManiacsTunnel_MapScripts:: @ 822AF28
- map_script 3, Route114_FossilManiacsTunnel_MapScript1_22AF33
- map_script 1, Route114_FossilManiacsTunnel_MapScript1_22AF49
+ map_script MAP_SCRIPT_ON_TRANSITION, Route114_FossilManiacsTunnel_MapScript1_22AF33
+ map_script MAP_SCRIPT_ON_LOAD, Route114_FossilManiacsTunnel_MapScript1_22AF49
.byte 0
Route114_FossilManiacsTunnel_MapScript1_22AF33: @ 822AF33
@@ -23,8 +23,8 @@ Route114_FossilManiacsTunnel_EventScript_22AF53:: @ 822AF53
Route114_FossilManiacsTunnel_EventScript_22AF66:: @ 822AF66
lockall
- applymovement 1, Route114_FossilManiacsTunnel_Movement_2725A6
- applymovement EVENT_OBJ_ID_PLAYER, Route114_FossilManiacsTunnel_Movement_2725AA
+ applymovement 1, Common_Movement_WalkInPlaceUp
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceDown
waitmovement 0
msgbox Route114_FossilManiacsTunnel_Text_22B1F7, MSGBOX_DEFAULT
setvar VAR_0x40CC, 2
diff --git a/data/maps/Route114_LanettesHouse/scripts.inc b/data/maps/Route114_LanettesHouse/scripts.inc
index b54365523..1cf7ffb47 100644
--- a/data/maps/Route114_LanettesHouse/scripts.inc
+++ b/data/maps/Route114_LanettesHouse/scripts.inc
@@ -1,5 +1,5 @@
Route114_LanettesHouse_MapScripts:: @ 822B2C8
- map_script 3, Route114_LanettesHouse_MapScript1_22B2CE
+ map_script MAP_SCRIPT_ON_TRANSITION, Route114_LanettesHouse_MapScript1_22B2CE
.byte 0
Route114_LanettesHouse_MapScript1_22B2CE: @ 822B2CE
diff --git a/data/maps/Route115/scripts.inc b/data/maps/Route115/scripts.inc
index 560c360af..9cb3ea2e0 100644
--- a/data/maps/Route115/scripts.inc
+++ b/data/maps/Route115/scripts.inc
@@ -1,7 +1,7 @@
Route115_MapScripts:: @ 81F2920
- map_script 1, Route115_MapScript1_1F2930
- map_script 3, Route115_MapScript1_1F2947
- map_script 2, Route115_MapScript2_1F2969
+ map_script MAP_SCRIPT_ON_LOAD, Route115_MapScript1_1F2930
+ map_script MAP_SCRIPT_ON_TRANSITION, Route115_MapScript1_1F2947
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, Route115_MapScript2_1F2969
.byte 0
Route115_MapScript1_1F2930: @ 81F2930
diff --git a/data/maps/Route116/map.json b/data/maps/Route116/map.json
index 79aa60e75..27eb381d0 100644
--- a/data/maps/Route116/map.json
+++ b/data/maps/Route116/map.json
@@ -433,7 +433,7 @@
"x": 47,
"y": 9,
"elevation": 3,
- "var": "VAR_0x406F",
+ "var": "VAR_ROUTE116_STATE",
"var_value": "1",
"script": "Route116_EventScript_1F2D95"
}
diff --git a/data/maps/Route116/scripts.inc b/data/maps/Route116/scripts.inc
index 623c74e3c..90ae29f5b 100644
--- a/data/maps/Route116/scripts.inc
+++ b/data/maps/Route116/scripts.inc
@@ -1,7 +1,7 @@
Route116_MapScripts:: @ 81F2C0C
- map_script 3, Route116_MapScript1_1F2C1C
- map_script 1, Route116_MapScript1_1F2C4F
- map_script 2, Route116_MapScript2_1F2C66
+ map_script MAP_SCRIPT_ON_TRANSITION, Route116_MapScript1_1F2C1C
+ map_script MAP_SCRIPT_ON_LOAD, Route116_MapScript1_1F2C4F
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, Route116_MapScript2_1F2C66
.byte 0
Route116_MapScript1_1F2C1C: @ 81F2C1C
@@ -145,17 +145,17 @@ Route116_EventScript_1F2D84:: @ 81F2D84
lock
faceplayer
msgbox Route116_Text_1F309D, MSGBOX_DEFAULT
- setvar VAR_0x406F, 2
+ setvar VAR_ROUTE116_STATE, 2
release
end
Route116_EventScript_1F2D95:: @ 81F2D95
lockall
- applymovement 11, Route116_Movement_2725A8
- applymovement EVENT_OBJ_ID_PLAYER, Route116_Movement_2725A4
+ applymovement 11, Common_Movement_WalkInPlaceRight
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceLeft
waitmovement 0
msgbox Route116_Text_1F309D, MSGBOX_DEFAULT
- setvar VAR_0x406F, 2
+ setvar VAR_ROUTE116_STATE, 2
releaseall
end
diff --git a/data/maps/Route116_TunnelersRestHouse/scripts.inc b/data/maps/Route116_TunnelersRestHouse/scripts.inc
index 89ccdce8d..bdd22aadd 100644
--- a/data/maps/Route116_TunnelersRestHouse/scripts.inc
+++ b/data/maps/Route116_TunnelersRestHouse/scripts.inc
@@ -1,5 +1,5 @@
Route116_TunnelersRestHouse_MapScripts:: @ 822B850
- map_script 3, Route116_TunnelersRestHouse_MapScript1_22B856
+ map_script MAP_SCRIPT_ON_TRANSITION, Route116_TunnelersRestHouse_MapScript1_22B856
.byte 0
Route116_TunnelersRestHouse_MapScript1_22B856: @ 822B856
diff --git a/data/maps/Route117/scripts.inc b/data/maps/Route117/scripts.inc
index 4a51c17d8..08571690f 100644
--- a/data/maps/Route117/scripts.inc
+++ b/data/maps/Route117/scripts.inc
@@ -1,5 +1,5 @@
Route117_MapScripts:: @ 81F397D
- map_script 3, Route117_MapScript1_1F3983
+ map_script MAP_SCRIPT_ON_TRANSITION, Route117_MapScript1_1F3983
.byte 0
Route117_MapScript1_1F3983: @ 81F3983
diff --git a/data/maps/Route117_PokemonDayCare/scripts.inc b/data/maps/Route117_PokemonDayCare/scripts.inc
index b2e9ddfaa..ea9894ffc 100644
--- a/data/maps/Route117_PokemonDayCare/scripts.inc
+++ b/data/maps/Route117_PokemonDayCare/scripts.inc
@@ -1,5 +1,5 @@
Route117_PokemonDayCare_MapScripts:: @ 822BBB1
- map_script 3, Route117_PokemonDayCare_MapScript1_22BBB7
+ map_script MAP_SCRIPT_ON_TRANSITION, Route117_PokemonDayCare_MapScript1_22BBB7
.byte 0
Route117_PokemonDayCare_MapScript1_22BBB7: @ 822BBB7
diff --git a/data/maps/Route118/map.json b/data/maps/Route118/map.json
index 66b7a1789..7fc1e45c7 100644
--- a/data/maps/Route118/map.json
+++ b/data/maps/Route118/map.json
@@ -326,7 +326,7 @@
"x": 43,
"y": 11,
"elevation": 3,
- "var": "VAR_0x4071",
+ "var": "VAR_ROUTE118_STATE",
"var_value": "0",
"script": "Route118_EventScript_1F3E8E"
},
@@ -335,7 +335,7 @@
"x": 44,
"y": 11,
"elevation": 3,
- "var": "VAR_0x4071",
+ "var": "VAR_ROUTE118_STATE",
"var_value": "0",
"script": "Route118_EventScript_1F3EAE"
},
@@ -344,7 +344,7 @@
"x": 45,
"y": 11,
"elevation": 3,
- "var": "VAR_0x4071",
+ "var": "VAR_ROUTE118_STATE",
"var_value": "0",
"script": "Route118_EventScript_1F3EC4"
}
diff --git a/data/maps/Route118/scripts.inc b/data/maps/Route118/scripts.inc
index 45b8665b0..758804137 100644
--- a/data/maps/Route118/scripts.inc
+++ b/data/maps/Route118/scripts.inc
@@ -1,7 +1,7 @@
Route118_MapScripts:: @ 81F3DBC
- map_script 3, Route118_MapScript1_1F3DCC
- map_script 1, Route118_MapScript1_1F3DF3
- map_script 2, Route118_MapScript2_1F3E0A
+ map_script MAP_SCRIPT_ON_TRANSITION, Route118_MapScript1_1F3DCC
+ map_script MAP_SCRIPT_ON_LOAD, Route118_MapScript1_1F3DF3
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, Route118_MapScript2_1F3E0A
.byte 0
Route118_MapScript1_1F3DCC: @ 81F3DCC
@@ -69,7 +69,7 @@ Route118_EventScript_1F3E85:: @ 81F3E85
Route118_EventScript_1F3E8E:: @ 81F3E8E
lockall
setvar VAR_0x8008, 0
- applymovement EVENT_OBJ_ID_PLAYER, Route118_Movement_2725B2
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_FaceUp
waitmovement 0
applymovement 19, Route118_Movement_1F3F61
waitmovement 0
@@ -79,7 +79,7 @@ Route118_EventScript_1F3E8E:: @ 81F3E8E
Route118_EventScript_1F3EAE:: @ 81F3EAE
lockall
setvar VAR_0x8008, 1
- applymovement EVENT_OBJ_ID_PLAYER, Route118_Movement_2725B2
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_FaceUp
waitmovement 0
goto Route118_EventScript_1F3EE4
end
@@ -87,7 +87,7 @@ Route118_EventScript_1F3EAE:: @ 81F3EAE
Route118_EventScript_1F3EC4:: @ 81F3EC4
lockall
setvar VAR_0x8008, 2
- applymovement EVENT_OBJ_ID_PLAYER, Route118_Movement_2725B2
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_FaceUp
waitmovement 0
applymovement 19, Route118_Movement_1F3F63
waitmovement 0
@@ -107,7 +107,7 @@ Route118_EventScript_1F3EE4:: @ 81F3EE4
call_if_eq Route118_EventScript_1F3F3A
compare VAR_0x8008, 2
call_if_eq Route118_EventScript_1F3F4C
- setvar VAR_0x4071, 1
+ setvar VAR_ROUTE118_STATE, 1
removeobject 19
releaseall
end
diff --git a/data/maps/Route119/map.json b/data/maps/Route119/map.json
index bdb3e923d..2146d5ec7 100644
--- a/data/maps/Route119/map.json
+++ b/data/maps/Route119/map.json
@@ -607,7 +607,7 @@
"x": 25,
"y": 31,
"elevation": 0,
- "var": "VAR_0x4072",
+ "var": "VAR_ROUTE119_STATE",
"var_value": "0",
"script": "Route119_EventScript_1F4472"
},
@@ -616,7 +616,7 @@
"x": 26,
"y": 31,
"elevation": 0,
- "var": "VAR_0x4072",
+ "var": "VAR_ROUTE119_STATE",
"var_value": "0",
"script": "Route119_EventScript_1F447D"
},
diff --git a/data/maps/Route119/scripts.inc b/data/maps/Route119/scripts.inc
index dee76d71d..83ff4707f 100644
--- a/data/maps/Route119/scripts.inc
+++ b/data/maps/Route119/scripts.inc
@@ -1,6 +1,6 @@
Route119_MapScripts:: @ 81F4424
- map_script 5, Route119_MapScript1_1F442F
- map_script 3, Route119_MapScript1_1F444D
+ map_script MAP_SCRIPT_ON_RESUME, Route119_MapScript1_1F442F
+ map_script MAP_SCRIPT_ON_TRANSITION, Route119_MapScript1_1F444D
.byte 0
Route119_MapScript1_1F442F: @ 81F442F
@@ -10,13 +10,13 @@ Route119_MapScript1_1F442F: @ 81F442F
Route119_EventScript_1F4439:: @ 81F4439
specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, 7
- goto_if_ne Route119_EventScript_27374E
+ goto_if_ne Common_EventScript_NopReturn
removeobject VAR_LAST_TALKED
return
Route119_MapScript1_1F444D: @ 81F444D
- call Route119_EventScript_271ED7
- call Route119_EventScript_271EFB
+ call Common_EventScript_SetupRivalGender
+ call Common_EventScript_SetupRivalOnBikeGender
compare VAR_WEATHER_INSTITUTE_STATE, 1
call_if_eq Route119_EventScript_1F4466
special SetRoute119Weather
@@ -51,7 +51,7 @@ Route119_EventScript_1F4488:: @ 81F4488
call_if_eq Route119_EventScript_1F46C6
compare VAR_TEMP_1, 2
call_if_eq Route119_EventScript_1F46D1
- applymovement EVENT_OBJ_ID_PLAYER, Route119_Movement_2725AA
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceDown
waitmovement 0
delay 30
compare VAR_TEMP_1, 1
@@ -156,7 +156,7 @@ Route119_EventScript_1F460F:: @ 81F460F
compare VAR_TEMP_1, 2
call_if_eq Route119_EventScript_1F46EE
removeobject 25
- setvar VAR_0x4072, 1
+ setvar VAR_ROUTE119_STATE, 1
savebgm MUS_DUMMY
fadedefaultbgm
delay 60
@@ -459,7 +459,7 @@ Route119_EventScript_1F49A3:: @ 81F49A3
faceplayer
msgbox Route119_Text_1F50EB, MSGBOX_DEFAULT
closemessage
- applymovement VAR_LAST_TALKED, Route119_Movement_2725A2
+ applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -469,7 +469,7 @@ Route119_EventScript_1F49BA:: @ 81F49BA
faceplayer
msgbox Route119_Text_1F5147, MSGBOX_DEFAULT
closemessage
- applymovement VAR_LAST_TALKED, Route119_Movement_2725A2
+ applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
diff --git a/data/maps/Route119_WeatherInstitute_1F/scripts.inc b/data/maps/Route119_WeatherInstitute_1F/scripts.inc
index ae0fea259..09ed3c4f5 100644
--- a/data/maps/Route119_WeatherInstitute_1F/scripts.inc
+++ b/data/maps/Route119_WeatherInstitute_1F/scripts.inc
@@ -1,5 +1,5 @@
Route119_WeatherInstitute_1F_MapScripts:: @ 826FA86
- map_script 3, Route119_WeatherInstitute_1F_MapScript1_26FA8C
+ map_script MAP_SCRIPT_ON_TRANSITION, Route119_WeatherInstitute_1F_MapScript1_26FA8C
.byte 0
Route119_WeatherInstitute_1F_MapScript1_26FA8C: @ 826FA8C
@@ -57,7 +57,7 @@ Route119_WeatherInstitute_1F_EventScript_26FB18:: @ 826FB18
lockall
msgbox Route119_WeatherInstitute_1F_Text_26FEFC, MSGBOX_DEFAULT
closemessage
- call Route119_WeatherInstitute_1F_EventScript_272083
+ call Common_EventScript_OutOfCenterPartyHeal
releaseall
end
diff --git a/data/maps/Route119_WeatherInstitute_2F/scripts.inc b/data/maps/Route119_WeatherInstitute_2F/scripts.inc
index bbee65df8..7d557fdef 100644
--- a/data/maps/Route119_WeatherInstitute_2F/scripts.inc
+++ b/data/maps/Route119_WeatherInstitute_2F/scripts.inc
@@ -1,5 +1,5 @@
Route119_WeatherInstitute_2F_MapScripts:: @ 826FF1E
- map_script 3, Route119_WeatherInstitute_2F_MapScript1_26FF24
+ map_script MAP_SCRIPT_ON_TRANSITION, Route119_WeatherInstitute_2F_MapScript1_26FF24
.byte 0
Route119_WeatherInstitute_2F_MapScript1_26FF24: @ 826FF24
@@ -55,9 +55,9 @@ Route119_WeatherInstitute_2F_EventScript_26FFC8:: @ 826FFC8
msgbox Route119_WeatherInstitute_2F_Text_270568, MSGBOX_DEFAULT
closemessage
playse SE_PIN
- applymovement 3, Route119_WeatherInstitute_2F_Movement_272598
+ applymovement 3, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 3, Route119_WeatherInstitute_2F_Movement_27259A
+ applymovement 3, Common_Movement_Delay48
waitmovement 0
msgbox Route119_WeatherInstitute_2F_Text_2705DD, MSGBOX_DEFAULT
closemessage
@@ -98,7 +98,7 @@ Route119_WeatherInstitute_2F_EventScript_270085:: @ 8270085
compare VAR_RESULT, 0
goto_if_eq Route119_WeatherInstitute_2F_EventScript_2700EA
call Route119_WeatherInstitute_2F_EventScript_27378B
- call Route119_WeatherInstitute_2F_EventScript_2723DD
+ call Common_EventScript_NameReceivedPokemon
goto Route119_WeatherInstitute_2F_EventScript_2700EA
end
diff --git a/data/maps/Route120/scripts.inc b/data/maps/Route120/scripts.inc
index a66026283..40c9ee09a 100644
--- a/data/maps/Route120/scripts.inc
+++ b/data/maps/Route120/scripts.inc
@@ -1,7 +1,7 @@
Route120_MapScripts:: @ 81F53EC
- map_script 5, Route120_MapScript1_1F53FC
- map_script 3, Route120_MapScript1_1F54CD
- map_script 1, Route120_MapScript1_1F5474
+ map_script MAP_SCRIPT_ON_RESUME, Route120_MapScript1_1F53FC
+ map_script MAP_SCRIPT_ON_TRANSITION, Route120_MapScript1_1F54CD
+ map_script MAP_SCRIPT_ON_LOAD, Route120_MapScript1_1F5474
.byte 0
Route120_MapScript1_1F53FC: @ 81F53FC
@@ -26,7 +26,7 @@ Route120_EventScript_1F5406:: @ 81F5406
Route120_EventScript_1F5449:: @ 81F5449
specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, 7
- goto_if_ne Route120_EventScript_27374E
+ goto_if_ne Common_EventScript_NopReturn
removeobject 30
removeobject 36
return
@@ -34,7 +34,7 @@ Route120_EventScript_1F5449:: @ 81F5449
Route120_EventScript_1F5460:: @ 81F5460
specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, 7
- goto_if_ne Route120_EventScript_27374E
+ goto_if_ne Common_EventScript_NopReturn
removeobject VAR_LAST_TALKED
return
@@ -147,7 +147,7 @@ Route120_EventScript_1F55F6:: @ 81F55F6
Route120_EventScript_1F5601:: @ 81F5601
giveitem_std VAR_0x8004
compare VAR_RESULT, 0
- goto_if_eq Route120_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
setflag FLAG_DAILY_ROUTE_120_RECEIVED_BERRY
msgbox Route120_Text_2A71D5, MSGBOX_DEFAULT
release
@@ -196,12 +196,12 @@ Route120_EventScript_1F568B:: @ 81F568B
call_if_eq Route120_EventScript_1F57A3
compare VAR_FACING, 3
call_if_eq Route120_EventScript_1F57AE
- applymovement 31, Route120_Movement_2725A4
+ applymovement 31, Common_Movement_WalkInPlaceLeft
waitmovement 0
delay 20
msgbox Route120_Text_1F5B43, MSGBOX_DEFAULT
closemessage
- applymovement 30, Route120_Movement_2725A8
+ applymovement 30, Common_Movement_WalkInPlaceRight
waitmovement 0
applymovement 30, Route120_Movement_2723C7
waitmovement 0
@@ -233,15 +233,15 @@ Route120_EventScript_1F571C:: @ 81F571C
end
Route120_EventScript_1F572C:: @ 81F572C
- applymovement 31, Route120_Movement_2725AA
- applymovement EVENT_OBJ_ID_PLAYER, Route120_Movement_2725A6
+ applymovement 31, Common_Movement_WalkInPlaceDown
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceUp
waitmovement 0
msgbox Route120_Text_1F5BAF, MSGBOX_DEFAULT
giveitem_std ITEM_DEVON_SCOPE
setflag FLAG_RECEIVED_DEVON_SCOPE
msgbox Route120_Text_1F5C7B, MSGBOX_DEFAULT
closemessage
- applymovement 31, Route120_Movement_2725AA
+ applymovement 31, Common_Movement_WalkInPlaceDown
waitmovement 0
delay 50
setfieldeffectargument 0, 1
@@ -258,7 +258,7 @@ Route120_EventScript_1F572C:: @ 81F572C
end
Route120_EventScript_1F57A3:: @ 81F57A3
- applymovement EVENT_OBJ_ID_PLAYER, Route120_Movement_2725A4
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceLeft
waitmovement 0
return
diff --git a/data/maps/Route121/map.json b/data/maps/Route121/map.json
index ad20a8119..4339b149d 100644
--- a/data/maps/Route121/map.json
+++ b/data/maps/Route121/map.json
@@ -423,7 +423,7 @@
"x": 25,
"y": 5,
"elevation": 3,
- "var": "VAR_0x4074",
+ "var": "VAR_ROUTE121_STATE",
"var_value": "0",
"script": "Route121_EventScript_1F5E18"
},
@@ -432,7 +432,7 @@
"x": 25,
"y": 6,
"elevation": 3,
- "var": "VAR_0x4074",
+ "var": "VAR_ROUTE121_STATE",
"var_value": "0",
"script": "Route121_EventScript_1F5E18"
},
@@ -441,7 +441,7 @@
"x": 25,
"y": 7,
"elevation": 3,
- "var": "VAR_0x4074",
+ "var": "VAR_ROUTE121_STATE",
"var_value": "0",
"script": "Route121_EventScript_1F5E18"
},
@@ -450,7 +450,7 @@
"x": 25,
"y": 8,
"elevation": 3,
- "var": "VAR_0x4074",
+ "var": "VAR_ROUTE121_STATE",
"var_value": "0",
"script": "Route121_EventScript_1F5E18"
}
diff --git a/data/maps/Route121/scripts.inc b/data/maps/Route121/scripts.inc
index ee361d30c..edca585c9 100644
--- a/data/maps/Route121/scripts.inc
+++ b/data/maps/Route121/scripts.inc
@@ -28,7 +28,7 @@ Route121_EventScript_1F5E18:: @ 81F5E18
removeobject 12
removeobject 13
removeobject 14
- setvar VAR_0x4074, 1
+ setvar VAR_ROUTE121_STATE, 1
releaseall
end
diff --git a/data/maps/Route121_SafariZoneEntrance/scripts.inc b/data/maps/Route121_SafariZoneEntrance/scripts.inc
index d4ef73f9b..69f5ea80d 100644
--- a/data/maps/Route121_SafariZoneEntrance/scripts.inc
+++ b/data/maps/Route121_SafariZoneEntrance/scripts.inc
@@ -1,16 +1,16 @@
Route121_SafariZoneEntrance_MapScripts:: @ 822BBBB
- map_script 2, Route121_SafariZoneEntrance_MapScript2_22BBC1
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, Route121_SafariZoneEntrance_MapScript2_22BBC1
.byte 0
Route121_SafariZoneEntrance_MapScript2_22BBC1: @ 822BBC1
- map_script_2 VAR_0x40A4, 1, Route121_SafariZoneEntrance_EventScript_22BBCB
+ map_script_2 VAR_SAFARI_ZONE_STATE, 1, Route121_SafariZoneEntrance_EventScript_22BBCB
.2byte 0
Route121_SafariZoneEntrance_EventScript_22BBCB:: @ 822BBCB
lockall
applymovement EVENT_OBJ_ID_PLAYER, Route121_SafariZoneEntrance_Movement_22BBDD
waitmovement 0
- setvar VAR_0x40A4, 0
+ setvar VAR_SAFARI_ZONE_STATE, 0
releaseall
end
@@ -46,7 +46,7 @@ Route121_SafariZoneEntrance_EventScript_22BC0E:: @ 822BC0E
Route121_SafariZoneEntrance_EventScript_22BC18:: @ 822BC18
lockall
- applymovement EVENT_OBJ_ID_PLAYER, Route121_SafariZoneEntrance_Movement_2725A6
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceUp
waitmovement 0
showmoneybox 0, 0, 0
msgbox Route121_SafariZoneEntrance_Text_2A4F74, MSGBOX_YESNO
@@ -81,7 +81,7 @@ Route121_SafariZoneEntrance_EventScript_22BC48:: @ 822BC48
applymovement EVENT_OBJ_ID_PLAYER, Route121_SafariZoneEntrance_Movement_22BD18
waitmovement 0
special EnterSafariMode
- setvar VAR_0x40A4, 2
+ setvar VAR_SAFARI_ZONE_STATE, 2
clearflag FLAG_GOOD_LUCK_SAFARI_ZONE
warp MAP_SAFARI_ZONE_SOUTH, 255, 32, 33
waitstate
diff --git a/data/maps/Route123/scripts.inc b/data/maps/Route123/scripts.inc
index 86a6e767e..8e1692114 100644
--- a/data/maps/Route123/scripts.inc
+++ b/data/maps/Route123/scripts.inc
@@ -1,5 +1,5 @@
Route123_MapScripts:: @ 81F6147
- map_script 3, Route123_MapScript1_1F614D
+ map_script MAP_SCRIPT_ON_TRANSITION, Route123_MapScript1_1F614D
.byte 0
Route123_MapScript1_1F614D: @ 81F614D
@@ -17,7 +17,7 @@ Route123_EventScript_1F6151:: @ 81F6151
msgbox Route123_Text_1F645D, MSGBOX_DEFAULT
giveitem_std ITEM_TM19
compare VAR_RESULT, 0
- goto_if_eq Route123_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
setflag FLAG_RECEIVED_TM19
msgbox Route123_Text_1F64CF, MSGBOX_DEFAULT
release
diff --git a/data/maps/Route123_BerryMastersHouse/scripts.inc b/data/maps/Route123_BerryMastersHouse/scripts.inc
index a7175e698..6d4afa30a 100644
--- a/data/maps/Route123_BerryMastersHouse/scripts.inc
+++ b/data/maps/Route123_BerryMastersHouse/scripts.inc
@@ -1,5 +1,5 @@
Route123_BerryMastersHouse_MapScripts:: @ 826F83B
- map_script 3, Route123_BerryMastersHouse_MapScript1_26F841
+ map_script MAP_SCRIPT_ON_TRANSITION, Route123_BerryMastersHouse_MapScript1_26F841
.byte 0
Route123_BerryMastersHouse_MapScript1_26F841: @ 826F841
@@ -17,7 +17,7 @@ Route123_BerryMastersHouse_EventScript_26F845:: @ 826F845
addvar VAR_RESULT, 133
giveitem_std VAR_RESULT
compare VAR_RESULT, 0
- goto_if_eq Route123_BerryMastersHouse_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
setflag FLAG_DAILY_BERRY_MASTER_RECEIVED_BERRY
msgbox Route123_BerryMastersHouse_Text_2A7428, MSGBOX_DEFAULT
random 10
@@ -25,7 +25,7 @@ Route123_BerryMastersHouse_EventScript_26F845:: @ 826F845
addvar VAR_RESULT, 133
giveitem_std VAR_RESULT
compare VAR_RESULT, 0
- goto_if_eq Route123_BerryMastersHouse_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
msgbox Route123_BerryMastersHouse_Text_2A7445, MSGBOX_DEFAULT
release
end
@@ -78,7 +78,7 @@ Route123_BerryMastersHouse_EventScript_26F94C:: @ 826F94C
addvar VAR_RESULT, 133
giveitem_std VAR_RESULT
compare VAR_RESULT, 0
- goto_if_eq Route123_BerryMastersHouse_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
goto Route123_BerryMastersHouse_EventScript_26FA79
release
end
@@ -88,7 +88,7 @@ Route123_BerryMastersHouse_EventScript_26F97A:: @ 826F97A
msgbox Route123_BerryMastersHouse_Text_2A7583, MSGBOX_DEFAULT
giveitem_std ITEM_SPELON_BERRY
compare VAR_RESULT, 0
- goto_if_eq Route123_BerryMastersHouse_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
setflag FLAG_RECEIVED_SPELON_BERRY
goto Route123_BerryMastersHouse_EventScript_26FA79
end
@@ -98,7 +98,7 @@ Route123_BerryMastersHouse_EventScript_26F9AB:: @ 826F9AB
msgbox Route123_BerryMastersHouse_Text_2A7583, MSGBOX_DEFAULT
giveitem_std ITEM_PAMTRE_BERRY
compare VAR_RESULT, 0
- goto_if_eq Route123_BerryMastersHouse_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
setflag FLAG_RECEIVED_PAMTRE_BERRY
goto Route123_BerryMastersHouse_EventScript_26FA79
end
@@ -108,7 +108,7 @@ Route123_BerryMastersHouse_EventScript_26F9DC:: @ 826F9DC
msgbox Route123_BerryMastersHouse_Text_2A7583, MSGBOX_DEFAULT
giveitem_std ITEM_WATMEL_BERRY
compare VAR_RESULT, 0
- goto_if_eq Route123_BerryMastersHouse_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
setflag FLAG_RECEIVED_WATMEL_BERRY
goto Route123_BerryMastersHouse_EventScript_26FA79
end
@@ -118,7 +118,7 @@ Route123_BerryMastersHouse_EventScript_26FA0D:: @ 826FA0D
msgbox Route123_BerryMastersHouse_Text_2A7583, MSGBOX_DEFAULT
giveitem_std ITEM_DURIN_BERRY
compare VAR_RESULT, 0
- goto_if_eq Route123_BerryMastersHouse_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
setflag FLAG_RECEIVED_DURIN_BERRY
goto Route123_BerryMastersHouse_EventScript_26FA79
end
@@ -128,7 +128,7 @@ Route123_BerryMastersHouse_EventScript_26FA3E:: @ 826FA3E
msgbox Route123_BerryMastersHouse_Text_2A7583, MSGBOX_DEFAULT
giveitem_std ITEM_BELUE_BERRY
compare VAR_RESULT, 0
- goto_if_eq Route123_BerryMastersHouse_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
setflag FLAG_RECEIVED_BELUE_BERRY
goto Route123_BerryMastersHouse_EventScript_26FA79
end
diff --git a/data/maps/Route124/scripts.inc b/data/maps/Route124/scripts.inc
index 97aa6f4be..34e315792 100644
--- a/data/maps/Route124/scripts.inc
+++ b/data/maps/Route124/scripts.inc
@@ -1,9 +1,9 @@
Route124_MapScripts:: @ 81F656C
- map_script 3, Route124_MapScript1_1F6572
+ map_script MAP_SCRIPT_ON_TRANSITION, Route124_MapScript1_1F6572
.byte 0
Route124_MapScript1_1F6572: @ 81F6572
- call_if_set FLAG_SYS_WEATHER_CTRL, Route124_EventScript_27207A
+ call_if_set FLAG_SYS_WEATHER_CTRL, Common_EventScript_SetWeather15
end
Route124_EventScript_1F657C:: @ 81F657C
diff --git a/data/maps/Route124_DivingTreasureHuntersHouse/scripts.inc b/data/maps/Route124_DivingTreasureHuntersHouse/scripts.inc
index 934c6757d..250a5ba51 100644
--- a/data/maps/Route124_DivingTreasureHuntersHouse/scripts.inc
+++ b/data/maps/Route124_DivingTreasureHuntersHouse/scripts.inc
@@ -1,5 +1,5 @@
Route124_DivingTreasureHuntersHouse_MapScripts:: @ 8270A28
- map_script 3, Route124_DivingTreasureHuntersHouse_MapScript1_270A2E
+ map_script MAP_SCRIPT_ON_TRANSITION, Route124_DivingTreasureHuntersHouse_MapScript1_270A2E
.byte 0
Route124_DivingTreasureHuntersHouse_MapScript1_270A2E: @ 8270A2E
diff --git a/data/maps/Route125/scripts.inc b/data/maps/Route125/scripts.inc
index e5ad32697..4812b9691 100644
--- a/data/maps/Route125/scripts.inc
+++ b/data/maps/Route125/scripts.inc
@@ -1,11 +1,11 @@
Route125_MapScripts:: @ 81F6748
- map_script 3, Route125_MapScript1_1F6758
- map_script 1, Route125_MapScript1_1F6783
- map_script 2, Route125_MapScript2_1F679A
+ map_script MAP_SCRIPT_ON_TRANSITION, Route125_MapScript1_1F6758
+ map_script MAP_SCRIPT_ON_LOAD, Route125_MapScript1_1F6783
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, Route125_MapScript2_1F679A
.byte 0
Route125_MapScript1_1F6758: @ 81F6758
- call_if_set FLAG_SYS_WEATHER_CTRL, Route125_EventScript_27207A
+ call_if_set FLAG_SYS_WEATHER_CTRL, Common_EventScript_SetWeather15
compare VAR_0x4039, 1
call_if_eq Route125_EventScript_273D13
compare VAR_0x4037, 11
diff --git a/data/maps/Route126/scripts.inc b/data/maps/Route126/scripts.inc
index 4fa47e0bb..71bc77b28 100644
--- a/data/maps/Route126/scripts.inc
+++ b/data/maps/Route126/scripts.inc
@@ -1,9 +1,9 @@
Route126_MapScripts:: @ 81F68C6
- map_script 3, Route126_MapScript1_1F68CC
+ map_script MAP_SCRIPT_ON_TRANSITION, Route126_MapScript1_1F68CC
.byte 0
Route126_MapScript1_1F68CC: @ 81F68CC
- call_if_set FLAG_SYS_WEATHER_CTRL, Route126_EventScript_27207A
+ call_if_set FLAG_SYS_WEATHER_CTRL, Common_EventScript_SetWeather15
end
Route126_EventScript_1F68D6:: @ 81F68D6
diff --git a/data/maps/Route127/scripts.inc b/data/maps/Route127/scripts.inc
index 28f20bfb3..7d5eee844 100644
--- a/data/maps/Route127/scripts.inc
+++ b/data/maps/Route127/scripts.inc
@@ -1,11 +1,11 @@
Route127_MapScripts:: @ 81F69D9
- map_script 3, Route127_MapScript1_1F69E9
- map_script 1, Route127_MapScript1_1F6A14
- map_script 2, Route127_MapScript2_1F6A2B
+ map_script MAP_SCRIPT_ON_TRANSITION, Route127_MapScript1_1F69E9
+ map_script MAP_SCRIPT_ON_LOAD, Route127_MapScript1_1F6A14
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, Route127_MapScript2_1F6A2B
.byte 0
Route127_MapScript1_1F69E9: @ 81F69E9
- call_if_set FLAG_SYS_WEATHER_CTRL, Route127_EventScript_27207A
+ call_if_set FLAG_SYS_WEATHER_CTRL, Common_EventScript_SetWeather15
compare VAR_0x4039, 1
call_if_eq Route127_EventScript_273D13
compare VAR_0x4037, 13
diff --git a/data/maps/Route128/scripts.inc b/data/maps/Route128/scripts.inc
index bb4f8d150..647d62b6a 100644
--- a/data/maps/Route128/scripts.inc
+++ b/data/maps/Route128/scripts.inc
@@ -1,14 +1,14 @@
Route128_MapScripts:: @ 81F6B38
- map_script 3, Route128_MapScript1_1F6B43
- map_script 2, Route128_MapScript2_1F6B4D
+ map_script MAP_SCRIPT_ON_TRANSITION, Route128_MapScript1_1F6B43
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, Route128_MapScript2_1F6B4D
.byte 0
Route128_MapScript1_1F6B43: @ 81F6B43
- call_if_set FLAG_SYS_WEATHER_CTRL, Route128_EventScript_27207A
+ call_if_set FLAG_SYS_WEATHER_CTRL, Common_EventScript_SetWeather15
end
Route128_MapScript2_1F6B4D: @ 81F6B4D
- map_script_2 VAR_0x407B, 1, Route128_EventScript_1F6B57
+ map_script_2 VAR_ROUTE128_STATE, 1, Route128_EventScript_1F6B57
.2byte 0
Route128_EventScript_1F6B57:: @ 81F6B57
@@ -24,18 +24,18 @@ Route128_EventScript_1F6B57:: @ 81F6B57
closemessage
applymovement 5, Route128_Movement_1F6CAD
waitmovement 0
- applymovement 4, Route128_Movement_2725A6
+ applymovement 4, Common_Movement_WalkInPlaceUp
waitmovement 0
msgbox Route128_Text_1F6E5A, MSGBOX_DEFAULT
closemessage
applymovement 5, Route128_Movement_1F6CBB
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, Route128_Movement_2725A6
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceUp
waitmovement 0
msgbox Route128_Text_1F6F1E, MSGBOX_DEFAULT
closemessage
applymovement 4, Route128_Movement_1F6C96
- applymovement EVENT_OBJ_ID_PLAYER, Route128_Movement_2725A4
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceLeft
applymovement 5, Route128_Movement_1F6CA8
waitmovement 0
msgbox Route128_Text_1F704F, MSGBOX_DEFAULT
@@ -53,19 +53,19 @@ Route128_EventScript_1F6B57:: @ 81F6B57
addobject 3
applymovement 3, Route128_Movement_1F6C87
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, Route128_Movement_2725A8
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceRight
waitmovement 0
msgbox Route128_Text_1F70C9, MSGBOX_DEFAULT
closemessage
applymovement 3, Route128_Movement_1F6C85
- applymovement EVENT_OBJ_ID_PLAYER, Route128_Movement_2725A6
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceUp
waitmovement 0
msgbox Route128_Text_1F70EA, MSGBOX_DEFAULT
- applymovement 3, Route128_Movement_2725AA
+ applymovement 3, Common_Movement_WalkInPlaceDown
waitmovement 0
msgbox Route128_Text_1F721B, MSGBOX_DEFAULT
closemessage
- applymovement 3, Route128_Movement_2725AA
+ applymovement 3, Common_Movement_WalkInPlaceDown
waitmovement 0
delay 50
setfieldeffectargument 0, 1
@@ -74,7 +74,7 @@ Route128_EventScript_1F6B57:: @ 81F6B57
removeobject 3
waitfieldeffect 30
clearflag FLAG_SPECIAL_FLAG_0x4000
- setvar VAR_0x407B, 2
+ setvar VAR_ROUTE128_STATE, 2
releaseall
end
diff --git a/data/maps/Route129/scripts.inc b/data/maps/Route129/scripts.inc
index 177dc626a..8aec4bc28 100644
--- a/data/maps/Route129/scripts.inc
+++ b/data/maps/Route129/scripts.inc
@@ -1,7 +1,7 @@
Route129_MapScripts:: @ 81F7284
- map_script 3, Route129_MapScript1_1F72AB
- map_script 1, Route129_MapScript1_1F7294
- map_script 2, Route129_MapScript2_1F72E2
+ map_script MAP_SCRIPT_ON_TRANSITION, Route129_MapScript1_1F72AB
+ map_script MAP_SCRIPT_ON_LOAD, Route129_MapScript1_1F7294
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, Route129_MapScript2_1F72E2
.byte 0
Route129_MapScript1_1F7294: @ 81F7294
@@ -23,7 +23,7 @@ Route129_MapScript1_1F72AB: @ 81F72AB
end
Route129_EventScript_1F72D8:: @ 81F72D8
- call_if_set FLAG_SYS_WEATHER_CTRL, Route129_EventScript_27207A
+ call_if_set FLAG_SYS_WEATHER_CTRL, Common_EventScript_SetWeather15
return
Route129_MapScript2_1F72E2: @ 81F72E2
diff --git a/data/maps/Route130/scripts.inc b/data/maps/Route130/scripts.inc
index 8ca9dcbb0..18dce324d 100644
--- a/data/maps/Route130/scripts.inc
+++ b/data/maps/Route130/scripts.inc
@@ -1,5 +1,5 @@
Route130_MapScripts:: @ 81F735F
- map_script 3, Route130_MapScript1_1F7365
+ map_script MAP_SCRIPT_ON_TRANSITION, Route130_MapScript1_1F7365
.byte 0
Route130_MapScript1_1F7365: @ 81F7365
@@ -31,7 +31,7 @@ Route130_EventScript_1F73B1:: @ 81F73B1
end
Route130_EventScript_1F73B5:: @ 81F73B5
- call_if_set FLAG_SYS_WEATHER_CTRL, Route130_EventScript_27207A
+ call_if_set FLAG_SYS_WEATHER_CTRL, Common_EventScript_SetWeather15
return
Route130_EventScript_1F73BF:: @ 81F73BF
diff --git a/data/maps/Route131/scripts.inc b/data/maps/Route131/scripts.inc
index e709a14ef..7f50b2273 100644
--- a/data/maps/Route131/scripts.inc
+++ b/data/maps/Route131/scripts.inc
@@ -1,5 +1,5 @@
Route131_MapScripts:: @ 81F7404
- map_script 3, Route131_MapScript1_1F740A
+ map_script MAP_SCRIPT_ON_TRANSITION, Route131_MapScript1_1F740A
.byte 0
Route131_MapScript1_1F740A: @ 81F740A
@@ -13,7 +13,7 @@ Route131_EventScript_1F741B:: @ 81F741B
return
Route131_EventScript_1F741F:: @ 81F741F
- call_if_set FLAG_SYS_WEATHER_CTRL, Route131_EventScript_27207A
+ call_if_set FLAG_SYS_WEATHER_CTRL, Common_EventScript_SetWeather15
return
Route131_EventScript_1F7429:: @ 81F7429
diff --git a/data/maps/Route134/scripts.inc b/data/maps/Route134/scripts.inc
index f6f4feee3..a941e19b5 100644
--- a/data/maps/Route134/scripts.inc
+++ b/data/maps/Route134/scripts.inc
@@ -1,5 +1,5 @@
Route134_MapScripts:: @ 81F7644
- map_script 5, Route134_MapScript1_1F764A
+ map_script MAP_SCRIPT_ON_RESUME, Route134_MapScript1_1F764A
.byte 0
Route134_MapScript1_1F764A: @ 81F764A
diff --git a/data/maps/RustboroCity/map.json b/data/maps/RustboroCity/map.json
index d43f7c33b..04c68baa3 100644
--- a/data/maps/RustboroCity/map.json
+++ b/data/maps/RustboroCity/map.json
@@ -331,7 +331,7 @@
"x": 23,
"y": 20,
"elevation": 3,
- "var": "VAR_0x405A",
+ "var": "VAR_RUSTBORO_STATE",
"var_value": "1",
"script": "RustboroCity_EventScript_1E095A"
},
@@ -340,7 +340,7 @@
"x": 23,
"y": 21,
"elevation": 3,
- "var": "VAR_0x405A",
+ "var": "VAR_RUSTBORO_STATE",
"var_value": "1",
"script": "RustboroCity_EventScript_1E0971"
},
@@ -349,7 +349,7 @@
"x": 23,
"y": 22,
"elevation": 3,
- "var": "VAR_0x405A",
+ "var": "VAR_RUSTBORO_STATE",
"var_value": "1",
"script": "RustboroCity_EventScript_1E0988"
},
@@ -358,7 +358,7 @@
"x": 23,
"y": 23,
"elevation": 3,
- "var": "VAR_0x405A",
+ "var": "VAR_RUSTBORO_STATE",
"var_value": "1",
"script": "RustboroCity_EventScript_1E099F"
},
@@ -367,7 +367,7 @@
"x": 23,
"y": 24,
"elevation": 3,
- "var": "VAR_0x405A",
+ "var": "VAR_RUSTBORO_STATE",
"var_value": "1",
"script": "RustboroCity_EventScript_1E09B6"
},
@@ -376,7 +376,7 @@
"x": 30,
"y": 9,
"elevation": 3,
- "var": "VAR_0x405A",
+ "var": "VAR_RUSTBORO_STATE",
"var_value": "2",
"script": "RustboroCity_EventScript_1E0AFE"
},
@@ -385,7 +385,7 @@
"x": 29,
"y": 10,
"elevation": 3,
- "var": "VAR_0x405A",
+ "var": "VAR_RUSTBORO_STATE",
"var_value": "2",
"script": "RustboroCity_EventScript_1E0B0A"
},
@@ -394,7 +394,7 @@
"x": 30,
"y": 11,
"elevation": 3,
- "var": "VAR_0x405A",
+ "var": "VAR_RUSTBORO_STATE",
"var_value": "2",
"script": "RustboroCity_EventScript_1E0B16"
},
@@ -403,7 +403,7 @@
"x": 30,
"y": 12,
"elevation": 3,
- "var": "VAR_0x405A",
+ "var": "VAR_RUSTBORO_STATE",
"var_value": "2",
"script": "RustboroCity_EventScript_1E0B22"
},
@@ -412,7 +412,7 @@
"x": 30,
"y": 9,
"elevation": 3,
- "var": "VAR_0x405A",
+ "var": "VAR_RUSTBORO_STATE",
"var_value": "4",
"script": "RustboroCity_EventScript_1E0C2B"
},
@@ -421,7 +421,7 @@
"x": 31,
"y": 10,
"elevation": 3,
- "var": "VAR_0x405A",
+ "var": "VAR_RUSTBORO_STATE",
"var_value": "4",
"script": "RustboroCity_EventScript_1E0C37"
},
@@ -430,7 +430,7 @@
"x": 30,
"y": 11,
"elevation": 3,
- "var": "VAR_0x405A",
+ "var": "VAR_RUSTBORO_STATE",
"var_value": "4",
"script": "RustboroCity_EventScript_1E0C43"
},
@@ -439,7 +439,7 @@
"x": 30,
"y": 12,
"elevation": 3,
- "var": "VAR_0x405A",
+ "var": "VAR_RUSTBORO_STATE",
"var_value": "4",
"script": "RustboroCity_EventScript_1E0C4F"
},
@@ -448,7 +448,7 @@
"x": 12,
"y": 53,
"elevation": 3,
- "var": "VAR_0x405A",
+ "var": "VAR_RUSTBORO_STATE",
"var_value": "7",
"script": "RustboroCity_EventScript_1E0DF3"
},
@@ -457,7 +457,7 @@
"x": 13,
"y": 53,
"elevation": 3,
- "var": "VAR_0x405A",
+ "var": "VAR_RUSTBORO_STATE",
"var_value": "7",
"script": "RustboroCity_EventScript_1E0E33"
},
@@ -466,7 +466,7 @@
"x": 14,
"y": 53,
"elevation": 3,
- "var": "VAR_0x405A",
+ "var": "VAR_RUSTBORO_STATE",
"var_value": "7",
"script": "RustboroCity_EventScript_1E0E73"
},
@@ -475,7 +475,7 @@
"x": 15,
"y": 53,
"elevation": 3,
- "var": "VAR_0x405A",
+ "var": "VAR_RUSTBORO_STATE",
"var_value": "7",
"script": "RustboroCity_EventScript_1E0EB3"
},
@@ -484,7 +484,7 @@
"x": 16,
"y": 53,
"elevation": 3,
- "var": "VAR_0x405A",
+ "var": "VAR_RUSTBORO_STATE",
"var_value": "7",
"script": "RustboroCity_EventScript_1E0EF3"
},
@@ -493,7 +493,7 @@
"x": 17,
"y": 53,
"elevation": 3,
- "var": "VAR_0x405A",
+ "var": "VAR_RUSTBORO_STATE",
"var_value": "7",
"script": "RustboroCity_EventScript_1E0F33"
},
@@ -502,7 +502,7 @@
"x": 18,
"y": 53,
"elevation": 3,
- "var": "VAR_0x405A",
+ "var": "VAR_RUSTBORO_STATE",
"var_value": "7",
"script": "RustboroCity_EventScript_1E0F73"
},
@@ -511,7 +511,7 @@
"x": 19,
"y": 53,
"elevation": 3,
- "var": "VAR_0x405A",
+ "var": "VAR_RUSTBORO_STATE",
"var_value": "7",
"script": "RustboroCity_EventScript_1E0FB3"
}
@@ -539,7 +539,7 @@
"y": 45,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "RustboroCity_EventScript_271E6A"
+ "script": "Common_EventScript_ShowPokemartSign"
},
{
"type": "sign",
@@ -547,7 +547,7 @@
"y": 38,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "RustboroCity_EventScript_271E73"
+ "script": "Common_EventScript_ShowPokemonCenterSign"
},
{
"type": "sign",
@@ -563,7 +563,7 @@
"y": 45,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "RustboroCity_EventScript_271E6A"
+ "script": "Common_EventScript_ShowPokemartSign"
},
{
"type": "sign",
@@ -571,7 +571,7 @@
"y": 38,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "RustboroCity_EventScript_271E73"
+ "script": "Common_EventScript_ShowPokemonCenterSign"
},
{
"type": "sign",
diff --git a/data/maps/RustboroCity/scripts.inc b/data/maps/RustboroCity/scripts.inc
index 8ffbf8373..f93711344 100644
--- a/data/maps/RustboroCity/scripts.inc
+++ b/data/maps/RustboroCity/scripts.inc
@@ -1,15 +1,15 @@
RustboroCity_MapScripts:: @ 81E06BD
- map_script 3, RustboroCity_MapScript1_1E06C8
- map_script 2, RustboroCity_MapScript2_1E070B
+ map_script MAP_SCRIPT_ON_TRANSITION, RustboroCity_MapScript1_1E06C8
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, RustboroCity_MapScript2_1E070B
.byte 0
RustboroCity_MapScript1_1E06C8: @ 81E06C8
setflag FLAG_VISITED_RUSTBORO_CITY
- call RustboroCity_EventScript_271ED7
- compare VAR_0x405A, 6
+ call Common_EventScript_SetupRivalGender
+ compare VAR_RUSTBORO_STATE, 6
call_if_eq RustboroCity_EventScript_1E0707
getplayerxy VAR_TEMP_0, VAR_TEMP_1
- compare VAR_0x405A, 6
+ compare VAR_RUSTBORO_STATE, 6
goto_if_eq RustboroCity_EventScript_1E06EC
end
@@ -28,7 +28,7 @@ RustboroCity_EventScript_1E0707:: @ 81E0707
return
RustboroCity_MapScript2_1E070B: @ 81E070B
- map_script_2 VAR_0x405A, 6, RustboroCity_EventScript_1E0715
+ map_script_2 VAR_RUSTBORO_STATE, 6, RustboroCity_EventScript_1E0715
.2byte 0
RustboroCity_EventScript_1E0715:: @ 81E0715
@@ -42,18 +42,18 @@ RustboroCity_EventScript_1E0715:: @ 81E0715
applymovement 15, RustboroCity_Movement_1E0852
waitmovement 0
playse SE_PIN
- applymovement 15, RustboroCity_Movement_272598
+ applymovement 15, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 15, RustboroCity_Movement_27259A
+ applymovement 15, Common_Movement_Delay48
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, RustboroCity_Movement_2725A6
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceUp
waitmovement 0
applymovement 15, RustboroCity_Movement_1E084E
waitmovement 0
msgbox RustboroCity_Text_1E22A5, MSGBOX_DEFAULT
closemessage
setflag FLAG_HAS_MATCH_CALL
- applymovement 15, RustboroCity_Movement_2725A4
+ applymovement 15, Common_Movement_WalkInPlaceLeft
waitmovement 0
playse SE_TK_KASYA
delay 10
@@ -63,7 +63,7 @@ RustboroCity_EventScript_1E0715:: @ 81E0715
delay 10
playse SE_TK_KASYA
delay 20
- applymovement 15, RustboroCity_Movement_2725AA
+ applymovement 15, Common_Movement_WalkInPlaceDown
waitmovement 0
msgbox RustboroCity_Text_1E2331, MSGBOX_DEFAULT
closemessage
@@ -99,7 +99,7 @@ RustboroCity_EventScript_1E07BD:: @ 81E07BD
playse SE_KAIDAN
removeobject 15
setflag FLAG_HIDE_RUSTBORO_CITY_SCIENTIST
- setvar VAR_0x405A, 7
+ setvar VAR_RUSTBORO_STATE, 7
clearflag FLAG_SPECIAL_FLAG_0x4000
releaseall
end
@@ -221,7 +221,7 @@ RustboroCity_EventScript_1E0922:: @ 81E0922
lock
faceplayer
msgbox RustboroCity_Text_1E16F4, MSGBOX_DEFAULT
- applymovement 7, RustboroCity_Movement_2725A2
+ applymovement 7, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -230,7 +230,7 @@ RustboroCity_EventScript_1E0938:: @ 81E0938
lock
faceplayer
msgbox RustboroCity_Text_1E174B, MSGBOX_DEFAULT
- applymovement 8, RustboroCity_Movement_2725A2
+ applymovement 8, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -302,9 +302,9 @@ RustboroCity_EventScript_1E09CD:: @ 81E09CD
setobjectxyperm 9, 30, 10
clearflag FLAG_HIDE_RUSTBORO_CITY_DEVON_EMPLOYEE_1
setflag FLAG_DEVON_GOODS_STOLEN
- setvar VAR_0x405A, 2
+ setvar VAR_RUSTBORO_STATE, 2
setvar VAR_RUSTURF_TUNNEL_STATE, 2
- setvar VAR_0x406F, 1
+ setvar VAR_ROUTE116_STATE, 1
clearflag FLAG_HIDE_ROUTE_116_MR_BRINEY
clearflag FLAG_HIDE_RUSTURF_TUNNEL_PEEKO
clearflag FLAG_HIDE_RUSTURF_TUNNEL_AQUA_GRUNT
@@ -344,7 +344,7 @@ RustboroCity_EventScript_1E0A6E:: @ 81E0A6E
RustboroCity_EventScript_1E0A79:: @ 81E0A79
applymovement 9, RustboroCity_Movement_1E0AD5
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, RustboroCity_Movement_2725A6
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceUp
waitmovement 0
return
@@ -493,59 +493,59 @@ RustboroCity_EventScript_1E0B2E:: @ 81E0B2E
compare VAR_TEMP_1, 3
call_if_eq RustboroCity_EventScript_1E0BF3
setflag FLAG_INTERACTED_WITH_DEVON_EMPLOYEE_GOODS_STOLEN
- setvar VAR_0x405A, 3
+ setvar VAR_RUSTBORO_STATE, 3
moveobjectoffscreen 9
msgbox RustboroCity_Text_1E183E, MSGBOX_DEFAULT
releaseall
end
RustboroCity_EventScript_1E0B6F:: @ 81E0B6F
- applymovement 9, RustboroCity_Movement_2725A6
+ applymovement 9, Common_Movement_WalkInPlaceUp
waitmovement 0
playse SE_PIN
- applymovement 9, RustboroCity_Movement_272598
+ applymovement 9, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 9, RustboroCity_Movement_27259A
+ applymovement 9, Common_Movement_Delay48
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, RustboroCity_Movement_2725AA
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceDown
waitmovement 0
return
RustboroCity_EventScript_1E0B9B:: @ 81E0B9B
- applymovement 9, RustboroCity_Movement_2725A4
+ applymovement 9, Common_Movement_WalkInPlaceLeft
waitmovement 0
playse SE_PIN
- applymovement 9, RustboroCity_Movement_272598
+ applymovement 9, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 9, RustboroCity_Movement_27259A
+ applymovement 9, Common_Movement_Delay48
waitmovement 0
applymovement EVENT_OBJ_ID_PLAYER, RustboroCity_Movement_2725AC
waitmovement 0
return
RustboroCity_EventScript_1E0BC7:: @ 81E0BC7
- applymovement 9, RustboroCity_Movement_2725AA
+ applymovement 9, Common_Movement_WalkInPlaceDown
waitmovement 0
playse SE_PIN
- applymovement 9, RustboroCity_Movement_272598
+ applymovement 9, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 9, RustboroCity_Movement_27259A
+ applymovement 9, Common_Movement_Delay48
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, RustboroCity_Movement_2725A6
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceUp
waitmovement 0
return
RustboroCity_EventScript_1E0BF3:: @ 81E0BF3
- applymovement 9, RustboroCity_Movement_2725AA
+ applymovement 9, Common_Movement_WalkInPlaceDown
waitmovement 0
playse SE_PIN
- applymovement 9, RustboroCity_Movement_272598
+ applymovement 9, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 9, RustboroCity_Movement_27259A
+ applymovement 9, Common_Movement_Delay48
waitmovement 0
applymovement 9, RustboroCity_Movement_1E0C29
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, RustboroCity_Movement_2725A6
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceUp
waitmovement 0
return
@@ -596,7 +596,7 @@ RustboroCity_EventScript_1E0C5B:: @ 81E0C5B
closemessage
setflag FLAG_RETURNED_DEVON_GOODS
setflag FLAG_HIDE_RUSTBORO_CITY_DEVON_EMPLOYEE_1
- setvar VAR_0x405A, 5
+ setvar VAR_RUSTBORO_STATE, 5
delay 30
warp MAP_RUSTBORO_CITY_DEVON_CORP_3F, 255, 2, 2
waitstate
@@ -608,69 +608,69 @@ RustboroCity_EventScript_1E0CD3:: @ 81E0CD3
return
RustboroCity_EventScript_1E0CDC:: @ 81E0CDC
- applymovement 9, RustboroCity_Movement_2725A6
+ applymovement 9, Common_Movement_WalkInPlaceUp
waitmovement 0
playse SE_PIN
- applymovement 9, RustboroCity_Movement_272598
+ applymovement 9, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 9, RustboroCity_Movement_27259A
+ applymovement 9, Common_Movement_Delay48
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, RustboroCity_Movement_2725AA
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceDown
waitmovement 0
return
RustboroCity_EventScript_1E0D08:: @ 81E0D08
- applymovement 9, RustboroCity_Movement_2725A8
+ applymovement 9, Common_Movement_WalkInPlaceRight
waitmovement 0
playse SE_PIN
- applymovement 9, RustboroCity_Movement_272598
+ applymovement 9, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 9, RustboroCity_Movement_27259A
+ applymovement 9, Common_Movement_Delay48
waitmovement 0
applymovement EVENT_OBJ_ID_PLAYER, RustboroCity_Movement_2725AE
waitmovement 0
return
RustboroCity_EventScript_1E0D34:: @ 81E0D34
- applymovement 9, RustboroCity_Movement_2725AA
+ applymovement 9, Common_Movement_WalkInPlaceDown
waitmovement 0
playse SE_PIN
- applymovement 9, RustboroCity_Movement_272598
+ applymovement 9, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 9, RustboroCity_Movement_27259A
+ applymovement 9, Common_Movement_Delay48
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, RustboroCity_Movement_2725A6
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceUp
waitmovement 0
return
RustboroCity_EventScript_1E0D60:: @ 81E0D60
- applymovement 9, RustboroCity_Movement_2725AA
+ applymovement 9, Common_Movement_WalkInPlaceDown
waitmovement 0
playse SE_PIN
- applymovement 9, RustboroCity_Movement_272598
+ applymovement 9, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 9, RustboroCity_Movement_27259A
+ applymovement 9, Common_Movement_Delay48
waitmovement 0
applymovement 9, RustboroCity_Movement_1E0C29
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, RustboroCity_Movement_2725A6
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceUp
waitmovement 0
return
RustboroCity_EventScript_1E0D96:: @ 81E0D96
- applymovement 9, RustboroCity_Movement_2725A4
+ applymovement 9, Common_Movement_WalkInPlaceLeft
waitmovement 0
playse SE_PIN
- applymovement 9, RustboroCity_Movement_272598
+ applymovement 9, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 9, RustboroCity_Movement_27259A
+ applymovement 9, Common_Movement_Delay48
waitmovement 0
return
RustboroCity_EventScript_1E0DB8:: @ 81E0DB8
lockall
call_if_unset FLAG_MET_RIVAL_RUSTBORO, RustboroCity_EventScript_1E0DD1
- applymovement 14, RustboroCity_Movement_27259E
+ applymovement 14, Common_Movement_FacePlayer
waitmovement 0
goto RustboroCity_EventScript_1E0FF3
@@ -694,128 +694,128 @@ RustboroCity_EventScript_1E0DEE:: @ 81E0DEE
RustboroCity_EventScript_1E0DF3:: @ 81E0DF3
lockall
call RustboroCity_EventScript_1E0DD1
- applymovement 14, RustboroCity_Movement_2725AA
+ applymovement 14, Common_Movement_WalkInPlaceDown
waitmovement 0
playse SE_PIN
- applymovement 14, RustboroCity_Movement_272598
+ applymovement 14, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 14, RustboroCity_Movement_27259A
+ applymovement 14, Common_Movement_Delay48
waitmovement 0
applymovement 14, RustboroCity_Movement_1E120E
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, RustboroCity_Movement_2725A6
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceUp
waitmovement 0
goto RustboroCity_EventScript_1E0FF3
RustboroCity_EventScript_1E0E33:: @ 81E0E33
lockall
call RustboroCity_EventScript_1E0DD1
- applymovement 14, RustboroCity_Movement_2725AA
+ applymovement 14, Common_Movement_WalkInPlaceDown
waitmovement 0
playse SE_PIN
- applymovement 14, RustboroCity_Movement_272598
+ applymovement 14, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 14, RustboroCity_Movement_27259A
+ applymovement 14, Common_Movement_Delay48
waitmovement 0
applymovement 14, RustboroCity_Movement_1E1215
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, RustboroCity_Movement_2725A6
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceUp
waitmovement 0
goto RustboroCity_EventScript_1E0FF3
RustboroCity_EventScript_1E0E73:: @ 81E0E73
lockall
call RustboroCity_EventScript_1E0DD1
- applymovement 14, RustboroCity_Movement_2725AA
+ applymovement 14, Common_Movement_WalkInPlaceDown
waitmovement 0
playse SE_PIN
- applymovement 14, RustboroCity_Movement_272598
+ applymovement 14, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 14, RustboroCity_Movement_27259A
+ applymovement 14, Common_Movement_Delay48
waitmovement 0
applymovement 14, RustboroCity_Movement_1E121B
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, RustboroCity_Movement_2725A6
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceUp
waitmovement 0
goto RustboroCity_EventScript_1E0FF3
RustboroCity_EventScript_1E0EB3:: @ 81E0EB3
lockall
call RustboroCity_EventScript_1E0DD1
- applymovement 14, RustboroCity_Movement_2725AA
+ applymovement 14, Common_Movement_WalkInPlaceDown
waitmovement 0
playse SE_PIN
- applymovement 14, RustboroCity_Movement_272598
+ applymovement 14, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 14, RustboroCity_Movement_27259A
+ applymovement 14, Common_Movement_Delay48
waitmovement 0
applymovement 14, RustboroCity_Movement_1E1220
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, RustboroCity_Movement_2725A6
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceUp
waitmovement 0
goto RustboroCity_EventScript_1E0FF3
RustboroCity_EventScript_1E0EF3:: @ 81E0EF3
lockall
call RustboroCity_EventScript_1E0DD1
- applymovement 14, RustboroCity_Movement_2725AA
+ applymovement 14, Common_Movement_WalkInPlaceDown
waitmovement 0
playse SE_PIN
- applymovement 14, RustboroCity_Movement_272598
+ applymovement 14, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 14, RustboroCity_Movement_27259A
+ applymovement 14, Common_Movement_Delay48
waitmovement 0
applymovement 14, RustboroCity_Movement_1E1224
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, RustboroCity_Movement_2725A6
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceUp
waitmovement 0
goto RustboroCity_EventScript_1E0FF3
RustboroCity_EventScript_1E0F33:: @ 81E0F33
lockall
call RustboroCity_EventScript_1E0DD1
- applymovement 14, RustboroCity_Movement_2725AA
+ applymovement 14, Common_Movement_WalkInPlaceDown
waitmovement 0
playse SE_PIN
- applymovement 14, RustboroCity_Movement_272598
+ applymovement 14, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 14, RustboroCity_Movement_27259A
+ applymovement 14, Common_Movement_Delay48
waitmovement 0
applymovement 14, RustboroCity_Movement_1E1227
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, RustboroCity_Movement_2725A6
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceUp
waitmovement 0
goto RustboroCity_EventScript_1E0FF3
RustboroCity_EventScript_1E0F73:: @ 81E0F73
lockall
call RustboroCity_EventScript_1E0DD1
- applymovement 14, RustboroCity_Movement_2725AA
+ applymovement 14, Common_Movement_WalkInPlaceDown
waitmovement 0
playse SE_PIN
- applymovement 14, RustboroCity_Movement_272598
+ applymovement 14, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 14, RustboroCity_Movement_27259A
+ applymovement 14, Common_Movement_Delay48
waitmovement 0
applymovement 14, RustboroCity_Movement_1E122B
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, RustboroCity_Movement_2725A6
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceUp
waitmovement 0
goto RustboroCity_EventScript_1E0FF3
RustboroCity_EventScript_1E0FB3:: @ 81E0FB3
lockall
call RustboroCity_EventScript_1E0DD1
- applymovement 14, RustboroCity_Movement_2725AA
+ applymovement 14, Common_Movement_WalkInPlaceDown
waitmovement 0
playse SE_PIN
- applymovement 14, RustboroCity_Movement_272598
+ applymovement 14, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 14, RustboroCity_Movement_27259A
+ applymovement 14, Common_Movement_Delay48
waitmovement 0
applymovement 14, RustboroCity_Movement_1E1230
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, RustboroCity_Movement_2725A6
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceUp
waitmovement 0
goto RustboroCity_EventScript_1E0FF3
@@ -840,7 +840,7 @@ RustboroCity_EventScript_1E100B:: @ 81E100B
closemessage
delay 30
setflag FLAG_ENABLE_RIVAL_MATCH_CALL
- setvar VAR_0x405A, 8
+ setvar VAR_RUSTBORO_STATE, 8
setvar VAR_0x4063, 2
setvar VAR_0x8008, 0
msgbox RustboroCity_Text_1E1AFA, MSGBOX_YESNO
@@ -911,7 +911,7 @@ RustboroCity_EventScript_1E1114:: @ 81E1114
closemessage
delay 30
setflag FLAG_ENABLE_RIVAL_MATCH_CALL
- setvar VAR_0x405A, 8
+ setvar VAR_RUSTBORO_STATE, 8
setvar VAR_0x4063, 2
msgbox RustboroCity_Text_1E1E34, MSGBOX_YESNO
compare VAR_RESULT, 1
diff --git a/data/maps/RustboroCity_DevonCorp_1F/scripts.inc b/data/maps/RustboroCity_DevonCorp_1F/scripts.inc
index a7a84335b..4f1971c80 100644
--- a/data/maps/RustboroCity_DevonCorp_1F/scripts.inc
+++ b/data/maps/RustboroCity_DevonCorp_1F/scripts.inc
@@ -1,5 +1,5 @@
RustboroCity_DevonCorp_1F_MapScripts:: @ 8211245
- map_script 3, RustboroCity_DevonCorp_1F_MapScript1_21124B
+ map_script MAP_SCRIPT_ON_TRANSITION, RustboroCity_DevonCorp_1F_MapScript1_21124B
.byte 0
RustboroCity_DevonCorp_1F_MapScript1_21124B: @ 821124B
diff --git a/data/maps/RustboroCity_DevonCorp_2F/scripts.inc b/data/maps/RustboroCity_DevonCorp_2F/scripts.inc
index cce9ae394..5c6138c6c 100644
--- a/data/maps/RustboroCity_DevonCorp_2F/scripts.inc
+++ b/data/maps/RustboroCity_DevonCorp_2F/scripts.inc
@@ -1,20 +1,20 @@
RustboroCity_DevonCorp_2F_MapScripts:: @ 8211857
- map_script 3, RustboroCity_DevonCorp_2F_MapScript1_21185D
+ map_script MAP_SCRIPT_ON_TRANSITION, RustboroCity_DevonCorp_2F_MapScript1_21185D
.byte 0
RustboroCity_DevonCorp_2F_MapScript1_21185D: @ 821185D
- compare VAR_0x40C4, 1
+ compare VAR_FOSSIL_RESURRECTION_STATE, 1
call_if_eq RustboroCity_DevonCorp_2F_EventScript_211869
end
RustboroCity_DevonCorp_2F_EventScript_211869:: @ 8211869
- setvar VAR_0x40C4, 2
+ setvar VAR_FOSSIL_RESURRECTION_STATE, 2
return
RustboroCity_DevonCorp_2F_EventScript_21186F:: @ 821186F
lock
faceplayer
- compare VAR_0x40C4, 1
+ compare VAR_FOSSIL_RESURRECTION_STATE, 1
call_if_eq RustboroCity_DevonCorp_2F_EventScript_211869
msgbox RustboroCity_DevonCorp_2F_Text_211BFB, MSGBOX_DEFAULT
release
@@ -23,7 +23,7 @@ RustboroCity_DevonCorp_2F_EventScript_21186F:: @ 821186F
RustboroCity_DevonCorp_2F_EventScript_211886:: @ 8211886
lock
faceplayer
- compare VAR_0x40C4, 1
+ compare VAR_FOSSIL_RESURRECTION_STATE, 1
call_if_eq RustboroCity_DevonCorp_2F_EventScript_211869
goto_if_set FLAG_MET_DEVON_EMPLOYEE, RustboroCity_DevonCorp_2F_EventScript_2118A6
msgbox RustboroCity_DevonCorp_2F_Text_211C50, MSGBOX_DEFAULT
@@ -38,7 +38,7 @@ RustboroCity_DevonCorp_2F_EventScript_2118A6:: @ 82118A6
RustboroCity_DevonCorp_2F_EventScript_2118B0:: @ 82118B0
lock
faceplayer
- compare VAR_0x40C4, 1
+ compare VAR_FOSSIL_RESURRECTION_STATE, 1
call_if_eq RustboroCity_DevonCorp_2F_EventScript_211869
goto_if_set FLAG_RECEIVED_POKENAV, RustboroCity_DevonCorp_2F_EventScript_2118D0
msgbox RustboroCity_DevonCorp_2F_Text_211D9F, MSGBOX_DEFAULT
@@ -53,7 +53,7 @@ RustboroCity_DevonCorp_2F_EventScript_2118D0:: @ 82118D0
RustboroCity_DevonCorp_2F_EventScript_2118DA:: @ 82118DA
lock
faceplayer
- compare VAR_0x40C4, 1
+ compare VAR_FOSSIL_RESURRECTION_STATE, 1
call_if_eq RustboroCity_DevonCorp_2F_EventScript_211869
msgbox RustboroCity_DevonCorp_2F_Text_211EE0, MSGBOX_DEFAULT
release
@@ -62,9 +62,9 @@ RustboroCity_DevonCorp_2F_EventScript_2118DA:: @ 82118DA
RustboroCity_DevonCorp_2F_EventScript_2118F1:: @ 82118F1
lock
faceplayer
- compare VAR_0x40C4, 2
+ compare VAR_FOSSIL_RESURRECTION_STATE, 2
goto_if_eq RustboroCity_DevonCorp_2F_EventScript_211A03
- compare VAR_0x40C4, 1
+ compare VAR_FOSSIL_RESURRECTION_STATE, 1
goto_if_eq RustboroCity_DevonCorp_2F_EventScript_2119F9
msgbox RustboroCity_DevonCorp_2F_Text_211F48, MSGBOX_DEFAULT
checkitem ITEM_ROOT_FOSSIL, 1
@@ -79,9 +79,9 @@ RustboroCity_DevonCorp_2F_EventScript_2118F1:: @ 82118F1
RustboroCity_DevonCorp_2F_EventScript_211933:: @ 8211933
closemessage
playse SE_PIN
- applymovement 5, RustboroCity_DevonCorp_2F_Movement_272598
+ applymovement 5, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 5, RustboroCity_DevonCorp_2F_Movement_27259A
+ applymovement 5, Common_Movement_Delay48
waitmovement 0
msgbox RustboroCity_DevonCorp_2F_Text_211FA6, MSGBOX_YESNO
compare VAR_RESULT, 0
@@ -96,17 +96,17 @@ RustboroCity_DevonCorp_2F_EventScript_211974:: @ 8211974
bufferitemname 0, ITEM_ROOT_FOSSIL
msgbox RustboroCity_DevonCorp_2F_Text_212153, MSGBOX_DEFAULT
takeitem ITEM_ROOT_FOSSIL, 1
- setvar VAR_0x40C4, 1
- setvar VAR_0x40C5, 1
+ setvar VAR_FOSSIL_RESURRECTION_STATE, 1
+ setvar VAR_WHICH_FOSSIL_REVIVED, 1
release
end
RustboroCity_DevonCorp_2F_EventScript_211991:: @ 8211991
closemessage
playse SE_PIN
- applymovement 5, RustboroCity_DevonCorp_2F_Movement_272598
+ applymovement 5, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 5, RustboroCity_DevonCorp_2F_Movement_27259A
+ applymovement 5, Common_Movement_Delay48
waitmovement 0
msgbox RustboroCity_DevonCorp_2F_Text_211FA6, MSGBOX_YESNO
compare VAR_RESULT, 0
@@ -121,8 +121,8 @@ RustboroCity_DevonCorp_2F_EventScript_2119D2:: @ 82119D2
bufferitemname 0, ITEM_CLAW_FOSSIL
msgbox RustboroCity_DevonCorp_2F_Text_212153, MSGBOX_DEFAULT
takeitem ITEM_CLAW_FOSSIL, 1
- setvar VAR_0x40C4, 1
- setvar VAR_0x40C5, 2
+ setvar VAR_FOSSIL_RESURRECTION_STATE, 1
+ setvar VAR_WHICH_FOSSIL_REVIVED, 2
release
end
@@ -137,9 +137,9 @@ RustboroCity_DevonCorp_2F_EventScript_2119F9:: @ 82119F9
end
RustboroCity_DevonCorp_2F_EventScript_211A03:: @ 8211A03
- compare VAR_0x40C5, 1
+ compare VAR_WHICH_FOSSIL_REVIVED, 1
goto_if_eq RustboroCity_DevonCorp_2F_EventScript_211A1A
- compare VAR_0x40C5, 2
+ compare VAR_WHICH_FOSSIL_REVIVED, 2
goto_if_eq RustboroCity_DevonCorp_2F_EventScript_211A2C
end
@@ -171,7 +171,7 @@ RustboroCity_DevonCorp_2F_EventScript_211A6E:: @ 8211A6E
compare VAR_RESULT, 0
goto_if_eq RustboroCity_DevonCorp_2F_EventScript_211AD7
call RustboroCity_DevonCorp_2F_EventScript_27378B
- call RustboroCity_DevonCorp_2F_EventScript_2723DD
+ call Common_EventScript_NameReceivedPokemon
goto RustboroCity_DevonCorp_2F_EventScript_211AD7
end
@@ -199,7 +199,7 @@ RustboroCity_DevonCorp_2F_EventScript_211AC4:: @ 8211AC4
return
RustboroCity_DevonCorp_2F_EventScript_211AD7:: @ 8211AD7
- setvar VAR_0x40C4, 0
+ setvar VAR_FOSSIL_RESURRECTION_STATE, 0
setflag FLAG_RECEIVED_REVIVED_FOSSIL_MON
release
end
@@ -220,7 +220,7 @@ RustboroCity_DevonCorp_2F_EventScript_211B11:: @ 8211B11
compare VAR_RESULT, 0
goto_if_eq RustboroCity_DevonCorp_2F_EventScript_211B7A
call RustboroCity_DevonCorp_2F_EventScript_27378B
- call RustboroCity_DevonCorp_2F_EventScript_2723DD
+ call Common_EventScript_NameReceivedPokemon
goto RustboroCity_DevonCorp_2F_EventScript_211B7A
end
@@ -248,7 +248,7 @@ RustboroCity_DevonCorp_2F_EventScript_211B67:: @ 8211B67
return
RustboroCity_DevonCorp_2F_EventScript_211B7A:: @ 8211B7A
- setvar VAR_0x40C4, 0
+ setvar VAR_FOSSIL_RESURRECTION_STATE, 0
setflag FLAG_RECEIVED_REVIVED_FOSSIL_MON
release
end
@@ -279,9 +279,9 @@ RustboroCity_DevonCorp_2F_EventScript_211BCD:: @ 8211BCD
RustboroCity_DevonCorp_2F_EventScript_211BCF:: @ 8211BCF
lock
faceplayer
- compare VAR_0x40C4, 1
+ compare VAR_FOSSIL_RESURRECTION_STATE, 1
call_if_eq RustboroCity_DevonCorp_2F_EventScript_211869
- compare VAR_0x405A, 6
+ compare VAR_RUSTBORO_STATE, 6
goto_if_ge RustboroCity_DevonCorp_2F_EventScript_211BF1
msgbox RustboroCity_DevonCorp_2F_Text_212338, MSGBOX_DEFAULT
release
diff --git a/data/maps/RustboroCity_DevonCorp_3F/scripts.inc b/data/maps/RustboroCity_DevonCorp_3F/scripts.inc
index 9d5fbe58b..6d0a78a42 100644
--- a/data/maps/RustboroCity_DevonCorp_3F/scripts.inc
+++ b/data/maps/RustboroCity_DevonCorp_3F/scripts.inc
@@ -1,11 +1,11 @@
RustboroCity_DevonCorp_3F_MapScripts:: @ 821242D
- map_script 3, RustboroCity_DevonCorp_3F_MapScript1_21243D
- map_script 4, RustboroCity_DevonCorp_3F_MapScript2_212455
- map_script 2, RustboroCity_DevonCorp_3F_MapScript2_212464
+ map_script MAP_SCRIPT_ON_TRANSITION, RustboroCity_DevonCorp_3F_MapScript1_21243D
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, RustboroCity_DevonCorp_3F_MapScript2_212455
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, RustboroCity_DevonCorp_3F_MapScript2_212464
.byte 0
RustboroCity_DevonCorp_3F_MapScript1_21243D: @ 821243D
- compare VAR_0x408F, 0
+ compare VAR_DEVON_CORP_3F_STATE, 0
call_if_eq RustboroCity_DevonCorp_3F_EventScript_212449
end
@@ -15,7 +15,7 @@ RustboroCity_DevonCorp_3F_EventScript_212449:: @ 8212449
return
RustboroCity_DevonCorp_3F_MapScript2_212455: @ 8212455
- map_script_2 VAR_0x408F, 0, RustboroCity_DevonCorp_3F_EventScript_21245F
+ map_script_2 VAR_DEVON_CORP_3F_STATE, 0, RustboroCity_DevonCorp_3F_EventScript_21245F
.2byte 0
RustboroCity_DevonCorp_3F_EventScript_21245F:: @ 821245F
@@ -23,7 +23,7 @@ RustboroCity_DevonCorp_3F_EventScript_21245F:: @ 821245F
end
RustboroCity_DevonCorp_3F_MapScript2_212464: @ 8212464
- map_script_2 VAR_0x408F, 0, RustboroCity_DevonCorp_3F_EventScript_21246E
+ map_script_2 VAR_DEVON_CORP_3F_STATE, 0, RustboroCity_DevonCorp_3F_EventScript_21246E
.2byte 0
RustboroCity_DevonCorp_3F_EventScript_21246E:: @ 821246E
@@ -58,17 +58,17 @@ RustboroCity_DevonCorp_3F_EventScript_21246E:: @ 821246E
setflag FLAG_HIDE_RUSTBORO_CITY_POKEMON_SCHOOL_SCOTT
msgbox RustboroCity_DevonCorp_3F_Text_212837, MSGBOX_DEFAULT
closemessage
- call RustboroCity_DevonCorp_3F_EventScript_272083
+ call Common_EventScript_OutOfCenterPartyHeal
msgbox RustboroCity_DevonCorp_3F_Text_2129D2, MSGBOX_DEFAULT
setflag FLAG_HIDE_ROUTE_116_TUNNELER
clearflag FLAG_HIDE_RUSTURF_TUNNEL_LOVER_MAN
clearflag FLAG_HIDE_RUSTURF_TUNNEL_LOVER_WOMAN
clearflag FLAG_HIDE_BRINEYS_HOUSE_MR_BRINEY
clearflag FLAG_HIDE_BRINEYS_HOUSE_PEEKO
- setvar VAR_0x4096, 1
+ setvar VAR_BRINEY_LOCATION, 1
clearflag FLAG_HIDE_RUSBORO_CITY_RIVAL
- setvar VAR_0x408F, 1
- setvar VAR_0x405A, 6
+ setvar VAR_DEVON_CORP_3F_STATE, 1
+ setvar VAR_RUSTBORO_STATE, 6
releaseall
end
@@ -154,7 +154,7 @@ RustboroCity_DevonCorp_3F_EventScript_21256C:: @ 821256C
goto_if_set FLAG_DELIVERED_STEVEN_LETTER, RustboroCity_DevonCorp_3F_EventScript_212595
msgbox RustboroCity_DevonCorp_3F_Text_212A09, MSGBOX_DEFAULT
closemessage
- applymovement VAR_LAST_TALKED, RustboroCity_DevonCorp_3F_Movement_2725A2
+ applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -163,11 +163,11 @@ RustboroCity_DevonCorp_3F_EventScript_212595:: @ 8212595
msgbox RustboroCity_DevonCorp_3F_Text_212A29, MSGBOX_DEFAULT
giveitem_std ITEM_EXP_SHARE
compare VAR_RESULT, 0
- goto_if_eq RustboroCity_DevonCorp_3F_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
setflag FLAG_RECEIVED_EXP_SHARE
msgbox RustboroCity_DevonCorp_3F_Text_212A9E, MSGBOX_DEFAULT
closemessage
- applymovement VAR_LAST_TALKED, RustboroCity_DevonCorp_3F_Movement_2725A2
+ applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -175,7 +175,7 @@ RustboroCity_DevonCorp_3F_EventScript_212595:: @ 8212595
RustboroCity_DevonCorp_3F_EventScript_2125CC:: @ 82125CC
msgbox RustboroCity_DevonCorp_3F_Text_212B78, MSGBOX_DEFAULT
closemessage
- applymovement VAR_LAST_TALKED, RustboroCity_DevonCorp_3F_Movement_2725A2
+ applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
diff --git a/data/maps/RustboroCity_Flat1_2F/scripts.inc b/data/maps/RustboroCity_Flat1_2F/scripts.inc
index 7798e72e6..ec59115ef 100644
--- a/data/maps/RustboroCity_Flat1_2F/scripts.inc
+++ b/data/maps/RustboroCity_Flat1_2F/scripts.inc
@@ -59,7 +59,7 @@ RustboroCity_Flat1_2F_EventScript_2151F8:: @ 82151F8
msgbox RustboroCity_Flat1_2F_Text_215535, MSGBOX_DEFAULT
call RustboroCity_Flat1_2F_EventScript_215238
msgbox RustboroCity_Flat1_2F_Text_215565, MSGBOX_DEFAULT
- applymovement 6, RustboroCity_Flat1_2F_Movement_27259E
+ applymovement 6, Common_Movement_FacePlayer
waitmovement 0
msgbox RustboroCity_Flat1_2F_Text_215792, MSGBOX_DEFAULT
release
diff --git a/data/maps/RustboroCity_Flat2_2F/scripts.inc b/data/maps/RustboroCity_Flat2_2F/scripts.inc
index 639e93884..d4b940c9f 100644
--- a/data/maps/RustboroCity_Flat2_2F/scripts.inc
+++ b/data/maps/RustboroCity_Flat2_2F/scripts.inc
@@ -12,7 +12,7 @@ RustboroCity_Flat2_2F_EventScript_215FE1:: @ 8215FE1
msgbox RustboroCity_Flat2_2F_Text_21605A, MSGBOX_DEFAULT
giveitem_std ITEM_PREMIER_BALL
compare VAR_RESULT, 0
- goto_if_eq RustboroCity_Flat2_2F_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
setflag FLAG_RECEIVED_PREMIER_BALL_RUSTBORO
release
end
diff --git a/data/maps/RustboroCity_Gym/scripts.inc b/data/maps/RustboroCity_Gym/scripts.inc
index 4581707ce..aaa3b3f0b 100644
--- a/data/maps/RustboroCity_Gym/scripts.inc
+++ b/data/maps/RustboroCity_Gym/scripts.inc
@@ -14,15 +14,15 @@ RustboroCity_Gym_EventScript_212F31:: @ 8212F31
RustboroCity_Gym_EventScript_212F66:: @ 8212F66
message RustboroCity_Gym_Text_2137EC
waitmessage
- call RustboroCity_Gym_EventScript_27207E
+ call Common_EventScript_PlayGymBadgeFanfare
msgbox RustboroCity_Gym_Text_213816, MSGBOX_DEFAULT
setflag FLAG_DEFEATED_RUSTBORO_GYM
setflag FLAG_BADGE01_GET
- setvar VAR_0x405A, 1
- addvar VAR_0x4085, 1
+ setvar VAR_RUSTBORO_STATE, 1
+ addvar VAR_PETALBURG_GYM_STATE, 1
setvar VAR_0x8008, 1
call RustboroCity_Gym_EventScript_271F43
- compare VAR_0x4085, 6
+ compare VAR_PETALBURG_GYM_STATE, 6
call_if_eq RustboroCity_Gym_EventScript_271E84
goto RustboroCity_Gym_EventScript_212FA4
end
@@ -30,7 +30,7 @@ RustboroCity_Gym_EventScript_212F66:: @ 8212F66
RustboroCity_Gym_EventScript_212FA4:: @ 8212FA4
giveitem_std ITEM_TM39
compare VAR_RESULT, 0
- goto_if_eq RustboroCity_Gym_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
setflag FLAG_RECEIVED_TM39
msgbox RustboroCity_Gym_Text_2138B1, MSGBOX_DEFAULT
release
diff --git a/data/maps/RustboroCity_PokemonCenter_1F/scripts.inc b/data/maps/RustboroCity_PokemonCenter_1F/scripts.inc
index f76603dbd..e7bea0f0d 100644
--- a/data/maps/RustboroCity_PokemonCenter_1F/scripts.inc
+++ b/data/maps/RustboroCity_PokemonCenter_1F/scripts.inc
@@ -1,6 +1,6 @@
RustboroCity_PokemonCenter_1F_MapScripts:: @ 8214D62
- map_script 3, RustboroCity_PokemonCenter_1F_MapScript1_214D6D
- map_script 5, RustboroCity_PokemonCenter_1F_MapScript1_277C30
+ map_script MAP_SCRIPT_ON_TRANSITION, RustboroCity_PokemonCenter_1F_MapScript1_214D6D
+ map_script MAP_SCRIPT_ON_RESUME, RustboroCity_PokemonCenter_1F_MapScript1_277C30
.byte 0
RustboroCity_PokemonCenter_1F_MapScript1_214D6D: @ 8214D6D
diff --git a/data/maps/RustboroCity_PokemonCenter_2F/scripts.inc b/data/maps/RustboroCity_PokemonCenter_2F/scripts.inc
index a1bdeba5b..fac3cb059 100644
--- a/data/maps/RustboroCity_PokemonCenter_2F/scripts.inc
+++ b/data/maps/RustboroCity_PokemonCenter_2F/scripts.inc
@@ -1,8 +1,8 @@
RustboroCity_PokemonCenter_2F_MapScripts:: @ 8214EDE
- map_script 2, RustboroCity_PokemonCenter_2F_MapScript2_276C3B
- map_script 4, RustboroCity_PokemonCenter_2F_MapScript2_276B6C
- map_script 1, RustboroCity_PokemonCenter_2F_MapScript1_276BBE
- map_script 3, RustboroCity_PokemonCenter_2F_MapScript1_276ACF
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, RustboroCity_PokemonCenter_2F_MapScript2_276C3B
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, RustboroCity_PokemonCenter_2F_MapScript2_276B6C
+ map_script MAP_SCRIPT_ON_LOAD, RustboroCity_PokemonCenter_2F_MapScript1_276BBE
+ map_script MAP_SCRIPT_ON_TRANSITION, RustboroCity_PokemonCenter_2F_MapScript1_276ACF
.byte 0
RustboroCity_PokemonCenter_2F_EventScript_214EF3:: @ 8214EF3
diff --git a/data/maps/RustboroCity_PokemonSchool/scripts.inc b/data/maps/RustboroCity_PokemonSchool/scripts.inc
index c01e4a436..74394f9a5 100644
--- a/data/maps/RustboroCity_PokemonSchool/scripts.inc
+++ b/data/maps/RustboroCity_PokemonSchool/scripts.inc
@@ -85,9 +85,9 @@ RustboroCity_PokemonSchool_EventScript_213F95:: @ 8213F95
msgbox RustboroCity_PokemonSchool_Text_214433, MSGBOX_DEFAULT
giveitem_std ITEM_QUICK_CLAW
compare VAR_RESULT, 0
- goto_if_eq RustboroCity_PokemonSchool_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
closemessage
- applymovement VAR_LAST_TALKED, RustboroCity_PokemonSchool_Movement_2725AA
+ applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceDown
waitmovement 0
setflag FLAG_RECEIVED_QUICK_CLAW
release
@@ -106,7 +106,7 @@ RustboroCity_PokemonSchool_EventScript_213FF0:: @ 8213FF0
RustboroCity_PokemonSchool_EventScript_213FFB:: @ 8213FFB
msgbox RustboroCity_PokemonSchool_Text_2144C8, MSGBOX_DEFAULT
closemessage
- applymovement VAR_LAST_TALKED, RustboroCity_PokemonSchool_Movement_2725AA
+ applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceDown
waitmovement 0
release
end
diff --git a/data/maps/RusturfTunnel/scripts.inc b/data/maps/RusturfTunnel/scripts.inc
index 59d0789ba..8e7e2342e 100644
--- a/data/maps/RusturfTunnel/scripts.inc
+++ b/data/maps/RusturfTunnel/scripts.inc
@@ -1,6 +1,6 @@
RusturfTunnel_MapScripts:: @ 822CE27
- map_script 3, RusturfTunnel_MapScript1_22CE44
- map_script 2, RusturfTunnel_MapScript2_22CE32
+ map_script MAP_SCRIPT_ON_TRANSITION, RusturfTunnel_MapScript1_22CE44
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, RusturfTunnel_MapScript2_22CE32
.byte 0
RusturfTunnel_MapScript2_22CE32: @ 822CE32
@@ -23,7 +23,7 @@ RusturfTunnel_EventScript_22CE5F:: @ 822CE5F
faceplayer
msgbox RusturfTunnel_Text_22D7A3, MSGBOX_DEFAULT
closemessage
- applymovement VAR_LAST_TALKED, RusturfTunnel_Movement_2725A2
+ applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -35,7 +35,7 @@ RusturfTunnel_EventScript_22CE76:: @ 822CE76
setflag FLAG_TEMP_1
msgbox RusturfTunnel_Text_22D510, MSGBOX_DEFAULT
closemessage
- applymovement VAR_LAST_TALKED, RusturfTunnel_Movement_2725A2
+ applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -43,7 +43,7 @@ RusturfTunnel_EventScript_22CE76:: @ 822CE76
RusturfTunnel_EventScript_22CE99:: @ 822CE99
msgbox RusturfTunnel_Text_22D5F3, MSGBOX_DEFAULT
closemessage
- applymovement VAR_LAST_TALKED, RusturfTunnel_Movement_2725A2
+ applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -94,7 +94,7 @@ RusturfTunnel_EventScript_22CF6F:: @ 822CF6F
applymovement EVENT_OBJ_ID_PLAYER, RusturfTunnel_Movement_22D045
applymovement 1, RusturfTunnel_Movement_22D06C
waitmovement 0
- applymovement 10, RusturfTunnel_Movement_2725AA
+ applymovement 10, Common_Movement_WalkInPlaceDown
waitmovement 0
return
@@ -102,14 +102,14 @@ RusturfTunnel_EventScript_22CF8B:: @ 822CF8B
applymovement EVENT_OBJ_ID_PLAYER, RusturfTunnel_Movement_22D045
applymovement 1, RusturfTunnel_Movement_22D06C
waitmovement 0
- applymovement 10, RusturfTunnel_Movement_2725AA
+ applymovement 10, Common_Movement_WalkInPlaceDown
waitmovement 0
return
RusturfTunnel_EventScript_22CFA7:: @ 822CFA7
- applymovement 1, RusturfTunnel_Movement_2725A6
+ applymovement 1, Common_Movement_WalkInPlaceUp
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, RusturfTunnel_Movement_2725AA
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceDown
waitmovement 0
return
@@ -142,9 +142,9 @@ RusturfTunnel_EventScript_22CFE6:: @ 822CFE6
RusturfTunnel_EventScript_22CFFF:: @ 822CFFF
playse SE_PIN
- applymovement 1, RusturfTunnel_Movement_272598
+ applymovement 1, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 1, RusturfTunnel_Movement_27259A
+ applymovement 1, Common_Movement_Delay48
waitmovement 0
return
@@ -328,7 +328,7 @@ RusturfTunnel_EventScript_22D0C2:: @ 822D0C2
applymovement 5, RusturfTunnel_Movement_22D1A4
waitmovement 0
msgbox RusturfTunnel_Text_22D395, MSGBOX_DEFAULT
- applymovement 5, RusturfTunnel_Movement_27259E
+ applymovement 5, Common_Movement_FacePlayer
waitmovement 0
message RusturfTunnel_Text_22D3BA
waitmessage
@@ -345,8 +345,8 @@ RusturfTunnel_EventScript_22D0C2:: @ 822D0C2
removeobject 7
clearflag FLAG_DEVON_GOODS_STOLEN
setflag FLAG_RECOVERED_DEVON_GOODS
- setvar VAR_0x405A, 4
- setvar VAR_0x4090, 1
+ setvar VAR_RUSTBORO_STATE, 4
+ setvar VAR_BRINEY_HOUSE_STATE, 1
setflag FLAG_HIDE_ROUTE_116_MR_BRINEY
release
end
diff --git a/data/maps/SSTidalCorridor/scripts.inc b/data/maps/SSTidalCorridor/scripts.inc
index 204d70e14..ededf1e5f 100644
--- a/data/maps/SSTidalCorridor/scripts.inc
+++ b/data/maps/SSTidalCorridor/scripts.inc
@@ -1,5 +1,5 @@
SSTidalCorridor_MapScripts:: @ 823BFCF
- map_script 2, SSTidalCorridor_MapScript2_23BFD5
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, SSTidalCorridor_MapScript2_23BFD5
.byte 0
SSTidalCorridor_MapScript2_23BFD5: @ 823BFD5
@@ -201,7 +201,7 @@ SSTidalCorridor_EventScript_23C219:: @ 823C219
lockall
applymovement 5, SSTidalCorridor_Movement_23C26D
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, SSTidalCorridor_Movement_2725A8
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceRight
waitmovement 0
msgbox SSTidalCorridor_Text_23C28F, MSGBOX_DEFAULT
closemessage
diff --git a/data/maps/SSTidalRooms/scripts.inc b/data/maps/SSTidalRooms/scripts.inc
index a021f5272..3b8df90a3 100644
--- a/data/maps/SSTidalRooms/scripts.inc
+++ b/data/maps/SSTidalRooms/scripts.inc
@@ -8,7 +8,7 @@ SSTidalRooms_EventScript_23C9F2:: @ 823C9F2
msgbox SSTidalRooms_Text_23D098, MSGBOX_DEFAULT
giveitem_std ITEM_TM49
compare VAR_RESULT, 0
- goto_if_eq SSTidalRooms_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
setflag FLAG_RECEIVED_TM49
msgbox SSTidalRooms_Text_23D145, MSGBOX_DEFAULT
release
@@ -23,7 +23,7 @@ SSTidalRooms_EventScript_23CA33:: @ 823CA33
lockall
msgbox SSTidalRooms_Text_23CAF2, MSGBOX_DEFAULT
closemessage
- call SSTidalRooms_EventScript_272083
+ call Common_EventScript_OutOfCenterPartyHeal
call SSTidalRooms_EventScript_23C0A7
releaseall
end
diff --git a/data/maps/SafariZone_South/scripts.inc b/data/maps/SafariZone_South/scripts.inc
index ab6f70f86..75ec95d33 100644
--- a/data/maps/SafariZone_South/scripts.inc
+++ b/data/maps/SafariZone_South/scripts.inc
@@ -1,10 +1,10 @@
SafariZone_South_MapScripts:: @ 823D279
- map_script 3, SafariZone_South_MapScript1_23D2B1
- map_script 2, SafariZone_South_MapScript2_23D284
+ map_script MAP_SCRIPT_ON_TRANSITION, SafariZone_South_MapScript1_23D2B1
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, SafariZone_South_MapScript2_23D284
.byte 0
SafariZone_South_MapScript2_23D284: @ 823D284
- map_script_2 VAR_0x40A4, 2, SafariZone_South_EventScript_23D28E
+ map_script_2 VAR_SAFARI_ZONE_STATE, 2, SafariZone_South_EventScript_23D28E
.2byte 0
SafariZone_South_EventScript_23D28E:: @ 823D28E
@@ -14,12 +14,12 @@ SafariZone_South_EventScript_23D28E:: @ 823D28E
applymovement 1, SafariZone_South_Movement_23D2C7
waitmovement 0
setobjectxyperm 1, 32, 34
- setvar VAR_0x40A4, 0
+ setvar VAR_SAFARI_ZONE_STATE, 0
releaseall
end
SafariZone_South_MapScript1_23D2B1: @ 823D2B1
- compare VAR_0x40A4, 2
+ compare VAR_SAFARI_ZONE_STATE, 2
call_if_eq SafariZone_South_EventScript_23D2BD
end
@@ -90,7 +90,7 @@ SafariZone_South_EventScript_23D359:: @ 823D359
end
SafariZone_South_EventScript_23D373:: @ 823D373
- setvar VAR_0x40A4, 1
+ setvar VAR_SAFARI_ZONE_STATE, 1
special ExitSafariMode
warpdoor MAP_ROUTE121_SAFARI_ZONE_ENTRANCE, 255, 2, 5
waitstate
diff --git a/data/maps/ScorchedSlab/scripts.inc b/data/maps/ScorchedSlab/scripts.inc
index f83724ec5..62a546780 100644
--- a/data/maps/ScorchedSlab/scripts.inc
+++ b/data/maps/ScorchedSlab/scripts.inc
@@ -1,5 +1,5 @@
ScorchedSlab_MapScripts:: @ 8239291
- map_script 3, ScorchedSlab_MapScript1_239297
+ map_script MAP_SCRIPT_ON_TRANSITION, ScorchedSlab_MapScript1_239297
.byte 0
ScorchedSlab_MapScript1_239297: @ 8239297
diff --git a/data/maps/SeafloorCavern_Entrance/scripts.inc b/data/maps/SeafloorCavern_Entrance/scripts.inc
index 9bbb9cbdc..045c0e065 100644
--- a/data/maps/SeafloorCavern_Entrance/scripts.inc
+++ b/data/maps/SeafloorCavern_Entrance/scripts.inc
@@ -1,5 +1,5 @@
SeafloorCavern_Entrance_MapScripts:: @ 823446E
- map_script 5, SeafloorCavern_Entrance_MapScript1_234474
+ map_script MAP_SCRIPT_ON_RESUME, SeafloorCavern_Entrance_MapScript1_234474
.byte 0
SeafloorCavern_Entrance_MapScript1_234474: @ 8234474
@@ -13,9 +13,9 @@ SeafloorCavern_Entrance_EventScript_234485:: @ 8234485
goto_if_eq SeafloorCavern_Entrance_EventScript_2344ED
waitse
playse SE_PIN
- applymovement 1, SeafloorCavern_Entrance_Movement_272598
+ applymovement 1, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 1, SeafloorCavern_Entrance_Movement_27259A
+ applymovement 1, Common_Movement_Delay48
waitmovement 0
delay 20
compare VAR_FACING, 3
@@ -29,7 +29,7 @@ SeafloorCavern_Entrance_EventScript_234485:: @ 8234485
moveobjectoffscreen 1
msgbox SeafloorCavern_Entrance_Text_234544, MSGBOX_DEFAULT
closemessage
- applymovement 1, SeafloorCavern_Entrance_Movement_2725A6
+ applymovement 1, Common_Movement_WalkInPlaceUp
waitmovement 0
releaseall
end
@@ -43,23 +43,23 @@ SeafloorCavern_Entrance_EventScript_2344ED:: @ 82344ED
call_if_eq SeafloorCavern_Entrance_EventScript_234539
msgbox SeafloorCavern_Entrance_Text_2346C8, MSGBOX_DEFAULT
closemessage
- applymovement 1, SeafloorCavern_Entrance_Movement_2725A6
+ applymovement 1, Common_Movement_WalkInPlaceUp
waitmovement 0
releaseall
end
SeafloorCavern_Entrance_EventScript_234523:: @ 8234523
- applymovement 1, SeafloorCavern_Entrance_Movement_2725A4
+ applymovement 1, Common_Movement_WalkInPlaceLeft
waitmovement 0
return
SeafloorCavern_Entrance_EventScript_23452E:: @ 823452E
- applymovement 1, SeafloorCavern_Entrance_Movement_2725A8
+ applymovement 1, Common_Movement_WalkInPlaceRight
waitmovement 0
return
SeafloorCavern_Entrance_EventScript_234539:: @ 8234539
- applymovement 1, SeafloorCavern_Entrance_Movement_2725AA
+ applymovement 1, Common_Movement_WalkInPlaceDown
waitmovement 0
return
diff --git a/data/maps/SeafloorCavern_Room9/map.json b/data/maps/SeafloorCavern_Room9/map.json
index fe02ad28b..f4f7fd336 100644
--- a/data/maps/SeafloorCavern_Room9/map.json
+++ b/data/maps/SeafloorCavern_Room9/map.json
@@ -121,7 +121,7 @@
"x": 17,
"y": 42,
"elevation": 3,
- "var": "VAR_0x40A2",
+ "var": "VAR_SEAFLOOR_CAVERN_STATE",
"var_value": "0",
"script": "SeafloorCavern_Room9_EventScript_234DC9"
}
diff --git a/data/maps/SeafloorCavern_Room9/scripts.inc b/data/maps/SeafloorCavern_Room9/scripts.inc
index 6ab802ee4..7fe6386c3 100644
--- a/data/maps/SeafloorCavern_Room9/scripts.inc
+++ b/data/maps/SeafloorCavern_Room9/scripts.inc
@@ -7,7 +7,7 @@ SeafloorCavern_Room9_EventScript_234DC9:: @ 8234DC9
setvar VAR_0x8005, 3
setvar VAR_0x8006, 4
setvar VAR_0x8007, 5
- applymovement EVENT_OBJ_ID_PLAYER, SeafloorCavern_Room9_Movement_2725A6
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceUp
waitmovement 0
applymovement EVENT_OBJ_ID_PLAYER, SeafloorCavern_Room9_Movement_23505C
waitmovement 0
@@ -15,15 +15,15 @@ SeafloorCavern_Room9_EventScript_234DC9:: @ 8234DC9
msgbox SeafloorCavern_Room9_Text_23505F, MSGBOX_DEFAULT
closemessage
addobject VAR_0x8004
- applymovement EVENT_OBJ_ID_PLAYER, SeafloorCavern_Room9_Movement_2725A4
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceLeft
waitmovement 0
applymovement VAR_0x8004, SeafloorCavern_Room9_Movement_23502A
waitmovement 0
msgbox SeafloorCavern_Room9_Text_23507C, MSGBOX_DEFAULT
- applymovement VAR_0x8004, SeafloorCavern_Room9_Movement_2725A6
+ applymovement VAR_0x8004, Common_Movement_WalkInPlaceUp
waitmovement 0
msgbox SeafloorCavern_Room9_Text_2350A6, MSGBOX_DEFAULT
- applymovement VAR_0x8004, SeafloorCavern_Room9_Movement_27259E
+ applymovement VAR_0x8004, Common_Movement_FacePlayer
waitmovement 0
msgbox SeafloorCavern_Room9_Text_23512C, MSGBOX_DEFAULT
trainerbattle_no_intro TRAINER_ARCHIE, SeafloorCavern_Room9_Text_2351BC
@@ -47,8 +47,8 @@ SeafloorCavern_Room9_EventScript_234DC9:: @ 8234DC9
playfanfare MUS_ME_TAMA
playse SE_TAMA
special sub_80B0534
- applymovement VAR_0x8004, SeafloorCavern_Room9_Movement_2725A6
- applymovement EVENT_OBJ_ID_PLAYER, SeafloorCavern_Room9_Movement_2725A6
+ applymovement VAR_0x8004, Common_Movement_WalkInPlaceUp
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceUp
waitmovement 0
delay 150
removeobject 7
@@ -82,7 +82,7 @@ SeafloorCavern_Room9_EventScript_234DC9:: @ 8234DC9
setvar VAR_0x8007, 5
msgbox SeafloorCavern_Room9_Text_2352A7, MSGBOX_DEFAULT
playse SE_PC_LOGIN
- applymovement EVENT_OBJ_ID_PLAYER, SeafloorCavern_Room9_Movement_2725A4
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceLeft
waitmovement 0
msgbox SeafloorCavern_Room9_Text_2352F6, MSGBOX_DEFAULT
closemessage
@@ -92,7 +92,7 @@ SeafloorCavern_Room9_EventScript_234DC9:: @ 8234DC9
closemessage
playse SE_PC_OFF
delay 20
- applymovement VAR_0x8004, SeafloorCavern_Room9_Movement_2725AA
+ applymovement VAR_0x8004, Common_Movement_WalkInPlaceDown
waitmovement 0
msgbox SeafloorCavern_Room9_Text_23546F, MSGBOX_DEFAULT
closemessage
@@ -103,13 +103,13 @@ SeafloorCavern_Room9_EventScript_234DC9:: @ 8234DC9
applymovement VAR_0x8006, SeafloorCavern_Room9_Movement_235057
applymovement VAR_0x8005, SeafloorCavern_Room9_Movement_23504E
waitmovement 0
- applymovement VAR_0x8004, SeafloorCavern_Room9_Movement_2725A4
+ applymovement VAR_0x8004, Common_Movement_WalkInPlaceLeft
waitmovement 0
msgbox SeafloorCavern_Room9_Text_2354F0, MSGBOX_DEFAULT
playse SE_PIN
- applymovement VAR_0x8004, SeafloorCavern_Room9_Movement_272598
+ applymovement VAR_0x8004, Common_Movement_ExclamationMark
waitmovement 0
- applymovement VAR_0x8004, SeafloorCavern_Room9_Movement_27259A
+ applymovement VAR_0x8004, Common_Movement_Delay48
waitmovement 0
msgbox SeafloorCavern_Room9_Text_2355C2, MSGBOX_DEFAULT
msgbox SeafloorCavern_Room9_Text_235692, MSGBOX_DEFAULT
@@ -118,7 +118,7 @@ SeafloorCavern_Room9_EventScript_234DC9:: @ 8234DC9
applymovement VAR_0x8004, SeafloorCavern_Room9_Movement_23503A
waitmovement 0
msgbox SeafloorCavern_Room9_Text_235723, MSGBOX_DEFAULT
- setvar VAR_0x407B, 1
+ setvar VAR_ROUTE128_STATE, 1
setvar VAR_0x405E, 1
clearflag FLAG_HIDE_SOOTOPOLIS_CITY_STEVEN
clearflag FLAG_HIDE_SOOTOPOLIS_CITY_ARCHIE
@@ -133,8 +133,8 @@ SeafloorCavern_Room9_EventScript_234DC9:: @ 8234DC9
setflag FLAG_SYS_WEATHER_CTRL
setflag FLAG_KYOGRE_ESCAPED_SEAFLOOR_CAVERN
setflag FLAG_HIDE_MOSSDEEP_CITY_STEVENS_HOUSE_STEVEN
- setvar VAR_0x40C6, 2
- setvar VAR_0x40A2, 1
+ setvar VAR_STEVENS_HOUSE_STATE, 2
+ setvar VAR_SEAFLOOR_CAVERN_STATE, 1
setflag FLAG_HIDE_SEAFLOOR_CAVERN_ROOM_9_ARCHIE
setflag FLAG_HIDE_SEAFLOOR_CAVERN_ROOM_9_MAXIE
setflag FLAG_HIDE_SEAFLOOR_CAVERN_ROOM_9_MAGMA_GRUNTS
diff --git a/data/maps/SealedChamber_OuterRoom/scripts.inc b/data/maps/SealedChamber_OuterRoom/scripts.inc
index 4b461a684..71e6426fe 100644
--- a/data/maps/SealedChamber_OuterRoom/scripts.inc
+++ b/data/maps/SealedChamber_OuterRoom/scripts.inc
@@ -1,7 +1,7 @@
SealedChamber_OuterRoom_MapScripts:: @ 8239106
- map_script 5, SealedChamber_OuterRoom_MapScript1_239116
- map_script 3, SealedChamber_OuterRoom_MapScript1_239127
- map_script 1, SealedChamber_OuterRoom_MapScript1_23912B
+ map_script MAP_SCRIPT_ON_RESUME, SealedChamber_OuterRoom_MapScript1_239116
+ map_script MAP_SCRIPT_ON_TRANSITION, SealedChamber_OuterRoom_MapScript1_239127
+ map_script MAP_SCRIPT_ON_LOAD, SealedChamber_OuterRoom_MapScript1_23912B
.byte 0
SealedChamber_OuterRoom_MapScript1_239116: @ 8239116
diff --git a/data/maps/SecretBase_YellowCave4/scripts.inc b/data/maps/SecretBase_YellowCave4/scripts.inc
index 32da39388..cb26f924e 100644
--- a/data/maps/SecretBase_YellowCave4/scripts.inc
+++ b/data/maps/SecretBase_YellowCave4/scripts.inc
@@ -1,8 +1,8 @@
SecretBase_YellowCave4_MapScripts:: @ 823B483
- map_script 4, SecretBase_RedCave1_MapScript2_23B498
- map_script 3, SecretBase_RedCave1_MapScript1_23B4A2
- map_script 2, SecretBase_RedCave1_MapScript2_23B4AE
- map_script 5, SecretBase_RedCave1_MapScript1_23B4B8
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, SecretBase_RedCave1_MapScript2_23B498
+ map_script MAP_SCRIPT_ON_TRANSITION, SecretBase_RedCave1_MapScript1_23B4A2
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, SecretBase_RedCave1_MapScript2_23B4AE
+ map_script MAP_SCRIPT_ON_RESUME, SecretBase_RedCave1_MapScript1_23B4B8
.byte 0
SecretBase_RedCave1_MapScript2_23B498: @ 823B498
diff --git a/data/maps/ShoalCave_LowTideEntranceRoom/scripts.inc b/data/maps/ShoalCave_LowTideEntranceRoom/scripts.inc
index 2874da963..218cabc67 100644
--- a/data/maps/ShoalCave_LowTideEntranceRoom/scripts.inc
+++ b/data/maps/ShoalCave_LowTideEntranceRoom/scripts.inc
@@ -1,5 +1,5 @@
ShoalCave_LowTideEntranceRoom_MapScripts:: @ 8236DBA
- map_script 3, ShoalCave_LowTideEntranceRoom_MapScript1_236DC0
+ map_script MAP_SCRIPT_ON_TRANSITION, ShoalCave_LowTideEntranceRoom_MapScript1_236DC0
.byte 0
ShoalCave_LowTideEntranceRoom_MapScript1_236DC0: @ 8236DC0
@@ -39,7 +39,7 @@ ShoalCave_LowTideEntranceRoom_EventScript_236DD9:: @ 8236DD9
takeitem ITEM_SHOAL_SHELL, 4
giveitem_std ITEM_SHELL_BELL
compare VAR_RESULT, 0
- goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
msgbox ShoalCave_LowTideEntranceRoom_Text_2A8012, MSGBOX_DEFAULT
setflag FLAG_TEMP_2
release
diff --git a/data/maps/ShoalCave_LowTideInnerRoom/scripts.inc b/data/maps/ShoalCave_LowTideInnerRoom/scripts.inc
index c54aa1d4f..f1a29b28a 100644
--- a/data/maps/ShoalCave_LowTideInnerRoom/scripts.inc
+++ b/data/maps/ShoalCave_LowTideInnerRoom/scripts.inc
@@ -1,6 +1,6 @@
ShoalCave_LowTideInnerRoom_MapScripts:: @ 8236EF5
- map_script 1, ShoalCave_LowTideInnerRoom_MapScript1_236F16
- map_script 3, ShoalCave_LowTideInnerRoom_MapScript1_236F00
+ map_script MAP_SCRIPT_ON_LOAD, ShoalCave_LowTideInnerRoom_MapScript1_236F16
+ map_script MAP_SCRIPT_ON_TRANSITION, ShoalCave_LowTideInnerRoom_MapScript1_236F00
.byte 0
ShoalCave_LowTideInnerRoom_MapScript1_236F00: @ 8236F00
@@ -64,7 +64,7 @@ ShoalCave_LowTideInnerRoom_EventScript_236FBA:: @ 8236FBA
goto_if_set FLAG_RECEIVED_SHOAL_SHELL_1, ShoalCave_LowTideInnerRoom_EventScript_236FEC
giveitem_std ITEM_SHOAL_SHELL
compare VAR_RESULT, 0
- goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
setmetatile 41, 20, 859, 0
special DrawWholeMapView
setflag FLAG_RECEIVED_SHOAL_SHELL_1
@@ -81,7 +81,7 @@ ShoalCave_LowTideInnerRoom_EventScript_236FF6:: @ 8236FF6
goto_if_set FLAG_RECEIVED_SHOAL_SHELL_2, ShoalCave_LowTideInnerRoom_EventScript_236FEC
giveitem_std ITEM_SHOAL_SHELL
compare VAR_RESULT, 0
- goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
setmetatile 41, 10, 859, 0
special DrawWholeMapView
setflag FLAG_RECEIVED_SHOAL_SHELL_2
@@ -93,7 +93,7 @@ ShoalCave_LowTideInnerRoom_EventScript_237028:: @ 8237028
goto_if_set FLAG_RECEIVED_SHOAL_SHELL_3, ShoalCave_LowTideInnerRoom_EventScript_236FEC
giveitem_std ITEM_SHOAL_SHELL
compare VAR_RESULT, 0
- goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
setmetatile 6, 9, 859, 0
special DrawWholeMapView
setflag FLAG_RECEIVED_SHOAL_SHELL_3
@@ -105,7 +105,7 @@ ShoalCave_LowTideInnerRoom_EventScript_23705A:: @ 823705A
goto_if_set FLAG_RECEIVED_SHOAL_SHELL_4, ShoalCave_LowTideInnerRoom_EventScript_236FEC
giveitem_std ITEM_SHOAL_SHELL
compare VAR_RESULT, 0
- goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
setmetatile 16, 13, 859, 0
special DrawWholeMapView
setflag FLAG_RECEIVED_SHOAL_SHELL_4
@@ -117,7 +117,7 @@ ShoalCave_LowTideInnerRoom_EventScript_23708C:: @ 823708C
goto_if_set FLAG_RECEIVED_SHOAL_SALT_1, ShoalCave_LowTideInnerRoom_EventScript_2370BE
giveitem_std ITEM_SHOAL_SALT
compare VAR_RESULT, 0
- goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
setmetatile 31, 8, 858, 0
special DrawWholeMapView
setflag FLAG_RECEIVED_SHOAL_SALT_1
@@ -134,7 +134,7 @@ ShoalCave_LowTideInnerRoom_EventScript_2370C8:: @ 82370C8
goto_if_set FLAG_RECEIVED_SHOAL_SALT_2, ShoalCave_LowTideInnerRoom_EventScript_2370BE
giveitem_std ITEM_SHOAL_SALT
compare VAR_RESULT, 0
- goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
setmetatile 14, 26, 858, 0
special DrawWholeMapView
setflag FLAG_RECEIVED_SHOAL_SALT_2
diff --git a/data/maps/ShoalCave_LowTideLowerRoom/scripts.inc b/data/maps/ShoalCave_LowTideLowerRoom/scripts.inc
index 60a6039be..8492afe5b 100644
--- a/data/maps/ShoalCave_LowTideLowerRoom/scripts.inc
+++ b/data/maps/ShoalCave_LowTideLowerRoom/scripts.inc
@@ -1,5 +1,5 @@
ShoalCave_LowTideLowerRoom_MapScripts:: @ 8237156
- map_script 1, ShoalCave_LowTideLowerRoom_MapScript1_23715C
+ map_script MAP_SCRIPT_ON_LOAD, ShoalCave_LowTideLowerRoom_MapScript1_23715C
.byte 0
ShoalCave_LowTideLowerRoom_MapScript1_23715C: @ 823715C
@@ -19,7 +19,7 @@ ShoalCave_LowTideLowerRoom_EventScript_237176:: @ 8237176
goto_if_set FLAG_RECEIVED_SHOAL_SALT_4, ShoalCave_LowTideLowerRoom_EventScript_2371A8
giveitem_std ITEM_SHOAL_SALT
compare VAR_RESULT, 0
- goto_if_eq ShoalCave_LowTideLowerRoom_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
setmetatile 18, 2, 858, 0
special DrawWholeMapView
setflag FLAG_RECEIVED_SHOAL_SALT_4
@@ -38,7 +38,7 @@ ShoalCave_LowTideLowerRoom_EventScript_2371B2:: @ 82371B2
msgbox ShoalCave_LowTideLowerRoom_Text_2371EB, MSGBOX_DEFAULT
giveitem_std ITEM_FOCUS_BAND
compare VAR_RESULT, 0
- goto_if_eq ShoalCave_LowTideLowerRoom_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
setflag FLAG_RECEIVED_FOCUS_BAND
release
end
diff --git a/data/maps/ShoalCave_LowTideStairsRoom/scripts.inc b/data/maps/ShoalCave_LowTideStairsRoom/scripts.inc
index 40275d809..74b653a5f 100644
--- a/data/maps/ShoalCave_LowTideStairsRoom/scripts.inc
+++ b/data/maps/ShoalCave_LowTideStairsRoom/scripts.inc
@@ -1,5 +1,5 @@
ShoalCave_LowTideStairsRoom_MapScripts:: @ 82370FA
- map_script 1, ShoalCave_LowTideStairsRoom_MapScript1_237100
+ map_script MAP_SCRIPT_ON_LOAD, ShoalCave_LowTideStairsRoom_MapScript1_237100
.byte 0
ShoalCave_LowTideStairsRoom_MapScript1_237100: @ 8237100
@@ -19,7 +19,7 @@ ShoalCave_LowTideStairsRoom_EventScript_23711A:: @ 823711A
goto_if_set FLAG_RECEIVED_SHOAL_SALT_3, ShoalCave_LowTideStairsRoom_EventScript_23714C
giveitem_std ITEM_SHOAL_SALT
compare VAR_RESULT, 0
- goto_if_eq ShoalCave_LowTideStairsRoom_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
setmetatile 11, 11, 858, 0
special DrawWholeMapView
setflag FLAG_RECEIVED_SHOAL_SALT_3
diff --git a/data/maps/SkyPillar_1F/scripts.inc b/data/maps/SkyPillar_1F/scripts.inc
index a0b62df25..b1ec3b74a 100644
--- a/data/maps/SkyPillar_1F/scripts.inc
+++ b/data/maps/SkyPillar_1F/scripts.inc
@@ -1,5 +1,5 @@
SkyPillar_1F_MapScripts:: @ 8239615
- map_script 3, SkyPillar_1F_MapScript1_23961B
+ map_script MAP_SCRIPT_ON_TRANSITION, SkyPillar_1F_MapScript1_23961B
.byte 0
SkyPillar_1F_MapScript1_23961B: @ 823961B
diff --git a/data/maps/SkyPillar_2F/scripts.inc b/data/maps/SkyPillar_2F/scripts.inc
index a0a4aeaf3..8c1424fd9 100644
--- a/data/maps/SkyPillar_2F/scripts.inc
+++ b/data/maps/SkyPillar_2F/scripts.inc
@@ -1,7 +1,7 @@
SkyPillar_2F_MapScripts:: @ 823962B
- map_script 2, SkyPillar_2F_MapScript2_2A8327
- map_script 3, SkyPillar_2F_MapScript1_23963B
- map_script 5, SkyPillar_2F_MapScript1_239650
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, SkyPillar_2F_MapScript2_2A8327
+ map_script MAP_SCRIPT_ON_TRANSITION, SkyPillar_2F_MapScript1_23963B
+ map_script MAP_SCRIPT_ON_RESUME, SkyPillar_2F_MapScript1_239650
.byte 0
SkyPillar_2F_MapScript1_23963B: @ 823963B
diff --git a/data/maps/SkyPillar_3F/scripts.inc b/data/maps/SkyPillar_3F/scripts.inc
index d78ee6266..9bc7eda27 100644
--- a/data/maps/SkyPillar_3F/scripts.inc
+++ b/data/maps/SkyPillar_3F/scripts.inc
@@ -1,5 +1,5 @@
SkyPillar_3F_MapScripts:: @ 823965B
- map_script 3, SkyPillar_3F_MapScript1_239661
+ map_script MAP_SCRIPT_ON_TRANSITION, SkyPillar_3F_MapScript1_239661
.byte 0
SkyPillar_3F_MapScript1_239661: @ 8239661
diff --git a/data/maps/SkyPillar_4F/scripts.inc b/data/maps/SkyPillar_4F/scripts.inc
index 3904e954f..254d61a59 100644
--- a/data/maps/SkyPillar_4F/scripts.inc
+++ b/data/maps/SkyPillar_4F/scripts.inc
@@ -1,7 +1,7 @@
SkyPillar_4F_MapScripts:: @ 8239671
- map_script 2, SkyPillar_4F_MapScript2_2A8327
- map_script 3, SkyPillar_4F_MapScript1_239681
- map_script 5, SkyPillar_4F_MapScript1_239696
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, SkyPillar_4F_MapScript2_2A8327
+ map_script MAP_SCRIPT_ON_TRANSITION, SkyPillar_4F_MapScript1_239681
+ map_script MAP_SCRIPT_ON_RESUME, SkyPillar_4F_MapScript1_239696
.byte 0
SkyPillar_4F_MapScript1_239681: @ 8239681
diff --git a/data/maps/SkyPillar_5F/scripts.inc b/data/maps/SkyPillar_5F/scripts.inc
index 20478e77e..af5a5ffe1 100644
--- a/data/maps/SkyPillar_5F/scripts.inc
+++ b/data/maps/SkyPillar_5F/scripts.inc
@@ -1,5 +1,5 @@
SkyPillar_5F_MapScripts:: @ 82396A2
- map_script 3, SkyPillar_5F_MapScript1_2396A8
+ map_script MAP_SCRIPT_ON_TRANSITION, SkyPillar_5F_MapScript1_2396A8
.byte 0
SkyPillar_5F_MapScript1_2396A8: @ 82396A8
diff --git a/data/maps/SkyPillar_Entrance/scripts.inc b/data/maps/SkyPillar_Entrance/scripts.inc
index 09ee9eae2..40d57a485 100644
--- a/data/maps/SkyPillar_Entrance/scripts.inc
+++ b/data/maps/SkyPillar_Entrance/scripts.inc
@@ -1,5 +1,5 @@
SkyPillar_Entrance_MapScripts:: @ 823929E
- map_script 3, SkyPillar_Entrance_MapScript1_2392A4
+ map_script MAP_SCRIPT_ON_TRANSITION, SkyPillar_Entrance_MapScript1_2392A4
.byte 0
SkyPillar_Entrance_MapScript1_2392A4: @ 82392A4
diff --git a/data/maps/SkyPillar_Outside/scripts.inc b/data/maps/SkyPillar_Outside/scripts.inc
index eb57d1227..c68dc03e3 100644
--- a/data/maps/SkyPillar_Outside/scripts.inc
+++ b/data/maps/SkyPillar_Outside/scripts.inc
@@ -1,7 +1,7 @@
SkyPillar_Outside_MapScripts:: @ 82392A8
- map_script 3, SkyPillar_Outside_MapScript1_2392B8
- map_script 1, SkyPillar_Outside_MapScript1_2392DD
- map_script 2, SkyPillar_Outside_MapScript2_2392FA
+ map_script MAP_SCRIPT_ON_TRANSITION, SkyPillar_Outside_MapScript1_2392B8
+ map_script MAP_SCRIPT_ON_LOAD, SkyPillar_Outside_MapScript1_2392DD
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, SkyPillar_Outside_MapScript2_2392FA
.byte 0
SkyPillar_Outside_MapScript1_2392B8: @ 82392B8
@@ -16,7 +16,7 @@ SkyPillar_Outside_EventScript_2392CF:: @ 82392CF
return
SkyPillar_Outside_EventScript_2392D3:: @ 82392D3
- call_if_set FLAG_SYS_WEATHER_CTRL, SkyPillar_Outside_EventScript_27207A
+ call_if_set FLAG_SYS_WEATHER_CTRL, Common_EventScript_SetWeather15
return
SkyPillar_Outside_MapScript1_2392DD: @ 82392DD
@@ -36,7 +36,7 @@ SkyPillar_Outside_EventScript_239304:: @ 8239304
lockall
applymovement 1, SkyPillar_Outside_Movement_2393D3
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, SkyPillar_Outside_Movement_2725A4
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceLeft
waitmovement 0
msgbox SkyPillar_Outside_Text_239416, MSGBOX_DEFAULT
closemessage
@@ -60,19 +60,19 @@ SkyPillar_Outside_EventScript_239304:: @ 8239304
special sub_8139560
waitstate
delay 20
- applymovement 1, SkyPillar_Outside_Movement_2725A4
+ applymovement 1, Common_Movement_WalkInPlaceLeft
waitmovement 0
delay 10
- applymovement 1, SkyPillar_Outside_Movement_2725A8
+ applymovement 1, Common_Movement_WalkInPlaceRight
waitmovement 0
delay 20
- applymovement 1, SkyPillar_Outside_Movement_2725AA
+ applymovement 1, Common_Movement_WalkInPlaceDown
waitmovement 0
delay 30
msgbox SkyPillar_Outside_Text_23950C, MSGBOX_DEFAULT
closemessage
setflag FLAG_SYS_WEATHER_CTRL
- setweather WEATHER_15
+ setweather WEATHER_ALTERNATING
doweather
special WaitWeather
waitstate
diff --git a/data/maps/SkyPillar_Top/scripts.inc b/data/maps/SkyPillar_Top/scripts.inc
index 4ca4c4681..3d031293d 100644
--- a/data/maps/SkyPillar_Top/scripts.inc
+++ b/data/maps/SkyPillar_Top/scripts.inc
@@ -1,7 +1,7 @@
SkyPillar_Top_MapScripts:: @ 82396B8
- map_script 5, SkyPillar_Top_MapScript1_2396C8
- map_script 3, SkyPillar_Top_MapScript1_2396E6
- map_script 4, SkyPillar_Top_MapScript2_239713
+ map_script MAP_SCRIPT_ON_RESUME, SkyPillar_Top_MapScript1_2396C8
+ map_script MAP_SCRIPT_ON_TRANSITION, SkyPillar_Top_MapScript1_2396E6
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, SkyPillar_Top_MapScript2_239713
.byte 0
SkyPillar_Top_MapScript1_2396C8: @ 82396C8
@@ -11,7 +11,7 @@ SkyPillar_Top_MapScript1_2396C8: @ 82396C8
SkyPillar_Top_EventScript_2396D2:: @ 82396D2
specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, 7
- goto_if_ne SkyPillar_Top_EventScript_27374E
+ goto_if_ne Common_EventScript_NopReturn
removeobject VAR_LAST_TALKED
return
@@ -94,7 +94,7 @@ SkyPillar_Top_EventScript_239785:: @ 8239785
SkyPillar_Top_EventScript_23979A:: @ 823979A
lockall
fadeoutbgm 1
- applymovement EVENT_OBJ_ID_PLAYER, SkyPillar_Top_Movement_2725B2
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_FaceUp
waitmovement 0
special SpawnCameraObject
applymovement EVENT_OBJ_ID_CAMERA, SkyPillar_Top_Movement_239858
diff --git a/data/maps/SlateportCity/map.json b/data/maps/SlateportCity/map.json
index ee9f3c379..126519096 100644
--- a/data/maps/SlateportCity/map.json
+++ b/data/maps/SlateportCity/map.json
@@ -591,7 +591,7 @@
"y": 19,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "SlateportCity_EventScript_271E73"
+ "script": "Common_EventScript_ShowPokemonCenterSign"
},
{
"type": "sign",
@@ -599,7 +599,7 @@
"y": 19,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "SlateportCity_EventScript_271E73"
+ "script": "Common_EventScript_ShowPokemonCenterSign"
},
{
"type": "sign",
@@ -607,7 +607,7 @@
"y": 26,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "SlateportCity_EventScript_271E6A"
+ "script": "Common_EventScript_ShowPokemartSign"
},
{
"type": "sign",
@@ -623,7 +623,7 @@
"y": 26,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "SlateportCity_EventScript_271E6A"
+ "script": "Common_EventScript_ShowPokemartSign"
},
{
"type": "sign",
diff --git a/data/maps/SlateportCity/scripts.inc b/data/maps/SlateportCity/scripts.inc
index 2e7859fba..9f4310c4a 100644
--- a/data/maps/SlateportCity/scripts.inc
+++ b/data/maps/SlateportCity/scripts.inc
@@ -1,12 +1,12 @@
SlateportCity_MapScripts:: @ 81DCC61
- map_script 3, SlateportCity_MapScript1_1DCC6C
- map_script 2, SlateportCity_MapScript2_1DCD12
+ map_script MAP_SCRIPT_ON_TRANSITION, SlateportCity_MapScript1_1DCC6C
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, SlateportCity_MapScript2_1DCD12
.byte 0
SlateportCity_MapScript1_1DCC6C: @ 81DCC6C
- setvar VAR_0x40AA, 0
+ setvar VAR_SLATEPORT_MUSEUM_1F_STATE, 0
call SlateportCity_EventScript_1DCC8D
- compare VAR_0x4058, 1
+ compare VAR_SLATEPORT_STATE, 1
call_if_eq SlateportCity_EventScript_1DCC99
compare VAR_0x40D2, 1
call_if_eq SlateportCity_EventScript_1DCCE7
@@ -14,7 +14,7 @@ SlateportCity_MapScript1_1DCC6C: @ 81DCC6C
SlateportCity_EventScript_1DCC8D:: @ 81DCC8D
setflag FLAG_VISITED_SLATEPORT_CITY
- setvar VAR_0x4086, 0
+ setvar VAR_LINK_CONTEST_ROOM_STATE, 0
setflag FLAG_HIDE_SLATEPORT_CITY_CONTEST_REPORTER
return
@@ -61,11 +61,11 @@ SlateportCity_EventScript_1DCD1C:: @ 81DCD1C
waitmovement 0
msgbox SlateportCity_Text_1DF032, MSGBOX_DEFAULT
closemessage
- applymovement 35, SlateportCity_Movement_2725A4
+ applymovement 35, Common_Movement_WalkInPlaceLeft
waitmovement 0
delay 60
msgbox SlateportCity_Text_1DF0FE, MSGBOX_DEFAULT
- applymovement 35, SlateportCity_Movement_2725A8
+ applymovement 35, Common_Movement_WalkInPlaceRight
waitmovement 0
msgbox SlateportCity_Text_1DF12B, MSGBOX_DEFAULT
closemessage
@@ -170,7 +170,7 @@ SlateportCity_EventScript_1DCE38:: @ 81DCE38
SlateportCity_EventScript_1DCE42:: @ 81DCE42
lock
faceplayer
- compare VAR_0x4058, 1
+ compare VAR_SLATEPORT_STATE, 1
call_if_eq SlateportCity_EventScript_1DCE59
msgbox SlateportCity_Text_1DD81A, MSGBOX_DEFAULT
release
@@ -184,7 +184,7 @@ SlateportCity_EventScript_1DCE59:: @ 81DCE59
SlateportCity_EventScript_1DCE63:: @ 81DCE63
lock
faceplayer
- compare VAR_0x4058, 1
+ compare VAR_SLATEPORT_STATE, 1
call_if_eq SlateportCity_EventScript_1DCE7A
msgbox SlateportCity_Text_1DD8A6, MSGBOX_DEFAULT
release
@@ -198,7 +198,7 @@ SlateportCity_EventScript_1DCE7A:: @ 81DCE7A
SlateportCity_EventScript_1DCE84:: @ 81DCE84
lock
faceplayer
- compare VAR_0x4058, 1
+ compare VAR_SLATEPORT_STATE, 1
call_if_eq SlateportCity_EventScript_1DCEA4
goto_if_set FLAG_RECEIVED_SECRET_POWER, SlateportCity_EventScript_1DCEAE
msgbox SlateportCity_Text_1DD93D, MSGBOX_DEFAULT
@@ -218,7 +218,7 @@ SlateportCity_EventScript_1DCEAE:: @ 81DCEAE
SlateportCity_EventScript_1DCEB8:: @ 81DCEB8
lock
faceplayer
- compare VAR_0x4058, 1
+ compare VAR_SLATEPORT_STATE, 1
call_if_eq SlateportCity_EventScript_1DCECF
msgbox SlateportCity_Text_1DDA34, MSGBOX_DEFAULT
release
@@ -230,7 +230,7 @@ SlateportCity_EventScript_1DCECF:: @ 81DCECF
end
SlateportCity_EventScript_1DCED9:: @ 81DCED9
- compare VAR_0x4058, 1
+ compare VAR_SLATEPORT_STATE, 1
goto_if_eq SlateportCity_EventScript_1DCEED
msgbox SlateportCity_Text_1DDA9A, MSGBOX_NPC
end
@@ -242,7 +242,7 @@ SlateportCity_EventScript_1DCEED:: @ 81DCEED
SlateportCity_EventScript_1DCEF6:: @ 81DCEF6
lock
faceplayer
- compare VAR_0x4058, 1
+ compare VAR_SLATEPORT_STATE, 1
call_if_eq SlateportCity_EventScript_1DCF0D
msgbox SlateportCity_Text_1DDB21, MSGBOX_DEFAULT
release
@@ -323,7 +323,7 @@ SlateportCity_EventScript_1DCFB2:: @ 81DCFB2
SlateportCity_EventScript_1DCFBB:: @ 81DCFBB
lock
faceplayer
- compare VAR_0x4058, 1
+ compare VAR_SLATEPORT_STATE, 1
call_if_eq SlateportCity_EventScript_1DCFD2
msgbox SlateportCity_Text_1DE10E, MSGBOX_DEFAULT
release
@@ -359,7 +359,7 @@ SlateportCity_EventScript_1DD009:: @ 81DD009
faceplayer
msgbox SlateportCity_Text_1DDC4F, MSGBOX_DEFAULT
closemessage
- applymovement 5, SlateportCity_Movement_2725A2
+ applymovement 5, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -369,7 +369,7 @@ SlateportCity_EventScript_1DD020:: @ 81DD020
faceplayer
msgbox SlateportCity_Text_1DDC8A, MSGBOX_DEFAULT
closemessage
- applymovement 18, SlateportCity_Movement_2725A2
+ applymovement 18, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -379,7 +379,7 @@ SlateportCity_EventScript_1DD037:: @ 81DD037
faceplayer
msgbox SlateportCity_Text_1DDCD5, MSGBOX_DEFAULT
closemessage
- applymovement 19, SlateportCity_Movement_2725A2
+ applymovement 19, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -389,7 +389,7 @@ SlateportCity_EventScript_1DD04E:: @ 81DD04E
faceplayer
msgbox SlateportCity_Text_1DDD18, MSGBOX_DEFAULT
closemessage
- applymovement 26, SlateportCity_Movement_2725A2
+ applymovement 26, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -399,7 +399,7 @@ SlateportCity_EventScript_1DD065:: @ 81DD065
faceplayer
msgbox SlateportCity_Text_1DDD7D, MSGBOX_DEFAULT
closemessage
- applymovement 27, SlateportCity_Movement_2725A2
+ applymovement 27, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -409,7 +409,7 @@ SlateportCity_EventScript_1DD07C:: @ 81DD07C
faceplayer
msgbox SlateportCity_Text_1DDDC0, MSGBOX_DEFAULT
closemessage
- applymovement 28, SlateportCity_Movement_2725A2
+ applymovement 28, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -419,7 +419,7 @@ SlateportCity_EventScript_1DD093:: @ 81DD093
faceplayer
msgbox SlateportCity_Text_1DDDDF, MSGBOX_DEFAULT
closemessage
- applymovement 29, SlateportCity_Movement_2725A2
+ applymovement 29, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -429,7 +429,7 @@ SlateportCity_EventScript_1DD0AA:: @ 81DD0AA
faceplayer
msgbox SlateportCity_Text_1DDE2F, MSGBOX_DEFAULT
closemessage
- applymovement 30, SlateportCity_Movement_2725A2
+ applymovement 30, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -438,31 +438,31 @@ SlateportCity_EventScript_1DD0C1:: @ 81DD0C1
lock
faceplayer
playse SE_PIN
- applymovement 31, SlateportCity_Movement_272598
+ applymovement 31, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 31, SlateportCity_Movement_27259A
+ applymovement 31, Common_Movement_Delay48
waitmovement 0
msgbox SlateportCity_Text_1DDE6E, MSGBOX_DEFAULT
closemessage
- applymovement 31, SlateportCity_Movement_2725A2
+ applymovement 31, Common_Movement_FaceOriginalDirection
waitmovement 0
applymovement 31, SlateportCity_Movement_1DD147
waitmovement 0
- applymovement 31, SlateportCity_Movement_27259E
+ applymovement 31, Common_Movement_FacePlayer
waitmovement 0
msgbox SlateportCity_Text_1DDE86, MSGBOX_DEFAULT
closemessage
- applymovement 31, SlateportCity_Movement_2725A2
+ applymovement 31, Common_Movement_FaceOriginalDirection
waitmovement 0
applymovement 31, SlateportCity_Movement_1DD147
waitmovement 0
msgbox SlateportCity_Text_1DDEB8, MSGBOX_DEFAULT
closemessage
- applymovement 31, SlateportCity_Movement_27259E
+ applymovement 31, Common_Movement_FacePlayer
waitmovement 0
applymovement 31, SlateportCity_Movement_1DD147
waitmovement 0
- applymovement 31, SlateportCity_Movement_2725A2
+ applymovement 31, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -481,7 +481,7 @@ SlateportCity_EventScript_1DD153:: @ 81DD153
faceplayer
msgbox SlateportCity_Text_1DDF8D, MSGBOX_DEFAULT
closemessage
- applymovement 33, SlateportCity_Movement_2725A2
+ applymovement 33, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -563,10 +563,10 @@ SlateportCity_EventScript_1DD1F8:: @ 81DD1F8
msgbox SlateportCity_Text_1DE502, MSGBOX_DEFAULT
msgbox SlateportCity_Text_1DE54A, MSGBOX_DEFAULT
closemessage
- applymovement 10, SlateportCity_Movement_2725A8
+ applymovement 10, Common_Movement_WalkInPlaceRight
waitmovement 0
delay 10
- applymovement 9, SlateportCity_Movement_2725AA
+ applymovement 9, Common_Movement_WalkInPlaceDown
waitmovement 0
delay 25
applymovement 11, SlateportCity_Movement_1DD33C
@@ -577,26 +577,26 @@ SlateportCity_EventScript_1DD1F8:: @ 81DD1F8
removeobject 10
removeobject 9
msgbox SlateportCity_Text_1DE5F7, MSGBOX_DEFAULT
- applymovement 11, SlateportCity_Movement_2725A6
+ applymovement 11, Common_Movement_WalkInPlaceUp
waitmovement 0
msgbox SlateportCity_Text_1DE64F, MSGBOX_DEFAULT
playbgm MUS_AQA_0, 0
msgbox SlateportCity_Text_1DE724, MSGBOX_DEFAULT
- applymovement 6, SlateportCity_Movement_2725A4
- applymovement 1, SlateportCity_Movement_2725A4
+ applymovement 6, Common_Movement_WalkInPlaceLeft
+ applymovement 1, Common_Movement_WalkInPlaceLeft
applymovement 7, SlateportCity_Movement_1DD309
applymovement 3, SlateportCity_Movement_272596
applymovement 2, SlateportCity_Movement_1DD311
waitmovement 0
- applymovement 11, SlateportCity_Movement_2725AA
+ applymovement 11, Common_Movement_WalkInPlaceDown
waitmovement 0
msgbox SlateportCity_Text_1DE7F7, MSGBOX_DEFAULT
playse SE_PIN
- applymovement 11, SlateportCity_Movement_272598
+ applymovement 11, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 11, SlateportCity_Movement_27259A
+ applymovement 11, Common_Movement_Delay48
waitmovement 0
- applymovement 11, SlateportCity_Movement_2725A6
+ applymovement 11, Common_Movement_WalkInPlaceUp
waitmovement 0
msgbox SlateportCity_Text_1DE860, MSGBOX_DEFAULT
msgbox SlateportCity_Text_1DE8A0, MSGBOX_DEFAULT
@@ -609,7 +609,7 @@ SlateportCity_EventScript_1DD1F8:: @ 81DD1F8
clearflag FLAG_HIDE_SLATEPORT_CITY_HARBOR_SUBMARINE_SHADOW
clearflag FLAG_HIDE_SLATEPORT_CITY_HARBOR_AQUA_GRUNT
clearflag FLAG_HIDE_SLATEPORT_CITY_HARBOR_ARCHIE
- setvar VAR_0x4058, 2
+ setvar VAR_SLATEPORT_STATE, 2
warp MAP_SLATEPORT_CITY_HARBOR, 255, 11, 14
waitstate
releaseall
@@ -885,7 +885,7 @@ SlateportCity_EventScript_1DD5CE:: @ 81DD5CE
SlateportCity_EventScript_1DD5DC:: @ 81DD5DC
lockall
- applymovement EVENT_OBJ_ID_PLAYER, SlateportCity_Movement_2725B2
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_FaceUp
waitmovement 0
opendoor 10, 12
waitdooranim
diff --git a/data/maps/SlateportCity_BattleTentBattleRoom/scripts.inc b/data/maps/SlateportCity_BattleTentBattleRoom/scripts.inc
index 9df0e0a6a..a5e2a493c 100644
--- a/data/maps/SlateportCity_BattleTentBattleRoom/scripts.inc
+++ b/data/maps/SlateportCity_BattleTentBattleRoom/scripts.inc
@@ -1,7 +1,7 @@
SlateportCity_BattleTentBattleRoom_MapScripts:: @ 8209960
- map_script 3, SlateportCity_BattleTentBattleRoom_MapScript1_209970
- map_script 4, SlateportCity_BattleTentBattleRoom_MapScript2_20999A
- map_script 2, SlateportCity_BattleTentBattleRoom_MapScript2_2099B4
+ map_script MAP_SCRIPT_ON_TRANSITION, SlateportCity_BattleTentBattleRoom_MapScript1_209970
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, SlateportCity_BattleTentBattleRoom_MapScript2_20999A
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, SlateportCity_BattleTentBattleRoom_MapScript2_2099B4
.byte 0
SlateportCity_BattleTentBattleRoom_MapScript1_209970: @ 8209970
diff --git a/data/maps/SlateportCity_BattleTentCorridor/scripts.inc b/data/maps/SlateportCity_BattleTentCorridor/scripts.inc
index 4bd28996b..27f7fa3b9 100644
--- a/data/maps/SlateportCity_BattleTentCorridor/scripts.inc
+++ b/data/maps/SlateportCity_BattleTentCorridor/scripts.inc
@@ -1,6 +1,6 @@
SlateportCity_BattleTentCorridor_MapScripts:: @ 8208E26
- map_script 2, SlateportCity_BattleTentCorridor_MapScript2_208E5B
- map_script 4, SlateportCity_BattleTentCorridor_MapScript2_208E31
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, SlateportCity_BattleTentCorridor_MapScript2_208E5B
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, SlateportCity_BattleTentCorridor_MapScript2_208E31
.byte 0
SlateportCity_BattleTentCorridor_MapScript2_208E31: @ 8208E31
@@ -44,7 +44,7 @@ SlateportCity_BattleTentCorridor_EventScript_208E65:: @ 8208E65
SlateportCity_BattleTentCorridor_EventScript_208EB4:: @ 8208EB4
msgbox SlateportCity_BattleTentCorridor_Text_25AB96, MSGBOX_DEFAULT
closemessage
- applymovement 1, SlateportCity_BattleTentCorridor_Movement_2725A6
+ applymovement 1, Common_Movement_WalkInPlaceUp
waitmovement 0
opendoor 2, 1
waitdooranim
diff --git a/data/maps/SlateportCity_BattleTentLobby/scripts.inc b/data/maps/SlateportCity_BattleTentLobby/scripts.inc
index 8851c5fa8..19416c91b 100644
--- a/data/maps/SlateportCity_BattleTentLobby/scripts.inc
+++ b/data/maps/SlateportCity_BattleTentLobby/scripts.inc
@@ -1,6 +1,6 @@
SlateportCity_BattleTentLobby_MapScripts:: @ 8208730
- map_script 2, SlateportCity_BattleTentLobby_MapScript2_20874F
- map_script 4, SlateportCity_BattleTentLobby_MapScript2_20873B
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, SlateportCity_BattleTentLobby_MapScript2_20874F
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, SlateportCity_BattleTentLobby_MapScript2_20873B
.byte 0
SlateportCity_BattleTentLobby_MapScript2_20873B: @ 820873B
@@ -165,7 +165,7 @@ SlateportCity_BattleTentLobby_EventScript_208950:: @ 8208950
special CallFrontierUtilFunc
closemessage
delay 2
- call SlateportCity_BattleTentLobby_EventScript_27134F
+ call Common_EventScript_SaveGame
setvar VAR_TEMP_0, 255
compare VAR_RESULT, 0
goto_if_eq SlateportCity_BattleTentLobby_EventScript_208A14
@@ -249,7 +249,7 @@ SlateportCity_BattleTentLobby_EventScript_208A3D:: @ 8208A3D
msgbox SlateportCity_BattleTentLobby_Text_208B4E, MSGBOX_DEFAULT
giveitem_std ITEM_TM41
compare VAR_RESULT, 0
- goto_if_eq SlateportCity_BattleTentLobby_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
setflag FLAG_RECEIVED_TM41
msgbox SlateportCity_BattleTentLobby_Text_208C5C, MSGBOX_DEFAULT
release
diff --git a/data/maps/SlateportCity_Harbor/map.json b/data/maps/SlateportCity_Harbor/map.json
index 4c9b45683..c61c5a5e6 100644
--- a/data/maps/SlateportCity_Harbor/map.json
+++ b/data/maps/SlateportCity_Harbor/map.json
@@ -155,7 +155,7 @@
"x": 8,
"y": 11,
"elevation": 3,
- "var": "VAR_0x40A0",
+ "var": "VAR_SLATEPORT_HARBOR_STATE",
"var_value": "1",
"script": "SlateportCity_Harbor_EventScript_20C9BB"
},
@@ -164,7 +164,7 @@
"x": 8,
"y": 12,
"elevation": 3,
- "var": "VAR_0x40A0",
+ "var": "VAR_SLATEPORT_HARBOR_STATE",
"var_value": "1",
"script": "SlateportCity_Harbor_EventScript_20C9C7"
},
@@ -173,7 +173,7 @@
"x": 8,
"y": 13,
"elevation": 3,
- "var": "VAR_0x40A0",
+ "var": "VAR_SLATEPORT_HARBOR_STATE",
"var_value": "1",
"script": "SlateportCity_Harbor_EventScript_20C9D3"
},
@@ -182,7 +182,7 @@
"x": 8,
"y": 14,
"elevation": 3,
- "var": "VAR_0x40A0",
+ "var": "VAR_SLATEPORT_HARBOR_STATE",
"var_value": "1",
"script": "SlateportCity_Harbor_EventScript_20C9DF"
}
diff --git a/data/maps/SlateportCity_Harbor/scripts.inc b/data/maps/SlateportCity_Harbor/scripts.inc
index 24e139edf..8f9f77e97 100644
--- a/data/maps/SlateportCity_Harbor/scripts.inc
+++ b/data/maps/SlateportCity_Harbor/scripts.inc
@@ -1,11 +1,11 @@
SlateportCity_Harbor_MapScripts:: @ 820C97D
- map_script 3, SlateportCity_Harbor_MapScript1_20C983
+ map_script MAP_SCRIPT_ON_TRANSITION, SlateportCity_Harbor_MapScript1_20C983
.byte 0
SlateportCity_Harbor_MapScript1_20C983: @ 820C983
setescapewarp MAP_SLATEPORT_CITY, 255, 28, 13
setvar VAR_TEMP_1, 0
- compare VAR_0x40A0, 1
+ compare VAR_SLATEPORT_HARBOR_STATE, 1
call_if_eq SlateportCity_Harbor_EventScript_20C9A9
call_if_set FLAG_SYS_GAME_CLEAR, SlateportCity_Harbor_EventScript_20C9A5
end
@@ -48,10 +48,10 @@ SlateportCity_Harbor_EventScript_20C9DF:: @ 820C9DF
end
SlateportCity_Harbor_EventScript_20C9F5:: @ 820C9F5
- applymovement 7, SlateportCity_Harbor_Movement_2725AA
+ applymovement 7, Common_Movement_WalkInPlaceDown
waitmovement 0
- applymovement 6, SlateportCity_Harbor_Movement_2725AA
- applymovement EVENT_OBJ_ID_PLAYER, SlateportCity_Harbor_Movement_2725A6
+ applymovement 6, Common_Movement_WalkInPlaceDown
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceUp
waitmovement 0
msgbox SlateportCity_Harbor_Text_20D291, MSGBOX_DEFAULT
closemessage
@@ -62,7 +62,7 @@ SlateportCity_Harbor_EventScript_20C9F5:: @ 820C9F5
removeobject 6
removeobject 7
removeobject 8
- setvar VAR_0x40A0, 2
+ setvar VAR_SLATEPORT_HARBOR_STATE, 2
setflag FLAG_MET_TEAM_AQUA_HARBOR
setflag FLAG_HIDE_LILCOVE_MOTEL_SCOTT
compare VAR_0x8008, 0
@@ -85,21 +85,21 @@ SlateportCity_Harbor_EventScript_20C9F5:: @ 820C9F5
SlateportCity_Harbor_EventScript_20CA89:: @ 820CA89
applymovement 4, SlateportCity_Harbor_Movement_20CAE0
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, SlateportCity_Harbor_Movement_2725AA
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceDown
waitmovement 0
return
SlateportCity_Harbor_EventScript_20CA9E:: @ 820CA9E
applymovement 4, SlateportCity_Harbor_Movement_20CAE6
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, SlateportCity_Harbor_Movement_2725A8
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceRight
waitmovement 0
return
SlateportCity_Harbor_EventScript_20CAB3:: @ 820CAB3
applymovement 4, SlateportCity_Harbor_Movement_20CAEB
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, SlateportCity_Harbor_Movement_2725A8
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceRight
waitmovement 0
return
@@ -226,7 +226,7 @@ SlateportCity_Harbor_EventScript_20CBDD:: @ 820CBDD
SlateportCity_Harbor_EventScript_20CBE9:: @ 820CBE9
msgbox SlateportCity_Harbor_Text_20CFCB, MSGBOX_DEFAULT
closemessage
- applymovement VAR_LAST_TALKED, SlateportCity_Harbor_Movement_2725A6
+ applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceUp
waitmovement 0
delay 30
hideobjectat VAR_LAST_TALKED, MAP_SLATEPORT_CITY_HARBOR
@@ -296,11 +296,11 @@ SlateportCity_Harbor_EventScript_20CCA2:: @ 820CCA2
goto_if_set FLAG_BADGE07_GET, SlateportCity_Harbor_EventScript_20CD00
goto_if_set FLAG_EVIL_TEAM_ESCAPED_STERN_SPOKE, SlateportCity_Harbor_EventScript_20CCF6
goto_if_set FLAG_TEAM_AQUA_ESCAPED_IN_SUBMARINE, SlateportCity_Harbor_EventScript_20CCE9
- compare VAR_0x40A0, 2
+ compare VAR_SLATEPORT_HARBOR_STATE, 2
goto_if_eq SlateportCity_Harbor_EventScript_20CCDF
msgbox SlateportCity_Harbor_Text_20D232, MSGBOX_DEFAULT
closemessage
- applymovement VAR_LAST_TALKED, SlateportCity_Harbor_Movement_2725A2
+ applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -358,7 +358,7 @@ SlateportCity_Harbor_EventScript_20CD7B:: @ 820CD7B
goto_if_eq SlateportCity_Harbor_EventScript_20CE05
giveitem_std ITEM_DEEP_SEA_TOOTH
compare VAR_RESULT, 0
- goto_if_eq SlateportCity_Harbor_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
takeitem ITEM_SCANNER, 1
msgbox SlateportCity_Harbor_Text_20D94A, MSGBOX_DEFAULT
setflag FLAG_EXCHANGED_SCANNER
@@ -371,7 +371,7 @@ SlateportCity_Harbor_EventScript_20CDBB:: @ 820CDBB
goto_if_eq SlateportCity_Harbor_EventScript_20CE05
giveitem_std ITEM_DEEP_SEA_SCALE
compare VAR_RESULT, 0
- goto_if_eq SlateportCity_Harbor_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
takeitem ITEM_SCANNER, 1
msgbox SlateportCity_Harbor_Text_20D94A, MSGBOX_DEFAULT
setflag FLAG_EXCHANGED_SCANNER
diff --git a/data/maps/SlateportCity_House1/scripts.inc b/data/maps/SlateportCity_House1/scripts.inc
index 2e973663b..155081a1b 100644
--- a/data/maps/SlateportCity_House1/scripts.inc
+++ b/data/maps/SlateportCity_House1/scripts.inc
@@ -57,7 +57,7 @@ SlateportCity_House1_EventScript_209B50:: @ 8209B50
SlateportCity_House1_EventScript_209B5A:: @ 8209B5A
msgbox SlateportCity_House1_Text_209CA4, MSGBOX_DEFAULT
- call SlateportCity_House1_EventScript_2723DD
+ call Common_EventScript_NameReceivedPokemon
specialvar VAR_RESULT, TV_PutNameRaterShowOnTheAirIfNicnkameChanged
special TV_CopyNicknameToStringVar1AndEnsureTerminated
compare VAR_RESULT, 1
diff --git a/data/maps/SlateportCity_OceanicMuseum_1F/map.json b/data/maps/SlateportCity_OceanicMuseum_1F/map.json
index 517647bd1..eefb843f4 100644
--- a/data/maps/SlateportCity_OceanicMuseum_1F/map.json
+++ b/data/maps/SlateportCity_OceanicMuseum_1F/map.json
@@ -226,7 +226,7 @@
"x": 9,
"y": 7,
"elevation": 3,
- "var": "VAR_0x40AA",
+ "var": "VAR_SLATEPORT_MUSEUM_1F_STATE",
"var_value": "0",
"script": "SlateportCity_OceanicMuseum_1F_EventScript_20AD9F"
},
@@ -235,7 +235,7 @@
"x": 10,
"y": 7,
"elevation": 3,
- "var": "VAR_0x40AA",
+ "var": "VAR_SLATEPORT_MUSEUM_1F_STATE",
"var_value": "0",
"script": "SlateportCity_OceanicMuseum_1F_EventScript_20ADB0"
}
diff --git a/data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc b/data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc
index b574ce448..5a4947c8a 100644
--- a/data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc
+++ b/data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc
@@ -7,14 +7,14 @@ SlateportCity_OceanicMuseum_1F_EventScript_20AD96:: @ 820AD96
SlateportCity_OceanicMuseum_1F_EventScript_20AD9F:: @ 820AD9F
lockall
- applymovement EVENT_OBJ_ID_PLAYER, SlateportCity_OceanicMuseum_1F_Movement_2725A4
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceLeft
waitmovement 0
goto SlateportCity_OceanicMuseum_1F_EventScript_20ADC1
end
SlateportCity_OceanicMuseum_1F_EventScript_20ADB0:: @ 820ADB0
lockall
- applymovement EVENT_OBJ_ID_PLAYER, SlateportCity_OceanicMuseum_1F_Movement_2725A8
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceRight
waitmovement 0
goto SlateportCity_OceanicMuseum_1F_EventScript_20ADC1
end
@@ -42,7 +42,7 @@ SlateportCity_OceanicMuseum_1F_EventScript_20ADE8:: @ 820ADE8
updatemoneybox 0, 0
nop
msgbox SlateportCity_OceanicMuseum_1F_Text_20B026, MSGBOX_DEFAULT
- setvar VAR_0x40AA, 1
+ setvar VAR_SLATEPORT_MUSEUM_1F_STATE, 1
hidemoneybox
nop
nop
@@ -63,7 +63,7 @@ SlateportCity_OceanicMuseum_1F_EventScript_20AE18:: @ 820AE18
SlateportCity_OceanicMuseum_1F_EventScript_20AE39:: @ 820AE39
msgbox SlateportCity_OceanicMuseum_1F_Text_20B075, MSGBOX_DEFAULT
- setvar VAR_0x40AA, 1
+ setvar VAR_SLATEPORT_MUSEUM_1F_STATE, 1
hidemoneybox
nop
nop
@@ -155,9 +155,9 @@ SlateportCity_OceanicMuseum_1F_EventScript_20AEF8:: @ 820AEF8
faceplayer
delay 8
playse SE_PIN
- applymovement 13, SlateportCity_OceanicMuseum_1F_Movement_272598
+ applymovement 13, Common_Movement_ExclamationMark
waitmovement 0
- applymovement 13, SlateportCity_OceanicMuseum_1F_Movement_27259A
+ applymovement 13, Common_Movement_Delay48
waitmovement 0
msgbox SlateportCity_OceanicMuseum_1F_Text_20B3AB, MSGBOX_DEFAULT
giveitem_std ITEM_TM46
diff --git a/data/maps/SlateportCity_OceanicMuseum_2F/scripts.inc b/data/maps/SlateportCity_OceanicMuseum_2F/scripts.inc
index 204ffb4eb..641c4dd86 100644
--- a/data/maps/SlateportCity_OceanicMuseum_2F/scripts.inc
+++ b/data/maps/SlateportCity_OceanicMuseum_2F/scripts.inc
@@ -43,8 +43,8 @@ SlateportCity_OceanicMuseum_2F_EventScript_20BB00:: @ 820BB00
trainerbattle_no_intro TRAINER_GRUNT_15, SlateportCity_OceanicMuseum_2F_Text_20BF66
applymovement 3, SlateportCity_OceanicMuseum_2F_Movement_20BCEF
waitmovement 0
- applymovement 3, SlateportCity_OceanicMuseum_2F_Movement_2725AA
- applymovement 4, SlateportCity_OceanicMuseum_2F_Movement_2725A6
+ applymovement 3, Common_Movement_WalkInPlaceDown
+ applymovement 4, Common_Movement_WalkInPlaceUp
waitmovement 0
msgbox SlateportCity_OceanicMuseum_2F_Text_20BF7A, MSGBOX_DEFAULT
closemessage
@@ -68,7 +68,7 @@ SlateportCity_OceanicMuseum_2F_EventScript_20BB00:: @ 820BB00
fadescreen 0
delay 30
setflag FLAG_HIDE_SLATEPORT_CITY_OCEANIC_MUSEUM_AQUA_GRUNTS
- applymovement EVENT_OBJ_ID_PLAYER, SlateportCity_OceanicMuseum_2F_Movement_2725A8
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceRight
waitmovement 0
msgbox SlateportCity_OceanicMuseum_2F_Text_20C2BE, MSGBOX_DEFAULT
setvar VAR_0x8004, 269
@@ -96,12 +96,12 @@ SlateportCity_OceanicMuseum_2F_EventScript_20BC8C:: @ 820BC8C
return
SlateportCity_OceanicMuseum_2F_EventScript_20BC92:: @ 820BC92
- applymovement EVENT_OBJ_ID_PLAYER, SlateportCity_OceanicMuseum_2F_Movement_2725A4
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceLeft
waitmovement 0
return
SlateportCity_OceanicMuseum_2F_EventScript_20BC9D:: @ 820BC9D
- applymovement 1, SlateportCity_OceanicMuseum_2F_Movement_2725A4
+ applymovement 1, Common_Movement_WalkInPlaceLeft
waitmovement 0
return
@@ -268,7 +268,7 @@ SlateportCity_OceanicMuseum_2F_EventScript_20BD76:: @ 820BD76
faceplayer
msgbox SlateportCity_OceanicMuseum_2F_Text_20C4C2, MSGBOX_DEFAULT
closemessage
- applymovement VAR_LAST_TALKED, SlateportCity_OceanicMuseum_2F_Movement_2725A2
+ applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
diff --git a/data/maps/SlateportCity_PokemonCenter_1F/scripts.inc b/data/maps/SlateportCity_PokemonCenter_1F/scripts.inc
index db8cc19d7..8c1f87e63 100644
--- a/data/maps/SlateportCity_PokemonCenter_1F/scripts.inc
+++ b/data/maps/SlateportCity_PokemonCenter_1F/scripts.inc
@@ -1,6 +1,6 @@
SlateportCity_PokemonCenter_1F_MapScripts:: @ 820DABF
- map_script 3, SlateportCity_PokemonCenter_1F_MapScript1_20DACA
- map_script 5, SlateportCity_PokemonCenter_1F_MapScript1_277C30
+ map_script MAP_SCRIPT_ON_TRANSITION, SlateportCity_PokemonCenter_1F_MapScript1_20DACA
+ map_script MAP_SCRIPT_ON_RESUME, SlateportCity_PokemonCenter_1F_MapScript1_277C30
.byte 0
SlateportCity_PokemonCenter_1F_MapScript1_20DACA: @ 820DACA
diff --git a/data/maps/SlateportCity_PokemonCenter_2F/scripts.inc b/data/maps/SlateportCity_PokemonCenter_2F/scripts.inc
index 3138f20d6..1ddbcc0be 100644
--- a/data/maps/SlateportCity_PokemonCenter_2F/scripts.inc
+++ b/data/maps/SlateportCity_PokemonCenter_2F/scripts.inc
@@ -1,8 +1,8 @@
SlateportCity_PokemonCenter_2F_MapScripts:: @ 820DC21
- map_script 2, SlateportCity_PokemonCenter_2F_MapScript2_276C3B
- map_script 4, SlateportCity_PokemonCenter_2F_MapScript2_276B6C
- map_script 1, SlateportCity_PokemonCenter_2F_MapScript1_276BBE
- map_script 3, SlateportCity_PokemonCenter_2F_MapScript1_276ACF
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, SlateportCity_PokemonCenter_2F_MapScript2_276C3B
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, SlateportCity_PokemonCenter_2F_MapScript2_276B6C
+ map_script MAP_SCRIPT_ON_LOAD, SlateportCity_PokemonCenter_2F_MapScript1_276BBE
+ map_script MAP_SCRIPT_ON_TRANSITION, SlateportCity_PokemonCenter_2F_MapScript1_276ACF
.byte 0
SlateportCity_PokemonCenter_2F_EventScript_20DC36:: @ 820DC36
diff --git a/data/maps/SlateportCity_PokemonFanClub/scripts.inc b/data/maps/SlateportCity_PokemonFanClub/scripts.inc
index 3faf350fc..866bf2963 100644
--- a/data/maps/SlateportCity_PokemonFanClub/scripts.inc
+++ b/data/maps/SlateportCity_PokemonFanClub/scripts.inc
@@ -6,7 +6,7 @@ SlateportCity_PokemonFanClub_EventScript_209E96:: @ 8209E96
faceplayer
goto_if_unset FLAG_ENTERED_LINK_CONTEST, SlateportCity_PokemonFanClub_EventScript_20A152
call_if_unset FLAG_MET_SLATEPORT_FANCLUB_CHAIRMAN, SlateportCity_PokemonFanClub_EventScript_20A172
- switch VAR_0x40B7
+ switch VAR_SLATEPORT_FAN_CLUB_STATE
case 0, SlateportCity_PokemonFanClub_EventScript_209ED2
case 1, SlateportCity_PokemonFanClub_EventScript_209EE5
case 2, SlateportCity_PokemonFanClub_EventScript_209F3B
@@ -14,7 +14,7 @@ SlateportCity_PokemonFanClub_EventScript_209E96:: @ 8209E96
end
SlateportCity_PokemonFanClub_EventScript_209ED2:: @ 8209ED2
- setvar VAR_0x40B7, 1
+ setvar VAR_SLATEPORT_FAN_CLUB_STATE, 1
msgbox SlateportCity_PokemonFanClub_Text_20A445, MSGBOX_DEFAULT
goto SlateportCity_PokemonFanClub_EventScript_209F45
end
@@ -28,7 +28,7 @@ SlateportCity_PokemonFanClub_EventScript_209EE5:: @ 8209EE5
call_if_set FLAG_RECEIVED_RED_SCARF, SlateportCity_PokemonFanClub_EventScript_209FD0
compare VAR_TEMP_2, 5
call_if_eq SlateportCity_PokemonFanClub_EventScript_209FCA
- compare VAR_0x40B7, 2
+ compare VAR_SLATEPORT_FAN_CLUB_STATE, 2
goto_if_eq SlateportCity_PokemonFanClub_EventScript_209F3B
msgbox SlateportCity_PokemonFanClub_Text_20A62A, MSGBOX_DEFAULT
goto SlateportCity_PokemonFanClub_EventScript_209F45
@@ -59,7 +59,7 @@ SlateportCity_PokemonFanClub_EventScript_209F45:: @ 8209F45
end
SlateportCity_PokemonFanClub_EventScript_209FCA:: @ 8209FCA
- setvar VAR_0x40B7, 2
+ setvar VAR_SLATEPORT_FAN_CLUB_STATE, 2
return
SlateportCity_PokemonFanClub_EventScript_209FD0:: @ 8209FD0
@@ -211,14 +211,14 @@ SlateportCity_PokemonFanClub_EventScript_20A17E:: @ 820A17E
SlateportCity_PokemonFanClub_EventScript_20A1A3:: @ 820A1A3
playse SE_PIN
- applymovement VAR_LAST_TALKED, SlateportCity_PokemonFanClub_Movement_272598
+ applymovement VAR_LAST_TALKED, Common_Movement_ExclamationMark
waitmovement 0
- applymovement VAR_LAST_TALKED, SlateportCity_PokemonFanClub_Movement_27259A
+ applymovement VAR_LAST_TALKED, Common_Movement_Delay48
waitmovement 0
msgbox SlateportCity_PokemonFanClub_Text_20AB63, MSGBOX_DEFAULT
giveitem_std ITEM_SOOTHE_BELL
compare VAR_RESULT, 0
- goto_if_eq SlateportCity_PokemonFanClub_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
setflag FLAG_RECEIVED_SOOTHE_BELL
release
end
diff --git a/data/maps/SlateportCity_SternsShipyard_1F/scripts.inc b/data/maps/SlateportCity_SternsShipyard_1F/scripts.inc
index adf1bd3a2..6c554387a 100644
--- a/data/maps/SlateportCity_SternsShipyard_1F/scripts.inc
+++ b/data/maps/SlateportCity_SternsShipyard_1F/scripts.inc
@@ -8,11 +8,11 @@ SlateportCity_SternsShipyard_1F_EventScript_207F40:: @ 8207F40
goto_if_set FLAG_DELIVERED_DEVON_GOODS, SlateportCity_SternsShipyard_1F_EventScript_207FD9
goto_if_set FLAG_DOCK_REJECTED_DEVON_GOODS, SlateportCity_SternsShipyard_1F_EventScript_207FBA
msgbox SlateportCity_SternsShipyard_1F_Text_208008, MSGBOX_DEFAULT
- applymovement 1, SlateportCity_SternsShipyard_1F_Movement_27259E
+ applymovement 1, Common_Movement_FacePlayer
waitmovement 0
msgbox SlateportCity_SternsShipyard_1F_Text_2080A5, MSGBOX_DEFAULT
closemessage
- applymovement 1, SlateportCity_SternsShipyard_1F_Movement_2725A2
+ applymovement 1, Common_Movement_FaceOriginalDirection
waitmovement 0
setflag FLAG_DOCK_REJECTED_DEVON_GOODS
setflag FLAG_HIDE_SLATEPORT_CITY_TEAM_AQUA
@@ -20,31 +20,31 @@ SlateportCity_SternsShipyard_1F_EventScript_207F40:: @ 8207F40
end
SlateportCity_SternsShipyard_1F_EventScript_207F92:: @ 8207F92
- applymovement 1, SlateportCity_SternsShipyard_1F_Movement_27259E
+ applymovement 1, Common_Movement_FacePlayer
waitmovement 0
msgbox SlateportCity_SternsShipyard_1F_Text_208323, MSGBOX_DEFAULT
releaseall
end
SlateportCity_SternsShipyard_1F_EventScript_207FA6:: @ 8207FA6
- applymovement 1, SlateportCity_SternsShipyard_1F_Movement_27259E
+ applymovement 1, Common_Movement_FacePlayer
waitmovement 0
msgbox SlateportCity_SternsShipyard_1F_Text_2082A8, MSGBOX_DEFAULT
releaseall
end
SlateportCity_SternsShipyard_1F_EventScript_207FBA:: @ 8207FBA
- applymovement 1, SlateportCity_SternsShipyard_1F_Movement_27259E
+ applymovement 1, Common_Movement_FacePlayer
waitmovement 0
msgbox SlateportCity_SternsShipyard_1F_Text_2081A5, MSGBOX_DEFAULT
closemessage
- applymovement 1, SlateportCity_SternsShipyard_1F_Movement_2725A2
+ applymovement 1, Common_Movement_FaceOriginalDirection
waitmovement 0
releaseall
end
SlateportCity_SternsShipyard_1F_EventScript_207FD9:: @ 8207FD9
- applymovement 1, SlateportCity_SternsShipyard_1F_Movement_27259E
+ applymovement 1, Common_Movement_FacePlayer
waitmovement 0
msgbox SlateportCity_SternsShipyard_1F_Text_208213, MSGBOX_DEFAULT
releaseall
diff --git a/data/maps/SootopolisCity/map.json b/data/maps/SootopolisCity/map.json
index 76ababed8..183c3ce46 100644
--- a/data/maps/SootopolisCity/map.json
+++ b/data/maps/SootopolisCity/map.json
@@ -358,7 +358,7 @@
"y": 29,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "SootopolisCity_EventScript_271E6A"
+ "script": "Common_EventScript_ShowPokemartSign"
},
{
"type": "sign",
@@ -366,7 +366,7 @@
"y": 31,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "SootopolisCity_EventScript_271E73"
+ "script": "Common_EventScript_ShowPokemonCenterSign"
},
{
"type": "sign",
@@ -374,7 +374,7 @@
"y": 31,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "SootopolisCity_EventScript_271E73"
+ "script": "Common_EventScript_ShowPokemonCenterSign"
},
{
"type": "sign",
@@ -382,7 +382,7 @@
"y": 29,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "SootopolisCity_EventScript_271E6A"
+ "script": "Common_EventScript_ShowPokemartSign"
},
{
"type": "sign",
diff --git a/data/maps/SootopolisCity/scripts.inc b/data/maps/SootopolisCity/scripts.inc
index 1cd4611e9..98c9af1ee 100644
--- a/data/maps/SootopolisCity/scripts.inc
+++ b/data/maps/SootopolisCity/scripts.inc
@@ -1,9 +1,9 @@
SootopolisCity_MapScripts:: @ 81E565C
- map_script 1, SootopolisCity_MapScript1_1E5676
- map_script 3, SootopolisCity_MapScript1_1E56EF
- map_script 5, SootopolisCity_MapScript1_1E590B
- map_script 2, SootopolisCity_MapScript2_1E5914
- map_script 4, SootopolisCity_MapScript2_1E58DB
+ map_script MAP_SCRIPT_ON_LOAD, SootopolisCity_MapScript1_1E5676
+ map_script MAP_SCRIPT_ON_TRANSITION, SootopolisCity_MapScript1_1E56EF
+ map_script MAP_SCRIPT_ON_RESUME, SootopolisCity_MapScript1_1E590B
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, SootopolisCity_MapScript2_1E5914
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, SootopolisCity_MapScript2_1E58DB
.byte 0
SootopolisCity_MapScript1_1E5676: @ 81E5676
@@ -110,7 +110,7 @@ SootopolisCity_EventScript_1E5805:: @ 81E5805
compare VAR_0x40CA, 1
goto_if_eq SootopolisCity_EventScript_1E583E
compare VAR_0x40CA, 1
- goto_if_le SootopolisCity_EventScript_27207A
+ goto_if_le Common_EventScript_SetWeather15
return
SootopolisCity_EventScript_1E583D:: @ 81E583D
@@ -214,13 +214,13 @@ SootopolisCity_EventScript_1E5946:: @ 81E5946
special RemoveCameraObject
delay 60
fadescreenspeed 1, 8
- setweather WEATHER_15
+ setweather WEATHER_ALTERNATING
doweather
setvar VAR_0x8004, 0
special sub_813B7D8
waitstate
- applymovement 10, SootopolisCity_Movement_2725A4
- applymovement 9, SootopolisCity_Movement_2725A8
+ applymovement 10, Common_Movement_WalkInPlaceLeft
+ applymovement 9, Common_Movement_WalkInPlaceRight
waitmovement 0
delay 60
waitse
@@ -314,13 +314,13 @@ SootopolisCity_EventScript_1E5A82:: @ 81E5A82
special RemoveCameraObject
delay 60
fadescreenspeed 1, 8
- setweather WEATHER_15
+ setweather WEATHER_ALTERNATING
doweather
setvar VAR_0x8004, 0
special sub_813B7D8
waitstate
- applymovement 10, SootopolisCity_Movement_2725A4
- applymovement 9, SootopolisCity_Movement_2725A8
+ applymovement 10, Common_Movement_WalkInPlaceLeft
+ applymovement 9, Common_Movement_WalkInPlaceRight
waitmovement 0
delay 60
waitse
@@ -730,7 +730,7 @@ SootopolisCity_EventScript_1E5ED8:: @ 81E5ED8
goto_if_eq SootopolisCity_EventScript_1E5F10
msgbox SootopolisCity_Text_1E6BFF, MSGBOX_DEFAULT
closemessage
- applymovement 3, SootopolisCity_Movement_2725A2
+ applymovement 3, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -751,7 +751,7 @@ SootopolisCity_EventScript_1E5F1B:: @ 81E5F1B
addvar VAR_RESULT, 133
giveitem_std VAR_RESULT
compare VAR_RESULT, 0
- goto_if_eq SootopolisCity_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
setflag FLAG_DAILY_SOOTOPOLIS_RECEIVED_BERRY
msgbox SootopolisCity_Text_2A7C7C, MSGBOX_DEFAULT
random 2
@@ -764,7 +764,7 @@ SootopolisCity_EventScript_1E5F1B:: @ 81E5F1B
SootopolisCity_EventScript_1E5F79:: @ 81E5F79
giveitem_std ITEM_FIGY_BERRY
compare VAR_RESULT, 0
- goto_if_eq SootopolisCity_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
msgbox SootopolisCity_Text_2A7CB7, MSGBOX_DEFAULT
release
end
@@ -772,7 +772,7 @@ SootopolisCity_EventScript_1E5F79:: @ 81E5F79
SootopolisCity_EventScript_1E5F9A:: @ 81E5F9A
giveitem_std ITEM_IAPAPA_BERRY
compare VAR_RESULT, 0
- goto_if_eq SootopolisCity_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
msgbox SootopolisCity_Text_2A7CB7, MSGBOX_DEFAULT
release
end
@@ -792,13 +792,13 @@ SootopolisCity_EventScript_1E5FD8:: @ 81E5FD8
SootopolisCity_EventScript_1E5FE2:: @ 81E5FE2
lockall
- applymovement 2, SootopolisCity_Movement_27259E
+ applymovement 2, Common_Movement_FacePlayer
waitmovement 0
compare VAR_0x405E, 5
goto_if_eq SootopolisCity_EventScript_1E600D
msgbox SootopolisCity_Text_1E71A1, MSGBOX_DEFAULT
closemessage
- applymovement 2, SootopolisCity_Movement_2725A2
+ applymovement 2, Common_Movement_FaceOriginalDirection
waitmovement 0
releaseall
end
@@ -838,7 +838,7 @@ SootopolisCity_EventScript_1E6038:: @ 81E6038
SootopolisCity_EventScript_1E6065:: @ 81E6065
msgbox SootopolisCity_Text_1E7078, MSGBOX_DEFAULT
closemessage
- applymovement 8, SootopolisCity_Movement_2725A2
+ applymovement 8, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -855,7 +855,7 @@ SootopolisCity_EventScript_1E6084:: @ 81E6084
SootopolisCity_EventScript_1E608E:: @ 81E608E
lockall
- applymovement 4, SootopolisCity_Movement_27259E
+ applymovement 4, Common_Movement_FacePlayer
waitmovement 0
compare VAR_0x405E, 5
goto_if_eq SootopolisCity_EventScript_1E60D9
@@ -865,7 +865,7 @@ SootopolisCity_EventScript_1E608E:: @ 81E608E
goto_if_le SootopolisCity_EventScript_1E60CF
msgbox SootopolisCity_Text_1E690B, MSGBOX_DEFAULT
closemessage
- applymovement 4, SootopolisCity_Movement_2725A2
+ applymovement 4, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -882,7 +882,7 @@ SootopolisCity_EventScript_1E60D9:: @ 81E60D9
SootopolisCity_EventScript_1E60E3:: @ 81E60E3
lockall
- applymovement 5, SootopolisCity_Movement_27259E
+ applymovement 5, Common_Movement_FacePlayer
waitmovement 0
compare VAR_0x405E, 5
goto_if_eq SootopolisCity_EventScript_1E612D
@@ -893,7 +893,7 @@ SootopolisCity_EventScript_1E60E3:: @ 81E60E3
goto_if_le SootopolisCity_EventScript_1E6141
msgbox SootopolisCity_Text_1E6692, MSGBOX_DEFAULT
closemessage
- applymovement 5, SootopolisCity_Movement_2725A2
+ applymovement 5, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
@@ -927,7 +927,7 @@ EventScript_ClosedSootopolisDoor:: @ 81E615D
SootopolisCity_EventScript_1E6166:: @ 81E6166
lockall
- applymovement 7, SootopolisCity_Movement_27259E
+ applymovement 7, Common_Movement_FacePlayer
waitmovement 0
call_if_unset FLAG_STEVEN_GUIDES_TO_CAVE_OF_ORIGIN, SootopolisCity_EventScript_1E61CC
compare VAR_0x405E, 2
@@ -1261,13 +1261,13 @@ SootopolisCity_Movement_1E635A: @ 81E635A
SootopolisCity_EventScript_1E635D:: @ 81E635D
lockall
- applymovement 15, SootopolisCity_Movement_27259E
+ applymovement 15, Common_Movement_FacePlayer
waitmovement 0
compare VAR_0x405E, 5
goto_if_eq SootopolisCity_EventScript_1E6388
msgbox SootopolisCity_Text_1E67DC, MSGBOX_DEFAULT
closemessage
- applymovement 15, SootopolisCity_Movement_2725A2
+ applymovement 15, Common_Movement_FaceOriginalDirection
waitmovement 0
releaseall
end
@@ -1284,17 +1284,17 @@ SootopolisCity_EventScript_1E6393:: @ 81E6393
goto_if_eq SootopolisCity_EventScript_1E63C7
msgbox SootopolisCity_Text_1E6936, MSGBOX_DEFAULT
closemessage
- applymovement 14, SootopolisCity_Movement_27259E
+ applymovement 14, Common_Movement_FacePlayer
waitmovement 0
msgbox SootopolisCity_Text_1E696C, MSGBOX_DEFAULT
closemessage
- applymovement 14, SootopolisCity_Movement_2725A2
+ applymovement 14, Common_Movement_FaceOriginalDirection
waitmovement 0
releaseall
end
SootopolisCity_EventScript_1E63C7:: @ 81E63C7
- applymovement 14, SootopolisCity_Movement_27259E
+ applymovement 14, Common_Movement_FacePlayer
waitmovement 0
msgbox SootopolisCity_Text_1E69B8, MSGBOX_DEFAULT
releaseall
@@ -1302,13 +1302,13 @@ SootopolisCity_EventScript_1E63C7:: @ 81E63C7
SootopolisCity_EventScript_1E63DB:: @ 81E63DB
lockall
- applymovement 13, SootopolisCity_Movement_27259E
+ applymovement 13, Common_Movement_FacePlayer
waitmovement 0
compare VAR_0x405E, 5
goto_if_eq SootopolisCity_EventScript_1E6406
msgbox SootopolisCity_Text_1E6C7C, MSGBOX_DEFAULT
closemessage
- applymovement 13, SootopolisCity_Movement_2725A2
+ applymovement 13, Common_Movement_FaceOriginalDirection
waitmovement 0
releaseall
end
@@ -1321,13 +1321,13 @@ SootopolisCity_EventScript_1E6406:: @ 81E6406
SootopolisCity_EventScript_1E6411:: @ 81E6411
lockall
- applymovement 12, SootopolisCity_Movement_27259E
+ applymovement 12, Common_Movement_FacePlayer
waitmovement 0
compare VAR_0x405E, 5
goto_if_eq SootopolisCity_EventScript_1E643C
msgbox SootopolisCity_Text_1E6A50, MSGBOX_DEFAULT
closemessage
- applymovement 12, SootopolisCity_Movement_2725A2
+ applymovement 12, Common_Movement_FaceOriginalDirection
waitmovement 0
releaseall
end
@@ -1435,7 +1435,7 @@ SootopolisCity_EventScript_1E654C:: @ 81E654C
setflag FLAG_SOOTOPOLIS_ARCHIE_MAXIE_LEAVE
clearflag FLAG_HIDE_MT_PYRE_SUMMIT_MAXIE
clearflag FLAG_HIDE_MT_PYRE_SUMMIT_ARCHIE
- setvar VAR_0x40B9, 2
+ setvar VAR_MT_PYRE_STATE, 2
warpsilent MAP_SOOTOPOLIS_CITY, 255, 31, 34
waitstate
releaseall
diff --git a/data/maps/SootopolisCity_Gym_1F/scripts.inc b/data/maps/SootopolisCity_Gym_1F/scripts.inc
index 22cd864cf..06bc91f21 100644
--- a/data/maps/SootopolisCity_Gym_1F/scripts.inc
+++ b/data/maps/SootopolisCity_Gym_1F/scripts.inc
@@ -1,8 +1,8 @@
SootopolisCity_Gym_1F_MapScripts:: @ 8224E4C
- map_script 2, SootopolisCity_Gym_1F_MapScript2_224ECB
- map_script 5, SootopolisCity_Gym_1F_MapScript1_224E67
- map_script 1, SootopolisCity_Gym_1F_MapScript1_224E6A
- map_script 3, SootopolisCity_Gym_1F_MapScript1_224E61
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, SootopolisCity_Gym_1F_MapScript2_224ECB
+ map_script MAP_SCRIPT_ON_RESUME, SootopolisCity_Gym_1F_MapScript1_224E67
+ map_script MAP_SCRIPT_ON_LOAD, SootopolisCity_Gym_1F_MapScript1_224E6A
+ map_script MAP_SCRIPT_ON_TRANSITION, SootopolisCity_Gym_1F_MapScript1_224E61
.byte 0
SootopolisCity_Gym_1F_MapScript1_224E61: @ 8224E61
@@ -99,7 +99,7 @@ SootopolisCity_Gym_1F_EventScript_224F44:: @ 8224F44
SootopolisCity_Gym_1F_EventScript_224F82:: @ 8224F82
message SootopolisCity_Gym_1F_Text_225598
waitmessage
- call SootopolisCity_Gym_1F_EventScript_27207E
+ call Common_EventScript_PlayGymBadgeFanfare
msgbox SootopolisCity_Gym_1F_Text_2255BE, MSGBOX_DEFAULT
setflag FLAG_DEFEATED_SOOTOPOLIS_GYM
setflag FLAG_BADGE08_GET
@@ -125,7 +125,7 @@ SootopolisCity_Gym_1F_EventScript_224F82:: @ 8224F82
SootopolisCity_Gym_1F_EventScript_224FD4:: @ 8224FD4
giveitem_std ITEM_TM03
compare VAR_RESULT, 0
- goto_if_eq SootopolisCity_Gym_1F_EventScript_27205E
+ goto_if_eq Common_EventScript_BagIsFull
msgbox SootopolisCity_Gym_1F_Text_2256C1, MSGBOX_DEFAULT
setflag FLAG_RECEIVED_TM03
return
@@ -133,7 +133,7 @@ SootopolisCity_Gym_1F_EventScript_224FD4:: @ 8224FD4
SootopolisCity_Gym_1F_EventScript_224FF7:: @ 8224FF7
giveitem_std ITEM_TM03
compare VAR_RESULT, 0
- goto_if_eq SootopolisCity_Gym_1F_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
msgbox SootopolisCity_Gym_1F_Text_2256C1, MSGBOX_DEFAULT
setflag FLAG_RECEIVED_TM03
release
diff --git a/data/maps/SootopolisCity_House1/scripts.inc b/data/maps/SootopolisCity_House1/scripts.inc
index 9dcc1031d..13b581c71 100644
--- a/data/maps/SootopolisCity_House1/scripts.inc
+++ b/data/maps/SootopolisCity_House1/scripts.inc
@@ -8,7 +8,7 @@ SootopolisCity_House1_EventScript_22694D:: @ 822694D
msgbox SootopolisCity_House1_Text_2269A1, MSGBOX_DEFAULT
giveitem_std ITEM_TM31
compare VAR_RESULT, 0
- goto_if_eq SootopolisCity_House1_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
setflag FLAG_RECEIVED_TM31
msgbox SootopolisCity_House1_Text_226A13, MSGBOX_DEFAULT
release
diff --git a/data/maps/SootopolisCity_House6/scripts.inc b/data/maps/SootopolisCity_House6/scripts.inc
index efa197c8d..0f175478a 100644
--- a/data/maps/SootopolisCity_House6/scripts.inc
+++ b/data/maps/SootopolisCity_House6/scripts.inc
@@ -28,7 +28,7 @@ SootopolisCity_House6_EventScript_226FA3:: @ 8226FA3
SootopolisCity_House6_EventScript_226FAD:: @ 8226FAD
bufferdecorationname 1, 117
- msgbox gUnknown_08272B1A, MSGBOX_DEFAULT
+ msgbox gText_NoRoomLeftForAnother, MSGBOX_DEFAULT
msgbox SootopolisCity_House6_Text_22704A, MSGBOX_DEFAULT
release
end
diff --git a/data/maps/SootopolisCity_MysteryEventsHouse_1F/scripts.inc b/data/maps/SootopolisCity_MysteryEventsHouse_1F/scripts.inc
index 5db204293..d107037d4 100644
--- a/data/maps/SootopolisCity_MysteryEventsHouse_1F/scripts.inc
+++ b/data/maps/SootopolisCity_MysteryEventsHouse_1F/scripts.inc
@@ -1,6 +1,6 @@
SootopolisCity_MysteryEventsHouse_1F_MapScripts:: @ 8227953
- map_script 3, SootopolisCity_MysteryEventsHouse_1F_MapScript1_22795E
- map_script 2, SootopolisCity_MysteryEventsHouse_1F_MapScript2_22799D
+ map_script MAP_SCRIPT_ON_TRANSITION, SootopolisCity_MysteryEventsHouse_1F_MapScript1_22795E
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, SootopolisCity_MysteryEventsHouse_1F_MapScript2_22799D
.byte 0
SootopolisCity_MysteryEventsHouse_1F_MapScript1_22795E: @ 822795E
@@ -8,7 +8,7 @@ SootopolisCity_MysteryEventsHouse_1F_MapScript1_22795E: @ 822795E
special CallFrontierUtilFunc
compare VAR_RESULT, 0
call_if_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_22797D
- compare VAR_0x40C0, 0
+ compare VAR_SOOTOPOLIS_MYSTERY_EVENTS_STATE, 0
call_if_ne SootopolisCity_MysteryEventsHouse_1F_EventScript_227991
end
@@ -25,9 +25,9 @@ SootopolisCity_MysteryEventsHouse_1F_EventScript_227991:: @ 8227991
return
SootopolisCity_MysteryEventsHouse_1F_MapScript2_22799D: @ 822799D
- map_script_2 VAR_0x40C0, 1, SootopolisCity_MysteryEventsHouse_1F_EventScript_2279B7
- map_script_2 VAR_0x40C0, 2, SootopolisCity_MysteryEventsHouse_1F_EventScript_2279B7
- map_script_2 VAR_0x40C0, 3, SootopolisCity_MysteryEventsHouse_1F_EventScript_2279B7
+ map_script_2 VAR_SOOTOPOLIS_MYSTERY_EVENTS_STATE, 1, SootopolisCity_MysteryEventsHouse_1F_EventScript_2279B7
+ map_script_2 VAR_SOOTOPOLIS_MYSTERY_EVENTS_STATE, 2, SootopolisCity_MysteryEventsHouse_1F_EventScript_2279B7
+ map_script_2 VAR_SOOTOPOLIS_MYSTERY_EVENTS_STATE, 3, SootopolisCity_MysteryEventsHouse_1F_EventScript_2279B7
.2byte 0
SootopolisCity_MysteryEventsHouse_1F_EventScript_2279B7:: @ 82279B7
@@ -37,16 +37,16 @@ SootopolisCity_MysteryEventsHouse_1F_EventScript_2279B7:: @ 82279B7
applymovement 1, SootopolisCity_MysteryEventsHouse_1F_Movement_227A21
waitmovement 0
moveobjectoffscreen 1
- applymovement EVENT_OBJ_ID_PLAYER, SootopolisCity_MysteryEventsHouse_1F_Movement_2725A6
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceUp
waitmovement 0
- compare VAR_0x40C0, 1
+ compare VAR_SOOTOPOLIS_MYSTERY_EVENTS_STATE, 1
call_if_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_227A04
- compare VAR_0x40C0, 2
+ compare VAR_SOOTOPOLIS_MYSTERY_EVENTS_STATE, 2
call_if_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_227A0D
- compare VAR_0x40C0, 3
+ compare VAR_SOOTOPOLIS_MYSTERY_EVENTS_STATE, 3
call_if_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_227A16
special LoadPlayerParty
- setvar VAR_0x40C0, 0
+ setvar VAR_SOOTOPOLIS_MYSTERY_EVENTS_STATE, 0
releaseall
end
@@ -102,7 +102,7 @@ SootopolisCity_MysteryEventsHouse_1F_EventScript_227A58:: @ 8227A58
compare VAR_RESULT, 0
goto_if_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_227AE2
special LoadPlayerParty
- call SootopolisCity_MysteryEventsHouse_1F_EventScript_27134F
+ call Common_EventScript_SaveGame
compare VAR_RESULT, 0
goto_if_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_227AE2
special SavePlayerParty
diff --git a/data/maps/SootopolisCity_MysteryEventsHouse_B1F/scripts.inc b/data/maps/SootopolisCity_MysteryEventsHouse_B1F/scripts.inc
index 0de8651d7..374aa6270 100644
--- a/data/maps/SootopolisCity_MysteryEventsHouse_B1F/scripts.inc
+++ b/data/maps/SootopolisCity_MysteryEventsHouse_B1F/scripts.inc
@@ -1,6 +1,6 @@
SootopolisCity_MysteryEventsHouse_B1F_MapScripts:: @ 8227E4F
- map_script 3, SootopolisCity_MysteryEventsHouse_B1F_MapScript1_227E5A
- map_script 2, SootopolisCity_MysteryEventsHouse_B1F_MapScript2_227E5E
+ map_script MAP_SCRIPT_ON_TRANSITION, SootopolisCity_MysteryEventsHouse_B1F_MapScript1_227E5A
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, SootopolisCity_MysteryEventsHouse_B1F_MapScript2_227E5E
.byte 0
SootopolisCity_MysteryEventsHouse_B1F_MapScript1_227E5A: @ 8227E5A
@@ -40,19 +40,19 @@ SootopolisCity_MysteryEventsHouse_B1F_EventScript_227E68:: @ 8227E68
end
SootopolisCity_MysteryEventsHouse_B1F_EventScript_227ECF:: @ 8227ECF
- setvar VAR_0x40C0, 3
+ setvar VAR_SOOTOPOLIS_MYSTERY_EVENTS_STATE, 3
msgbox SootopolisCity_MysteryEventsHouse_B1F_Text_227D40, MSGBOX_DEFAULT
return
SootopolisCity_MysteryEventsHouse_B1F_EventScript_227EDD:: @ 8227EDD
- setvar VAR_0x40C0, 1
+ setvar VAR_SOOTOPOLIS_MYSTERY_EVENTS_STATE, 1
special ShowFieldMessageStringVar4
waitmessage
waitbuttonpress
return
SootopolisCity_MysteryEventsHouse_B1F_EventScript_227EE8:: @ 8227EE8
- setvar VAR_0x40C0, 2
+ setvar VAR_SOOTOPOLIS_MYSTERY_EVENTS_STATE, 2
special ShowFieldMessageStringVar4
waitmessage
waitbuttonpress
diff --git a/data/maps/SootopolisCity_PokemonCenter_1F/scripts.inc b/data/maps/SootopolisCity_PokemonCenter_1F/scripts.inc
index 2e7e804ce..96f766f7b 100644
--- a/data/maps/SootopolisCity_PokemonCenter_1F/scripts.inc
+++ b/data/maps/SootopolisCity_PokemonCenter_1F/scripts.inc
@@ -1,6 +1,6 @@
SootopolisCity_PokemonCenter_1F_MapScripts:: @ 82264F1
- map_script 3, SootopolisCity_PokemonCenter_1F_MapScript1_2264FC
- map_script 5, SootopolisCity_PokemonCenter_1F_MapScript1_277C30
+ map_script MAP_SCRIPT_ON_TRANSITION, SootopolisCity_PokemonCenter_1F_MapScript1_2264FC
+ map_script MAP_SCRIPT_ON_RESUME, SootopolisCity_PokemonCenter_1F_MapScript1_277C30
.byte 0
SootopolisCity_PokemonCenter_1F_MapScript1_2264FC: @ 82264FC
diff --git a/data/maps/SootopolisCity_PokemonCenter_2F/scripts.inc b/data/maps/SootopolisCity_PokemonCenter_2F/scripts.inc
index 43d8a9d2f..275fe3046 100644
--- a/data/maps/SootopolisCity_PokemonCenter_2F/scripts.inc
+++ b/data/maps/SootopolisCity_PokemonCenter_2F/scripts.inc
@@ -1,8 +1,8 @@
SootopolisCity_PokemonCenter_2F_MapScripts:: @ 822676D
- map_script 2, SootopolisCity_PokemonCenter_2F_MapScript2_276C3B
- map_script 4, SootopolisCity_PokemonCenter_2F_MapScript2_276B6C
- map_script 1, SootopolisCity_PokemonCenter_2F_MapScript1_276BBE
- map_script 3, SootopolisCity_PokemonCenter_2F_MapScript1_276ACF
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, SootopolisCity_PokemonCenter_2F_MapScript2_276C3B
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, SootopolisCity_PokemonCenter_2F_MapScript2_276B6C
+ map_script MAP_SCRIPT_ON_LOAD, SootopolisCity_PokemonCenter_2F_MapScript1_276BBE
+ map_script MAP_SCRIPT_ON_TRANSITION, SootopolisCity_PokemonCenter_2F_MapScript1_276ACF
.byte 0
SootopolisCity_PokemonCenter_2F_EventScript_226782:: @ 8226782
diff --git a/data/maps/SouthernIsland_Exterior/scripts.inc b/data/maps/SouthernIsland_Exterior/scripts.inc
index 388410821..618ce864a 100644
--- a/data/maps/SouthernIsland_Exterior/scripts.inc
+++ b/data/maps/SouthernIsland_Exterior/scripts.inc
@@ -1,5 +1,5 @@
SouthernIsland_Exterior_MapScripts:: @ 82429C8
- map_script 3, SouthernIsland_Exterior_MapScript1_2429CE
+ map_script MAP_SCRIPT_ON_TRANSITION, SouthernIsland_Exterior_MapScript1_2429CE
.byte 0
SouthernIsland_Exterior_MapScript1_2429CE: @ 82429CE
@@ -14,7 +14,7 @@ SouthernIsland_Exterior_EventScript_2429D2:: @ 82429D2
goto_if_eq SouthernIsland_Exterior_EventScript_242A17
msgbox SouthernIsland_Exterior_Text_2A6A5D, MSGBOX_DEFAULT
closemessage
- applymovement VAR_LAST_TALKED, SouthernIsland_Exterior_Movement_2725AA
+ applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceDown
waitmovement 0
delay 30
hideobjectat 1, MAP_SOUTHERN_ISLAND_EXTERIOR
diff --git a/data/maps/SouthernIsland_Interior/scripts.inc b/data/maps/SouthernIsland_Interior/scripts.inc
index 4f8dba7e5..a24bc772f 100644
--- a/data/maps/SouthernIsland_Interior/scripts.inc
+++ b/data/maps/SouthernIsland_Interior/scripts.inc
@@ -1,6 +1,6 @@
SouthernIsland_Interior_MapScripts:: @ 8242A45
- map_script 5, SouthernIsland_Interior_MapScript1_242A50
- map_script 3, SouthernIsland_Interior_MapScript1_242A6E
+ map_script MAP_SCRIPT_ON_RESUME, SouthernIsland_Interior_MapScript1_242A50
+ map_script MAP_SCRIPT_ON_TRANSITION, SouthernIsland_Interior_MapScript1_242A6E
.byte 0
SouthernIsland_Interior_MapScript1_242A50: @ 8242A50
@@ -10,7 +10,7 @@ SouthernIsland_Interior_MapScript1_242A50: @ 8242A50
SouthernIsland_Interior_EventScript_242A5A:: @ 8242A5A
specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, 7
- goto_if_ne SouthernIsland_Interior_EventScript_27374E
+ goto_if_ne Common_EventScript_NopReturn
removeobject 2
return
diff --git a/data/maps/TerraCave_End/scripts.inc b/data/maps/TerraCave_End/scripts.inc
index a3164136d..3f892315d 100644
--- a/data/maps/TerraCave_End/scripts.inc
+++ b/data/maps/TerraCave_End/scripts.inc
@@ -1,6 +1,6 @@
TerraCave_End_MapScripts:: @ 823B0B0
- map_script 5, TerraCave_End_MapScript1_23B0BB
- map_script 3, TerraCave_End_MapScript1_23B0D9
+ map_script MAP_SCRIPT_ON_RESUME, TerraCave_End_MapScript1_23B0BB
+ map_script MAP_SCRIPT_ON_TRANSITION, TerraCave_End_MapScript1_23B0D9
.byte 0
TerraCave_End_MapScript1_23B0BB: @ 823B0BB
@@ -10,7 +10,7 @@ TerraCave_End_MapScript1_23B0BB: @ 823B0BB
TerraCave_End_EventScript_23B0C5:: @ 823B0C5
specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, 7
- goto_if_ne TerraCave_End_EventScript_27374E
+ goto_if_ne Common_EventScript_NopReturn
removeobject 1
return
@@ -25,7 +25,7 @@ TerraCave_End_EventScript_23B0E3:: @ 823B0E3
TerraCave_End_EventScript_23B0EC:: @ 823B0EC
lockall
- applymovement EVENT_OBJ_ID_PLAYER, TerraCave_End_Movement_2725B2
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_FaceUp
waitmovement 0
applymovement 1, TerraCave_End_Movement_23B16E
waitmovement 0
diff --git a/data/maps/TerraCave_Entrance/scripts.inc b/data/maps/TerraCave_Entrance/scripts.inc
index b9a17701b..b9e3e5910 100644
--- a/data/maps/TerraCave_Entrance/scripts.inc
+++ b/data/maps/TerraCave_Entrance/scripts.inc
@@ -1,5 +1,5 @@
TerraCave_Entrance_MapScripts:: @ 823B0A6
- map_script 3, TerraCave_Entrance_MapScript1_23B0AC
+ map_script MAP_SCRIPT_ON_TRANSITION, TerraCave_Entrance_MapScript1_23B0AC
.byte 0
TerraCave_Entrance_MapScript1_23B0AC: @ 823B0AC
diff --git a/data/maps/TrainerHill_1F/scripts.inc b/data/maps/TrainerHill_1F/scripts.inc
index 465a6d781..e726f8566 100644
--- a/data/maps/TrainerHill_1F/scripts.inc
+++ b/data/maps/TrainerHill_1F/scripts.inc
@@ -1,6 +1,6 @@
TrainerHill_1F_MapScripts:: @ 8268F71
- map_script 5, TrainerHill_1F_MapScript1_2C8336
- map_script 4, TrainerHill_1F_MapScript2_2C8372
- map_script 2, TrainerHill_1F_MapScript2_2C8381
+ map_script MAP_SCRIPT_ON_RESUME, TrainerHill_1F_MapScript1_2C8336
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, TrainerHill_1F_MapScript2_2C8372
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, TrainerHill_1F_MapScript2_2C8381
.byte 0
diff --git a/data/maps/TrainerHill_2F/scripts.inc b/data/maps/TrainerHill_2F/scripts.inc
index ca8eeff72..dd1f356de 100644
--- a/data/maps/TrainerHill_2F/scripts.inc
+++ b/data/maps/TrainerHill_2F/scripts.inc
@@ -1,6 +1,6 @@
TrainerHill_2F_MapScripts:: @ 8268F81
- map_script 5, TrainerHill_2F_MapScript1_2C8336
- map_script 4, TrainerHill_2F_MapScript2_2C8372
- map_script 2, TrainerHill_2F_MapScript2_2C8381
+ map_script MAP_SCRIPT_ON_RESUME, TrainerHill_2F_MapScript1_2C8336
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, TrainerHill_2F_MapScript2_2C8372
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, TrainerHill_2F_MapScript2_2C8381
.byte 0
diff --git a/data/maps/TrainerHill_3F/scripts.inc b/data/maps/TrainerHill_3F/scripts.inc
index 921a8d808..b4793f457 100644
--- a/data/maps/TrainerHill_3F/scripts.inc
+++ b/data/maps/TrainerHill_3F/scripts.inc
@@ -1,5 +1,5 @@
TrainerHill_3F_MapScripts:: @ 8268F91
- map_script 5, TrainerHill_3F_MapScript1_2C8336
- map_script 2, TrainerHill_3F_MapScript2_2C8381
+ map_script MAP_SCRIPT_ON_RESUME, TrainerHill_3F_MapScript1_2C8336
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, TrainerHill_3F_MapScript2_2C8381
.byte 0
diff --git a/data/maps/TrainerHill_4F/scripts.inc b/data/maps/TrainerHill_4F/scripts.inc
index 0f710152c..66b8ed3bb 100644
--- a/data/maps/TrainerHill_4F/scripts.inc
+++ b/data/maps/TrainerHill_4F/scripts.inc
@@ -1,5 +1,5 @@
TrainerHill_4F_MapScripts:: @ 8268F9C
- map_script 5, TrainerHill_4F_MapScript1_2C8336
- map_script 2, TrainerHill_4F_MapScript2_2C8381
+ map_script MAP_SCRIPT_ON_RESUME, TrainerHill_4F_MapScript1_2C8336
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, TrainerHill_4F_MapScript2_2C8381
.byte 0
diff --git a/data/maps/TrainerHill_Elevator/scripts.inc b/data/maps/TrainerHill_Elevator/scripts.inc
index c3a71d492..ecc48a9e9 100644
--- a/data/maps/TrainerHill_Elevator/scripts.inc
+++ b/data/maps/TrainerHill_Elevator/scripts.inc
@@ -1,5 +1,5 @@
TrainerHill_Elevator_MapScripts:: @ 826934F
- map_script 2, TrainerHill_Elevator_MapScript2_269355
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, TrainerHill_Elevator_MapScript2_269355
.byte 0
TrainerHill_Elevator_MapScript2_269355: @ 8269355
diff --git a/data/maps/TrainerHill_Entrance/scripts.inc b/data/maps/TrainerHill_Entrance/scripts.inc
index 846b7f6c3..5339f49e3 100644
--- a/data/maps/TrainerHill_Entrance/scripts.inc
+++ b/data/maps/TrainerHill_Entrance/scripts.inc
@@ -1,9 +1,9 @@
TrainerHill_Entrance_MapScripts:: @ 82680AC
- map_script 5, TrainerHill_Entrance_MapScript1_2680D0
- map_script 7, TrainerHill_Entrance_MapScript1_26811B
- map_script 3, TrainerHill_Entrance_MapScript1_2680C6
- map_script 1, TrainerHill_Entrance_MapScript1_268128
- map_script 2, TrainerHill_Entrance_MapScript2_26813E
+ map_script MAP_SCRIPT_ON_RESUME, TrainerHill_Entrance_MapScript1_2680D0
+ map_script MAP_SCRIPT_ON_RETURN_TO_FIELD, TrainerHill_Entrance_MapScript1_26811B
+ map_script MAP_SCRIPT_ON_TRANSITION, TrainerHill_Entrance_MapScript1_2680C6
+ map_script MAP_SCRIPT_ON_LOAD, TrainerHill_Entrance_MapScript1_268128
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, TrainerHill_Entrance_MapScript2_26813E
.byte 0
TrainerHill_Entrance_MapScript1_2680C6: @ 82680C6
@@ -194,7 +194,7 @@ TrainerHill_Entrance_EventScript_26832E:: @ 826832E
setvar VAR_0x8004, 14
special CallTrainerHillFunction
setvar VAR_TEMP_5, 1
- call TrainerHill_Entrance_EventScript_27134F
+ call Common_EventScript_SaveGame
compare VAR_RESULT, 0
goto_if_eq TrainerHill_Entrance_EventScript_26835C
setvar VAR_0x8004, 14
diff --git a/data/maps/TrainerHill_Roof/scripts.inc b/data/maps/TrainerHill_Roof/scripts.inc
index b959481f2..fc1ca200f 100644
--- a/data/maps/TrainerHill_Roof/scripts.inc
+++ b/data/maps/TrainerHill_Roof/scripts.inc
@@ -1,6 +1,6 @@
TrainerHill_Roof_MapScripts:: @ 8268FA7
- map_script 5, TrainerHill_Roof_MapScript1_2C8336
- map_script 2, TrainerHill_Roof_MapScript2_2C8381
+ map_script MAP_SCRIPT_ON_RESUME, TrainerHill_Roof_MapScript1_2C8336
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, TrainerHill_Roof_MapScript2_2C8381
.byte 0
TrainerHill_Roof_EventScript_268FB2:: @ 8268FB2
diff --git a/data/maps/Underwater3/scripts.inc b/data/maps/Underwater3/scripts.inc
index 463f7a0ff..99f0efcf0 100644
--- a/data/maps/Underwater3/scripts.inc
+++ b/data/maps/Underwater3/scripts.inc
@@ -1,5 +1,5 @@
Underwater3_MapScripts:: @ 81F7724
- map_script 5, Underwater3_MapScript1_1F772A
+ map_script MAP_SCRIPT_ON_RESUME, Underwater3_MapScript1_1F772A
.byte 0
Underwater3_MapScript1_1F772A: @ 81F772A
diff --git a/data/maps/Underwater5/scripts.inc b/data/maps/Underwater5/scripts.inc
index 9d0cc373c..ea37514eb 100644
--- a/data/maps/Underwater5/scripts.inc
+++ b/data/maps/Underwater5/scripts.inc
@@ -1,5 +1,5 @@
Underwater5_MapScripts:: @ 81F7731
- map_script 5, Underwater5_MapScript1_1F7737
+ map_script MAP_SCRIPT_ON_RESUME, Underwater5_MapScript1_1F7737
.byte 0
Underwater5_MapScript1_1F7737: @ 81F7737
diff --git a/data/maps/Underwater6/scripts.inc b/data/maps/Underwater6/scripts.inc
index 047628c9c..fee91dc75 100644
--- a/data/maps/Underwater6/scripts.inc
+++ b/data/maps/Underwater6/scripts.inc
@@ -1,5 +1,5 @@
Underwater6_MapScripts:: @ 81F773D
- map_script 5, Underwater6_MapScript1_1F7743
+ map_script MAP_SCRIPT_ON_RESUME, Underwater6_MapScript1_1F7743
.byte 0
Underwater6_MapScript1_1F7743: @ 81F7743
diff --git a/data/maps/Underwater7/scripts.inc b/data/maps/Underwater7/scripts.inc
index dd757f98a..a0eba386a 100644
--- a/data/maps/Underwater7/scripts.inc
+++ b/data/maps/Underwater7/scripts.inc
@@ -1,5 +1,5 @@
Underwater7_MapScripts:: @ 81F7749
- map_script 5, Underwater7_MapScript1_1F774F
+ map_script MAP_SCRIPT_ON_RESUME, Underwater7_MapScript1_1F774F
.byte 0
Underwater7_MapScript1_1F774F: @ 81F774F
diff --git a/data/maps/Underwater_MarineCave/scripts.inc b/data/maps/Underwater_MarineCave/scripts.inc
index d6a3aa0db..9309d51f4 100644
--- a/data/maps/Underwater_MarineCave/scripts.inc
+++ b/data/maps/Underwater_MarineCave/scripts.inc
@@ -1,6 +1,6 @@
Underwater_MarineCave_MapScripts:: @ 823AFB8
- map_script 5, Underwater_MarineCave_MapScript1_23AFC7
- map_script 3, Underwater_MarineCave_MapScript1_23AFC3
+ map_script MAP_SCRIPT_ON_RESUME, Underwater_MarineCave_MapScript1_23AFC7
+ map_script MAP_SCRIPT_ON_TRANSITION, Underwater_MarineCave_MapScript1_23AFC3
.byte 0
Underwater_MarineCave_MapScript1_23AFC3: @ 823AFC3
diff --git a/data/maps/Underwater_Route134/scripts.inc b/data/maps/Underwater_Route134/scripts.inc
index 786de1757..acffa23a2 100644
--- a/data/maps/Underwater_Route134/scripts.inc
+++ b/data/maps/Underwater_Route134/scripts.inc
@@ -1,5 +1,5 @@
Underwater_Route134_MapScripts:: @ 82390B5
- map_script 5, Underwater_Route134_MapScript1_2390BB
+ map_script MAP_SCRIPT_ON_RESUME, Underwater_Route134_MapScript1_2390BB
.byte 0
Underwater_Route134_MapScript1_2390BB: @ 82390BB
diff --git a/data/maps/Underwater_SeafloorCavern/scripts.inc b/data/maps/Underwater_SeafloorCavern/scripts.inc
index efd2e9438..9dc5b406a 100644
--- a/data/maps/Underwater_SeafloorCavern/scripts.inc
+++ b/data/maps/Underwater_SeafloorCavern/scripts.inc
@@ -1,7 +1,7 @@
Underwater_SeafloorCavern_MapScripts:: @ 823433B
- map_script 5, Underwater_SeafloorCavern_MapScript1_2343D3
- map_script 3, Underwater_SeafloorCavern_MapScript1_23434B
- map_script 1, Underwater_SeafloorCavern_MapScript1_23435C
+ map_script MAP_SCRIPT_ON_RESUME, Underwater_SeafloorCavern_MapScript1_2343D3
+ map_script MAP_SCRIPT_ON_TRANSITION, Underwater_SeafloorCavern_MapScript1_23434B
+ map_script MAP_SCRIPT_ON_LOAD, Underwater_SeafloorCavern_MapScript1_23435C
.byte 0
Underwater_SeafloorCavern_MapScript1_23434B: @ 823434B
diff --git a/data/maps/Underwater_SealedChamber/scripts.inc b/data/maps/Underwater_SealedChamber/scripts.inc
index de6ed50d1..9ec884781 100644
--- a/data/maps/Underwater_SealedChamber/scripts.inc
+++ b/data/maps/Underwater_SealedChamber/scripts.inc
@@ -1,5 +1,5 @@
Underwater_SealedChamber_MapScripts:: @ 82390C4
- map_script 6, Underwater_SealedChamber_MapScript1_2390CA
+ map_script MAP_SCRIPT_ON_DIVE_WARP, Underwater_SealedChamber_MapScript1_2390CA
.byte 0
Underwater_SealedChamber_MapScript1_2390CA: @ 82390CA
diff --git a/data/maps/Underwater_SootopolisCity/scripts.inc b/data/maps/Underwater_SootopolisCity/scripts.inc
index cbeefcb1d..d5040dba0 100644
--- a/data/maps/Underwater_SootopolisCity/scripts.inc
+++ b/data/maps/Underwater_SootopolisCity/scripts.inc
@@ -1,5 +1,5 @@
Underwater_SootopolisCity_MapScripts:: @ 822D94C
- map_script 5, Underwater_SootopolisCity_MapScript1_22D952
+ map_script MAP_SCRIPT_ON_RESUME, Underwater_SootopolisCity_MapScript1_22D952
.byte 0
Underwater_SootopolisCity_MapScript1_22D952: @ 822D952
diff --git a/data/maps/UnionRoom/scripts.inc b/data/maps/UnionRoom/scripts.inc
index f71c40e3d..0871ae033 100644
--- a/data/maps/UnionRoom/scripts.inc
+++ b/data/maps/UnionRoom/scripts.inc
@@ -1,6 +1,6 @@
UnionRoom_MapScripts:: @ 823D1A6
- map_script 5, UnionRoom_MapScript1_23D1B1
- map_script 3, UnionRoom_MapScript1_23D1E5
+ map_script MAP_SCRIPT_ON_RESUME, UnionRoom_MapScript1_23D1B1
+ map_script MAP_SCRIPT_ON_TRANSITION, UnionRoom_MapScript1_23D1E5
.byte 0
UnionRoom_MapScript1_23D1B1: @ 823D1B1
diff --git a/data/maps/VerdanturfTown/map.json b/data/maps/VerdanturfTown/map.json
index 3f8f4fe45..7aef48724 100644
--- a/data/maps/VerdanturfTown/map.json
+++ b/data/maps/VerdanturfTown/map.json
@@ -137,7 +137,7 @@
"y": 3,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "VerdanturfTown_EventScript_271E6A"
+ "script": "Common_EventScript_ShowPokemartSign"
},
{
"type": "sign",
@@ -153,7 +153,7 @@
"y": 3,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "VerdanturfTown_EventScript_271E73"
+ "script": "Common_EventScript_ShowPokemonCenterSign"
},
{
"type": "sign",
@@ -169,7 +169,7 @@
"y": 3,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "VerdanturfTown_EventScript_271E6A"
+ "script": "Common_EventScript_ShowPokemartSign"
},
{
"type": "sign",
@@ -177,7 +177,7 @@
"y": 3,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH",
- "script": "VerdanturfTown_EventScript_271E73"
+ "script": "Common_EventScript_ShowPokemonCenterSign"
},
{
"type": "sign",
diff --git a/data/maps/VerdanturfTown/scripts.inc b/data/maps/VerdanturfTown/scripts.inc
index c929633dd..bd2bce048 100644
--- a/data/maps/VerdanturfTown/scripts.inc
+++ b/data/maps/VerdanturfTown/scripts.inc
@@ -1,10 +1,10 @@
VerdanturfTown_MapScripts:: @ 81EB566
- map_script 3, VerdanturfTown_MapScript1_1EB56C
+ map_script MAP_SCRIPT_ON_TRANSITION, VerdanturfTown_MapScript1_1EB56C
.byte 0
VerdanturfTown_MapScript1_1EB56C: @ 81EB56C
setflag FLAG_VISITED_VERDANTURF_TOWN
- setvar VAR_0x4086, 0
+ setvar VAR_LINK_CONTEST_ROOM_STATE, 0
end
VerdanturfTown_EventScript_1EB575:: @ 81EB575
@@ -12,14 +12,14 @@ VerdanturfTown_EventScript_1EB575:: @ 81EB575
faceplayer
goto_if_set FLAG_RUSTURF_TUNNEL_OPENED, VerdanturfTown_EventScript_1EB594
msgbox VerdanturfTown_Text_1EB5FD, MSGBOX_DEFAULT
- applymovement 2, VerdanturfTown_Movement_2725A2
+ applymovement 2, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
VerdanturfTown_EventScript_1EB594:: @ 81EB594
msgbox VerdanturfTown_Text_1EB6E0, MSGBOX_DEFAULT
- applymovement 2, VerdanturfTown_Movement_2725A2
+ applymovement 2, Common_Movement_FaceOriginalDirection
waitmovement 0
release
end
diff --git a/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc b/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc
index 52aed7618..9d98e790c 100644
--- a/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc
+++ b/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc
@@ -1,7 +1,7 @@
VerdanturfTown_BattleTentBattleRoom_MapScripts:: @ 82022FA
- map_script 3, VerdanturfTown_BattleTentBattleRoom_MapScript1_20230A
- map_script 2, VerdanturfTown_BattleTentBattleRoom_MapScript2_20233E
- map_script 4, VerdanturfTown_BattleTentBattleRoom_MapScript2_202541
+ map_script MAP_SCRIPT_ON_TRANSITION, VerdanturfTown_BattleTentBattleRoom_MapScript1_20230A
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, VerdanturfTown_BattleTentBattleRoom_MapScript2_20233E
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, VerdanturfTown_BattleTentBattleRoom_MapScript2_202541
.byte 0
VerdanturfTown_BattleTentBattleRoom_MapScript1_20230A: @ 820230A
@@ -77,8 +77,8 @@ VerdanturfTown_BattleTentBattleRoom_EventScript_2023C8:: @ 82023C8
applymovement 2, VerdanturfTown_BattleTentBattleRoom_Movement_202581
waitmovement 0
removeobject 2
- applymovement 3, VerdanturfTown_BattleTentBattleRoom_Movement_2725AA
- applymovement 1, VerdanturfTown_BattleTentBattleRoom_Movement_2725A6
+ applymovement 3, Common_Movement_WalkInPlaceDown
+ applymovement 1, Common_Movement_WalkInPlaceUp
waitmovement 0
msgbox VerdanturfTown_BattleTentBattleRoom_Text_24FF00, MSGBOX_DEFAULT
special LoadPlayerParty
@@ -121,8 +121,8 @@ VerdanturfTown_BattleTentBattleRoom_EventScript_2024B8:: @ 82024B8
case 127, VerdanturfTown_BattleTentBattleRoom_EventScript_20243C
VerdanturfTown_BattleTentBattleRoom_EventScript_2024EA:: @ 82024EA
- applymovement 3, VerdanturfTown_BattleTentBattleRoom_Movement_2725A8
- applymovement 1, VerdanturfTown_BattleTentBattleRoom_Movement_2725A8
+ applymovement 3, Common_Movement_WalkInPlaceRight
+ applymovement 1, Common_Movement_WalkInPlaceRight
waitmovement 0
closemessage
goto VerdanturfTown_BattleTentBattleRoom_EventScript_20236F
diff --git a/data/maps/VerdanturfTown_BattleTentCorridor/scripts.inc b/data/maps/VerdanturfTown_BattleTentCorridor/scripts.inc
index e5d7e45e9..907ef3fd6 100644
--- a/data/maps/VerdanturfTown_BattleTentCorridor/scripts.inc
+++ b/data/maps/VerdanturfTown_BattleTentCorridor/scripts.inc
@@ -1,5 +1,5 @@
VerdanturfTown_BattleTentCorridor_MapScripts:: @ 820208A
- map_script 2, VerdanturfTown_BattleTentCorridor_MapScript2_202090
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, VerdanturfTown_BattleTentCorridor_MapScript2_202090
.byte 0
VerdanturfTown_BattleTentCorridor_MapScript2_202090: @ 8202090
diff --git a/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc b/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc
index df56f41ed..f6bb194a3 100644
--- a/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc
+++ b/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc
@@ -1,6 +1,6 @@
VerdanturfTown_BattleTentLobby_MapScripts:: @ 82016D0
- map_script 2, VerdanturfTown_BattleTentLobby_MapScript2_2016EF
- map_script 4, VerdanturfTown_BattleTentLobby_MapScript2_2016DB
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, VerdanturfTown_BattleTentLobby_MapScript2_2016EF
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, VerdanturfTown_BattleTentLobby_MapScript2_2016DB
.byte 0
VerdanturfTown_BattleTentLobby_MapScript2_2016DB: @ 82016DB
@@ -192,7 +192,7 @@ VerdanturfTown_BattleTentLobby_EventScript_201954:: @ 8201954
special LoadPlayerParty
closemessage
delay 2
- call VerdanturfTown_BattleTentLobby_EventScript_27134F
+ call Common_EventScript_SaveGame
setvar VAR_TEMP_0, 255
compare VAR_RESULT, 0
goto_if_eq VerdanturfTown_BattleTentLobby_EventScript_201A1D
@@ -281,7 +281,7 @@ VerdanturfTown_BattleTentLobby_EventScript_201A7B:: @ 8201A7B
msgbox VerdanturfTown_BattleTentLobby_Text_201D9E, MSGBOX_DEFAULT
giveitem_std ITEM_TM45
compare VAR_RESULT, 0
- goto_if_eq VerdanturfTown_BattleTentLobby_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
setflag FLAG_RECEIVED_TM45
msgbox VerdanturfTown_BattleTentLobby_Text_201E43, MSGBOX_DEFAULT
release
diff --git a/data/maps/VerdanturfTown_PokemonCenter_1F/scripts.inc b/data/maps/VerdanturfTown_PokemonCenter_1F/scripts.inc
index da8676aec..474448132 100644
--- a/data/maps/VerdanturfTown_PokemonCenter_1F/scripts.inc
+++ b/data/maps/VerdanturfTown_PokemonCenter_1F/scripts.inc
@@ -1,6 +1,6 @@
VerdanturfTown_PokemonCenter_1F_MapScripts:: @ 8202726
- map_script 3, VerdanturfTown_PokemonCenter_1F_MapScript1_202731
- map_script 5, VerdanturfTown_PokemonCenter_1F_MapScript1_277C30
+ map_script MAP_SCRIPT_ON_TRANSITION, VerdanturfTown_PokemonCenter_1F_MapScript1_202731
+ map_script MAP_SCRIPT_ON_RESUME, VerdanturfTown_PokemonCenter_1F_MapScript1_277C30
.byte 0
VerdanturfTown_PokemonCenter_1F_MapScript1_202731: @ 8202731
diff --git a/data/maps/VerdanturfTown_PokemonCenter_2F/scripts.inc b/data/maps/VerdanturfTown_PokemonCenter_2F/scripts.inc
index 9e93a628e..b09335fb2 100644
--- a/data/maps/VerdanturfTown_PokemonCenter_2F/scripts.inc
+++ b/data/maps/VerdanturfTown_PokemonCenter_2F/scripts.inc
@@ -1,8 +1,8 @@
VerdanturfTown_PokemonCenter_2F_MapScripts:: @ 8202897
- map_script 2, VerdanturfTown_PokemonCenter_2F_MapScript2_276C3B
- map_script 4, VerdanturfTown_PokemonCenter_2F_MapScript2_276B6C
- map_script 1, VerdanturfTown_PokemonCenter_2F_MapScript1_276BBE
- map_script 3, VerdanturfTown_PokemonCenter_2F_MapScript1_276ACF
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, VerdanturfTown_PokemonCenter_2F_MapScript2_276C3B
+ map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, VerdanturfTown_PokemonCenter_2F_MapScript2_276B6C
+ map_script MAP_SCRIPT_ON_LOAD, VerdanturfTown_PokemonCenter_2F_MapScript1_276BBE
+ map_script MAP_SCRIPT_ON_TRANSITION, VerdanturfTown_PokemonCenter_2F_MapScript1_276ACF
.byte 0
VerdanturfTown_PokemonCenter_2F_EventScript_2028AC:: @ 82028AC
diff --git a/data/maps/VictoryRoad_1F/map.json b/data/maps/VictoryRoad_1F/map.json
index 65636a49e..05eb2b795 100644
--- a/data/maps/VictoryRoad_1F/map.json
+++ b/data/maps/VictoryRoad_1F/map.json
@@ -175,7 +175,7 @@
"x": 2,
"y": 23,
"elevation": 4,
- "var": "VAR_0x40C3",
+ "var": "VAR_VICTORY_ROAD_1F_STATE",
"var_value": "0",
"script": "VictoryRoad_1F_EventScript_235DAF"
},
@@ -184,7 +184,7 @@
"x": 3,
"y": 23,
"elevation": 4,
- "var": "VAR_0x40C3",
+ "var": "VAR_VICTORY_ROAD_1F_STATE",
"var_value": "0",
"script": "VictoryRoad_1F_EventScript_235DC8"
}
diff --git a/data/maps/VictoryRoad_1F/scripts.inc b/data/maps/VictoryRoad_1F/scripts.inc
index 2d1c63027..96f3c6f42 100644
--- a/data/maps/VictoryRoad_1F/scripts.inc
+++ b/data/maps/VictoryRoad_1F/scripts.inc
@@ -1,11 +1,11 @@
VictoryRoad_1F_MapScripts:: @ 8235D7A
- map_script 3, VictoryRoad_1F_MapScript1_235D80
+ map_script MAP_SCRIPT_ON_TRANSITION, VictoryRoad_1F_MapScript1_235D80
.byte 0
VictoryRoad_1F_MapScript1_235D80: @ 8235D80
- compare VAR_0x40C3, 1
+ compare VAR_VICTORY_ROAD_1F_STATE, 1
call_if_eq VictoryRoad_1F_EventScript_235D97
- compare VAR_0x40C3, 2
+ compare VAR_VICTORY_ROAD_1F_STATE, 2
call_if_eq VictoryRoad_1F_EventScript_235DA3
end
@@ -38,7 +38,7 @@ VictoryRoad_1F_EventScript_235DC8:: @ 8235DC8
end
VictoryRoad_1F_EventScript_235DE1:: @ 8235DE1
- applymovement EVENT_OBJ_ID_PLAYER, VictoryRoad_1F_Movement_2725AA
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceDown
waitmovement 0
msgbox VictoryRoad_1F_Text_235EE6, MSGBOX_DEFAULT
trainerbattle_no_intro TRAINER_WALLY_1, VictoryRoad_1F_Text_235FFC
@@ -46,7 +46,7 @@ VictoryRoad_1F_EventScript_235DE1:: @ 8235DE1
clearflag FLAG_HIDE_VICTORY_ROAD_ENTRANCE_WALLY
moveobjectoffscreen 4
setflag FLAG_DEFEATED_WALLY_VICTORY_ROAD
- copyvar VAR_0x40C3, VAR_0x8008
+ copyvar VAR_VICTORY_ROAD_1F_STATE, VAR_0x8008
releaseall
end
diff --git a/data/mystery_event_msg.s b/data/mystery_event_msg.s
index aa904b0bf..24a075181 100644
--- a/data/mystery_event_msg.s
+++ b/data/mystery_event_msg.s
@@ -1,5 +1,6 @@
#include "constants/flags.h"
#include "constants/items.h"
+#include "constants/map_scripts.h"
#include "constants/moves.h"
#include "constants/songs.h"
#include "constants/species.h"
diff --git a/data/scripts/cable_club.inc b/data/scripts/cable_club.inc
index b73d7e1fa..0858dfabb 100644
--- a/data/scripts/cable_club.inc
+++ b/data/scripts/cable_club.inc
@@ -101,14 +101,14 @@ RustboroCity_PokemonCenter_2F_MapScript2_276B6C: @ 8276B6C
SlateportCity_PokemonCenter_2F_MapScript2_276B6C: @ 8276B6C
SootopolisCity_PokemonCenter_2F_MapScript2_276B6C: @ 8276B6C
VerdanturfTown_PokemonCenter_2F_MapScript2_276B6C: @ 8276B6C
- map_script_2 VAR_0x4087, 1, OldaleTown_PokemonCenter_2F_EventScript_276BAE
- map_script_2 VAR_0x4087, 2, OldaleTown_PokemonCenter_2F_EventScript_276BAE
- map_script_2 VAR_0x4087, 5, OldaleTown_PokemonCenter_2F_EventScript_276BAE
- map_script_2 VAR_0x4087, 3, OldaleTown_PokemonCenter_2F_EventScript_276BAE
- map_script_2 VAR_0x4087, 4, OldaleTown_PokemonCenter_2F_EventScript_276BAE
- map_script_2 VAR_0x4087, 6, OldaleTown_PokemonCenter_2F_EventScript_276BAE
- map_script_2 VAR_0x4087, 7, OldaleTown_PokemonCenter_2F_EventScript_276BAE
- map_script_2 VAR_0x4087, 8, OldaleTown_PokemonCenter_2F_EventScript_276BAE
+ map_script_2 VAR_CABLE_CLUB_STATE, 1, OldaleTown_PokemonCenter_2F_EventScript_276BAE
+ map_script_2 VAR_CABLE_CLUB_STATE, 2, OldaleTown_PokemonCenter_2F_EventScript_276BAE
+ map_script_2 VAR_CABLE_CLUB_STATE, 5, OldaleTown_PokemonCenter_2F_EventScript_276BAE
+ map_script_2 VAR_CABLE_CLUB_STATE, 3, OldaleTown_PokemonCenter_2F_EventScript_276BAE
+ map_script_2 VAR_CABLE_CLUB_STATE, 4, OldaleTown_PokemonCenter_2F_EventScript_276BAE
+ map_script_2 VAR_CABLE_CLUB_STATE, 6, OldaleTown_PokemonCenter_2F_EventScript_276BAE
+ map_script_2 VAR_CABLE_CLUB_STATE, 7, OldaleTown_PokemonCenter_2F_EventScript_276BAE
+ map_script_2 VAR_CABLE_CLUB_STATE, 8, OldaleTown_PokemonCenter_2F_EventScript_276BAE
.2byte 0
MossdeepCity_GameCorner_1F_EventScript_276BAE:: @ 8276BAE
@@ -138,21 +138,21 @@ RustboroCity_PokemonCenter_2F_MapScript1_276BBE: @ 8276BBE
SlateportCity_PokemonCenter_2F_MapScript1_276BBE: @ 8276BBE
SootopolisCity_PokemonCenter_2F_MapScript1_276BBE: @ 8276BBE
VerdanturfTown_PokemonCenter_2F_MapScript1_276BBE: @ 8276BBE
- compare VAR_0x4087, 1
+ compare VAR_CABLE_CLUB_STATE, 1
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_276C17
- compare VAR_0x4087, 2
+ compare VAR_CABLE_CLUB_STATE, 2
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_276C17
- compare VAR_0x4087, 5
+ compare VAR_CABLE_CLUB_STATE, 5
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_276C17
- compare VAR_0x4087, 3
+ compare VAR_CABLE_CLUB_STATE, 3
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_276C1D
- compare VAR_0x4087, 4
+ compare VAR_CABLE_CLUB_STATE, 4
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_276C23
- compare VAR_0x4087, 6
+ compare VAR_CABLE_CLUB_STATE, 6
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_276C29
- compare VAR_0x4087, 7
+ compare VAR_CABLE_CLUB_STATE, 7
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_276C2F
- compare VAR_0x4087, 8
+ compare VAR_CABLE_CLUB_STATE, 8
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_276C35
end
@@ -198,14 +198,14 @@ SlateportCity_PokemonCenter_2F_MapScript2_276C3B: @ 8276C3B
SootopolisCity_PokemonCenter_2F_MapScript2_276C3B: @ 8276C3B
VerdanturfTown_PokemonCenter_2F_MapScript2_276C3B: @ 8276C3B
map_script_2 VAR_0x40CD, 1, OldaleTown_PokemonCenter_2F_EventScript_276DE0
- map_script_2 VAR_0x4087, 1, OldaleTown_PokemonCenter_2F_EventScript_276C85
- map_script_2 VAR_0x4087, 2, OldaleTown_PokemonCenter_2F_EventScript_276C85
- map_script_2 VAR_0x4087, 5, OldaleTown_PokemonCenter_2F_EventScript_276C85
- map_script_2 VAR_0x4087, 3, OldaleTown_PokemonCenter_2F_EventScript_276CE7
- map_script_2 VAR_0x4087, 4, OldaleTown_PokemonCenter_2F_EventScript_276D2C
- map_script_2 VAR_0x4087, 6, OldaleTown_PokemonCenter_2F_EventScript_276D6C
- map_script_2 VAR_0x4087, 7, OldaleTown_PokemonCenter_2F_EventScript_276C85
- map_script_2 VAR_0x4087, 8, OldaleTown_PokemonCenter_2F_EventScript_276C9D
+ map_script_2 VAR_CABLE_CLUB_STATE, 1, OldaleTown_PokemonCenter_2F_EventScript_276C85
+ map_script_2 VAR_CABLE_CLUB_STATE, 2, OldaleTown_PokemonCenter_2F_EventScript_276C85
+ map_script_2 VAR_CABLE_CLUB_STATE, 5, OldaleTown_PokemonCenter_2F_EventScript_276C85
+ map_script_2 VAR_CABLE_CLUB_STATE, 3, OldaleTown_PokemonCenter_2F_EventScript_276CE7
+ map_script_2 VAR_CABLE_CLUB_STATE, 4, OldaleTown_PokemonCenter_2F_EventScript_276D2C
+ map_script_2 VAR_CABLE_CLUB_STATE, 6, OldaleTown_PokemonCenter_2F_EventScript_276D6C
+ map_script_2 VAR_CABLE_CLUB_STATE, 7, OldaleTown_PokemonCenter_2F_EventScript_276C85
+ map_script_2 VAR_CABLE_CLUB_STATE, 8, OldaleTown_PokemonCenter_2F_EventScript_276C9D
.2byte 0
OldaleTown_PokemonCenter_2F_EventScript_276C85:: @ 8276C85
@@ -231,7 +231,7 @@ OldaleTown_PokemonCenter_2F_EventScript_276C9D:: @ 8276C9D
OldaleTown_PokemonCenter_2F_EventScript_276CB5:: @ 8276CB5
special CloseLink
- setvar VAR_0x4087, 0
+ setvar VAR_CABLE_CLUB_STATE, 0
compare VAR_0x8007, 0
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_276DD5
applymovement VAR_0x8007, OldaleTown_PokemonCenter_2F_Movement_27734D
@@ -254,7 +254,7 @@ OldaleTown_PokemonCenter_2F_EventScript_276CE7:: @ 8276CE7
OldaleTown_PokemonCenter_2F_EventScript_276CFF:: @ 8276CFF
special CloseLink
- setvar VAR_0x4087, 0
+ setvar VAR_CABLE_CLUB_STATE, 0
compare VAR_0x8007, 0
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_276DD5
applymovement EVENT_OBJ_ID_PLAYER, OldaleTown_PokemonCenter_2F_Movement_27735E
@@ -276,7 +276,7 @@ OldaleTown_PokemonCenter_2F_EventScript_276D2C:: @ 8276D2C
OldaleTown_PokemonCenter_2F_EventScript_276D44:: @ 8276D44
special CloseLink
- setvar VAR_0x4087, 0
+ setvar VAR_CABLE_CLUB_STATE, 0
applymovement EVENT_OBJ_ID_PLAYER, OldaleTown_PokemonCenter_2F_Movement_27734F
waitmovement 0
compare VAR_0x8007, 0
@@ -298,7 +298,7 @@ OldaleTown_PokemonCenter_2F_EventScript_276D6C:: @ 8276D6C
end
OldaleTown_PokemonCenter_2F_EventScript_276D84:: @ 8276D84
- setvar VAR_0x4087, 0
+ setvar VAR_CABLE_CLUB_STATE, 0
compare VAR_0x8007, 0
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_276DD5
applymovement EVENT_OBJ_ID_PLAYER, OldaleTown_PokemonCenter_2F_Movement_27735E
@@ -328,7 +328,7 @@ OldaleTown_PokemonCenter_2F_EventScript_276DD5:: @ 8276DD5
OldaleTown_PokemonCenter_2F_EventScript_276DE0:: @ 8276DE0
lockall
- applymovement EVENT_OBJ_ID_PLAYER, OldaleTown_PokemonCenter_2F_Movement_2725A6
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceUp
waitmovement 0
msgbox OldaleTown_PokemonCenter_2F_Text_27964A, MSGBOX_DEFAULT
closemessage
@@ -425,7 +425,7 @@ OldaleTown_PokemonCenter_2F_EventScript_276F55:: @ 8276F55
end
OldaleTown_PokemonCenter_2F_EventScript_276F60:: @ 8276F60
- call OldaleTown_PokemonCenter_2F_EventScript_27134F
+ call Common_EventScript_SaveGame
compare VAR_RESULT, 0
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_2772EC
message gText_PleaseWaitForLink
@@ -450,7 +450,7 @@ OldaleTown_PokemonCenter_2F_EventScript_276FBD:: @ 8276FBD
special HealPlayerParty
special SavePlayerParty
special LoadPlayerBag
- copyvar VAR_0x4087, VAR_0x8004
+ copyvar VAR_CABLE_CLUB_STATE, VAR_0x8004
messageautoscroll OldaleTown_PokemonCenter_2F_Text_278197
waitmessage
call OldaleTown_PokemonCenter_2F_EventScript_277BE4
@@ -527,7 +527,7 @@ OldaleTown_PokemonCenter_2F_EventScript_2770B2:: @ 82770B2
call OldaleTown_PokemonCenter_2F_EventScript_277199
compare VAR_RESULT, 0
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_2772EC
- call OldaleTown_PokemonCenter_2F_EventScript_27134F
+ call Common_EventScript_SaveGame
compare VAR_RESULT, 0
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_2772EC
message gText_PleaseWaitForLink
@@ -554,7 +554,7 @@ OldaleTown_PokemonCenter_2F_EventScript_2770B2:: @ 82770B2
OldaleTown_PokemonCenter_2F_EventScript_27713A:: @ 827713A
setvar VAR_0x8004, 3
- copyvar VAR_0x4087, VAR_0x8004
+ copyvar VAR_CABLE_CLUB_STATE, VAR_0x8004
messageautoscroll OldaleTown_PokemonCenter_2F_Text_278197
waitmessage
call OldaleTown_PokemonCenter_2F_EventScript_277BE4
@@ -602,7 +602,7 @@ OldaleTown_PokemonCenter_2F_EventScript_2771CD:: @ 82771CD
OldaleTown_PokemonCenter_2F_EventScript_2771DB:: @ 82771DB
copyvar VAR_0x8007, VAR_LAST_TALKED
- call OldaleTown_PokemonCenter_2F_EventScript_27134F
+ call Common_EventScript_SaveGame
compare VAR_RESULT, 0
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_2772EC
message gText_PleaseWaitForLink
@@ -629,7 +629,7 @@ OldaleTown_PokemonCenter_2F_EventScript_2771DB:: @ 82771DB
OldaleTown_PokemonCenter_2F_EventScript_27724C:: @ 827724C
setvar VAR_0x8004, 4
- copyvar VAR_0x4087, VAR_0x8004
+ copyvar VAR_CABLE_CLUB_STATE, VAR_0x8004
messageautoscroll OldaleTown_PokemonCenter_2F_Text_278197
waitmessage
call OldaleTown_PokemonCenter_2F_EventScript_277BE4
@@ -1023,14 +1023,14 @@ OldaleTown_PokemonCenter_2F_EventScript_27759F:: @ 827759F
call OldaleTown_PokemonCenter_2F_EventScript_277626
compare VAR_RESULT, 0
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_2772EC
- call OldaleTown_PokemonCenter_2F_EventScript_27134F
+ call Common_EventScript_SaveGame
compare VAR_RESULT, 0
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_2772EC
msgbox OldaleTown_PokemonCenter_2F_Text_27961C, MSGBOX_DEFAULT
closemessage
special HealPlayerParty
setvar VAR_0x8004, 6
- copyvar VAR_0x4087, VAR_0x8004
+ copyvar VAR_CABLE_CLUB_STATE, VAR_0x8004
call OldaleTown_PokemonCenter_2F_EventScript_277BBE
special DrawWholeMapView
playse SE_TK_KASYA
@@ -1234,7 +1234,7 @@ OldaleTown_PokemonCenter_2F_EventScript_277923:: @ 8277923
end
OldaleTown_PokemonCenter_2F_EventScript_277931:: @ 8277931
- call OldaleTown_PokemonCenter_2F_EventScript_27134F
+ call Common_EventScript_SaveGame
compare VAR_RESULT, 0
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_2772EC
switch VAR_0x8004
@@ -1513,7 +1513,7 @@ MossdeepCity_GameCorner_1F_EventScript_277CE9:: @ 8277CE9
waitstate
compare VAR_0x8004, 6
goto_if_ge MossdeepCity_GameCorner_1F_EventScript_2772F9
- call MossdeepCity_GameCorner_1F_EventScript_27134F
+ call Common_EventScript_SaveGame
compare VAR_RESULT, 0
goto_if_eq MossdeepCity_GameCorner_1F_EventScript_2772F9
setvar VAR_0x8004, 4
@@ -1532,7 +1532,7 @@ MossdeepCity_GameCorner_1F_EventScript_277D35:: @ 8277D35
waitstate
compare VAR_0x8004, 6
goto_if_ge MossdeepCity_GameCorner_1F_EventScript_2772F9
- call MossdeepCity_GameCorner_1F_EventScript_27134F
+ call Common_EventScript_SaveGame
compare VAR_RESULT, 0
goto_if_eq MossdeepCity_GameCorner_1F_EventScript_2772F9
setvar VAR_0x8004, 6
diff --git a/data/scripts/contest_hall.inc b/data/scripts/contest_hall.inc
index f85ebd3d2..6c19cdc0c 100644
--- a/data/scripts/contest_hall.inc
+++ b/data/scripts/contest_hall.inc
@@ -1,7 +1,7 @@
LilycoveCity_ContestLobby_EventScript_279CC5:: @ 8279CC5
lock
faceplayer
- compare VAR_0x408A, 0
+ compare VAR_CONTEST_PRIZE_PICKUP, 0
goto_if_ne LilycoveCity_ContestLobby_EventScript_279D13
call_if_set FLAG_RECEIVED_POKEBLOCK_CASE, LilycoveCity_ContestLobby_EventScript_279CEA
call_if_unset FLAG_RECEIVED_POKEBLOCK_CASE, LilycoveCity_ContestLobby_EventScript_279CF3
@@ -21,7 +21,7 @@ LilycoveCity_ContestLobby_EventScript_279CF3:: @ 8279CF3
LilycoveCity_ContestLobby_EventScript_279D13:: @ 8279D13
msgbox LilycoveCity_ContestLobby_Text_27B67B, MSGBOX_DEFAULT
- switch VAR_0x408A
+ switch VAR_CONTEST_PRIZE_PICKUP
case 4, LilycoveCity_ContestLobby_EventScript_279D2C
end
@@ -29,13 +29,13 @@ LilycoveCity_ContestLobby_EventScript_279D2C:: @ 8279D2C
giveitem_std ITEM_LUXURY_BALL
compare VAR_RESULT, 0
goto_if_eq LilycoveCity_ContestLobby_EventScript_279D4B
- setvar VAR_0x408A, 0
+ setvar VAR_CONTEST_PRIZE_PICKUP, 0
closemessage
release
end
LilycoveCity_ContestLobby_EventScript_279D4B:: @ 8279D4B
- call LilycoveCity_ContestLobby_EventScript_27205E
+ call Common_EventScript_BagIsFull
msgbox LilycoveCity_ContestLobby_Text_27B6E7, MSGBOX_DEFAULT
release
end
@@ -181,7 +181,7 @@ LilycoveCity_ContestLobby_EventScript_279F87:: @ 8279F87
msgbox LilycoveCity_ContestLobby_Text_27B5E2, MSGBOX_DEFAULT
closemessage
releaseall
- setvar VAR_0x4086, 1
+ setvar VAR_LINK_CONTEST_ROOM_STATE, 1
return
LinkContestRoom1_EventScript_279F97:: @ 8279F97
@@ -204,7 +204,7 @@ LinkContestRoom1_EventScript_279F97:: @ 8279F97
call LinkContestRoom1_EventScript_27A9D4
call LinkContestRoom1_EventScript_27AA1B
call LinkContestRoom1_EventScript_27AB36
- setvar VAR_0x4086, 2
+ setvar VAR_LINK_CONTEST_ROOM_STATE, 2
return
LinkContestRoom1_EventScript_279FF2:: @ 8279FF2
@@ -271,7 +271,7 @@ LinkContestRoom1_EventScript_27A097:: @ 827A097
return
LinkContestRoom1_EventScript_27A0B1:: @ 827A0B1
- compare VAR_0x4088, 5
+ compare VAR_CONTEST_LOCATION, 5
goto_if_eq LinkContestRoom1_EventScript_27A0C7
lockall
msgbox LinkContestRoom1_Text_27B711, MSGBOX_DEFAULT
@@ -391,7 +391,7 @@ LinkContestRoom1_EventScript_27A1D2:: @ 827A1D2
return
LinkContestRoom1_EventScript_27A217:: @ 827A217
- compare VAR_0x4088, 5
+ compare VAR_CONTEST_LOCATION, 5
goto_if_eq LinkContestRoom1_EventScript_27A229
message LinkContestRoom1_Text_27B815
waitmessage
@@ -419,7 +419,7 @@ LinkContestRoom1_EventScript_27A230:: @ 827A230
return
LinkContestRoom1_EventScript_27A26C:: @ 827A26C
- compare VAR_0x4088, 5
+ compare VAR_CONTEST_LOCATION, 5
goto_if_eq LinkContestRoom1_EventScript_27A280
msgbox LinkContestRoom1_Text_27B830, MSGBOX_DEFAULT
return
@@ -445,7 +445,7 @@ LinkContestRoom1_EventScript_27A297:: @ 827A297
return
LinkContestRoom1_EventScript_27A2B9:: @ 827A2B9
- compare VAR_0x4088, 5
+ compare VAR_CONTEST_LOCATION, 5
goto_if_eq LinkContestRoom1_EventScript_27A2CA
message LinkContestRoom1_Text_27B8F2
return
@@ -483,15 +483,15 @@ LinkContestRoom1_EventScript_27A2D5:: @ 827A2D5
LinkContestRoom1_EventScript_27A34F:: @ 827A34F
special sub_80F82FC
- compare VAR_0x4088, 1
+ compare VAR_CONTEST_LOCATION, 1
call_if_eq LinkContestRoom1_EventScript_27A454
- compare VAR_0x4088, 2
+ compare VAR_CONTEST_LOCATION, 2
call_if_eq LinkContestRoom1_EventScript_27A4B2
- compare VAR_0x4088, 3
+ compare VAR_CONTEST_LOCATION, 3
call_if_eq LinkContestRoom1_EventScript_27A510
- compare VAR_0x4088, 4
+ compare VAR_CONTEST_LOCATION, 4
call_if_eq LinkContestRoom1_EventScript_27A56E
- compare VAR_0x4088, 5
+ compare VAR_CONTEST_LOCATION, 5
call_if_eq LinkContestRoom1_EventScript_27A5CC
setvar VAR_TEMP_1, 9
setvar VAR_TEMP_2, 9
@@ -843,7 +843,7 @@ LinkContestRoom1_EventScript_27A801:: @ 827A801
return
LinkContestRoom1_EventScript_27A853:: @ 827A853
- compare VAR_0x4088, 5
+ compare VAR_CONTEST_LOCATION, 5
goto_if_eq LinkContestRoom1_EventScript_27A867
msgbox LinkContestRoom1_Text_27B904, MSGBOX_DEFAULT
return
@@ -893,7 +893,7 @@ LinkContestRoom1_EventScript_27A8A5:: @ 827A8A5
return
LinkContestRoom1_EventScript_27A8FB:: @ 827A8FB
- compare VAR_0x4088, 5
+ compare VAR_CONTEST_LOCATION, 5
goto_if_eq LinkContestRoom1_EventScript_27A90F
msgbox LinkContestRoom1_Text_27BA15, MSGBOX_DEFAULT
return
@@ -906,7 +906,7 @@ LinkContestRoom1_EventScript_27A90F:: @ 827A90F
return
LinkContestRoom1_EventScript_27A91E:: @ 827A91E
- compare VAR_0x4088, 5
+ compare VAR_CONTEST_LOCATION, 5
goto_if_eq LinkContestRoom1_EventScript_27A932
msgbox LinkContestRoom1_Text_27BA30, MSGBOX_DEFAULT
return
@@ -919,7 +919,7 @@ LinkContestRoom1_EventScript_27A932:: @ 827A932
return
LinkContestRoom1_EventScript_27A941:: @ 827A941
- compare VAR_0x4088, 5
+ compare VAR_CONTEST_LOCATION, 5
goto_if_eq LinkContestRoom1_EventScript_27A955
msgbox LinkContestRoom1_Text_27BAAC, MSGBOX_DEFAULT
return
@@ -932,7 +932,7 @@ LinkContestRoom1_EventScript_27A955:: @ 827A955
return
LinkContestRoom1_EventScript_27A964:: @ 827A964
- compare VAR_0x4088, 5
+ compare VAR_CONTEST_LOCATION, 5
goto_if_eq LinkContestRoom1_EventScript_27A978
msgbox LinkContestRoom1_Text_27BB25, MSGBOX_DEFAULT
return
@@ -983,7 +983,7 @@ LinkContestRoom1_EventScript_27A9D4:: @ 827A9D4
return
LinkContestRoom1_EventScript_27AA00:: @ 827AA00
- compare VAR_0x4088, 5
+ compare VAR_CONTEST_LOCATION, 5
goto_if_eq LinkContestRoom1_EventScript_27AA14
msgbox LinkContestRoom1_Text_27BB4C, MSGBOX_DEFAULT
return
@@ -996,7 +996,7 @@ LinkContestRoom1_EventScript_27AA14:: @ 827AA14
LinkContestRoom1_EventScript_27AA1B:: @ 827AA1B
addvar VAR_TEMP_1, 1
lockall
- compare VAR_0x4088, 1
+ compare VAR_CONTEST_LOCATION, 1
call_if_gt LinkContestRoom1_EventScript_27AA6F
applymovement 9, LinkContestRoom1_Movement_27AD3B
applymovement 12, LinkContestRoom1_Movement_27AD3F
@@ -1081,7 +1081,7 @@ LinkContestRoom1_EventScript_27AA6F:: @ 827AA6F
return
LinkContestRoom1_EventScript_27AB36:: @ 827AB36
- compare VAR_0x4088, 5
+ compare VAR_CONTEST_LOCATION, 5
goto_if_eq LinkContestRoom1_EventScript_27ABD8
call LinkContestRoom1_EventScript_27AB9E
goto_if_set FLAG_TEMP_2, LinkContestRoom1_EventScript_27AB82
@@ -1135,7 +1135,7 @@ LinkContestRoom1_EventScript_27ABCE:: @ 827ABCE
return
LinkContestRoom1_EventScript_27ABD2:: @ 827ABD2
- setvar VAR_0x4099, 1
+ setvar VAR_LILYCOVE_CONTEST_LOBBY_STATE, 1
return
LinkContestRoom1_EventScript_27ABD8:: @ 827ABD8
@@ -1149,7 +1149,7 @@ LinkContestRoom1_EventScript_27ABD8:: @ 827ABD8
return
LinkContestRoom1_EventScript_27ABF1:: @ 827ABF1
- setvar VAR_0x4099, 2
+ setvar VAR_LILYCOVE_CONTEST_LOBBY_STATE, 2
return
LinkContestRoom1_EventScript_27ABF7:: @ 827ABF7
@@ -1201,7 +1201,7 @@ LinkContestRoom1_EventScript_27AC5E:: @ 827AC5E
return
LinkContestRoom1_EventScript_27AC77:: @ 827AC77
- compare VAR_0x4088, 2
+ compare VAR_CONTEST_LOCATION, 2
call_if_eq LinkContestRoom1_EventScript_27ABCE
specialvar VAR_RESULT, sub_80F7F7C
compare VAR_RESULT, 0
@@ -1215,10 +1215,10 @@ LinkContestRoom1_EventScript_27AC77:: @ 827AC77
LinkContestRoom1_EventScript_27ACA8:: @ 827ACA8
lockall
- call LinkContestRoom1_EventScript_27205E
+ call Common_EventScript_BagIsFull
msgbox LinkContestRoom1_Text_27BC2F, MSGBOX_DEFAULT
releaseall
- setvar VAR_0x408A, 4
+ setvar VAR_CONTEST_PRIZE_PICKUP, 4
return
LinkContestRoom1_EventScript_27ACBD:: @ 827ACBD
diff --git a/data/scripts/gabby_and_ty.inc b/data/scripts/gabby_and_ty.inc
index 39de44ba6..ee0e533bc 100644
--- a/data/scripts/gabby_and_ty.inc
+++ b/data/scripts/gabby_and_ty.inc
@@ -232,13 +232,13 @@ Route111_EventScript_28CF94:: @ 828CF94
Route111_EventScript_28CF9F:: @ 828CF9F
applymovement VAR_0x8004, Route111_Movement_28D04F
- applymovement VAR_0x8005, Route111_Movement_2725A6
+ applymovement VAR_0x8005, Common_Movement_WalkInPlaceUp
waitmovement 0
return
Route111_EventScript_28CFB1:: @ 828CFB1
applymovement VAR_0x8004, Route111_Movement_28D051
- applymovement VAR_0x8005, Route111_Movement_2725A4
+ applymovement VAR_0x8005, Common_Movement_WalkInPlaceLeft
waitmovement 0
return
diff --git a/data/scripts/players_house.inc b/data/scripts/players_house.inc
index eb29ef6e0..306157561 100644
--- a/data/scripts/players_house.inc
+++ b/data/scripts/players_house.inc
@@ -1,12 +1,12 @@
LittlerootTown_BrendansHouse_2F_EventScript_2926FE:: @ 82926FE
LittlerootTown_MaysHouse_2F_EventScript_2926FE:: @ 82926FE
- setvar VAR_0x4092, 5
+ setvar VAR_LITTLEROOT_INTRO_STATE, 5
return
LittlerootTown_BrendansHouse_1F_EventScript_292704:: @ 8292704
LittlerootTown_MaysHouse_1F_EventScript_292704:: @ 8292704
msgbox LittlerootTown_BrendansHouse_1F_Text_1F7A1C, MSGBOX_DEFAULT
- applymovement VAR_0x8004, LittlerootTown_BrendansHouse_1F_Movement_27259E
+ applymovement VAR_0x8004, Common_Movement_FacePlayer
waitmovement 0
compare VAR_0x8005, 0
call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_29274D
@@ -14,20 +14,20 @@ LittlerootTown_MaysHouse_1F_EventScript_292704:: @ 8292704
call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_292758
msgbox LittlerootTown_BrendansHouse_1F_Text_1F7A46, MSGBOX_DEFAULT
closemessage
- setvar VAR_0x4092, 4
+ setvar VAR_LITTLEROOT_INTRO_STATE, 4
applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_BrendansHouse_1F_Movement_292763
- applymovement VAR_0x8004, LittlerootTown_BrendansHouse_1F_Movement_2725A6
+ applymovement VAR_0x8004, Common_Movement_WalkInPlaceUp
waitmovement 0
releaseall
end
LittlerootTown_BrendansHouse_1F_EventScript_29274D:: @ 829274D
- applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_BrendansHouse_1F_Movement_2725A8
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceRight
waitmovement 0
return
LittlerootTown_BrendansHouse_1F_EventScript_292758:: @ 8292758
- applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_BrendansHouse_1F_Movement_2725A4
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceLeft
waitmovement 0
return
@@ -39,7 +39,7 @@ LittlerootTown_BrendansHouse_1F_EventScript_292765:: @ 8292765
LittlerootTown_MaysHouse_1F_EventScript_292765:: @ 8292765
msgbox LittlerootTown_BrendansHouse_1F_Text_1F7B24, MSGBOX_DEFAULT
closemessage
- applymovement VAR_0x8004, LittlerootTown_BrendansHouse_1F_Movement_2725A6
+ applymovement VAR_0x8004, Common_Movement_WalkInPlaceUp
applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_BrendansHouse_1F_Movement_292AF0
waitmovement 0
releaseall
@@ -63,7 +63,7 @@ LittlerootTown_MaysHouse_2F_EventScript_292799:: @ 8292799
msgbox LittlerootTown_BrendansHouse_2F_Text_1F8668, MSGBOX_DEFAULT
call LittlerootTown_BrendansHouse_2F_EventScript_292849
delay 30
- setvar VAR_0x4092, 6
+ setvar VAR_LITTLEROOT_INTRO_STATE, 6
setflag FLAG_SET_WALL_CLOCK
setflag FLAG_HIDE_LITTLEROOT_TOWN_PLAYERS_HOUSE_VIGOROTH_1
setflag FLAG_HIDE_LITTLEROOT_TOWN_PLAYERS_HOUSE_VIGOROTH_2
@@ -82,7 +82,7 @@ LittlerootTown_BrendansHouse_2F_EventScript_2927DF:: @ 82927DF
addobject VAR_0x8008
applymovement VAR_0x8008, LittlerootTown_BrendansHouse_2F_Movement_292850
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_BrendansHouse_2F_Movement_2725A8
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceRight
waitmovement 0
msgbox LittlerootTown_BrendansHouse_2F_Text_1F869A, MSGBOX_DEFAULT
closemessage
@@ -95,7 +95,7 @@ LittlerootTown_BrendansHouse_2F_EventScript_29280F:: @ 829280F
addobject VAR_0x8008
applymovement VAR_0x8008, LittlerootTown_BrendansHouse_2F_Movement_29285B
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_BrendansHouse_2F_Movement_2725A4
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceLeft
waitmovement 0
msgbox LittlerootTown_BrendansHouse_2F_Text_1F869A, MSGBOX_DEFAULT
closemessage
@@ -149,12 +149,12 @@ LittlerootTown_BrendansHouse_2F_Movement_292862: @ 8292862
LittlerootTown_BrendansHouse_1F_EventScript_292866:: @ 8292866
LittlerootTown_MaysHouse_1F_EventScript_292866:: @ 8292866
- setvar VAR_0x4092, 7
+ setvar VAR_LITTLEROOT_INTRO_STATE, 7
releaseall
end
LittlerootTown_BrendansHouse_1F_EventScript_29286D:: @ 829286D
- applymovement VAR_0x8005, LittlerootTown_BrendansHouse_1F_Movement_2725A8
+ applymovement VAR_0x8005, Common_Movement_WalkInPlaceRight
waitmovement 0
call LittlerootTown_BrendansHouse_1F_EventScript_29294B
applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_BrendansHouse_1F_Movement_292AE0
@@ -167,7 +167,7 @@ LittlerootTown_BrendansHouse_1F_EventScript_29286D:: @ 829286D
applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_BrendansHouse_1F_Movement_292AE6
waitmovement 0
call LittlerootTown_BrendansHouse_1F_EventScript_29296C
- applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_BrendansHouse_1F_Movement_2725A4
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceLeft
waitmovement 0
msgbox LittlerootTown_BrendansHouse_1F_Text_1F7BF1, MSGBOX_DEFAULT
msgbox LittlerootTown_BrendansHouse_1F_Text_1F7C35, MSGBOX_DEFAULT
@@ -179,7 +179,7 @@ LittlerootTown_BrendansHouse_1F_EventScript_29286D:: @ 829286D
end
LittlerootTown_MaysHouse_1F_EventScript_2928DC:: @ 82928DC
- applymovement VAR_0x8005, LittlerootTown_MaysHouse_1F_Movement_2725A4
+ applymovement VAR_0x8005, Common_Movement_WalkInPlaceLeft
waitmovement 0
call LittlerootTown_MaysHouse_1F_EventScript_29294B
applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_MaysHouse_1F_Movement_292AE8
@@ -192,7 +192,7 @@ LittlerootTown_MaysHouse_1F_EventScript_2928DC:: @ 82928DC
applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_MaysHouse_1F_Movement_292AEE
waitmovement 0
call LittlerootTown_MaysHouse_1F_EventScript_29296C
- applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_MaysHouse_1F_Movement_2725A8
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceRight
waitmovement 0
msgbox LittlerootTown_MaysHouse_1F_Text_1F7BF1, MSGBOX_DEFAULT
msgbox LittlerootTown_MaysHouse_1F_Text_1F7C35, MSGBOX_DEFAULT
@@ -206,9 +206,9 @@ LittlerootTown_MaysHouse_1F_EventScript_2928DC:: @ 82928DC
LittlerootTown_BrendansHouse_1F_EventScript_29294B:: @ 829294B
LittlerootTown_MaysHouse_1F_EventScript_29294B:: @ 829294B
playse SE_PIN
- applymovement VAR_0x8005, LittlerootTown_BrendansHouse_1F_Movement_272598
+ applymovement VAR_0x8005, Common_Movement_ExclamationMark
waitmovement 0
- applymovement VAR_0x8005, LittlerootTown_BrendansHouse_1F_Movement_27259A
+ applymovement VAR_0x8005, Common_Movement_Delay48
waitmovement 0
msgbox LittlerootTown_BrendansHouse_1F_Text_1F7B96, MSGBOX_DEFAULT
closemessage
@@ -216,7 +216,7 @@ LittlerootTown_MaysHouse_1F_EventScript_29294B:: @ 829294B
LittlerootTown_BrendansHouse_1F_EventScript_29296C:: @ 829296C
LittlerootTown_MaysHouse_1F_EventScript_29296C:: @ 829296C
- applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_BrendansHouse_1F_Movement_2725A6
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceUp
waitmovement 0
msgbox LittlerootTown_BrendansHouse_1F_Text_1F7EC6, MSGBOX_DEFAULT
fadedefaultbgm
@@ -313,15 +313,15 @@ LittlerootTown_BrendansHouse_1F_EventScript_2929C5:: @ 82929C5
LittlerootTown_MaysHouse_1F_EventScript_2929C5:: @ 82929C5
lock
faceplayer
- compare VAR_0x4082, 4
+ compare VAR_LITTLEROOT_HOUSES_STATE, 4
goto_if_eq LittlerootTown_BrendansHouse_1F_EventScript_292A0F
- compare VAR_0x408C, 4
+ compare VAR_LITTLEROOT_HOUSES_STATE_2, 4
goto_if_eq LittlerootTown_BrendansHouse_1F_EventScript_292A0F
goto_if_set FLAG_HAS_MATCH_CALL, LittlerootTown_BrendansHouse_1F_EventScript_292A19
goto_if_set FLAG_RESCUED_BIRCH, LittlerootTown_BrendansHouse_1F_EventScript_292A86
compare VAR_TEMP_1, 1
goto_if_eq LittlerootTown_BrendansHouse_1F_EventScript_292A94
- compare VAR_0x4092, 7
+ compare VAR_LITTLEROOT_INTRO_STATE, 7
goto_if_eq LittlerootTown_BrendansHouse_1F_EventScript_292AB0
msgbox LittlerootTown_BrendansHouse_1F_Text_1F7A1C, MSGBOX_DEFAULT
release
@@ -355,7 +355,7 @@ LittlerootTown_BrendansHouse_1F_EventScript_292A51:: @ 8292A51
msgbox LittlerootTown_BrendansHouse_1F_Text_1F7D73, MSGBOX_DEFAULT
giveitem_std ITEM_AMULET_COIN
compare VAR_RESULT, 0
- goto_if_eq LittlerootTown_BrendansHouse_1F_EventScript_272054
+ goto_if_eq Common_EventScript_ShowBagIsFull
msgbox LittlerootTown_BrendansHouse_1F_Text_1F7DBE, MSGBOX_DEFAULT
setflag FLAG_MOM_SAYS_GOODBYE
release
@@ -373,7 +373,7 @@ LittlerootTown_BrendansHouse_1F_EventScript_292A94:: @ 8292A94
LittlerootTown_BrendansHouse_1F_EventScript_292A9E:: @ 8292A9E
closemessage
- call LittlerootTown_BrendansHouse_1F_EventScript_272083
+ call Common_EventScript_OutOfCenterPartyHeal
incrementgamestat 16
msgbox LittlerootTown_BrendansHouse_1F_Text_1F7D5C, MSGBOX_DEFAULT
release
@@ -446,12 +446,12 @@ LittlerootTown_MaysHouse_1F_EventScript_292AF2:: @ 8292AF2
call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_292D08
compare VAR_0x8008, 1
call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_292D13
- applymovement VAR_0x8009, LittlerootTown_BrendansHouse_1F_Movement_27259E
+ applymovement VAR_0x8009, Common_Movement_FacePlayer
waitmovement 0
playse SE_PIN
- applymovement VAR_0x8009, LittlerootTown_BrendansHouse_1F_Movement_272598
+ applymovement VAR_0x8009, Common_Movement_ExclamationMark
waitmovement 0
- applymovement VAR_0x8009, LittlerootTown_BrendansHouse_1F_Movement_27259A
+ applymovement VAR_0x8009, Common_Movement_Delay48
waitmovement 0
delay 20
compare VAR_0x8008, 0
@@ -513,8 +513,8 @@ LittlerootTown_MaysHouse_1F_EventScript_292AF2:: @ 8292AF2
copyvar VAR_0x40D5, VAR_RESULT
msgbox LittlerootTown_BrendansHouse_1F_Text_1F83A1, MSGBOX_DEFAULT
closemessage
- setvar VAR_0x4082, 4
- setvar VAR_0x408C, 4
+ setvar VAR_LITTLEROOT_HOUSES_STATE, 4
+ setvar VAR_LITTLEROOT_HOUSES_STATE_2, 4
releaseall
end
@@ -585,28 +585,28 @@ LittlerootTown_BrendansHouse_1F_EventScript_292D13:: @ 8292D13
LittlerootTown_BrendansHouse_1F_EventScript_292D1E:: @ 8292D1E
applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_BrendansHouse_1F_Movement_292DD7
waitmovement 0
- applymovement VAR_0x800A, LittlerootTown_BrendansHouse_1F_Movement_2725A4
+ applymovement VAR_0x800A, Common_Movement_WalkInPlaceLeft
waitmovement 0
return
LittlerootTown_BrendansHouse_1F_EventScript_292D33:: @ 8292D33
applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_BrendansHouse_1F_Movement_292DDE
waitmovement 0
- applymovement VAR_0x800A, LittlerootTown_BrendansHouse_1F_Movement_2725A8
+ applymovement VAR_0x800A, Common_Movement_WalkInPlaceRight
waitmovement 0
return
LittlerootTown_BrendansHouse_1F_EventScript_292D48:: @ 8292D48
applymovement VAR_0x800A, LittlerootTown_BrendansHouse_1F_Movement_292999
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_BrendansHouse_1F_Movement_2725A4
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceLeft
waitmovement 0
return
LittlerootTown_BrendansHouse_1F_EventScript_292D5D:: @ 8292D5D
applymovement VAR_0x800A, LittlerootTown_BrendansHouse_1F_Movement_29299B
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_BrendansHouse_1F_Movement_2725A8
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceRight
waitmovement 0
return
@@ -623,14 +623,14 @@ LittlerootTown_BrendansHouse_1F_EventScript_292D7D:: @ 8292D7D
LittlerootTown_BrendansHouse_1F_EventScript_292D88:: @ 8292D88
applymovement VAR_0x800A, LittlerootTown_BrendansHouse_1F_Movement_2929AF
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_BrendansHouse_1F_Movement_2725A8
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceRight
waitmovement 0
return
LittlerootTown_BrendansHouse_1F_EventScript_292D9D:: @ 8292D9D
applymovement VAR_0x800A, LittlerootTown_BrendansHouse_1F_Movement_2929B3
waitmovement 0
- applymovement EVENT_OBJ_ID_PLAYER, LittlerootTown_BrendansHouse_1F_Movement_2725A4
+ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceLeft
waitmovement 0
return
diff --git a/data/scripts/pokeblocks.inc b/data/scripts/pokeblocks.inc
index c2a580a61..a26ecb4c9 100644
--- a/data/scripts/pokeblocks.inc
+++ b/data/scripts/pokeblocks.inc
@@ -333,7 +333,7 @@ EventScript_Pblock1_NoPokeblock: @ 8293D43
LilycoveCity_ContestLobby_EventScript_293D4D:: @ 8293D4D
lockall
setvar VAR_0x8009, 2
- applymovement 10, LilycoveCity_ContestLobby_Movement_2725A2
+ applymovement 10, Common_Movement_FaceOriginalDirection
applymovement 3, LilycoveCity_ContestLobby_Movement_294053
waitmovement 0
msgbox LilycoveCity_ContestLobby_Text_293201, MSGBOX_YESNO
@@ -398,8 +398,8 @@ LilycoveCity_ContestLobby_EventScript_293E1E:: @ 8293E1E
lockall
setvar VAR_0x8008, 15
setvar VAR_0x8009, 3
- applymovement 9, LilycoveCity_ContestLobby_Movement_2725A2
- applymovement 17, LilycoveCity_ContestLobby_Movement_2725A2
+ applymovement 9, Common_Movement_FaceOriginalDirection
+ applymovement 17, Common_Movement_FaceOriginalDirection
applymovement VAR_0x8008, LilycoveCity_ContestLobby_Movement_294053
waitmovement 0
msgbox LilycoveCity_ContestLobby_Text_293842, MSGBOX_YESNO
@@ -602,7 +602,7 @@ EventScript_PblocLink_NoBerries: @ 82940B1
end
EventScript_PblocLink_TryConnect: @ 82940BB
- call LilycoveCity_ContestLobby_EventScript_27134F
+ call Common_EventScript_SaveGame
compare VAR_RESULT, 0
goto_if_eq EventScript_PblocLink_End
specialvar VAR_RESULT, IsWirelessAdapterConnected
diff --git a/data/scripts/safari_zone.inc b/data/scripts/safari_zone.inc
index 1fcf5d166..3539e0970 100644
--- a/data/scripts/safari_zone.inc
+++ b/data/scripts/safari_zone.inc
@@ -1,11 +1,11 @@
EventScript_2A4B4C:: @ 82A4B4C
- setvar VAR_0x40A4, 1
+ setvar VAR_SAFARI_ZONE_STATE, 1
special ExitSafariMode
setwarp MAP_ROUTE121_SAFARI_ZONE_ENTRANCE, 255, 2, 5
end
EventScript_2A4B5D:: @ 82A4B5D
- setvar VAR_0x40A4, 1
+ setvar VAR_SAFARI_ZONE_STATE, 1
special ExitSafariMode
warp MAP_ROUTE121_SAFARI_ZONE_ENTRANCE, 255, 2, 5
waitstate
diff --git a/data/scripts/secret_base.inc b/data/scripts/secret_base.inc
index db8aece85..770bc9a5b 100644
--- a/data/scripts/secret_base.inc
+++ b/data/scripts/secret_base.inc
@@ -660,7 +660,7 @@ SecretBase_RedCave1_EventScript_275DD6:: @ 8275DD6
goto_if_eq SecretBase_RedCave1_EventScript_275E2F
setvar VAR_RESULT, 1
special sub_80EA30C
- call SecretBase_RedCave1_EventScript_27134F
+ call Common_EventScript_SaveGame
compare VAR_RESULT, 0
goto_if_eq SecretBase_RedCave1_EventScript_275E2F
msgbox SecretBase_RedCave1_Text_274939, MSGBOX_DEFAULT
@@ -696,7 +696,7 @@ SecretBase_RedCave1_EventScript_275E4E:: @ 8275E4E
goto_if_eq SecretBase_RedCave1_EventScript_275EA7
setvar VAR_RESULT, 1
special sub_80EA30C
- call SecretBase_RedCave1_EventScript_27134F
+ call Common_EventScript_SaveGame
compare VAR_RESULT, 0
goto_if_eq SecretBase_RedCave1_EventScript_275EA7
msgbox SecretBase_RedCave1_Text_274CB0, MSGBOX_DEFAULT
@@ -732,7 +732,7 @@ SecretBase_RedCave1_EventScript_275EC6:: @ 8275EC6
goto_if_eq SecretBase_RedCave1_EventScript_275F1F
setvar VAR_RESULT, 1
special sub_80EA30C
- call SecretBase_RedCave1_EventScript_27134F
+ call Common_EventScript_SaveGame
compare VAR_RESULT, 0
goto_if_eq SecretBase_RedCave1_EventScript_275F1F
msgbox SecretBase_RedCave1_Text_274FCA, MSGBOX_DEFAULT
@@ -768,7 +768,7 @@ SecretBase_RedCave1_EventScript_275F3E:: @ 8275F3E
goto_if_eq SecretBase_RedCave1_EventScript_275F97
setvar VAR_RESULT, 1
special sub_80EA30C
- call SecretBase_RedCave1_EventScript_27134F
+ call Common_EventScript_SaveGame
compare VAR_RESULT, 0
goto_if_eq SecretBase_RedCave1_EventScript_275F97
msgbox SecretBase_RedCave1_Text_275315, MSGBOX_DEFAULT
@@ -804,7 +804,7 @@ SecretBase_RedCave1_EventScript_275FB6:: @ 8275FB6
goto_if_eq SecretBase_RedCave1_EventScript_27600F
setvar VAR_RESULT, 1
special sub_80EA30C
- call SecretBase_RedCave1_EventScript_27134F
+ call Common_EventScript_SaveGame
compare VAR_RESULT, 0
goto_if_eq SecretBase_RedCave1_EventScript_27600F
msgbox SecretBase_RedCave1_Text_275679, MSGBOX_DEFAULT
@@ -840,7 +840,7 @@ SecretBase_RedCave1_EventScript_27602E:: @ 827602E
goto_if_eq SecretBase_RedCave1_EventScript_276087
setvar VAR_RESULT, 1
special sub_80EA30C
- call SecretBase_RedCave1_EventScript_27134F
+ call Common_EventScript_SaveGame
compare VAR_RESULT, 0
goto_if_eq SecretBase_RedCave1_EventScript_276087
msgbox SecretBase_RedCave1_Text_274AFA, MSGBOX_DEFAULT
@@ -876,7 +876,7 @@ SecretBase_RedCave1_EventScript_2760A6:: @ 82760A6
goto_if_eq SecretBase_RedCave1_EventScript_2760FF
setvar VAR_RESULT, 1
special sub_80EA30C
- call SecretBase_RedCave1_EventScript_27134F
+ call Common_EventScript_SaveGame
compare VAR_RESULT, 0
goto_if_eq SecretBase_RedCave1_EventScript_2760FF
msgbox SecretBase_RedCave1_Text_274E41, MSGBOX_DEFAULT
@@ -912,7 +912,7 @@ SecretBase_RedCave1_EventScript_27611E:: @ 827611E
goto_if_eq SecretBase_RedCave1_EventScript_276177
setvar VAR_RESULT, 1
special sub_80EA30C
- call SecretBase_RedCave1_EventScript_27134F
+ call Common_EventScript_SaveGame
compare VAR_RESULT, 0
goto_if_eq SecretBase_RedCave1_EventScript_276177
msgbox SecretBase_RedCave1_Text_2751AF, MSGBOX_DEFAULT
@@ -948,7 +948,7 @@ SecretBase_RedCave1_EventScript_276196:: @ 8276196
goto_if_eq SecretBase_RedCave1_EventScript_2761EF
setvar VAR_RESULT, 1
special sub_80EA30C
- call SecretBase_RedCave1_EventScript_27134F
+ call Common_EventScript_SaveGame
compare VAR_RESULT, 0
goto_if_eq SecretBase_RedCave1_EventScript_2761EF
msgbox SecretBase_RedCave1_Text_2754B2, MSGBOX_DEFAULT
@@ -984,7 +984,7 @@ SecretBase_RedCave1_EventScript_27620E:: @ 827620E
goto_if_eq SecretBase_RedCave1_EventScript_276267
setvar VAR_RESULT, 1
special sub_80EA30C
- call SecretBase_RedCave1_EventScript_27134F
+ call Common_EventScript_SaveGame
compare VAR_RESULT, 0
goto_if_eq SecretBase_RedCave1_EventScript_276267
msgbox SecretBase_RedCave1_Text_275884, MSGBOX_DEFAULT
diff --git a/data/specials.inc b/data/specials.inc
index cbbd81dc1..965bef117 100644
--- a/data/specials.inc
+++ b/data/specials.inc
@@ -503,7 +503,7 @@ gSpecials:: @ 81DBA64
def_special sub_813B374
def_special sub_813B490
def_special sub_80A08CC
- def_special sub_813B484
+ def_special Unused_SetWeatherSunny
def_special sub_81AFDA0
def_special sub_813B4E0
def_special ShouldDoBrailleRegicePuzzle
diff --git a/include/constants/map_scripts.h b/include/constants/map_scripts.h
new file mode 100644
index 000000000..d5fd40156
--- /dev/null
+++ b/include/constants/map_scripts.h
@@ -0,0 +1,12 @@
+#ifndef GUARD_CONSTANTS_MAP_SCRIPTS_H
+#define GUARD_CONSTANTS_MAP_SCRIPTS_H
+
+#define MAP_SCRIPT_ON_LOAD 1
+#define MAP_SCRIPT_ON_FRAME_TABLE 2
+#define MAP_SCRIPT_ON_TRANSITION 3
+#define MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE 4
+#define MAP_SCRIPT_ON_RESUME 5
+#define MAP_SCRIPT_ON_DIVE_WARP 6
+#define MAP_SCRIPT_ON_RETURN_TO_FIELD 7
+
+#endif // GUARD_CONSTANTS_MAP_SCRIPTS_H \ No newline at end of file
diff --git a/include/constants/vars.h b/include/constants/vars.h
index fedc85657..fc3b3263d 100644
--- a/include/constants/vars.h
+++ b/include/constants/vars.h
@@ -46,232 +46,232 @@
#define VAR_OBJ_GFX_ID_F 0x401F
// general purpose vars
-#define VAR_RECYCLE_GOODS 0x4020
-#define VAR_REPEL_STEP_COUNT 0x4021
-#define VAR_ICE_STEP_COUNT 0x4022
-#define VAR_STARTER_MON 0x4023 // 0=Treecko, 1=Torchic, 2=Mudkip
-#define VAR_MIRAGE_RND_H 0x4024
-#define VAR_MIRAGE_RND_L 0x4025
-#define VAR_SECRET_BASE_MAP 0x4026
-#define VAR_CYCLING_ROAD_RECORD_COLLISIONS 0x4027
-#define VAR_CYCLING_ROAD_RECORD_TIME_L 0x4028
-#define VAR_CYCLING_ROAD_RECORD_TIME_H 0x4029
-#define VAR_HAPPINESS_STEP_COUNTER 0x402A
-#define VAR_POISON_STEP_COUNTER 0x402B
-#define VAR_RESET_RTC_ENABLE 0x402C
-#define VAR_ENIGMA_BERRY_AVAILABLE 0x402D
-#define VAR_0x402E 0x402E
+#define VAR_RECYCLE_GOODS 0x4020
+#define VAR_REPEL_STEP_COUNT 0x4021
+#define VAR_ICE_STEP_COUNT 0x4022
+#define VAR_STARTER_MON 0x4023 // 0=Treecko, 1=Torchic, 2=Mudkip
+#define VAR_MIRAGE_RND_H 0x4024
+#define VAR_MIRAGE_RND_L 0x4025
+#define VAR_SECRET_BASE_MAP 0x4026
+#define VAR_CYCLING_ROAD_RECORD_COLLISIONS 0x4027
+#define VAR_CYCLING_ROAD_RECORD_TIME_L 0x4028
+#define VAR_CYCLING_ROAD_RECORD_TIME_H 0x4029
+#define VAR_HAPPINESS_STEP_COUNTER 0x402A
+#define VAR_POISON_STEP_COUNTER 0x402B
+#define VAR_RESET_RTC_ENABLE 0x402C
+#define VAR_ENIGMA_BERRY_AVAILABLE 0x402D
+#define VAR_0x402E 0x402E // Seems to be unused.
-#define VAR_FRONTIER_MANIAC_FACILITY 0x402F
-#define VAR_FRONTIER_GAMBLER_FACILITY 0x4030
-#define VAR_FRONTIER_GAMBLER_SET_FACILITY_F 0x4031
-#define VAR_FRONTIER_GAMBLER_AMOUNT_BET 0x4032
-#define VAR_FRONTIER_GAMBLER_PLACED_BET_F 0x4033
+#define VAR_FRONTIER_MANIAC_FACILITY 0x402F
+#define VAR_FRONTIER_GAMBLER_FACILITY 0x4030
+#define VAR_FRONTIER_GAMBLER_SET_FACILITY_F 0x4031
+#define VAR_FRONTIER_GAMBLER_AMOUNT_BET 0x4032
+#define VAR_FRONTIER_GAMBLER_PLACED_BET_F 0x4033
-#define VAR_DEOXYS_ROCK_STEP_COUNT 0x4034
-#define VAR_DEOXYS_ROCK_LEVEL 0x4035
-#define VAR_STORAGE_UNKNOWN 0x4036
-#define VAR_0x4037 0x4037
-#define VAR_0x4038 0x4038
-#define VAR_0x4039 0x4039
-#define VAR_0x403A 0x403A
-#define VAR_REGICE_STEPS_1 0x403B
-#define VAR_REGICE_STEPS_2 0x403C
-#define VAR_REGICE_STEPS_3 0x403D
-#define VAR_ALTERING_CAVE_WILD_SET 0x403E
-#define VAR_0x403F 0x403F
-#define VAR_DAYS 0x4040
-#define VAR_FANCLUB_UNKNOWN_1 0x4041
-#define VAR_FANCLUB_UNKNOWN_2 0x4042
-#define VAR_DEPT_STORE_FLOOR 0x4043
-#define VAR_0x4044 0x4044
-#define VAR_POKELOT_PRIZE 0x4045
-#define VAR_NATIONAL_DEX 0x4046
-#define VAR_SEEDOT_SIZE_RECORD 0x4047
-#define VAR_ASH_GATHER_COUNT 0x4048
-#define VAR_BIRCH_STATE 0x4049
-#define VAR_CRUISE_STEP_COUNT 0x404A
-#define VAR_POKELOT_RND1 0x404B
-#define VAR_POKELOT_RND2 0x404C
-#define VAR_0x404D 0x404D
-#define VAR_0x404E 0x404E
-#define VAR_LOTAD_SIZE_RECORD 0x404F
-#define VAR_0x4050 0x4050
-#define VAR_0x4051 0x4051
-#define VAR_0x4052 0x4052
-#define VAR_0x4053 0x4053
-#define VAR_CURRENT_SECRET_BASE 0x4054
-#define VAR_0x4055 0x4055
-#define VAR_0x4056 0x4056
-#define VAR_0x4057 0x4057
-#define VAR_0x4058 0x4058
-#define VAR_0x4059 0x4059
-#define VAR_0x405A 0x405A
-#define VAR_0x405B 0x405B
-#define VAR_0x405C 0x405C
-#define VAR_0x405D 0x405D
-#define VAR_0x405E 0x405E
-#define VAR_0x405F 0x405F
-#define VAR_0x4060 0x4060
-#define VAR_0x4061 0x4061
-#define VAR_0x4062 0x4062
-#define VAR_0x4063 0x4063
-#define VAR_0x4064 0x4064
-#define VAR_0x4065 0x4065
-#define VAR_0x4066 0x4066
-#define VAR_0x4067 0x4067
-#define VAR_0x4068 0x4068
-#define VAR_0x4069 0x4069
-#define VAR_0x406A 0x406A
-#define VAR_0x406B 0x406B
-#define VAR_0x406C 0x406C
-#define VAR_0x406D 0x406D
-#define VAR_0x406E 0x406E
-#define VAR_0x406F 0x406F
-#define VAR_0x4070 0x4070
-#define VAR_0x4071 0x4071
-#define VAR_0x4072 0x4072
-#define VAR_0x4073 0x4073
-#define VAR_0x4074 0x4074
-#define VAR_0x4075 0x4075
-#define VAR_0x4076 0x4076
-#define VAR_0x4077 0x4077
-#define VAR_0x4078 0x4078
-#define VAR_0x4079 0x4079
-#define VAR_0x407A 0x407A
-#define VAR_0x407B 0x407B
-#define VAR_0x407C 0x407C
-#define VAR_0x407D 0x407D
-#define VAR_0x407E 0x407E
-#define VAR_0x407F 0x407F
-#define VAR_0x4080 0x4080
-#define VAR_0x4081 0x4081
-#define VAR_0x4082 0x4082
-#define VAR_0x4083 0x4083
-#define VAR_0x4084 0x4084
-#define VAR_0x4085 0x4085
-#define VAR_0x4086 0x4086
-#define VAR_0x4087 0x4087
-#define VAR_0x4088 0x4088
-#define VAR_0x4089 0x4089
-#define VAR_0x408A 0x408A
-#define VAR_0x408B 0x408B
-#define VAR_0x408C 0x408C
-#define VAR_0x408D 0x408D
-#define VAR_0x408E 0x408E
-#define VAR_0x408F 0x408F
-#define VAR_0x4090 0x4090
-#define VAR_0x4091 0x4091
-#define VAR_0x4092 0x4092
-#define VAR_0x4093 0x4093
-#define VAR_0x4094 0x4094
-#define VAR_LILYCOVE_FAN_CLUB_STATE 0x4095
-#define VAR_0x4096 0x4096
-#define VAR_0x4097 0x4097
-#define VAR_0x4098 0x4098
-#define VAR_0x4099 0x4099
-#define VAR_RUSTURF_TUNNEL_STATE 0x409A
-#define VAR_0x409B 0x409B
-#define VAR_0x409C 0x409C
-#define VAR_0x409D 0x409D
-#define VAR_0x409E 0x409E
-#define VAR_0x409F 0x409F
-#define VAR_0x40A0 0x40A0
-#define VAR_0x40A1 0x40A1
-#define VAR_0x40A2 0x40A2
-#define VAR_0x40A3 0x40A3
-#define VAR_0x40A4 0x40A4
-#define VAR_0x40A5 0x40A5
-#define VAR_0x40A6 0x40A6
-#define VAR_0x40A7 0x40A7
-#define VAR_0x40A8 0x40A8
-#define VAR_CYCLING_CHALLENGE_STATE 0x40A9
-#define VAR_0x40AA 0x40AA
-#define VAR_0x40AB 0x40AB
-#define VAR_0x40AC 0x40AC
-#define VAR_0x40AD 0x40AD
-#define VAR_0x40AE 0x40AE
-#define VAR_0x40AF 0x40AF
-#define VAR_0x40B0 0x40B0
-#define VAR_0x40B1 0x40B1
-#define VAR_0x40B2 0x40B2
-#define VAR_WEATHER_INSTITUTE_STATE 0x40B3
-#define VAR_PORTHOLE_STATE 0x40B4
-#define VAR_0x40B5 0x40B5
-#define VAR_0x40B6 0x40B6
-#define VAR_0x40B7 0x40B7
-#define VAR_0x40B8 0x40B8
-#define VAR_0x40B9 0x40B9
-#define VAR_0x40BA 0x40BA
-#define VAR_0x40BB 0x40BB
-#define VAR_0x40BC 0x40BC
-#define VAR_0x40BD 0x40BD
-#define VAR_0x40BE 0x40BE
-#define VAR_0x40BF 0x40BF
-#define VAR_0x40C0 0x40C0
-#define VAR_0x40C1 0x40C1
-#define VAR_PACIFIDLOG_TM_RECEIVED_DAY 0x40C2
-#define VAR_0x40C3 0x40C3
-#define VAR_0x40C4 0x40C4
-#define VAR_0x40C5 0x40C5
-#define VAR_0x40C6 0x40C6
-#define VAR_0x40C7 0x40C7
-#define VAR_0x40C8 0x40C8
-#define VAR_0x40C9 0x40C9
-#define VAR_0x40CA 0x40CA
-#define VAR_0x40CB 0x40CB
-#define VAR_0x40CC 0x40CC
-#define VAR_0x40CD 0x40CD
-#define VAR_FRONTIER_BATTLE_MODE 0x40CE
-#define VAR_FRONTIER_FACILITY 0x40CF
-#define VAR_0x40D0 0x40D0
-#define VAR_0x40D1 0x40D1
-#define VAR_0x40D2 0x40D2
-#define VAR_0x40D3 0x40D3
-#define VAR_0x40D4 0x40D4
-#define VAR_0x40D5 0x40D5
-#define VAR_0x40D6 0x40D6
-#define VAR_0x40D7 0x40D7
-#define VAR_0x40D8 0x40D8
-#define VAR_0x40D9 0x40D9
-#define VAR_0x40DA 0x40DA
-#define VAR_0x40DB 0x40DB
-#define VAR_0x40DC 0x40DC
-#define VAR_EVENT_PICHU_SLOT 0x40DD
-#define VAR_0x40DE 0x40DE
-#define VAR_0x40DF 0x40DF
-#define VAR_0x40E0 0x40E0
-#define VAR_0x40E1 0x40E1
-#define VAR_0x40E2 0x40E2
-#define VAR_0x40E3 0x40E3
-#define VAR_0x40E4 0x40E4
-#define VAR_0x40E5 0x40E5
-#define VAR_DAILY_SLOTS 0x40E6
-#define VAR_DAILY_WILDS 0x40E7
-#define VAR_DAILY_BLENDER 0x40E8
-#define VAR_DAILY_PLANTED_BERRIES 0x40E9
-#define VAR_DAILY_PICKED_BERRIES 0x40EA
-#define VAR_DAILY_ROULETTE 0x40EB
-#define VAR_0x40EC 0x40EC
-#define VAR_0x40ED 0x40ED
-#define VAR_0x40EE 0x40EE
-#define VAR_0x40EF 0x40EF
-#define VAR_0x40F0 0x40F0
-#define VAR_DAILY_BP 0x40F1
-#define VAR_0x40F2 0x40F2
-#define VAR_0x40F3 0x40F3
-#define VAR_0x40F4 0x40F4
-#define VAR_0x40F5 0x40F5
-#define VAR_0x40F6 0x40F6
-#define VAR_0x40F7 0x40F7
-#define VAR_0x40F8 0x40F8
-#define VAR_0x40F9 0x40F9
-#define VAR_0x40FA 0x40FA
-#define VAR_0x40FB 0x40FB
-#define VAR_0x40FC 0x40FC
-#define VAR_0x40FD 0x40FD
-#define VAR_0x40FE 0x40FE
-#define VAR_0x40FF 0x40FF
+#define VAR_DEOXYS_ROCK_STEP_COUNT 0x4034
+#define VAR_DEOXYS_ROCK_LEVEL 0x4035
+#define VAR_STORAGE_UNKNOWN 0x4036
+#define VAR_0x4037 0x4037
+#define VAR_0x4038 0x4038
+#define VAR_0x4039 0x4039
+#define VAR_0x403A 0x403A
+#define VAR_REGICE_STEPS_1 0x403B
+#define VAR_REGICE_STEPS_2 0x403C
+#define VAR_REGICE_STEPS_3 0x403D
+#define VAR_ALTERING_CAVE_WILD_SET 0x403E
+#define VAR_0x403F 0x403F
+#define VAR_DAYS 0x4040
+#define VAR_FANCLUB_UNKNOWN_1 0x4041
+#define VAR_FANCLUB_UNKNOWN_2 0x4042
+#define VAR_DEPT_STORE_FLOOR 0x4043
+#define VAR_0x4044 0x4044
+#define VAR_POKELOT_PRIZE 0x4045
+#define VAR_NATIONAL_DEX 0x4046
+#define VAR_SEEDOT_SIZE_RECORD 0x4047
+#define VAR_ASH_GATHER_COUNT 0x4048
+#define VAR_BIRCH_STATE 0x4049
+#define VAR_CRUISE_STEP_COUNT 0x404A
+#define VAR_POKELOT_RND1 0x404B
+#define VAR_POKELOT_RND2 0x404C
+#define VAR_0x404D 0x404D
+#define VAR_0x404E 0x404E
+#define VAR_LOTAD_SIZE_RECORD 0x404F
+#define VAR_0x4050 0x4050
+#define VAR_ROUTE102_ACCESSIBLE 0x4051
+#define VAR_0x4052 0x4052
+#define VAR_LAVARIDGE_RIVAL_STATE 0x4053
+#define VAR_CURRENT_SECRET_BASE 0x4054
+#define VAR_0x4055 0x4055
+#define VAR_0x4056 0x4056
+#define VAR_PETALBURG_STATE 0x4057
+#define VAR_SLATEPORT_STATE 0x4058
+#define VAR_0x4059 0x4059
+#define VAR_RUSTBORO_STATE 0x405A
+#define VAR_0x405B 0x405B
+#define VAR_0x405C 0x405C
+#define VAR_0x405D 0x405D
+#define VAR_0x405E 0x405E
+#define VAR_0x405F 0x405F
+#define VAR_ROUTE101_STATE 0x4060
+#define VAR_0x4061 0x4061
+#define VAR_0x4062 0x4062
+#define VAR_0x4063 0x4063
+#define VAR_0x4064 0x4064
+#define VAR_0x4065 0x4065
+#define VAR_0x4066 0x4066
+#define VAR_0x4067 0x4067
+#define VAR_0x4068 0x4068
+#define VAR_ROUTE110_STATE 0x4069
+#define VAR_0x406A 0x406A
+#define VAR_0x406B 0x406B
+#define VAR_0x406C 0x406C
+#define VAR_0x406D 0x406D
+#define VAR_0x406E 0x406E
+#define VAR_ROUTE116_STATE 0x406F
+#define VAR_0x4070 0x4070
+#define VAR_ROUTE118_STATE 0x4071
+#define VAR_ROUTE119_STATE 0x4072
+#define VAR_0x4073 0x4073
+#define VAR_ROUTE121_STATE 0x4074
+#define VAR_0x4075 0x4075
+#define VAR_0x4076 0x4076
+#define VAR_0x4077 0x4077
+#define VAR_0x4078 0x4078
+#define VAR_0x4079 0x4079
+#define VAR_0x407A 0x407A
+#define VAR_ROUTE128_STATE 0x407B
+#define VAR_0x407C 0x407C
+#define VAR_0x407D 0x407D
+#define VAR_0x407E 0x407E
+#define VAR_0x407F 0x407F
+#define VAR_0x4080 0x4080
+#define VAR_0x4081 0x4081
+#define VAR_LITTLEROOT_HOUSES_STATE 0x4082
+#define VAR_0x4083 0x4083
+#define VAR_BIRCH_LAB_STATE 0x4084
+#define VAR_PETALBURG_GYM_STATE 0x4085
+#define VAR_LINK_CONTEST_ROOM_STATE 0x4086
+#define VAR_CABLE_CLUB_STATE 0x4087
+#define VAR_CONTEST_LOCATION 0x4088
+#define VAR_0x4089 0x4089
+#define VAR_CONTEST_PRIZE_PICKUP 0x408A
+#define VAR_0x408B 0x408B
+#define VAR_LITTLEROOT_HOUSES_STATE_2 0x408C
+#define VAR_LITTLEROOT_RIVAL_STATE 0x408D
+#define VAR_BOARD_BRINEY_BOAT_ROUTE104_STATE 0x408E
+#define VAR_DEVON_CORP_3F_STATE 0x408F
+#define VAR_BRINEY_HOUSE_STATE 0x4090
+#define VAR_0x4091 0x4091
+#define VAR_LITTLEROOT_INTRO_STATE 0x4092
+#define VAR_MAUVILLE_GYM_STATE 0x4093
+#define VAR_LILYCOVE_MUSEUM_2F_STATE 0x4094
+#define VAR_LILYCOVE_FAN_CLUB_STATE 0x4095
+#define VAR_BRINEY_LOCATION 0x4096
+#define VAR_0x4097 0x4097
+#define VAR_PETALBURG_WOODS_STATE 0x4098
+#define VAR_LILYCOVE_CONTEST_LOBBY_STATE 0x4099
+#define VAR_RUSTURF_TUNNEL_STATE 0x409A
+#define VAR_0x409B 0x409B
+#define VAR_ELITE_4_STATE 0x409C
+#define VAR_0x409D 0x409D
+#define VAR_0x409E 0x409E
+#define VAR_0x409F 0x409F
+#define VAR_SLATEPORT_HARBOR_STATE 0x40A0
+#define VAR_0x40A1 0x40A1
+#define VAR_SEAFLOOR_CAVERN_STATE 0x40A2
+#define VAR_CABLE_CAR_STATION_STATE 0x40A3
+#define VAR_SAFARI_ZONE_STATE 0x40A4
+#define VAR_TRICK_HOUSE_ENTRANCE_STATE_1 0x40A5
+#define VAR_TRICK_HOUSE_ENTRANCE_STATE_2 0x40A6
+#define VAR_TRICK_HOUSE_ENTRANCE_STATE_3 0x40A7
+#define VAR_0x40A8 0x40A8
+#define VAR_CYCLING_CHALLENGE_STATE 0x40A9
+#define VAR_SLATEPORT_MUSEUM_1F_STATE 0x40AA
+#define VAR_TRICK_HOUSE_PUZZLE_1_STATE 0x40AB
+#define VAR_TRICK_HOUSE_PUZZLE_2_STATE 0x40AC
+#define VAR_TRICK_HOUSE_PUZZLE_3_STATE 0x40AD
+#define VAR_TRICK_HOUSE_PUZZLE_4_STATE 0x40AE
+#define VAR_TRICK_HOUSE_PUZZLE_5_STATE 0x40AF
+#define VAR_TRICK_HOUSE_PUZZLE_6_STATE 0x40B0
+#define VAR_TRICK_HOUSE_PUZZLE_7_STATE 0x40B1
+#define VAR_TRICK_HOUSE_PUZZLE_8_STATE 0x40B2
+#define VAR_WEATHER_INSTITUTE_STATE 0x40B3
+#define VAR_PORTHOLE_STATE 0x40B4
+#define VAR_TRICK_HOUSE_STATE 0x40B5 // TODO: needs some further investigation
+#define VAR_TRICK_HOUSE_PUZZLE_7_STATE_2 0x40B6
+#define VAR_SLATEPORT_FAN_CLUB_STATE 0x40B7
+#define VAR_0x40B8 0x40B8
+#define VAR_MT_PYRE_STATE 0x40B9
+#define VAR_NEW_MAUVILLE_STATE 0x40BA
+#define VAR_0x40BB 0x40BB
+#define VAR_BRAVO_TRAINER_BATTLE_TOWER_ON 0x40BC
+#define VAR_JAGGED_PASS_ASH_WEATHER 0x40BD
+#define VAR_GLASS_WORKSHOP_STATE 0x40BE
+#define VAR_METEOR_FALLS_STATE 0x40BF
+#define VAR_SOOTOPOLIS_MYSTERY_EVENTS_STATE 0x40C0
+#define VAR_TRICK_HOUSE_PRIZE_PICKUP 0x40C1
+#define VAR_PACIFIDLOG_TM_RECEIVED_DAY 0x40C2
+#define VAR_VICTORY_ROAD_1F_STATE 0x40C3
+#define VAR_FOSSIL_RESURRECTION_STATE 0x40C4
+#define VAR_WHICH_FOSSIL_REVIVED 0x40C5
+#define VAR_STEVENS_HOUSE_STATE 0x40C6
+#define VAR_OLDALE_STATE 0x40C7
+#define VAR_0x40C8 0x40C8
+#define VAR_0x40C9 0x40C9
+#define VAR_0x40CA 0x40CA
+#define VAR_0x40CB 0x40CB
+#define VAR_0x40CC 0x40CC
+#define VAR_0x40CD 0x40CD
+#define VAR_FRONTIER_BATTLE_MODE 0x40CE
+#define VAR_FRONTIER_FACILITY 0x40CF
+#define VAR_0x40D0 0x40D0
+#define VAR_0x40D1 0x40D1
+#define VAR_0x40D2 0x40D2
+#define VAR_0x40D3 0x40D3
+#define VAR_0x40D4 0x40D4
+#define VAR_0x40D5 0x40D5
+#define VAR_0x40D6 0x40D6
+#define VAR_0x40D7 0x40D7
+#define VAR_0x40D8 0x40D8
+#define VAR_0x40D9 0x40D9
+#define VAR_0x40DA 0x40DA
+#define VAR_0x40DB 0x40DB
+#define VAR_0x40DC 0x40DC
+#define VAR_EVENT_PICHU_SLOT 0x40DD
+#define VAR_0x40DE 0x40DE
+#define VAR_0x40DF 0x40DF
+#define VAR_0x40E0 0x40E0
+#define VAR_0x40E1 0x40E1
+#define VAR_0x40E2 0x40E2
+#define VAR_0x40E3 0x40E3
+#define VAR_0x40E4 0x40E4
+#define VAR_0x40E5 0x40E5
+#define VAR_DAILY_SLOTS 0x40E6
+#define VAR_DAILY_WILDS 0x40E7
+#define VAR_DAILY_BLENDER 0x40E8
+#define VAR_DAILY_PLANTED_BERRIES 0x40E9
+#define VAR_DAILY_PICKED_BERRIES 0x40EA
+#define VAR_DAILY_ROULETTE 0x40EB
+#define VAR_0x40EC 0x40EC
+#define VAR_0x40ED 0x40ED
+#define VAR_0x40EE 0x40EE
+#define VAR_0x40EF 0x40EF
+#define VAR_0x40F0 0x40F0
+#define VAR_DAILY_BP 0x40F1
+#define VAR_0x40F2 0x40F2
+#define VAR_0x40F3 0x40F3
+#define VAR_0x40F4 0x40F4
+#define VAR_0x40F5 0x40F5
+#define VAR_0x40F6 0x40F6
+#define VAR_0x40F7 0x40F7
+#define VAR_0x40F8 0x40F8
+#define VAR_0x40F9 0x40F9
+#define VAR_0x40FA 0x40FA
+#define VAR_0x40FB 0x40FB
+#define VAR_0x40FC 0x40FC
+#define VAR_0x40FD 0x40FD
+#define VAR_0x40FE 0x40FE
+#define VAR_0x40FF 0x40FF
#define SPECIAL_VARS_START 0x8000
// special vars
diff --git a/include/constants/weather.h b/include/constants/weather.h
index d0a81c34c..d62e07474 100644
--- a/include/constants/weather.h
+++ b/include/constants/weather.h
@@ -16,7 +16,7 @@
#define WEATHER_DROUGHT 12
#define WEATHER_RAIN_HEAVY 13
#define WEATHER_BUBBLES 14
-#define WEATHER_15 15
+#define WEATHER_ALTERNATING 15
#define WEATHER_ROUTE119_CYCLE 20
#define WEATHER_ROUTE123_CYCLE 21
diff --git a/include/field_weather.h b/include/field_weather.h
index 2d73f2b94..76399200d 100644
--- a/include/field_weather.h
+++ b/include/field_weather.h
@@ -140,9 +140,9 @@ extern const u16 gUnknown_083970E8[];
extern const u8 gWeatherFog1Tiles[];
void StartWeather(void);
-void ChangeWeather(u8 weather);
-void sub_80AB104(u8 weather);
-void sub_80AB130(u8 weather);
+void SetNextWeather(u8 weather);
+void SetCurrentAndNextWeather(u8 weather);
+void SetCurrentAndNextWeatherNoDelay(u8 weather);
void sub_80ABC48(s8 gammaIndex);
void sub_80ABC7C(u8 gammaIndex, u8 gammaTargetIndex, u8 gammaStepDelay);
void FadeScreen(u8 mode, s8 delay);
@@ -162,7 +162,7 @@ bool8 Weather_UpdateBlend(void);
void sub_80AC274(u8 a);
u8 GetCurrentWeather(void);
void SetRainStrengthFromSoundEffect(u16 soundEffect);
-void PlayRainSoundEffect(void);
+void PlayRainStoppingSoundEffect(void);
u8 IsWeatherChangeComplete(void);
void SetWeatherScreenFadeOut(void);
void sub_80AC3E4(void);
@@ -233,6 +233,6 @@ void SetSav1WeatherFromCurrMapHeader(void);
void SetWeather(u32 weather);
void DoCurrentWeather(void);
void UpdateWeatherPerDay(u16 increment);
-void sub_80AEE84(void);
+void ResumePausedWeather(void);
#endif // GUARD_WEATHER_H
diff --git a/include/overworld.h b/include/overworld.h
index 79cbf1da3..8caba0673 100644
--- a/include/overworld.h
+++ b/include/overworld.h
@@ -68,7 +68,7 @@ void SetContinueGameWarpToDynamicWarp(int unused);
const struct MapConnection *GetMapConnection(u8 dir);
bool8 SetDiveWarpEmerge(u16 x, u16 y);
bool8 SetDiveWarpDive(u16 x, u16 y);
-void mliX_load_map(u8 mapGroup, u8 mapNum);
+void LoadMapFromCameraTransition(u8 mapGroup, u8 mapNum);
void ResetInitialPlayerAvatarState(void);
void StoreInitialPlayerAvatarState(void);
bool32 Overworld_IsBikingAllowed(void);
diff --git a/include/script.h b/include/script.h
index 755ff19a3..386b388d0 100644
--- a/include/script.h
+++ b/include/script.h
@@ -43,16 +43,16 @@ void ScriptContext1_SetupScript(const u8 *ptr);
void ScriptContext1_Stop(void);
void EnableBothScriptContexts(void);
void ScriptContext2_RunNewScript(const u8 *ptr);
-u8 *mapheader_get_tagged_pointer(u8 tag);
-void mapheader_run_script_by_tag(u8 tag);
-u8 *mapheader_get_first_match_from_tagged_ptr_list(u8 tag);
-void mapheader_run_script_with_tag_x1(void);
-void mapheader_run_script_with_tag_x3(void);
-void mapheader_run_script_with_tag_x5(void);
-void mapheader_run_script_with_tag_x7(void);
-void mapheader_run_script_with_tag_x6(void);
-bool8 mapheader_run_first_tag2_script_list_match(void);
-void mapheader_run_first_tag4_script_list_match(void);
+u8 *MapHeaderGetScriptTable(u8 tag);
+void MapHeaderRunScriptType(u8 tag);
+u8 *MapHeaderCheckScriptTable(u8 tag);
+void RunOnLoadMapScript(void);
+void RunOnTransitionMapScript(void);
+void RunOnResumeMapScript(void);
+void RunOnReturnToFieldMapScript(void);
+void RunOnDiveWarpMapScript(void);
+bool8 TryRunOnFrameMapScript(void);
+void TryRunOnWarpIntoMapScript(void);
u32 CalculateRamScriptChecksum(void);
void ClearRamScript(void);
bool8 InitRamScript(const u8 *script, u16 scriptSize, u8 mapGroup, u8 mapNum, u8 objectId);
diff --git a/porymap.project.cfg b/porymap.project.cfg
deleted file mode 100755
index c6ba8781e..000000000
--- a/porymap.project.cfg
+++ /dev/null
@@ -1 +0,0 @@
-base_game_version=pokeemerald
diff --git a/src/battle_interface.c b/src/battle_interface.c
index 0eb494db4..4a6ac67f1 100644
--- a/src/battle_interface.c
+++ b/src/battle_interface.c
@@ -35,125 +35,126 @@ struct TestingBar
};
enum
-{
- HEALTHBOX_GFX_0,
- HEALTHBOX_GFX_1,
- HEALTHBOX_GFX_2,
- HEALTHBOX_GFX_HP_BAR_GREEN,
- HEALTHBOX_GFX_4,
- HEALTHBOX_GFX_5,
- HEALTHBOX_GFX_6,
- HEALTHBOX_GFX_7,
- HEALTHBOX_GFX_8,
- HEALTHBOX_GFX_9,
- HEALTHBOX_GFX_10,
- HEALTHBOX_GFX_11,
- HEALTHBOX_GFX_12,
- HEALTHBOX_GFX_13,
- HEALTHBOX_GFX_14,
- HEALTHBOX_GFX_15,
- HEALTHBOX_GFX_16,
- HEALTHBOX_GFX_17,
- HEALTHBOX_GFX_18,
- HEALTHBOX_GFX_19,
- HEALTHBOX_GFX_20,
- HEALTHBOX_GFX_STATUS_PSN_BATTLER0,
- HEALTHBOX_GFX_22,
- HEALTHBOX_GFX_23,
- HEALTHBOX_GFX_STATUS_PRZ_BATTLER0,
+{ // Corresponds to gHealthboxElementsGfxTable (and the tables after it) in graphics.c
+ // These are indexes into the tables, which are filled with 8x8 square pixel data.
+ HEALTHBOX_GFX_0, //hp bar [black section]
+ HEALTHBOX_GFX_1, //hp bar "H"
+ HEALTHBOX_GFX_2, //hp bar "P"
+ HEALTHBOX_GFX_HP_BAR_GREEN, //hp bar [0 pixels]
+ HEALTHBOX_GFX_4, //hp bar [1 pixels]
+ HEALTHBOX_GFX_5, //hp bar [2 pixels]
+ HEALTHBOX_GFX_6, //hp bar [3 pixels]
+ HEALTHBOX_GFX_7, //hp bar [4 pixels]
+ HEALTHBOX_GFX_8, //hp bar [5 pixels]
+ HEALTHBOX_GFX_9, //hp bar [6 pixels]
+ HEALTHBOX_GFX_10, //hp bar [7 pixels]
+ HEALTHBOX_GFX_11, //hp bar [8 pixels]
+ HEALTHBOX_GFX_12, //exp bar [0 pixels]
+ HEALTHBOX_GFX_13, //exp bar [1 pixels]
+ HEALTHBOX_GFX_14, //exp bar [2 pixels]
+ HEALTHBOX_GFX_15, //exp bar [3 pixels]
+ HEALTHBOX_GFX_16, //exp bar [4 pixels]
+ HEALTHBOX_GFX_17, //exp bar [5 pixels]
+ HEALTHBOX_GFX_18, //exp bar [6 pixels]
+ HEALTHBOX_GFX_19, //exp bar [7 pixels]
+ HEALTHBOX_GFX_20, //exp bar [8 pixels]
+ HEALTHBOX_GFX_STATUS_PSN_BATTLER0, //status psn "(P"
+ HEALTHBOX_GFX_22, //status psn "SN"
+ HEALTHBOX_GFX_23, //status psn "|)""
+ HEALTHBOX_GFX_STATUS_PRZ_BATTLER0, //status prz
HEALTHBOX_GFX_25,
HEALTHBOX_GFX_26,
- HEALTHBOX_GFX_STATUS_SLP_BATTLER0,
+ HEALTHBOX_GFX_STATUS_SLP_BATTLER0, //status slp
HEALTHBOX_GFX_28,
HEALTHBOX_GFX_29,
- HEALTHBOX_GFX_STATUS_FRZ_BATTLER0,
+ HEALTHBOX_GFX_STATUS_FRZ_BATTLER0, //status frz
HEALTHBOX_GFX_31,
HEALTHBOX_GFX_32,
- HEALTHBOX_GFX_STATUS_BRN_BATTLER0,
+ HEALTHBOX_GFX_STATUS_BRN_BATTLER0, //status brn
HEALTHBOX_GFX_34,
HEALTHBOX_GFX_35,
- HEALTHBOX_GFX_36,
- HEALTHBOX_GFX_37,
- HEALTHBOX_GFX_38,
- HEALTHBOX_GFX_39,
- HEALTHBOX_GFX_40,
- HEALTHBOX_GFX_41,
- HEALTHBOX_GFX_42,
- HEALTHBOX_GFX_43,
- HEALTHBOX_GFX_44,
- HEALTHBOX_GFX_45,
- HEALTHBOX_GFX_46,
- HEALTHBOX_GFX_HP_BAR_YELLOW,
- HEALTHBOX_GFX_48,
- HEALTHBOX_GFX_49,
- HEALTHBOX_GFX_50,
- HEALTHBOX_GFX_51,
- HEALTHBOX_GFX_52,
- HEALTHBOX_GFX_53,
- HEALTHBOX_GFX_54,
- HEALTHBOX_GFX_55,
- HEALTHBOX_GFX_HP_BAR_RED,
- HEALTHBOX_GFX_57,
- HEALTHBOX_GFX_58,
- HEALTHBOX_GFX_59,
- HEALTHBOX_GFX_60,
- HEALTHBOX_GFX_61,
- HEALTHBOX_GFX_62,
- HEALTHBOX_GFX_63,
- HEALTHBOX_GFX_64,
- HEALTHBOX_GFX_65,
- HEALTHBOX_GFX_66,
- HEALTHBOX_GFX_67,
- HEALTHBOX_GFX_68,
- HEALTHBOX_GFX_69,
- HEALTHBOX_GFX_70,
- HEALTHBOX_GFX_STATUS_PSN_BATTLER1,
+ HEALTHBOX_GFX_36, //misc [Black section]
+ HEALTHBOX_GFX_37, //misc [Black section]
+ HEALTHBOX_GFX_38, //misc [Black section]
+ HEALTHBOX_GFX_39, //misc [Blank Health Window?]
+ HEALTHBOX_GFX_40, //misc [Blank Health Window?]
+ HEALTHBOX_GFX_41, //misc [Blank Health Window?]
+ HEALTHBOX_GFX_42, //misc [Blank Health Window?]
+ HEALTHBOX_GFX_43, //misc [Top of Health Window?]
+ HEALTHBOX_GFX_44, //misc [Top of Health Window?]
+ HEALTHBOX_GFX_45, //misc [Top of Health Window?]
+ HEALTHBOX_GFX_46, //misc [Blank Health Window?]
+ HEALTHBOX_GFX_HP_BAR_YELLOW, //hp bar yellow [0 pixels]
+ HEALTHBOX_GFX_48, //hp bar yellow [1 pixels]
+ HEALTHBOX_GFX_49, //hp bar yellow [2 pixels]
+ HEALTHBOX_GFX_50, //hp bar yellow [3 pixels]
+ HEALTHBOX_GFX_51, //hp bar yellow [4 pixels]
+ HEALTHBOX_GFX_52, //hp bar yellow [5 pixels]
+ HEALTHBOX_GFX_53, //hp bar yellow [6 pixels]
+ HEALTHBOX_GFX_54, //hp bar yellow [7 pixels]
+ HEALTHBOX_GFX_55, //hp bar yellow [8 pixels]
+ HEALTHBOX_GFX_HP_BAR_RED, //hp bar red [0 pixels]
+ HEALTHBOX_GFX_57, //hp bar red [1 pixels]
+ HEALTHBOX_GFX_58, //hp bar red [2 pixels]
+ HEALTHBOX_GFX_59, //hp bar red [3 pixels]
+ HEALTHBOX_GFX_60, //hp bar red [4 pixels]
+ HEALTHBOX_GFX_61, //hp bar red [5 pixels]
+ HEALTHBOX_GFX_62, //hp bar red [6 pixels]
+ HEALTHBOX_GFX_63, //hp bar red [7 pixels]
+ HEALTHBOX_GFX_64, //hp bar red [8 pixels]
+ HEALTHBOX_GFX_65, //hp bar frame end
+ HEALTHBOX_GFX_66, //status ball [full]
+ HEALTHBOX_GFX_67, //status ball [empty]
+ HEALTHBOX_GFX_68, //status ball [fainted]
+ HEALTHBOX_GFX_69, //status ball [statused]
+ HEALTHBOX_GFX_70, //status ball [unused extra]
+ HEALTHBOX_GFX_STATUS_PSN_BATTLER1, //status2 "PSN"
HEALTHBOX_GFX_72,
HEALTHBOX_GFX_73,
- HEALTHBOX_GFX_STATUS_PRZ_BATTLER1,
+ HEALTHBOX_GFX_STATUS_PRZ_BATTLER1, //status2 "PRZ"
HEALTHBOX_GFX_75,
HEALTHBOX_GFX_76,
- HEALTHBOX_GFX_STATUS_SLP_BATTLER1,
+ HEALTHBOX_GFX_STATUS_SLP_BATTLER1, //status2 "SLP"
HEALTHBOX_GFX_78,
HEALTHBOX_GFX_79,
- HEALTHBOX_GFX_STATUS_FRZ_BATTLER1,
+ HEALTHBOX_GFX_STATUS_FRZ_BATTLER1, //status2 "FRZ"
HEALTHBOX_GFX_81,
HEALTHBOX_GFX_82,
- HEALTHBOX_GFX_STATUS_BRN_BATTLER1,
+ HEALTHBOX_GFX_STATUS_BRN_BATTLER1, //status2 "BRN"
HEALTHBOX_GFX_84,
HEALTHBOX_GFX_85,
- HEALTHBOX_GFX_STATUS_PSN_BATTLER2,
+ HEALTHBOX_GFX_STATUS_PSN_BATTLER2, //status3 "PSN"
HEALTHBOX_GFX_87,
HEALTHBOX_GFX_88,
- HEALTHBOX_GFX_STATUS_PRZ_BATTLER2,
+ HEALTHBOX_GFX_STATUS_PRZ_BATTLER2, //status3 "PRZ"
HEALTHBOX_GFX_90,
HEALTHBOX_GFX_91,
- HEALTHBOX_GFX_STATUS_SLP_BATTLER2,
+ HEALTHBOX_GFX_STATUS_SLP_BATTLER2, //status3 "SLP"
HEALTHBOX_GFX_93,
HEALTHBOX_GFX_94,
- HEALTHBOX_GFX_STATUS_FRZ_BATTLER2,
+ HEALTHBOX_GFX_STATUS_FRZ_BATTLER2, //status3 "FRZ"
HEALTHBOX_GFX_96,
HEALTHBOX_GFX_97,
- HEALTHBOX_GFX_STATUS_BRN_BATTLER2,
+ HEALTHBOX_GFX_STATUS_BRN_BATTLER2, //status3 "BRN"
HEALTHBOX_GFX_99,
HEALTHBOX_GFX_100,
- HEALTHBOX_GFX_STATUS_PSN_BATTLER3,
+ HEALTHBOX_GFX_STATUS_PSN_BATTLER3, //status4 "PSN"
HEALTHBOX_GFX_102,
HEALTHBOX_GFX_103,
- HEALTHBOX_GFX_STATUS_PRZ_BATTLER3,
+ HEALTHBOX_GFX_STATUS_PRZ_BATTLER3, //status4 "PRZ"
HEALTHBOX_GFX_105,
HEALTHBOX_GFX_106,
- HEALTHBOX_GFX_STATUS_SLP_BATTLER3,
+ HEALTHBOX_GFX_STATUS_SLP_BATTLER3, //status4 "SLP"
HEALTHBOX_GFX_108,
HEALTHBOX_GFX_109,
- HEALTHBOX_GFX_STATUS_FRZ_BATTLER3,
+ HEALTHBOX_GFX_STATUS_FRZ_BATTLER3, //status4 "FRZ"
HEALTHBOX_GFX_111,
HEALTHBOX_GFX_112,
- HEALTHBOX_GFX_STATUS_BRN_BATTLER3,
+ HEALTHBOX_GFX_STATUS_BRN_BATTLER3, //status4 "BRN"
HEALTHBOX_GFX_114,
HEALTHBOX_GFX_115,
- HEALTHBOX_GFX_116,
- HEALTHBOX_GFX_117,
+ HEALTHBOX_GFX_116, //unknown_D12FEC
+ HEALTHBOX_GFX_117, //unknown_D1300C
};
extern const u8 *const gNatureNamePointers[];
diff --git a/src/battle_pyramid.c b/src/battle_pyramid.c
index a2fa4120f..340c17c59 100644
--- a/src/battle_pyramid.c
+++ b/src/battle_pyramid.c
@@ -1590,7 +1590,7 @@ void GenerateBattlePyramidFloorLayout(u16 *backupMapData, bool8 setPlayerPositio
layoutMap += mapLayout->width;
}
}
- mapheader_run_script_with_tag_x1();
+ RunOnLoadMapScript();
free(floorLayoutOffsets);
}
diff --git a/src/cable_car.c b/src/cable_car.c
index 207a0c22d..420bdd30f 100755
--- a/src/cable_car.c
+++ b/src/cable_car.c
@@ -358,7 +358,7 @@ static void CleanupCableCar(void)
HideBg(3);
sub_8150B6C(0);
gSpriteCoordOffsetX = 0;
- sub_80AB130(WEATHER_NONE);
+ SetCurrentAndNextWeatherNoDelay(WEATHER_NONE);
for (i = 0; i < 20; i++)
gWeatherPtr->sprites.s2.ashSprites[i] = NULL;
@@ -394,7 +394,7 @@ static void sub_81503E4(u8 taskId)
case 0:
if (sCableCar->timer == sCableCar->unk4)
{
- ChangeWeather(sCableCar->weather);
+ SetNextWeather(sCableCar->weather);
sCableCar->state = 1;
}
break;
@@ -798,7 +798,7 @@ static void LoadCableCarSprites(void)
gSprites[spriteId].data[1] = 99;
sCableCar->weather = WEATHER_ASH;
sCableCar->unk4 = 0x15e;
- sub_80AB130(WEATHER_SUNNY);
+ SetCurrentAndNextWeatherNoDelay(WEATHER_SUNNY);
break;
case 1:
CopyToBgTilemapBufferRect_ChangePalette(0, sCableCar->mtChimneyTilemap + 0x24, 24, 26, 12, 3, 17);
@@ -822,7 +822,7 @@ static void LoadCableCarSprites(void)
gSprites[spriteId].data[1] = 0x41;
sCableCar->weather = WEATHER_SUNNY;
sCableCar->unk4 = 0x109;
- sub_80AB130(WEATHER_ASH);
+ SetCurrentAndNextWeatherNoDelay(WEATHER_ASH);
break;
}
for (i = 0; i < 9; i++)
diff --git a/src/contest_link_80F57C4.c b/src/contest_link_80F57C4.c
index 485065d71..c0a79af81 100644
--- a/src/contest_link_80F57C4.c
+++ b/src/contest_link_80F57C4.c
@@ -372,12 +372,12 @@ static void sub_80F5CE4(u8 taskId)
sub_80DEDA8(0xFE);
gUnknown_02039F5C = 1;
gUnknown_02039F5D = sub_80DEFA8(0xFE, 0);
- var = VarGet(VAR_0x4086);
- VarSet(VAR_0x4086, 0);
+ var = VarGet(VAR_LINK_CONTEST_ROOM_STATE);
+ VarSet(VAR_LINK_CONTEST_ROOM_STATE, 0);
SetContinueGameWarpStatusToDynamicWarp();
TrySavingData(SAVE_LINK);
ClearContinueGameWarpStatus2();
- VarSet(VAR_0x4086, var);
+ VarSet(VAR_LINK_CONTEST_ROOM_STATE, var);
gTasks[taskId].data[0]++;
break;
case 1:
diff --git a/src/easy_chat.c b/src/easy_chat.c
index 5c55cd2ca..1b1bd105b 100644
--- a/src/easy_chat.c
+++ b/src/easy_chat.c
@@ -3,10 +3,12 @@
#include "global.h"
#include "alloc.h"
#include "bg.h"
+#include "decompress.h"
#include "dewford_trend.h"
#include "dynamic_placeholder_text_util.h"
#include "easy_chat.h"
#include "event_data.h"
+#include "event_object_movement.h"
#include "field_weather.h"
#include "gpu_regs.h"
#include "graphics.h"
@@ -22,6 +24,7 @@
#include "task.h"
#include "text_window.h"
#include "window.h"
+#include "constants/event_objects.h"
#include "constants/flags.h"
#include "constants/songs.h"
@@ -82,20 +85,23 @@ struct Unk203A11C
u8 unk6;
u8 unk7;
s8 unk8;
- u8 filler9[0x1];
+ u8 unk9;
u8 unkA;
u8 unkB[0xC1];
- u8 unkCC[0x20C];
- int unk2D8;
- int unk2DC;
- int unk2E0;
- int unk2E4;
- int unk2E8;
- int unk2EC;
- int unk2F0;
- int unk2F4;
- int unk2F8;
- int unk2FC;
+ u8 unkCC[0x202];
+ u16 unk2CE;
+ int unk2D0;
+ int unk2D4;
+ struct Sprite *unk2D8;
+ struct Sprite *unk2DC;
+ struct Sprite *unk2E0;
+ struct Sprite *unk2E4;
+ struct Sprite *unk2E8;
+ struct Sprite *unk2EC;
+ struct Sprite *unk2F0;
+ struct Sprite *unk2F4;
+ struct Sprite *unk2F8;
+ struct Sprite *unk2FC;
u16 unk300[BG_SCREEN_SIZE / 2];
u16 unkB00[BG_SCREEN_SIZE / 2];
};
@@ -202,12 +208,12 @@ static void sub_811CFCC(void);
static void sub_811D0BC(void);
static void sub_811D2C8(void);
static void sub_811D684(void);
-void sub_811DE90(void);
-void sub_811DEC4(void);
-void sub_811DE5C(u8, u8, u8, u8);
-void sub_811E5D4(void);
-void sub_811E720(void);
-void sub_811E828(void);
+static void sub_811DE90(void);
+static void sub_811DEC4(void);
+static void sub_811DE5C(u8, u8, u8, u8);
+static void sub_811E5D4(void);
+static void sub_811E720(void);
+static void sub_811E828(void);
static bool8 sub_811C2D4(void);
static bool8 sub_811C30C(void);
static bool8 sub_811C3E4(void);
@@ -237,51 +243,56 @@ static bool8 sub_811CD94(void);
static bool8 sub_811CDD4(void);
static bool8 sub_811CE14(void);
static bool8 sub_811CE54(void);
-void sub_811DF60(u8, u8);
-int sub_811E920(int);
-void sub_811DF90(void);
+static void sub_811DF60(u8, u8);
+static int sub_811E920(int);
+static void sub_811DF90(void);
static void sub_811D104(u8);
static void sub_811D214(u8);
-void sub_811DFB0(void);
+static void sub_811DFB0(void);
static void sub_811D6D4(void);
static void sub_811D9CC(int);
-void sub_811E3AC(void);
-bool8 sub_811E418(void);
-void sub_811DFC8(void);
-void sub_811E6E0(int);
+static void sub_811E3AC(void);
+static bool8 sub_811E418(void);
+static void sub_811DFC8(void);
+static void sub_811E6E0(int);
static bool8 sub_811DAA4(void);
-void sub_811E64C(void);
-void sub_811E050(void);
-void sub_811E4AC(void);
-void sub_811E6B0(void);
-void sub_811E55C(void);
-bool8 sub_811E4D0(void);
-bool8 sub_811E5B8(void);
-void sub_811E578(void);
-void sub_811E088(void);
-void sub_811DDAC(s16, u8);
-bool8 sub_811DE10(void);
+static void sub_811E64C(void);
+static void sub_811E050(void);
+static void sub_811E4AC(void);
+static void sub_811E6B0(void);
+static void sub_811E55C(void);
+static bool8 sub_811E4D0(void);
+static bool8 sub_811E5B8(void);
+static void sub_811E578(void);
+static void sub_811E088(void);
+static void sub_811DDAC(s16, u8);
+static bool8 sub_811DE10(void);
static void sub_811D9B4(void);
static void sub_811D698(u32);
-void sub_811E288(void);
-void sub_811E794(void);
-void sub_811E380(void);
-void sub_811E7F8(void);
-void sub_811E30C(void);
+static void sub_811E288(void);
+static void sub_811E794(void);
+static void sub_811E380(void);
+static void sub_811E7F8(void);
+static void sub_811E30C(void);
static void sub_811D7A4(void);
static void sub_811D7C8(void);
-int sub_811DE48(void);
+static int sub_811DE48(void);
static void sub_811D7EC(void);
static void sub_811D830(void);
void sub_811D058(u8, u8, const u8 *, u8, u8, u8, u8, u8, u8);
-void sub_811DD84(void);
+static void sub_811DD84(void);
static void sub_811D6F4(void);
static void sub_811D758(void);
static void sub_811D794(void);
const u8 *sub_811F424(u8);
static void sub_811D864(u8, u8);
static void sub_811D950(u8, u8);
-void sub_811DADC(u8);
+static void sub_811DADC(u8);
+static void sub_811DC28(int, int, int, int);
+static void sub_811E0EC(s8, s8);
+static void sub_811E1A4(s8, s8);
+static void sub_811E2DC(struct Sprite *);
+static void sub_811E34C(u8, u8);
u8 *CopyEasyChatWordPadded(u8 *, u16, u16);
extern const struct {
@@ -304,6 +315,17 @@ extern const u16 gUnknown_08597C24[];
extern const struct WindowTemplate gUnknown_08597C84;
extern const u8 gUnknown_08597C8C[4];
extern const u8 *const gUnknown_08597C90[4];
+extern const struct SpriteSheet gUnknown_08597CA0[];
+extern const struct SpritePalette gUnknown_08597CC0[];
+extern const struct CompressedSpriteSheet gUnknown_08597CE8[];
+extern const struct SpriteTemplate gUnknown_08597D18;
+extern const struct SpriteTemplate gUnknown_08597D68;
+extern const struct SpriteTemplate gUnknown_08597DF0;
+extern const struct SpriteTemplate gUnknown_08597DD0;
+extern const struct SpriteTemplate gUnknown_08597E48;
+extern const struct SpriteTemplate gUnknown_08597E30;
+extern const u8 gUnknown_08597D08[];
+extern const u8 gUnknown_08597E60[][4];
void sub_811A20C(u8 kind, u16 *words, MainCallback callback, u8 sizeParam)
{
@@ -3228,16 +3250,16 @@ static bool8 sub_811CE94(void)
return FALSE;
gUnknown_0203A11C->unk0 = 0;
- gUnknown_0203A11C->unk2D8 = 0;
- gUnknown_0203A11C->unk2DC = 0;
- gUnknown_0203A11C->unk2E0 = 0;
- gUnknown_0203A11C->unk2E4 = 0;
- gUnknown_0203A11C->unk2E8 = 0;
- gUnknown_0203A11C->unk2EC = 0;
- gUnknown_0203A11C->unk2F0 = 0;
- gUnknown_0203A11C->unk2F4 = 0;
- gUnknown_0203A11C->unk2F8 = 0;
- gUnknown_0203A11C->unk2FC = 0;
+ gUnknown_0203A11C->unk2D8 = NULL;
+ gUnknown_0203A11C->unk2DC = NULL;
+ gUnknown_0203A11C->unk2E0 = NULL;
+ gUnknown_0203A11C->unk2E4 = NULL;
+ gUnknown_0203A11C->unk2E8 = NULL;
+ gUnknown_0203A11C->unk2EC = NULL;
+ gUnknown_0203A11C->unk2F0 = NULL;
+ gUnknown_0203A11C->unk2F4 = NULL;
+ gUnknown_0203A11C->unk2F8 = NULL;
+ gUnknown_0203A11C->unk2FC = NULL;
gUnknown_0203A11C->unkA = sub_811BC70();
return TRUE;
}
@@ -3752,3 +3774,602 @@ static bool8 sub_811DAA4(void)
var1 = gUnknown_0203A11C->unk7;
return (var0 ^ var1) > 0;
}
+
+static void sub_811DADC(u8 arg0)
+{
+ FillBgTilemapBufferRect_Palette0(1, 0, 0, 10, 30, 10);
+ switch (arg0)
+ {
+ case 0:
+ break;
+ case 1:
+ sub_811DC28(11, 14, 3, 2);
+ break;
+ case 2:
+ sub_811DC28(9, 14, 7, 2);
+ break;
+ case 3:
+ sub_811DC28(7, 14, 11, 2);
+ break;
+ case 4:
+ sub_811DC28(5, 14, 15, 2);
+ break;
+ case 5:
+ sub_811DC28(3, 14, 19, 2);
+ break;
+ case 6:
+ sub_811DC28(1, 14, 23, 2);
+ break;
+ case 11:
+ sub_811DC28(1, 10, 24, 10);
+ break;
+ case 12:
+ sub_811DC28(1, 10, 25, 10);
+ break;
+ case 13:
+ sub_811DC28(1, 10, 26, 10);
+ break;
+ case 14:
+ sub_811DC28(1, 10, 27, 10);
+ break;
+ case 15:
+ sub_811DC28(1, 10, 28, 10);
+ break;
+ case 16:
+ sub_811DC28(1, 10, 29, 10);
+ break;
+ case 17:
+ sub_811DC28(0, 10, 30, 10);
+ break;
+ case 10:
+ case 18:
+ sub_811DC28(1, 10, 23, 10);
+ break;
+ case 9:
+ case 19:
+ sub_811DC28(1, 11, 23, 8);
+ break;
+ case 8:
+ case 20:
+ sub_811DC28(1, 12, 23, 6);
+ break;
+ case 7:
+ case 21:
+ sub_811DC28(1, 13, 23, 4);
+ break;
+ case 22:
+ sub_811DC28(1, 14, 23, 2);
+ break;
+ }
+
+ CopyBgTilemapBufferToVram(1);
+}
+
+static void sub_811DC28(int left, int top, int width, int height)
+{
+ u16 *tilemap;
+ int right;
+ int bottom;
+ int x, y;
+
+ tilemap = gUnknown_0203A11C->unk300;
+ right = left + width - 1;
+ bottom = top + height - 1;
+ x = left;
+ y = top;
+ tilemap[y * 32 + x] = 0x4001;
+ x++;
+ for (; x < right; x++)
+ tilemap[y * 32 + x] = 0x4002;
+
+ tilemap[y * 32 + x] = 0x4003;
+ y++;
+ for (; y < bottom; y++)
+ {
+ tilemap[y * 32 + left] = 0x4005;
+ x = left + 1;
+ for (; x < right; x++)
+ tilemap[y * 32 + x] = 0x4000;
+
+ tilemap[y * 32 + x] = 0x4007;
+ }
+
+ tilemap[y * 32 + left] = 0x4009;
+ x = left + 1;
+ for (; x < right; x++)
+ tilemap[y * 32 + x] = 0x400A;
+
+ tilemap[y * 32 + x] = 0x400B;
+ sub_811DE5C((left + 1) * 8, (top + 1) * 8, (width - 2) * 8, (height - 2) * 8);
+}
+
+static void sub_811DD84(void)
+{
+ ChangeBgY(2, 0x800, 0);
+ gUnknown_0203A11C->unk2CE = 0;
+}
+
+static void sub_811DDAC(s16 arg0, u8 arg1)
+{
+ int bgY;
+ s16 var0;
+
+ bgY = GetBgY(2);
+ gUnknown_0203A11C->unk2CE += arg0;
+ var0 = arg0 * 16;
+ bgY += var0 << 8;
+ if (arg1)
+ {
+ gUnknown_0203A11C->unk2D0 = bgY;
+ gUnknown_0203A11C->unk2D4 = arg1 * 256;
+ if (var0 < 0)
+ gUnknown_0203A11C->unk2D4 = -gUnknown_0203A11C->unk2D4;
+ }
+ else
+ {
+ ChangeBgY(2, bgY, 0);
+ }
+}
+
+static bool8 sub_811DE10(void)
+{
+ int bgY;
+
+ bgY = GetBgY(2);
+ if (bgY == gUnknown_0203A11C->unk2D0)
+ {
+ return FALSE;
+ }
+ else
+ {
+ ChangeBgY(2, gUnknown_0203A11C->unk2D4, 1);
+ return TRUE;
+ }
+}
+
+static int sub_811DE48(void)
+{
+ return gUnknown_0203A11C->unk2CE;
+}
+
+static void sub_811DE5C(u8 left, u8 top, u8 width, u8 height)
+{
+ u16 horizontalDimensions = WIN_RANGE(left, left + width);
+ u16 verticalDimensions = WIN_RANGE(top, top + height);
+ SetGpuReg(REG_OFFSET_WIN0H, horizontalDimensions);
+ SetGpuReg(REG_OFFSET_WIN0V, verticalDimensions);
+}
+
+static void sub_811DE90(void)
+{
+ u32 i;
+
+ LoadSpriteSheets(gUnknown_08597CA0);
+ LoadSpritePalettes(gUnknown_08597CC0);
+ for (i = 0; i < 4; i++)
+ LoadCompressedSpriteSheet(&gUnknown_08597CE8[i]);
+}
+
+static void sub_811DEC4(void)
+{
+ u8 var0 = sub_811BA68();
+ int x = gUnknown_08597C30[var0].unk0_0 * 8 + 13;
+ int y = gUnknown_08597C30[var0].unk0_5 * 8 + 8;
+ u8 spriteId = CreateSprite(&gUnknown_08597D18, x, y, 2);
+ gUnknown_0203A11C->unk2D8 = &gSprites[spriteId];
+ gSprites[spriteId].data[1] = 1;
+}
+
+void sub_811DF28(struct Sprite *sprite)
+{
+ if (sprite->data[1])
+ {
+ if (++sprite->data[0] > 2)
+ {
+ sprite->data[0] = 0;
+ if (++sprite->pos2.x > 0)
+ sprite->pos2.x = -6;
+ }
+ }
+}
+
+static void sub_811DF60(u8 x, u8 y)
+{
+ gUnknown_0203A11C->unk2D8->pos1.x = x;
+ gUnknown_0203A11C->unk2D8->pos1.y = y;
+ gUnknown_0203A11C->unk2D8->pos2.x = 0;
+ gUnknown_0203A11C->unk2D8->data[0] = 0;
+}
+
+static void sub_811DF90(void)
+{
+ gUnknown_0203A11C->unk2D8->data[0] = 0;
+ gUnknown_0203A11C->unk2D8->data[1] = 0;
+ gUnknown_0203A11C->unk2D8->pos2.x = 0;
+}
+
+static void sub_811DFB0(void)
+{
+ gUnknown_0203A11C->unk2D8->data[1] = 1;
+}
+
+static void sub_811DFC8(void)
+{
+ u8 spriteId = CreateSprite(&gUnknown_08597D68, 0, 0, 3);
+ gUnknown_0203A11C->unk2DC = &gSprites[spriteId];
+ gUnknown_0203A11C->unk2DC->pos2.x = 32;
+
+ spriteId = CreateSprite(&gUnknown_08597D68, 0, 0, 3);
+ gUnknown_0203A11C->unk2E0 = &gSprites[spriteId];
+ gUnknown_0203A11C->unk2E0->pos2.x = -32;
+
+ gUnknown_0203A11C->unk2DC->hFlip = 1;
+ sub_811E088();
+}
+
+static void sub_811E050(void)
+{
+ DestroySprite(gUnknown_0203A11C->unk2DC);
+ gUnknown_0203A11C->unk2DC = NULL;
+ DestroySprite(gUnknown_0203A11C->unk2E0);
+ gUnknown_0203A11C->unk2E0 = NULL;
+}
+
+static void sub_811E088(void)
+{
+ u8 var0;
+ u8 var1;
+
+ if (gUnknown_0203A11C->unk2DC && gUnknown_0203A11C->unk2E0)
+ {
+ sub_811BB9C(&var0, &var1);
+ if (!sub_811BBB0())
+ sub_811E0EC(var0, var1);
+ else
+ sub_811E1A4(var0, var1);
+ }
+}
+
+static void sub_811E0EC(s8 arg0, s8 arg1)
+{
+ if (arg0 != -1)
+ {
+ StartSpriteAnim(gUnknown_0203A11C->unk2DC, 0);
+ gUnknown_0203A11C->unk2DC->pos1.x = arg0 * 84 + 58;
+ gUnknown_0203A11C->unk2DC->pos1.y = arg1 * 16 + 96;
+
+ StartSpriteAnim(gUnknown_0203A11C->unk2E0, 0);
+ gUnknown_0203A11C->unk2E0->pos1.x = arg0 * 84 + 58;
+ gUnknown_0203A11C->unk2E0->pos1.y = arg1 * 16 + 96;
+ }
+ else
+ {
+ StartSpriteAnim(gUnknown_0203A11C->unk2DC, 1);
+ gUnknown_0203A11C->unk2DC->pos1.x = 216;
+ gUnknown_0203A11C->unk2DC->pos1.y = arg1 * 16 + 112;
+
+ StartSpriteAnim(gUnknown_0203A11C->unk2E0, 1);
+ gUnknown_0203A11C->unk2E0->pos1.x = 216;
+ gUnknown_0203A11C->unk2E0->pos1.y = arg1 * 16 + 112;
+ }
+}
+
+static void sub_811E1A4(s8 arg0, s8 arg1)
+{
+ int anim;
+ int x, y;
+
+ if (arg0 != -1)
+ {
+ y = arg1 * 16 + 96;
+ x = 32;
+ if (arg0 == 6 && arg1 == 0)
+ {
+ x = 158;
+ anim = 2;
+ }
+ else
+ {
+ x += gUnknown_08597D08[(u8)arg0 < 7 ? arg0 : 0];
+ anim = 3;
+ }
+
+ StartSpriteAnim(gUnknown_0203A11C->unk2DC, anim);
+ gUnknown_0203A11C->unk2DC->pos1.x = x;
+ gUnknown_0203A11C->unk2DC->pos1.y = y;
+
+ StartSpriteAnim(gUnknown_0203A11C->unk2E0, anim);
+ gUnknown_0203A11C->unk2E0->pos1.x = x;
+ gUnknown_0203A11C->unk2E0->pos1.y = y;
+ }
+ else
+ {
+ StartSpriteAnim(gUnknown_0203A11C->unk2DC, 1);
+ gUnknown_0203A11C->unk2DC->pos1.x = 216;
+ gUnknown_0203A11C->unk2DC->pos1.y = arg1 * 16 + 112;
+
+ StartSpriteAnim(gUnknown_0203A11C->unk2E0, 1);
+ gUnknown_0203A11C->unk2E0->pos1.x = 216;
+ gUnknown_0203A11C->unk2E0->pos1.y = arg1 * 16 + 112;
+ }
+}
+
+static void sub_811E288(void)
+{
+ u8 spriteId = CreateSprite(&gUnknown_08597D18, 0, 0, 4);
+ gUnknown_0203A11C->unk2E4 = &gSprites[spriteId];
+ gUnknown_0203A11C->unk2E4->callback = sub_811E2DC;
+ gUnknown_0203A11C->unk2E4->oam.priority = 2;
+ sub_811E30C();
+}
+
+static void sub_811E2DC(struct Sprite *sprite)
+{
+ if (++sprite->data[0] > 2)
+ {
+ sprite->data[0] = 0;
+ if (++sprite->pos2.x > 0)
+ sprite->pos2.x = -6;
+ }
+}
+
+static void sub_811E30C(void)
+{
+ s8 var0, var1, x, y;
+
+ sub_811BBC8(&var0, &var1);
+ x = var0 * 13;
+ x = x * 8 + 28;
+ y = var1 * 16 + 96;
+ sub_811E34C(x, y);
+}
+
+static void sub_811E34C(u8 x, u8 y)
+{
+ if (gUnknown_0203A11C->unk2E4)
+ {
+ gUnknown_0203A11C->unk2E4->pos1.x = x;
+ gUnknown_0203A11C->unk2E4->pos1.y = y;
+ gUnknown_0203A11C->unk2E4->pos2.x = 0;
+ gUnknown_0203A11C->unk2E4->data[0] = 0;
+ }
+}
+
+static void sub_811E380(void)
+{
+ if (gUnknown_0203A11C->unk2E4)
+ {
+ DestroySprite(gUnknown_0203A11C->unk2E4);
+ gUnknown_0203A11C->unk2E4 = NULL;
+ }
+}
+
+static void sub_811E3AC(void)
+{
+ u8 spriteId = CreateSprite(&gUnknown_08597DF0, 208, 128, 6);
+ gUnknown_0203A11C->unk2E8 = &gSprites[spriteId];
+ gUnknown_0203A11C->unk2E8->pos2.x = -64;
+
+ spriteId = CreateSprite(&gUnknown_08597DD0, 208, 80, 5);
+ gUnknown_0203A11C->unk2EC = &gSprites[spriteId];
+ gUnknown_0203A11C->unk9 = 0;
+}
+
+static bool8 sub_811E418(void)
+{
+ switch (gUnknown_0203A11C->unk9)
+ {
+ default:
+ return FALSE;
+ case 0:
+ gUnknown_0203A11C->unk2E8->pos2.x += 8;
+ if (gUnknown_0203A11C->unk2E8->pos2.x >= 0)
+ {
+ gUnknown_0203A11C->unk2E8->pos2.x = 0;
+ if (!sub_811BBB0())
+ StartSpriteAnim(gUnknown_0203A11C->unk2EC, 1);
+ else
+ StartSpriteAnim(gUnknown_0203A11C->unk2EC, 2);
+
+ gUnknown_0203A11C->unk9++;
+ }
+ break;
+ case 1:
+ if (gUnknown_0203A11C->unk2EC->animEnded)
+ {
+ gUnknown_0203A11C->unk9 = 2;
+ return FALSE;
+ }
+ }
+
+ return TRUE;
+}
+
+static void sub_811E4AC(void)
+{
+ gUnknown_0203A11C->unk9 = 0;
+ StartSpriteAnim(gUnknown_0203A11C->unk2EC, 3);
+}
+
+static bool8 sub_811E4D0(void)
+{
+ switch (gUnknown_0203A11C->unk9)
+ {
+ default:
+ return FALSE;
+ case 0:
+ if (gUnknown_0203A11C->unk2EC->animEnded)
+ gUnknown_0203A11C->unk9 = 1;
+ break;
+ case 1:
+ gUnknown_0203A11C->unk2E8->pos2.x -= 8;
+ if (gUnknown_0203A11C->unk2E8->pos2.x <= -64)
+ {
+ DestroySprite(gUnknown_0203A11C->unk2EC);
+ DestroySprite(gUnknown_0203A11C->unk2E8);
+ gUnknown_0203A11C->unk2EC = NULL;
+ gUnknown_0203A11C->unk2E8 = NULL;
+ gUnknown_0203A11C->unk9++;
+ return FALSE;
+ }
+ }
+
+ return TRUE;
+}
+
+static void sub_811E55C(void)
+{
+ StartSpriteAnim(gUnknown_0203A11C->unk2EC, 4);
+}
+
+static void sub_811E578(void)
+{
+ if (!sub_811BBB0())
+ StartSpriteAnim(gUnknown_0203A11C->unk2EC, 1);
+ else
+ StartSpriteAnim(gUnknown_0203A11C->unk2EC, 2);
+}
+
+static bool8 sub_811E5B8(void)
+{
+ return !gUnknown_0203A11C->unk2EC->animEnded;
+}
+
+static void sub_811E5D4(void)
+{
+ u8 spriteId = CreateSprite(&gUnknown_08597E48, 96, 80, 0);
+ if (spriteId != MAX_SPRITES)
+ gUnknown_0203A11C->unk2F0 = &gSprites[spriteId];
+
+ spriteId = CreateSprite(&gUnknown_08597E48, 96, 156, 0);
+ if (spriteId != MAX_SPRITES)
+ {
+ gUnknown_0203A11C->unk2F4 = &gSprites[spriteId];
+ gUnknown_0203A11C->unk2F4->vFlip = 1;
+ }
+
+ sub_811E6B0();
+}
+
+static void sub_811E64C(void)
+{
+ gUnknown_0203A11C->unk2F0->invisible = !sub_811BBF8();
+ gUnknown_0203A11C->unk2F4->invisible = !sub_811BC2C();
+}
+
+static void sub_811E6B0(void)
+{
+ gUnknown_0203A11C->unk2F0->invisible = 1;
+ gUnknown_0203A11C->unk2F4->invisible = 1;
+}
+
+static void sub_811E6E0(int arg0)
+{
+ if (!arg0)
+ {
+ gUnknown_0203A11C->unk2F0->pos1.x = 96;
+ gUnknown_0203A11C->unk2F4->pos1.x = 96;
+ }
+ else
+ {
+ gUnknown_0203A11C->unk2F0->pos1.x = 120;
+ gUnknown_0203A11C->unk2F4->pos1.x = 120;
+ }
+}
+
+static void sub_811E720(void)
+{
+ u8 spriteId = CreateSprite(&gUnknown_08597E30, 220, 84, 1);
+ if (spriteId != MAX_SPRITES)
+ gUnknown_0203A11C->unk2F8 = &gSprites[spriteId];
+
+ spriteId = CreateSprite(&gUnknown_08597E30, 220, 156, 1);
+ if (spriteId != MAX_SPRITES)
+ {
+ gUnknown_0203A11C->unk2FC = &gSprites[spriteId];
+ StartSpriteAnim(gUnknown_0203A11C->unk2FC, 1);
+ }
+
+ sub_811E7F8();
+}
+
+static void sub_811E794(void)
+{
+ gUnknown_0203A11C->unk2F8->invisible = !sub_811BBF8();
+ gUnknown_0203A11C->unk2FC->invisible = !sub_811BC2C();
+}
+
+static void sub_811E7F8(void)
+{
+ gUnknown_0203A11C->unk2F8->invisible = 1;
+ gUnknown_0203A11C->unk2FC->invisible = 1;
+}
+
+static void sub_811E828(void)
+{
+ int graphicsId;
+ u8 spriteId;
+
+ switch (sub_811BCBC())
+ {
+ case 0:
+ graphicsId = EVENT_OBJ_GFX_REPORTER_M;
+ break;
+ case 1:
+ graphicsId = EVENT_OBJ_GFX_REPORTER_F;
+ break;
+ case 2:
+ graphicsId = EVENT_OBJ_GFX_BOY_1;
+ break;
+ default:
+ return;
+ }
+
+ if (sub_811BA68() != 4)
+ return;
+
+ spriteId = AddPseudoEventObject(graphicsId, SpriteCallbackDummy, 76, 40, 0);
+ if (spriteId != MAX_SPRITES)
+ {
+ gSprites[spriteId].oam.priority = 0;
+ StartSpriteAnim(&gSprites[spriteId], 2);
+ }
+
+ spriteId = AddPseudoEventObject(
+ gSaveBlock2Ptr->playerGender == MALE ? EVENT_OBJ_GFX_RIVAL_BRENDAN_NORMAL : EVENT_OBJ_GFX_RIVAL_MAY_NORMAL,
+ SpriteCallbackDummy,
+ 52,
+ 40,
+ 0);
+
+ if (spriteId != MAX_SPRITES)
+ {
+ gSprites[spriteId].oam.priority = 0;
+ StartSpriteAnim(&gSprites[spriteId], 3);
+ }
+}
+
+int sub_811E8E4(void)
+{
+ u8 var0 = sub_811BA68();
+ switch (gUnknown_08597C30[var0].unk3)
+ {
+ case 1:
+ return 1;
+ case 2:
+ return 2;
+ case 0:
+ return 0;
+ default:
+ return 3;
+ }
+}
+
+static int sub_811E920(int arg0)
+{
+ int var0 = sub_811E8E4();
+ if (var0 < 3)
+ return gUnknown_08597E60[var0][arg0] + 4;
+ else
+ return 0;
+}
diff --git a/src/egg_hatch.c b/src/egg_hatch.c
index e1d94889a..ba1020669 100644
--- a/src/egg_hatch.c
+++ b/src/egg_hatch.c
@@ -574,7 +574,7 @@ static void Task_EggHatchPlayBGM(u8 taskID)
if (gTasks[taskID].data[0] == 0)
{
StopMapMusic();
- PlayRainSoundEffect();
+ PlayRainStoppingSoundEffect();
}
if (gTasks[taskID].data[0] == 1)
PlayBGM(MUS_ME_SHINKA);
diff --git a/src/field_control_avatar.c b/src/field_control_avatar.c
index 00dce4c7d..cffafaf9f 100644
--- a/src/field_control_avatar.c
+++ b/src/field_control_avatar.c
@@ -147,7 +147,7 @@ int ProcessPlayerFieldInput(struct FieldInput *input)
if (CheckForTrainersWantingBattle() == TRUE)
return TRUE;
- if (mapheader_run_first_tag2_script_list_match() == 1)
+ if (TryRunOnFrameMapScript() == TRUE)
return TRUE;
if (input->pressedBButton && TrySetupDiveEmergeScript() == TRUE)
diff --git a/src/field_screen_effect.c b/src/field_screen_effect.c
index 93017f125..0a4f3212b 100644
--- a/src/field_screen_effect.c
+++ b/src/field_screen_effect.c
@@ -503,7 +503,7 @@ void DoWarp(void)
ScriptContext2_Enable();
TryFadeOutOldMapMusic();
WarpFadeScreen();
- PlayRainSoundEffect();
+ PlayRainStoppingSoundEffect();
PlaySE(SE_KAIDAN);
gFieldCallback = mapldr_default;
CreateTask(sub_80AFA0C, 10);
@@ -514,7 +514,7 @@ void DoDiveWarp(void)
ScriptContext2_Enable();
TryFadeOutOldMapMusic();
WarpFadeScreen();
- PlayRainSoundEffect();
+ PlayRainStoppingSoundEffect();
gFieldCallback = mapldr_default;
CreateTask(sub_80AFA0C, 10);
}
@@ -524,7 +524,7 @@ void sub_80AF79C(void)
ScriptContext2_Enable();
TryFadeOutOldMapMusic();
FadeScreen(FADE_TO_WHITE, 8);
- PlayRainSoundEffect();
+ PlayRainStoppingSoundEffect();
gFieldCallback = sub_80AF3B0;
CreateTask(sub_80AFA0C, 10);
}
@@ -734,7 +734,7 @@ static void sub_80AFA88(u8 taskId)
case 4:
TryFadeOutOldMapMusic();
WarpFadeScreen();
- PlayRainSoundEffect();
+ PlayRainStoppingSoundEffect();
task->data[0] = 0;
task->func = sub_80AFA0C;
break;
@@ -771,7 +771,7 @@ void sub_80AFC60(void)
ScriptContext2_Enable();
TryFadeOutOldMapMusic();
WarpFadeScreen();
- PlayRainSoundEffect();
+ PlayRainStoppingSoundEffect();
PlaySE(SE_KAIDAN);
gFieldCallback = sub_80AF3C8;
CreateTask(task0A_fade_n_map_maybe, 10);
diff --git a/src/field_specials.c b/src/field_specials.c
index 3c26085dd..307f81399 100644
--- a/src/field_specials.c
+++ b/src/field_specials.c
@@ -54,6 +54,7 @@
#include "constants/moves.h"
#include "constants/vars.h"
#include "constants/battle_frontier.h"
+#include "constants/weather.h"
EWRAM_DATA bool8 gBikeCyclingChallenge = FALSE;
EWRAM_DATA u8 gBikeCollisions = 0;
@@ -3527,9 +3528,9 @@ bool8 sub_813B3B0(void)
}
}
-void sub_813B484(void)
+void Unused_SetWeatherSunny(void)
{
- sub_80AB104(2);
+ SetCurrentAndNextWeather(WEATHER_SUNNY);
}
bool32 sub_813B490(void)
diff --git a/src/field_weather.c b/src/field_weather.c
index 0db635c60..9913e9a61 100644
--- a/src/field_weather.c
+++ b/src/field_weather.c
@@ -186,11 +186,11 @@ void StartWeather(void)
}
}
-void ChangeWeather(u8 weather)
+void SetNextWeather(u8 weather)
{
if (weather != WEATHER_RAIN_LIGHT && weather != WEATHER_RAIN_MED && weather != WEATHER_RAIN_HEAVY)
{
- PlayRainSoundEffect();
+ PlayRainStoppingSoundEffect();
}
if (gWeatherPtr->nextWeather != weather && gWeatherPtr->currWeather == weather)
@@ -203,18 +203,19 @@ void ChangeWeather(u8 weather)
gWeatherPtr->finishStep = 0;
}
-void sub_80AB104(u8 weather)
+void SetCurrentAndNextWeather(u8 weather)
{
- PlayRainSoundEffect();
+ PlayRainStoppingSoundEffect();
gWeatherPtr->currWeather = weather;
gWeatherPtr->nextWeather = weather;
}
-void sub_80AB130(u8 weather)
+void SetCurrentAndNextWeatherNoDelay(u8 weather)
{
- PlayRainSoundEffect();
+ PlayRainStoppingSoundEffect();
gWeatherPtr->currWeather = weather;
gWeatherPtr->nextWeather = weather;
+ // Overrides the normal delay during screen fading.
gWeatherPtr->readyForInit = TRUE;
}
@@ -1053,7 +1054,7 @@ void SetRainStrengthFromSoundEffect(u16 soundEffect)
}
}
-void PlayRainSoundEffect(void)
+void PlayRainStoppingSoundEffect(void)
{
if (IsSpecialSEPlaying())
{
diff --git a/src/field_weather_effect.c b/src/field_weather_effect.c
index 2ec51a722..be8fdc6cb 100644
--- a/src/field_weather_effect.c
+++ b/src/field_weather_effect.c
@@ -16,8 +16,8 @@
void sub_80AC6B4(struct Sprite *);
// EWRAM
-EWRAM_DATA static u8 gUnknown_02038BC4 = 0;
-EWRAM_DATA static u16 gUnknown_02038BC6 = 0;
+EWRAM_DATA static u8 gCurrentAlternatingWeather = 0;
+EWRAM_DATA static u16 gUnusedWeatherRelated = 0;
// CONST
const u16 gUnknown_0854C290[] = INCBIN_U16("graphics/weather/1.gbapal");
@@ -2286,13 +2286,14 @@ void unc_0807DAB4(struct Sprite *sprite)
//------------------------------------------------------------------------------
-static void sub_80AEC94(u32 a0, u32 a1)
+// Unused function.
+static void UnusedSetCurrentAlternatingWeather(u32 a0, u32 a1)
{
- gUnknown_02038BC4 = a0;
- gUnknown_02038BC6 = a1;
+ gCurrentAlternatingWeather = a0;
+ gUnusedWeatherRelated = a1;
}
-static void sub_80AECA8(u8 taskId)
+static void Task_DoAlternatingWeather(u8 taskId)
{
s16 *data = gTasks[taskId].data;
@@ -2301,8 +2302,8 @@ static void sub_80AECA8(u8 taskId)
case 0:
if (data[15]-- <= 0)
{
- ChangeWeather(data[1]);
- gUnknown_02038BC4 = data[1];
+ SetNextWeather(data[1]);
+ gCurrentAlternatingWeather = data[1];
data[15] = 600;
data[0]++;
}
@@ -2310,8 +2311,8 @@ static void sub_80AECA8(u8 taskId)
case 1:
if (data[15]-- <= 0)
{
- ChangeWeather(data[2]);
- gUnknown_02038BC4 = data[2];
+ SetNextWeather(data[2]);
+ gCurrentAlternatingWeather = data[2];
data[15] = 600;
data[0] = 0;
}
@@ -2319,25 +2320,25 @@ static void sub_80AECA8(u8 taskId)
}
}
-static void sub_80AED28(void)
+static void CreateAlternatingWeatherTask(void)
{
- u8 taskId = CreateTask(sub_80AECA8, 0);
+ u8 taskId = CreateTask(Task_DoAlternatingWeather, 0);
s16 *data = gTasks[taskId].data;
data[15] = 600;
- if (gUnknown_02038BC4 == WEATHER_RAIN_HEAVY)
+ if (gCurrentAlternatingWeather == WEATHER_RAIN_HEAVY)
{
data[1] = WEATHER_DROUGHT;
data[2] = WEATHER_RAIN_HEAVY;
}
- else if (gUnknown_02038BC4 == WEATHER_DROUGHT)
+ else if (gCurrentAlternatingWeather == WEATHER_DROUGHT)
{
data[1] = WEATHER_RAIN_HEAVY;
data[2] = WEATHER_DROUGHT;
}
else
{
- gUnknown_02038BC4 = WEATHER_RAIN_HEAVY;
+ gCurrentAlternatingWeather = WEATHER_RAIN_HEAVY;
data[1] = WEATHER_DROUGHT;
data[2] = WEATHER_RAIN_HEAVY;
}
@@ -2368,51 +2369,51 @@ void SetSav1WeatherFromCurrMapHeader(void)
void SetWeather(u32 weather)
{
SetSav1Weather(weather);
- ChangeWeather(GetSav1Weather());
+ SetNextWeather(GetSav1Weather());
}
void SetWeather_Unused(u32 weather)
{
SetSav1Weather(weather);
- sub_80AB104(GetSav1Weather());
+ SetCurrentAndNextWeather(GetSav1Weather());
}
void DoCurrentWeather(void)
{
u8 weather = GetSav1Weather();
- if (weather == WEATHER_15)
+ if (weather == WEATHER_ALTERNATING)
{
- if (!FuncIsActiveTask(sub_80AECA8))
- sub_80AED28();
- weather = gUnknown_02038BC4;
+ if (!FuncIsActiveTask(Task_DoAlternatingWeather))
+ CreateAlternatingWeatherTask();
+ weather = gCurrentAlternatingWeather;
}
else
{
- if (FuncIsActiveTask(sub_80AECA8))
- DestroyTask(FindTaskIdByFunc(sub_80AECA8));
- gUnknown_02038BC4 = WEATHER_RAIN_HEAVY;
+ if (FuncIsActiveTask(Task_DoAlternatingWeather))
+ DestroyTask(FindTaskIdByFunc(Task_DoAlternatingWeather));
+ gCurrentAlternatingWeather = WEATHER_RAIN_HEAVY;
}
- ChangeWeather(weather);
+ SetNextWeather(weather);
}
-void sub_80AEE84(void)
+void ResumePausedWeather(void)
{
u8 weather = GetSav1Weather();
- if (weather == WEATHER_15)
+ if (weather == WEATHER_ALTERNATING)
{
- if (!FuncIsActiveTask(sub_80AECA8))
- sub_80AED28();
- weather = gUnknown_02038BC4;
+ if (!FuncIsActiveTask(Task_DoAlternatingWeather))
+ CreateAlternatingWeatherTask();
+ weather = gCurrentAlternatingWeather;
}
else
{
- if (FuncIsActiveTask(sub_80AECA8))
- DestroyTask(FindTaskIdByFunc(sub_80AECA8));
- gUnknown_02038BC4 = WEATHER_RAIN_HEAVY;
+ if (FuncIsActiveTask(Task_DoAlternatingWeather))
+ DestroyTask(FindTaskIdByFunc(Task_DoAlternatingWeather));
+ gCurrentAlternatingWeather = WEATHER_RAIN_HEAVY;
}
- sub_80AB104(weather);
+ SetCurrentAndNextWeather(weather);
}
static const u8 sWeatherCycleRoute119[] =
@@ -2434,25 +2435,25 @@ static u8 TranslateWeatherNum(u8 weather)
{
switch (weather)
{
- case WEATHER_NONE: return WEATHER_NONE;
- case WEATHER_CLOUDS: return WEATHER_CLOUDS;
- case WEATHER_SUNNY: return WEATHER_SUNNY;
- case WEATHER_RAIN_LIGHT: return WEATHER_RAIN_LIGHT;
- case WEATHER_SNOW: return WEATHER_SNOW;
- case WEATHER_RAIN_MED: return WEATHER_RAIN_MED;
- case WEATHER_FOG_1: return WEATHER_FOG_1;
- case WEATHER_ASH: return WEATHER_ASH;
- case WEATHER_SANDSTORM: return WEATHER_SANDSTORM;
- case WEATHER_FOG_2: return WEATHER_FOG_2;
- case WEATHER_FOG_3: return WEATHER_FOG_3;
- case WEATHER_SHADE: return WEATHER_SHADE;
- case WEATHER_DROUGHT: return WEATHER_DROUGHT;
- case WEATHER_RAIN_HEAVY: return WEATHER_RAIN_HEAVY;
- case WEATHER_BUBBLES: return WEATHER_BUBBLES;
- case WEATHER_15: return WEATHER_15;
+ case WEATHER_NONE: return WEATHER_NONE;
+ case WEATHER_CLOUDS: return WEATHER_CLOUDS;
+ case WEATHER_SUNNY: return WEATHER_SUNNY;
+ case WEATHER_RAIN_LIGHT: return WEATHER_RAIN_LIGHT;
+ case WEATHER_SNOW: return WEATHER_SNOW;
+ case WEATHER_RAIN_MED: return WEATHER_RAIN_MED;
+ case WEATHER_FOG_1: return WEATHER_FOG_1;
+ case WEATHER_ASH: return WEATHER_ASH;
+ case WEATHER_SANDSTORM: return WEATHER_SANDSTORM;
+ case WEATHER_FOG_2: return WEATHER_FOG_2;
+ case WEATHER_FOG_3: return WEATHER_FOG_3;
+ case WEATHER_SHADE: return WEATHER_SHADE;
+ case WEATHER_DROUGHT: return WEATHER_DROUGHT;
+ case WEATHER_RAIN_HEAVY: return WEATHER_RAIN_HEAVY;
+ case WEATHER_BUBBLES: return WEATHER_BUBBLES;
+ case WEATHER_ALTERNATING: return WEATHER_ALTERNATING;
case WEATHER_ROUTE119_CYCLE: return sWeatherCycleRoute119[gSaveBlock1Ptr->weatherCycleStage];
case WEATHER_ROUTE123_CYCLE: return sWeatherCycleRoute123[gSaveBlock1Ptr->weatherCycleStage];
- default: return WEATHER_NONE;
+ default: return WEATHER_NONE;
}
}
diff --git a/src/fieldmap.c b/src/fieldmap.c
index 7d9d079fc..cf5f0356e 100644
--- a/src/fieldmap.c
+++ b/src/fieldmap.c
@@ -53,7 +53,7 @@ void InitMap(void)
{
InitMapLayoutData(&gMapHeader);
sub_80E8EE0(gMapHeader.events);
- mapheader_run_script_with_tag_x1();
+ RunOnLoadMapScript();
}
void InitMapFromSavedGame(void)
@@ -62,7 +62,7 @@ void InitMapFromSavedGame(void)
sub_80E9238(0);
sub_80E8EE0(gMapHeader.events);
LoadSavedMapView();
- mapheader_run_script_with_tag_x1();
+ RunOnLoadMapScript();
UpdateTVScreensOnMap(gBackupMapLayout.width, gBackupMapLayout.height);
}
@@ -775,7 +775,7 @@ bool8 CameraMove(int x, int y)
old_y = gSaveBlock1Ptr->pos.y;
connection = sub_8088950(direction, gSaveBlock1Ptr->pos.x, gSaveBlock1Ptr->pos.y);
sub_80887F8(connection, direction, x, y);
- mliX_load_map(connection->mapGroup, connection->mapNum);
+ LoadMapFromCameraTransition(connection->mapGroup, connection->mapNum);
gCamera.active = TRUE;
gCamera.x = old_x - gSaveBlock1Ptr->pos.x;
gCamera.y = old_y - gSaveBlock1Ptr->pos.y;
diff --git a/src/overworld.c b/src/overworld.c
index 08fd94c1b..a10d1e17a 100644
--- a/src/overworld.c
+++ b/src/overworld.c
@@ -761,7 +761,7 @@ static bool8 SetDiveWarp(u8 dir, u16 x, u16 y)
}
else
{
- mapheader_run_script_with_tag_x6();
+ RunOnDiveWarpMapScript();
if (IsDummyWarp(&gFixedDiveWarp))
return FALSE;
SetWarpDestinationToDiveWarp();
@@ -779,7 +779,7 @@ bool8 SetDiveWarpDive(u16 x, u16 y)
return SetDiveWarp(CONNECTION_DIVE, x, y);
}
-void mliX_load_map(u8 mapGroup, u8 mapNum)
+void LoadMapFromCameraTransition(u8 mapGroup, u8 mapNum)
{
s32 paletteIndex;
@@ -800,7 +800,7 @@ void mliX_load_map(u8 mapGroup, u8 mapNum)
ChooseAmbientCrySpecies();
SetDefaultFlashLevel();
Overworld_ClearSavedMusic();
- mapheader_run_script_with_tag_x3();
+ RunOnTransitionMapScript();
InitMap();
copy_map_tileset2_to_vram_2(gMapHeader.mapLayout);
apply_map_tileset2_palette(gMapHeader.mapLayout);
@@ -813,7 +813,7 @@ void mliX_load_map(u8 mapGroup, u8 mapNum)
RoamerMove();
DoCurrentWeather();
ResetFieldTasksArgs();
- mapheader_run_script_with_tag_x5();
+ RunOnResumeMapScript();
if (gMapHeader.regionMapSectionId != MAPSEC_BATTLE_FRONTIER || gMapHeader.regionMapSectionId != sLastMapSectionId)
ShowMapNamePopup();
@@ -852,7 +852,7 @@ static void mli0_load_map(u32 a1)
FlagClear(FLAG_SYS_USE_FLASH);
SetDefaultFlashLevel();
Overworld_ClearSavedMusic();
- mapheader_run_script_with_tag_x3();
+ RunOnTransitionMapScript();
UpdateLocationHistoryForRoamer();
RoamerMoveToOtherLocationSet();
if (gMapHeader.mapLayoutId == LAYOUT_BATTLE_FRONTIER_BATTLE_PYRAMID_EMPTY_SQUARE)
@@ -2123,10 +2123,10 @@ static void sub_8086988(u32 a1)
FieldEffectActiveListClear();
StartWeather();
- sub_80AEE84();
+ ResumePausedWeather();
if (!a1)
SetUpFieldTasks();
- mapheader_run_script_with_tag_x5();
+ RunOnResumeMapScript();
TryStartMirageTowerPulseBlendEffect();
}
@@ -2136,7 +2136,7 @@ static void sub_80869DC(void)
gTotalCameraPixelOffsetY = 0;
ResetEventObjects();
TrySpawnEventObjects(0, 0);
- mapheader_run_first_tag4_script_list_match();
+ TryRunOnWarpIntoMapScript();
}
static void mli4_mapscripts_and_other(void)
@@ -2153,14 +2153,14 @@ static void mli4_mapscripts_and_other(void)
SetPlayerAvatarTransitionFlags(player->transitionFlags);
ResetInitialPlayerAvatarState();
TrySpawnEventObjects(0, 0);
- mapheader_run_first_tag4_script_list_match();
+ TryRunOnWarpIntoMapScript();
}
static void sub_8086A68(void)
{
sub_808E16C(0, 0);
RotatingGate_InitPuzzleAndGraphics();
- mapheader_run_script_with_tag_x7();
+ RunOnReturnToFieldMapScript();
}
static void sub_8086A80(void)
diff --git a/src/rom_8011DC0.c b/src/rom_8011DC0.c
index baed26cf8..c8adfbe0b 100644
--- a/src/rom_8011DC0.c
+++ b/src/rom_8011DC0.c
@@ -1630,7 +1630,7 @@ void sub_8014210(u16 battleFlags)
void sub_8014290(u16 arg0, u16 x, u16 y)
{
- VarSet(VAR_0x4087, arg0);
+ VarSet(VAR_CABLE_CLUB_STATE, arg0);
SetWarpDestination(gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, -1, x, y);
SetDynamicWarpWithCoords(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, -1, x, y);
WarpIntoMap();
@@ -1639,7 +1639,7 @@ void sub_8014290(u16 arg0, u16 x, u16 y)
void sub_8014304(s8 mapGroup, s8 mapNum, s32 x, s32 y, u16 arg4)
{
gSpecialVar_0x8004 = arg4;
- VarSet(VAR_0x4087, arg4);
+ VarSet(VAR_CABLE_CLUB_STATE, arg4);
gFieldLinkPlayerCount = GetLinkPlayerCount();
gUnknown_03005DB4 = GetMultiplayerId();
SetCableClubWarp();
diff --git a/src/script.c b/src/script.c
index c61ae7183..c95a1141f 100644
--- a/src/script.c
+++ b/src/script.c
@@ -2,6 +2,7 @@
#include "script.h"
#include "event_data.h"
#include "util.h"
+#include "constants/map_scripts.h"
#define RAM_SCRIPT_MAGIC 51
@@ -241,7 +242,7 @@ void ScriptContext2_RunNewScript(const u8 *ptr)
while (RunScriptCommand(&sScriptContext2) == TRUE);
}
-u8 *mapheader_get_tagged_pointer(u8 tag)
+u8 *MapHeaderGetScriptTable(u8 tag)
{
const u8 *mapScripts = gMapHeader.mapScripts;
@@ -261,16 +262,16 @@ u8 *mapheader_get_tagged_pointer(u8 tag)
}
}
-void mapheader_run_script_by_tag(u8 tag)
+void MapHeaderRunScriptType(u8 tag)
{
- u8 *ptr = mapheader_get_tagged_pointer(tag);
+ u8 *ptr = MapHeaderGetScriptTable(tag);
if (ptr)
ScriptContext2_RunNewScript(ptr);
}
-u8 *mapheader_get_first_match_from_tagged_ptr_list(u8 tag)
+u8 *MapHeaderCheckScriptTable(u8 tag)
{
- u8 *ptr = mapheader_get_tagged_pointer(tag);
+ u8 *ptr = MapHeaderGetScriptTable(tag);
if (!ptr)
return NULL;
@@ -291,45 +292,45 @@ u8 *mapheader_get_first_match_from_tagged_ptr_list(u8 tag)
}
}
-void mapheader_run_script_with_tag_x1(void)
+void RunOnLoadMapScript(void)
{
- mapheader_run_script_by_tag(1);
+ MapHeaderRunScriptType(MAP_SCRIPT_ON_LOAD);
}
-void mapheader_run_script_with_tag_x3(void)
+void RunOnTransitionMapScript(void)
{
- mapheader_run_script_by_tag(3);
+ MapHeaderRunScriptType(MAP_SCRIPT_ON_TRANSITION);
}
-void mapheader_run_script_with_tag_x5(void)
+void RunOnResumeMapScript(void)
{
- mapheader_run_script_by_tag(5);
+ MapHeaderRunScriptType(MAP_SCRIPT_ON_RESUME);
}
-void mapheader_run_script_with_tag_x7(void)
+void RunOnReturnToFieldMapScript(void)
{
- mapheader_run_script_by_tag(7);
+ MapHeaderRunScriptType(MAP_SCRIPT_ON_RETURN_TO_FIELD);
}
-void mapheader_run_script_with_tag_x6(void)
+void RunOnDiveWarpMapScript(void)
{
- mapheader_run_script_by_tag(6);
+ MapHeaderRunScriptType(MAP_SCRIPT_ON_DIVE_WARP);
}
-bool8 mapheader_run_first_tag2_script_list_match(void)
+bool8 TryRunOnFrameMapScript(void)
{
- u8 *ptr = mapheader_get_first_match_from_tagged_ptr_list(2);
+ u8 *ptr = MapHeaderCheckScriptTable(MAP_SCRIPT_ON_FRAME_TABLE);
if (!ptr)
- return 0;
+ return FALSE;
ScriptContext1_SetupScript(ptr);
- return 1;
+ return TRUE;
}
-void mapheader_run_first_tag4_script_list_match(void)
+void TryRunOnWarpIntoMapScript(void)
{
- u8 *ptr = mapheader_get_first_match_from_tagged_ptr_list(4);
+ u8 *ptr = MapHeaderCheckScriptTable(MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE);
if (ptr)
ScriptContext2_RunNewScript(ptr);
}
diff --git a/src/start_menu.c b/src/start_menu.c
index d5eec76d2..6efd7a04a 100644
--- a/src/start_menu.c
+++ b/src/start_menu.c
@@ -91,7 +91,7 @@ extern void sub_80AF688(void);
extern void var_800D_set_xB(void);
extern void sub_808B864(void);
extern void CB2_Pokedex(void);
-extern void PlayRainSoundEffect(void);
+extern void PlayRainStoppingSoundEffect(void);
extern void CB2_PokeNav(void);
extern void ScriptUnfreezeEventObjects(void);
extern void save_serialize_map(void);
@@ -608,7 +608,7 @@ static bool8 StartMenuPokedexCallback(void)
if (!gPaletteFade.active)
{
IncrementGameStat(GAME_STAT_CHECKED_POKEDEX);
- PlayRainSoundEffect();
+ PlayRainStoppingSoundEffect();
RemoveExtraStartMenuWindows();
CleanupOverworldWindowsAndTilemaps();
SetMainCallback2(CB2_Pokedex);
@@ -623,7 +623,7 @@ static bool8 StartMenuPokemonCallback(void)
{
if (!gPaletteFade.active)
{
- PlayRainSoundEffect();
+ PlayRainStoppingSoundEffect();
RemoveExtraStartMenuWindows();
CleanupOverworldWindowsAndTilemaps();
SetMainCallback2(CB2_PartyMenuFromStartMenu); // Display party menu
@@ -638,7 +638,7 @@ static bool8 StartMenuBagCallback(void)
{
if (!gPaletteFade.active)
{
- PlayRainSoundEffect();
+ PlayRainStoppingSoundEffect();
RemoveExtraStartMenuWindows();
CleanupOverworldWindowsAndTilemaps();
SetMainCallback2(CB2_BagMenuFromStartMenu); // Display bag menu
@@ -653,7 +653,7 @@ static bool8 StartMenuPokeNavCallback(void)
{
if (!gPaletteFade.active)
{
- PlayRainSoundEffect();
+ PlayRainStoppingSoundEffect();
RemoveExtraStartMenuWindows();
CleanupOverworldWindowsAndTilemaps();
SetMainCallback2(CB2_PokeNav); // Display PokeNav
@@ -668,7 +668,7 @@ static bool8 StartMenuPlayerNameCallback(void)
{
if (!gPaletteFade.active)
{
- PlayRainSoundEffect();
+ PlayRainStoppingSoundEffect();
RemoveExtraStartMenuWindows();
CleanupOverworldWindowsAndTilemaps();
@@ -699,7 +699,7 @@ static bool8 StartMenuOptionCallback(void)
{
if (!gPaletteFade.active)
{
- PlayRainSoundEffect();
+ PlayRainStoppingSoundEffect();
RemoveExtraStartMenuWindows();
CleanupOverworldWindowsAndTilemaps();
SetMainCallback2(CB2_InitOptionMenu); // Display option menu
@@ -732,7 +732,7 @@ static bool8 StartMenuLinkModePlayerNameCallback(void)
{
if (!gPaletteFade.active)
{
- PlayRainSoundEffect();
+ PlayRainStoppingSoundEffect();
CleanupOverworldWindowsAndTilemaps();
ShowTrainerCardInLink(gUnknown_03005DB4, CB2_ReturnToFieldWithOpenMenu);
@@ -761,7 +761,7 @@ static bool8 StartMenuBattlePyramidBagCallback(void)
{
if (!gPaletteFade.active)
{
- PlayRainSoundEffect();
+ PlayRainStoppingSoundEffect();
RemoveExtraStartMenuWindows();
CleanupOverworldWindowsAndTilemaps();
SetMainCallback2(CB2_PyramidBagMenuFromStartMenu);
diff --git a/src/trainer_hill.c b/src/trainer_hill.c
index efe11b0c7..42b196abd 100644
--- a/src/trainer_hill.c
+++ b/src/trainer_hill.c
@@ -796,7 +796,7 @@ void sub_81D5FB4(u16 *mapArg)
dst += 31;
}
- mapheader_run_script_with_tag_x1();
+ RunOnLoadMapScript();
FreeDataStruct();
}
diff --git a/src/tv.c b/src/tv.c
index 5904efeb8..248721083 100644
--- a/src/tv.c
+++ b/src/tv.c
@@ -3603,7 +3603,7 @@ void GetMomOrDadStringForTVMessage(void)
void sub_80F01B8(void)
{
- VarSet(VAR_0x40BC, 0);
+ VarSet(VAR_BRAVO_TRAINER_BATTLE_TOWER_ON, 0);
RemoveEventObjectByLocalIdAndMap(5, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup);
FlagSet(FLAG_HIDE_BATTLE_TOWER_REPORTER);
}