summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2019-05-14 17:35:04 -0400
committerPikalaxALT <pikalaxalt@gmail.com>2019-05-14 17:35:04 -0400
commit9a464931d207da83d3fb582e35821ba50ced6afc (patch)
treeb68876fba8f847b3f81b4bd65f40fcd55997f85e
parent15c153273b5e643bf049a941c0ec0ceb5a9b54d6 (diff)
Replace some hardcoded flags/vars
-rw-r--r--data/maps/BirthIsland_Exterior/scripts.inc8
-rw-r--r--data/maps/CeladonCity_Condominiums_1F/scripts.inc2
-rw-r--r--data/maps/CeladonCity_GameCorner_PrizeRoom/scripts.inc24
-rw-r--r--data/maps/CeladonCity_Gym/scripts.inc4
-rw-r--r--data/maps/CeruleanCave_B1F/scripts.inc6
-rw-r--r--data/maps/CeruleanCity/scripts.inc2
-rw-r--r--data/maps/CeruleanCity_Gym/scripts.inc4
-rw-r--r--data/maps/CeruleanCity_House5/scripts.inc2
-rw-r--r--data/maps/CinnabarIsland_Gym/scripts.inc12
-rw-r--r--data/maps/FiveIsland_LostCave_Room10/scripts.inc4
-rw-r--r--data/maps/FiveIsland_RocketWarehouse/scripts.inc4
-rw-r--r--data/maps/FourIsland/scripts.inc2
-rw-r--r--data/maps/IndigoPlateau_PokemonCenter_1F/scripts.inc4
-rw-r--r--data/maps/MtEmber_Exterior/scripts.inc8
-rw-r--r--data/maps/MtEmber_Summit/scripts.inc6
-rw-r--r--data/maps/MtMoon_B2F/scripts.inc2
-rw-r--r--data/maps/NavelRock_Base/scripts.inc6
-rw-r--r--data/maps/NavelRock_Summit/scripts.inc6
-rw-r--r--data/maps/OneIsland/scripts.inc2
-rw-r--r--data/maps/OneIsland_PokemonCenter_1F/scripts.inc18
-rw-r--r--data/maps/PalletTown/scripts.inc4
-rw-r--r--data/maps/PalletTown_GarysHouse/scripts.inc2
-rw-r--r--data/maps/PalletTown_ProfessorOaksLab/scripts.inc18
-rw-r--r--data/maps/PewterCity/scripts.inc2
-rw-r--r--data/maps/PokemonLeague_AgathasRoom/scripts.inc8
-rw-r--r--data/maps/PokemonLeague_BrunosRoom/scripts.inc8
-rw-r--r--data/maps/PokemonLeague_ChampionsRoom/scripts.inc20
-rw-r--r--data/maps/PokemonLeague_LancesRoom/scripts.inc8
-rw-r--r--data/maps/PokemonLeague_LoreleisRoom/scripts.inc8
-rw-r--r--data/maps/PowerPlant/scripts.inc14
-rw-r--r--data/maps/RocketHideout_B1F/scripts.inc2
-rw-r--r--data/maps/RocketHideout_B4F/scripts.inc12
-rw-r--r--data/maps/Route12/scripts.inc6
-rw-r--r--data/maps/Route16/scripts.inc8
-rw-r--r--data/maps/Route16_NorthEntrance_1F/scripts.inc2
-rw-r--r--data/maps/Route18/scripts.inc2
-rw-r--r--data/maps/Route18_EastEntrance_1F/scripts.inc2
-rw-r--r--data/maps/Route25_SeaCottage/scripts.inc2
-rw-r--r--data/maps/SaffronCity_Dojo/scripts.inc6
-rw-r--r--data/maps/SaffronCity_Gym/scripts.inc4
-rw-r--r--data/maps/SeafoamIslands_B4F/scripts.inc6
-rw-r--r--data/maps/SevenIsland_SeavaultCanyon_TanobyKey/scripts.inc4
-rw-r--r--data/maps/ThreeIsland_Port/scripts.inc2
-rw-r--r--data/maps/TwoIsland/scripts.inc4
-rw-r--r--data/maps/VermilionCity/scripts.inc4
-rw-r--r--data/maps/VermilionCity_Gym/scripts.inc4
-rw-r--r--data/maps/VermilionCity_PokemonFanClub/scripts.inc2
-rw-r--r--data/maps/ViridianCity/scripts.inc8
-rw-r--r--data/maps/ViridianCity_Gym/scripts.inc4
-rw-r--r--data/maps/ViridianCity_Mart/scripts.inc2
-rw-r--r--include/constants/flags.h26
51 files changed, 178 insertions, 152 deletions
diff --git a/data/maps/BirthIsland_Exterior/scripts.inc b/data/maps/BirthIsland_Exterior/scripts.inc
index 269dbea5b..5c5460119 100644
--- a/data/maps/BirthIsland_Exterior/scripts.inc
+++ b/data/maps/BirthIsland_Exterior/scripts.inc
@@ -28,11 +28,11 @@ EventScript_165243:: @ 8165243
checkflag FLAG_0x2F7
goto_if 1, EventScript_1A77A9
clearflag FLAG_0x09A
- clearflag 2120
+ clearflag FLAG_0x848
return
BirthIsland_Exterior_MapScript2_165253:: @ 8165253
- checkflag 2055
+ checkflag FLAG_0x807
call_if 1, EventScript_16525D
end
@@ -95,10 +95,10 @@ EventScript_1652C0:: @ 81652C0
setvar VAR_0x8005, 30
setvar VAR_0x8006, 0
special sub_8044838
- setflag 2055
+ setflag FLAG_0x807
special sub_807F9D8
waitstate
- clearflag 2055
+ clearflag FLAG_0x807
specialvar VAR_RESULT, sub_80CA74C
compare_var_to_value VAR_RESULT, 1
goto_if 1, EventScript_16533A
diff --git a/data/maps/CeladonCity_Condominiums_1F/scripts.inc b/data/maps/CeladonCity_Condominiums_1F/scripts.inc
index e30e70186..0e1708b0d 100644
--- a/data/maps/CeladonCity_Condominiums_1F/scripts.inc
+++ b/data/maps/CeladonCity_Condominiums_1F/scripts.inc
@@ -6,7 +6,7 @@ CeladonCity_Condominiums_1F_EventScript_16C321:: @ 816C321
faceplayer
checkflag FLAG_0x2F8
goto_if 1, EventScript_16C36A
- checkflag 2092
+ checkflag FLAG_0x82C
goto_if 1, EventScript_16C374
checkflag FLAG_0x2A6
goto_if 1, EventScript_16C36A
diff --git a/data/maps/CeladonCity_GameCorner_PrizeRoom/scripts.inc b/data/maps/CeladonCity_GameCorner_PrizeRoom/scripts.inc
index e6973ddf3..60570bbbf 100644
--- a/data/maps/CeladonCity_GameCorner_PrizeRoom/scripts.inc
+++ b/data/maps/CeladonCity_GameCorner_PrizeRoom/scripts.inc
@@ -82,7 +82,7 @@ EventScript_16CC55:: @ 816CC55
end
EventScript_16CC65:: @ 816CC65
- getspeciesname 0, 16385
+ getspeciesname 0, VAR_0x4001
loadword 0, gUnknown_819709D
callstd 5
compare_var_to_value VAR_RESULT, 0
@@ -107,32 +107,32 @@ EventScript_16CC65:: @ 816CC65
end
EventScript_16CCD4:: @ 816CCD4
- givemon 16385, 9, ITEM_NONE, 0, 0, 0
+ givemon VAR_0x4001, 9, ITEM_NONE, 0, 0, 0
goto EventScript_16CD52
end
EventScript_16CCE9:: @ 816CCE9
- givemon 16385, 8, ITEM_NONE, 0, 0, 0
+ givemon VAR_0x4001, 8, ITEM_NONE, 0, 0, 0
goto EventScript_16CD52
end
EventScript_16CCFE:: @ 816CCFE
- givemon 16385, 18, ITEM_NONE, 0, 0, 0
+ givemon VAR_0x4001, 18, ITEM_NONE, 0, 0, 0
goto EventScript_16CD52
end
EventScript_16CD13:: @ 816CD13
- givemon 16385, 25, ITEM_NONE, 0, 0, 0
+ givemon VAR_0x4001, 25, ITEM_NONE, 0, 0, 0
goto EventScript_16CD52
end
EventScript_16CD28:: @ 816CD28
- givemon 16385, 26, ITEM_NONE, 0, 0, 0
+ givemon VAR_0x4001, 26, ITEM_NONE, 0, 0, 0
goto EventScript_16CD52
end
EventScript_16CD3D:: @ 816CD3D
- givemon 16385, 18, ITEM_NONE, 0, 0, 0
+ givemon VAR_0x4001, 18, ITEM_NONE, 0, 0, 0
goto EventScript_16CD52
end
@@ -177,7 +177,7 @@ EventScript_16CDA5:: @ 816CDA5
EventScript_16CDB3:: @ 816CDB3
takecoins VAR_0x4002
updatecoinsbox 0, 5
- getspeciesname 0, 16385
+ getspeciesname 0, VAR_0x4001
playfanfare MUS_FANFA1
message Text_1A5DF1
waitmessage
@@ -192,7 +192,7 @@ EventScript_16CDB3:: @ 816CDB3
EventScript_16CDE0:: @ 816CDE0
takecoins VAR_0x4002
updatecoinsbox 0, 5
- getspeciesname 0, 16385
+ getspeciesname 0, VAR_0x4001
playfanfare MUS_FANFA1
message Text_1A5DF1
waitmessage
@@ -289,7 +289,7 @@ EventScript_16CF09:: @ 816CF09
end
EventScript_16CF22:: @ 816CF22
- getitemname 0, 16385
+ getitemname 0, VAR_0x4001
loadword 0, gUnknown_819709D
callstd 5
compare_var_to_value VAR_RESULT, 0
@@ -298,11 +298,11 @@ EventScript_16CF22:: @ 816CF22
end
EventScript_16CF3F:: @ 816CF3F
- getitemname 0, 16385
+ getitemname 0, VAR_0x4001
checkcoins VAR_RESULT
compare_var_to_var VAR_RESULT, VAR_0x4002
goto_if 0, EventScript_16CDA5
- checkitemspace 16385, 1
+ checkitemspace VAR_0x4001, 1
compare_var_to_value VAR_RESULT, 0
goto_if 1, EventScript_16CF79
takecoins VAR_0x4002
diff --git a/data/maps/CeladonCity_Gym/scripts.inc b/data/maps/CeladonCity_Gym/scripts.inc
index 5b8d3ec3c..de2ed3f54 100644
--- a/data/maps/CeladonCity_Gym/scripts.inc
+++ b/data/maps/CeladonCity_Gym/scripts.inc
@@ -22,7 +22,7 @@ EventScript_16D0A0:: @ 816D0A0
special SetFlavorTextFlagFromSpecialVars
clearflag FLAG_0x09E
setflag FLAG_0x4B3
- setflag 2083
+ setflag FLAG_0x823
setvar VAR_0x8008, 4
call EventScript_1A6B18
goto EventScript_16D0C6
@@ -102,7 +102,7 @@ CeladonCity_Gym_EventScript_16D1B5:: @ 816D1B5
CeladonCity_Gym_EventScript_16D1CC:: @ 816D1CC
lockall
- checkflag 2083
+ checkflag FLAG_0x823
goto_if 1, EventScript_16D1E0
loadword 0, gUnknown_8197874
callstd 4
diff --git a/data/maps/CeruleanCave_B1F/scripts.inc b/data/maps/CeruleanCave_B1F/scripts.inc
index 433266be7..5f80fe18f 100644
--- a/data/maps/CeruleanCave_B1F/scripts.inc
+++ b/data/maps/CeruleanCave_B1F/scripts.inc
@@ -4,7 +4,7 @@ CeruleanCave_B1F_MapScripts:: @ 81624BE
.byte 0
CeruleanCave_B1F_MapScript1_1624C9:: @ 81624C9
- checkflag 2055
+ checkflag FLAG_0x807
call_if 1, EventScript_1624D3
end
@@ -40,10 +40,10 @@ CeruleanCave_B1F_EventScript_1624F5:: @ 81624F5
playbgm BGM_FRLG_LEADER_EYE, 0
waitbuttonpress
setwildbattle SPECIES_MEWTWO, 70, ITEM_NONE
- setflag 2055
+ setflag FLAG_0x807
special sub_807F9D8
waitstate
- clearflag 2055
+ clearflag FLAG_0x807
specialvar VAR_RESULT, sub_80CA74C
compare_var_to_value VAR_RESULT, 1
goto_if 1, EventScript_162558
diff --git a/data/maps/CeruleanCity/scripts.inc b/data/maps/CeruleanCity/scripts.inc
index dd13a913d..f2f773d22 100644
--- a/data/maps/CeruleanCity/scripts.inc
+++ b/data/maps/CeruleanCity/scripts.inc
@@ -179,7 +179,7 @@ Movement_1665FB:: @ 81665FB
CeruleanCity_EventScript_166603:: @ 8166603
lock
faceplayer
- checktrainerflag 355
+ checktrainerflag FLAG_0x163
goto_if 1, EventScript_16662E
message Text_17EE0E
waitmessage
diff --git a/data/maps/CeruleanCity_Gym/scripts.inc b/data/maps/CeruleanCity_Gym/scripts.inc
index 46a11bc54..7dec220b6 100644
--- a/data/maps/CeruleanCity_Gym/scripts.inc
+++ b/data/maps/CeruleanCity_Gym/scripts.inc
@@ -18,7 +18,7 @@ EventScript_16AAD3:: @ 816AAD3
setvar VAR_0x8005, 1
special SetFlavorTextFlagFromSpecialVars
setflag FLAG_0x4B1
- setflag 2081
+ setflag FLAG_0x821
setrespawn 4
setvar VAR_0x8008, 2
call EventScript_1A6B18
@@ -82,7 +82,7 @@ EventScript_16AB94:: @ 816AB94
CeruleanCity_Gym_EventScript_16AB9E:: @ 816AB9E
lockall
- checkflag 2081
+ checkflag FLAG_0x821
goto_if 1, EventScript_16ABB2
loadword 0, gUnknown_81926E1
callstd 4
diff --git a/data/maps/CeruleanCity_House5/scripts.inc b/data/maps/CeruleanCity_House5/scripts.inc
index 438ee6859..fdbe6956a 100644
--- a/data/maps/CeruleanCity_House5/scripts.inc
+++ b/data/maps/CeruleanCity_House5/scripts.inc
@@ -10,7 +10,7 @@ CeruleanCity_House5_EventScript_16AE50:: @ 816AE50
callstd 5
compare_var_to_value VAR_RESULT, 0
goto_if 1, EventScript_16AEAD
- checkflag 2119
+ checkflag FLAG_0x847
goto_if 0, EventScript_16AEA3
loadword 0, gUnknown_8193003
callstd 4
diff --git a/data/maps/CinnabarIsland_Gym/scripts.inc b/data/maps/CinnabarIsland_Gym/scripts.inc
index 7b22015d0..a5397c97a 100644
--- a/data/maps/CinnabarIsland_Gym/scripts.inc
+++ b/data/maps/CinnabarIsland_Gym/scripts.inc
@@ -299,7 +299,7 @@ EventScript_16DC68:: @ 816DC68
EventScript_16DC6A:: @ 816DC6A
call EventScript_16DC34
- checktrainerflag 213
+ checktrainerflag FLAG_0x0D5
goto_if 0, EventScript_16DC7A
releaseall
end
@@ -381,7 +381,7 @@ EventScript_16DD31:: @ 816DD31
EventScript_16DD41:: @ 816DD41
call EventScript_16DC34
- checktrainerflag 178
+ checktrainerflag FLAG_0x0B2
goto_if 0, EventScript_16DD51
releaseall
end
@@ -472,7 +472,7 @@ EventScript_16DE0F:: @ 816DE0F
EventScript_16DE1F:: @ 816DE1F
call EventScript_16DC34
- checktrainerflag 214
+ checktrainerflag FLAG_0x0D6
goto_if 0, EventScript_16DE2F
releaseall
end
@@ -554,7 +554,7 @@ EventScript_16DEE6:: @ 816DEE6
EventScript_16DEF6:: @ 816DEF6
call EventScript_16DC34
- checktrainerflag 179
+ checktrainerflag FLAG_0x0B3
goto_if 0, EventScript_16DF06
releaseall
end
@@ -636,7 +636,7 @@ EventScript_16DFBD:: @ 816DFBD
EventScript_16DFCD:: @ 816DFCD
call EventScript_16DC34
- checktrainerflag 215
+ checktrainerflag FLAG_0x0D7
goto_if 0, EventScript_16DFDD
releaseall
end
@@ -718,7 +718,7 @@ EventScript_16E094:: @ 816E094
EventScript_16E0A4:: @ 816E0A4
call EventScript_16DC34
- checktrainerflag 180
+ checktrainerflag FLAG_0x0B4
goto_if 0, EventScript_16E0B4
releaseall
end
diff --git a/data/maps/FiveIsland_LostCave_Room10/scripts.inc b/data/maps/FiveIsland_LostCave_Room10/scripts.inc
index 14622ea67..c13f2f97e 100644
--- a/data/maps/FiveIsland_LostCave_Room10/scripts.inc
+++ b/data/maps/FiveIsland_LostCave_Room10/scripts.inc
@@ -4,7 +4,7 @@ FiveIsland_LostCave_Room10_MapScripts:: @ 8164C2D
.byte 0
FiveIsland_LostCave_Room10_MapScript1_164C38:: @ 8164C38
- checktrainerflag 606
+ checktrainerflag FLAG_0x25E
call_if 1, EventScript_164C42
end
@@ -47,7 +47,7 @@ EventScript_164CA5:: @ 8164CA5
return
EventScript_164CB6:: @ 8164CB6
- settrainerflag 606
+ settrainerflag FLAG_0x25E
call EventScript_164CA5
releaseall
end
diff --git a/data/maps/FiveIsland_RocketWarehouse/scripts.inc b/data/maps/FiveIsland_RocketWarehouse/scripts.inc
index fc1753562..9b6492471 100644
--- a/data/maps/FiveIsland_RocketWarehouse/scripts.inc
+++ b/data/maps/FiveIsland_RocketWarehouse/scripts.inc
@@ -8,7 +8,7 @@ FiveIsland_RocketWarehouse_MapScript2_163F39:: @ 8163F39
end
FiveIsland_RocketWarehouse_MapScript1_163F3D:: @ 8163F3D
- checktrainerflag 543
+ checktrainerflag FLAG_0x21F
call_if 1, EventScript_163F47
end
@@ -47,7 +47,7 @@ FiveIsland_RocketWarehouse_EventScript_163F81:: @ 8163F81
FiveIsland_RocketWarehouse_EventScript_163F93:: @ 8163F93
trainerbattle 2, 545, 0, Text_17BBAF, Text_17BC55, EventScript_163FCD
- checkflag 2116
+ checkflag FLAG_0x844
goto_if 1, EventScript_163FB7
loadword 0, gUnknown_817BCA3
callstd 6
diff --git a/data/maps/FourIsland/scripts.inc b/data/maps/FourIsland/scripts.inc
index 97ebe39ec..8e425a1bc 100644
--- a/data/maps/FourIsland/scripts.inc
+++ b/data/maps/FourIsland/scripts.inc
@@ -151,7 +151,7 @@ EventScript_167E19:: @ 8167E19
FourIsland_EventScript_167E2E:: @ 8167E2E
lock
faceplayer
- checkflag 2116
+ checkflag FLAG_0x844
goto_if 1, EventScript_167E43
loadword 0, gUnknown_8182A2B
callstd 4
diff --git a/data/maps/IndigoPlateau_PokemonCenter_1F/scripts.inc b/data/maps/IndigoPlateau_PokemonCenter_1F/scripts.inc
index 91257ef5a..a8db66421 100644
--- a/data/maps/IndigoPlateau_PokemonCenter_1F/scripts.inc
+++ b/data/maps/IndigoPlateau_PokemonCenter_1F/scripts.inc
@@ -11,7 +11,7 @@ IndigoPlateau_PokemonCenter_1F_MapScript1_16EA65:: @ 816EA65
end
EventScript_16EA79:: @ 816EA79
- checkflag 2116
+ checkflag FLAG_0x844
goto_if 1, EventScript_1A77A9
setobjectxyperm 4, 4, 2
return
@@ -28,7 +28,7 @@ IndigoPlateau_PokemonCenter_1F_EventScript_16EA8A:: @ 816EA8A
end
EventScript_16EAA6:: @ 816EAA6
- checkflag 2116
+ checkflag FLAG_0x844
goto_if 1, EventScript_16EAB9
loadword 0, gUnknown_819A943
callstd 4
diff --git a/data/maps/MtEmber_Exterior/scripts.inc b/data/maps/MtEmber_Exterior/scripts.inc
index 829dfd8a2..8b7cecce8 100644
--- a/data/maps/MtEmber_Exterior/scripts.inc
+++ b/data/maps/MtEmber_Exterior/scripts.inc
@@ -25,7 +25,7 @@ EventScript_163975:: @ 8163975
MtEmber_Exterior_EventScript_16397F:: @ 816397F
lock
- checktrainerflag 537
+ checktrainerflag FLAG_0x219
goto_if 1, EventScript_16399E
compare_var_to_value VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 4
goto_if 1, EventScript_1639A8
@@ -49,7 +49,7 @@ EventScript_1639A8:: @ 81639A8
trainerbattle 3, 537, 0, Text_17AA34
loadword 0, gUnknown_817AA3F
callstd 4
- checktrainerflag 538
+ checktrainerflag FLAG_0x21A
goto_if 1, EventScript_1639DB
release
end
@@ -68,7 +68,7 @@ EventScript_1639DB:: @ 81639DB
MtEmber_Exterior_EventScript_1639F0:: @ 81639F0
lock
faceplayer
- checktrainerflag 538
+ checktrainerflag FLAG_0x21A
goto_if 1, EventScript_163A1B
compare_var_to_value VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 4
goto_if 1, EventScript_163A25
@@ -93,7 +93,7 @@ EventScript_163A25:: @ 8163A25
trainerbattle 3, 538, 0, Text_17AA8A
loadword 0, gUnknown_817AA99
callstd 4
- checktrainerflag 537
+ checktrainerflag FLAG_0x219
goto_if 1, EventScript_1639DB
release
end
diff --git a/data/maps/MtEmber_Summit/scripts.inc b/data/maps/MtEmber_Summit/scripts.inc
index 4b78fd317..eae1f5d13 100644
--- a/data/maps/MtEmber_Summit/scripts.inc
+++ b/data/maps/MtEmber_Summit/scripts.inc
@@ -4,7 +4,7 @@ MtEmber_Summit_MapScripts:: @ 8163AFC
.byte 0
MtEmber_Summit_MapScript2_163B07:: @ 8163B07
- checkflag 2055
+ checkflag FLAG_0x807
call_if 1, EventScript_163B11
end
@@ -40,10 +40,10 @@ MtEmber_Summit_EventScript_163B33:: @ 8163B33
delay 10
playbgm BGM_FRLG_LEADER_EYE, 0
waitbuttonpress
- setflag 2055
+ setflag FLAG_0x807
special sub_807F9D8
waitstate
- clearflag 2055
+ clearflag FLAG_0x807
specialvar VAR_RESULT, sub_80CA74C
compare_var_to_value VAR_RESULT, 1
goto_if 1, EventScript_163B96
diff --git a/data/maps/MtMoon_B2F/scripts.inc b/data/maps/MtMoon_B2F/scripts.inc
index 399f12386..99a5c392e 100644
--- a/data/maps/MtMoon_B2F/scripts.inc
+++ b/data/maps/MtMoon_B2F/scripts.inc
@@ -25,7 +25,7 @@ MtMoon_B2F_EventScript_1606C2:: @ 81606C2
faceplayer
checkflag FLAG_0x232
goto_if 1, EventScript_160707
- checktrainerflag 170
+ checktrainerflag FLAG_0x0AA
goto_if 1, EventScript_160711
call EventScript_1606DD
release
diff --git a/data/maps/NavelRock_Base/scripts.inc b/data/maps/NavelRock_Base/scripts.inc
index fe051092b..649451b13 100644
--- a/data/maps/NavelRock_Base/scripts.inc
+++ b/data/maps/NavelRock_Base/scripts.inc
@@ -21,7 +21,7 @@ EventScript_165109:: @ 8165109
return
NavelRock_Base_MapScript2_165116:: @ 8165116
- checkflag 2055
+ checkflag FLAG_0x807
call_if 1, EventScript_165120
end
@@ -64,10 +64,10 @@ NavelRock_Base_EventScript_165134:: @ 8165134
setvar VAR_0x8005, 70
setvar VAR_0x8006, 0
special sub_8044838
- setflag 2055
+ setflag FLAG_0x807
special sub_807F9D8
waitstate
- clearflag 2055
+ clearflag FLAG_0x807
specialvar VAR_RESULT, sub_80CA74C
compare_var_to_value VAR_RESULT, 1
goto_if 1, EventScript_1651D9
diff --git a/data/maps/NavelRock_Summit/scripts.inc b/data/maps/NavelRock_Summit/scripts.inc
index d1c48d99b..24fb2e0ce 100644
--- a/data/maps/NavelRock_Summit/scripts.inc
+++ b/data/maps/NavelRock_Summit/scripts.inc
@@ -24,7 +24,7 @@ EventScript_164FC6:: @ 8164FC6
return
NavelRock_Summit_MapScript2_164FDD:: @ 8164FDD
- checkflag 2055
+ checkflag FLAG_0x807
call_if 1, EventScript_164FE7
end
@@ -68,10 +68,10 @@ NavelRock_Summit_EventScript_164FFB:: @ 8164FFB
setvar VAR_0x8005, 70
setvar VAR_0x8006, 0
special sub_8044838
- setflag 2055
+ setflag FLAG_0x807
special sub_807F9D8
waitstate
- clearflag 2055
+ clearflag FLAG_0x807
setvar VAR_LAST_TALKED, 1
specialvar VAR_RESULT, sub_80CA74C
compare_var_to_value VAR_RESULT, 1
diff --git a/data/maps/OneIsland/scripts.inc b/data/maps/OneIsland/scripts.inc
index 8b9d0845a..f73187fc3 100644
--- a/data/maps/OneIsland/scripts.inc
+++ b/data/maps/OneIsland/scripts.inc
@@ -84,7 +84,7 @@ Movement_167514:: @ 8167514
OneIsland_EventScript_167517:: @ 8167517
lock
faceplayer
- checkflag 2116
+ checkflag FLAG_0x844
goto_if 1, EventScript_16753F
checkflag FLAG_0x2A1
goto_if 1, EventScript_167535
diff --git a/data/maps/OneIsland_PokemonCenter_1F/scripts.inc b/data/maps/OneIsland_PokemonCenter_1F/scripts.inc
index 76f8b8c5d..df9064d78 100644
--- a/data/maps/OneIsland_PokemonCenter_1F/scripts.inc
+++ b/data/maps/OneIsland_PokemonCenter_1F/scripts.inc
@@ -8,7 +8,7 @@ OneIsland_PokemonCenter_1F_MapScripts:: @ 8170BF8
OneIsland_PokemonCenter_1F_MapScript3_170C0D:: @ 8170C0D
compare_var_to_value VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 5
call_if 4, EventScript_170C22
- checkflag 2116
+ checkflag FLAG_0x844
call_if 1, EventScript_170C36
end
@@ -88,9 +88,9 @@ EventScript_170CB1:: @ 8170CB1
waitmovement 0
applymovement 255, Movement_1A75EB
waitmovement 0
- checkflag 2092
+ checkflag FLAG_0x82C
call_if 1, EventScript_170E34
- checkflag 2092
+ checkflag FLAG_0x82C
call_if 0, EventScript_170E3D
applymovement 3, Movement_1A75ED
waitmovement 0
@@ -135,7 +135,7 @@ EventScript_170CB1:: @ 8170CB1
call_if 4, EventScript_170E46
compare_var_to_value VAR_0x4058, 2
call_if 0, EventScript_170E58
- setflag 2117
+ setflag FLAG_0x845
loadword 0, gUnknown_81A1230
callstd 4
closemessage
@@ -143,7 +143,7 @@ EventScript_170CB1:: @ 8170CB1
waitmovement 0
applymovement 3, Movement_1A75E9
waitmovement 0
- setflag 2113
+ setflag FLAG_0x841
setvar VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 1
releaseall
end
@@ -337,7 +337,7 @@ EventScript_170FA5:: @ 8170FA5
loadword 0, gUnknown_81A1D7D
callstd 4
special sub_810B82C
- setflag 2116
+ setflag FLAG_0x844
setflag FLAG_0x05C
setflag FLAG_0x08C
setvar VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 6
@@ -391,7 +391,7 @@ EventScript_1710B2:: @ 81710B2
removeitem ITEM_TRI_PASS, 1
setvar VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 5
additem ITEM_RAINBOW_PASS, 1
- setflag 2118
+ setflag FLAG_0x846
textcolor 3
playfanfare BGM_FRLG_ME_KEYITEM
message Text_1A1B56
@@ -460,7 +460,7 @@ OneIsland_PokemonCenter_1F_EventScript_171151:: @ 8171151
OneIsland_PokemonCenter_1F_EventScript_17115A:: @ 817115A
lock
faceplayer
- checkflag 2116
+ checkflag FLAG_0x844
goto_if 1, EventScript_17116F
loadword 0, gUnknown_81A218D
callstd 4
@@ -475,7 +475,7 @@ EventScript_17116F:: @ 817116F
OneIsland_PokemonCenter_1F_EventScript_171179:: @ 8171179
lockall
- checkflag 2116
+ checkflag FLAG_0x844
goto_if 1, EventScript_1711A0
checkflag FLAG_0x2A1
goto_if 1, EventScript_171196
diff --git a/data/maps/PalletTown/scripts.inc b/data/maps/PalletTown/scripts.inc
index 202258462..26f0708c0 100644
--- a/data/maps/PalletTown/scripts.inc
+++ b/data/maps/PalletTown/scripts.inc
@@ -14,7 +14,7 @@ PalletTown_MapScript1_165465:: @ 8165465
end
EventScript_165488:: @ 8165488
- checkflag 2110
+ checkflag FLAG_0x83E
goto_if 0, EventScript_1A77A9
compare_var_to_value VAR_0x4070, 1
goto_if 4, EventScript_1A77A9
@@ -508,7 +508,7 @@ EventScript_165894:: @ 8165894
closemessage
delay 20
textcolor 3
- setflag 2110
+ setflag FLAG_0x83E
setvar VAR_0x4070, 1
setvar VAR_0x4002, 0
special sub_80699E0
diff --git a/data/maps/PalletTown_GarysHouse/scripts.inc b/data/maps/PalletTown_GarysHouse/scripts.inc
index 56d49fb90..80a77835a 100644
--- a/data/maps/PalletTown_GarysHouse/scripts.inc
+++ b/data/maps/PalletTown_GarysHouse/scripts.inc
@@ -24,7 +24,7 @@ PalletTown_GarysHouse_EventScript_168D56:: @ 8168D56
setvar VAR_0x8004, 1
setvar VAR_0x8005, 2
special UpdatePickStateFromSpecialVar8005
- checkflag 2092
+ checkflag FLAG_0x82C
goto_if 1, EventScript_168DB9
compare_var_to_value VAR_0x4001, 1
goto_if 1, EventScript_168EEC
diff --git a/data/maps/PalletTown_ProfessorOaksLab/scripts.inc b/data/maps/PalletTown_ProfessorOaksLab/scripts.inc
index 73a88153c..9f6b65822 100644
--- a/data/maps/PalletTown_ProfessorOaksLab/scripts.inc
+++ b/data/maps/PalletTown_ProfessorOaksLab/scripts.inc
@@ -618,7 +618,7 @@ PalletTown_ProfessorOaksLab_EventScript_169595:: @ 8169595
goto_if 1, EventScript_169903
compare_var_to_value VAR_MAP_SCENE_PALLET_TOWN_PROFESSOR_OAKS_LAB, 8
goto_if 1, EventScript_169A6E
- checkflag 2092
+ checkflag FLAG_0x82C
goto_if 1, EventScript_1699CE
compare_var_to_value VAR_0x4052, 1
goto_if 1, EventScript_169903
@@ -734,7 +734,7 @@ EventScript_16961E:: @ 816961E
waitmessage
waitfanfare
call EventScript_1A6675
- setflag 2089
+ setflag FLAG_0x829
special sub_810B810
setvar VAR_0x407C, 1
loadword 0, gUnknown_818E612
@@ -1208,7 +1208,7 @@ PalletTown_ProfessorOaksLab_EventScript_169BAB:: @ 8169BAB
EventScript_169BE1:: @ 8169BE1
applymovement 4, Movement_1A75EF
waitmovement 0
- drawmonpic 16386, 10, 3
+ drawmonpic VAR_0x4002, 10, 3
textcolor 0
compare_var_to_value VAR_0x4001, 0
goto_if 1, EventScript_169C14
@@ -1256,11 +1256,11 @@ EventScript_169C74:: @ 8169C74
loadword 0, gUnknown_818E2E5
callstd 4
call EventScript_1A6675
- setflag 2088
+ setflag FLAG_0x828
setflag FLAG_0x291
- givemon 16386, 5, ITEM_NONE, 0, 0, 0
+ givemon VAR_0x4002, 5, ITEM_NONE, 0, 0, 0
copyvar VAR_STARTER_MON, VAR_0x4001
- getspeciesname 0, 16386
+ getspeciesname 0, VAR_0x4002
message Text_18E30D
waitmessage
playfanfare BGM_FRLG_ME_KEYITEM
@@ -1319,7 +1319,7 @@ EventScript_169D2F:: @ 8169D2F
playfanfare BGM_FRLG_ME_KEYITEM
waitfanfare
setvar VAR_MAP_SCENE_PALLET_TOWN_PROFESSOR_OAKS_LAB, 3
- checkflag 2110
+ checkflag FLAG_0x83E
call_if 1, EventScript_169D5C
release
end
@@ -1397,7 +1397,7 @@ EventScript_169DE4:: @ 8169DE4
PalletTown_ProfessorOaksLab_EventScript_169DEE:: @ 8169DEE
lock
faceplayer
- checkflag 2092
+ checkflag FLAG_0x82C
goto_if 1, EventScript_169E03
loadword 0, gUnknown_818EBE6
callstd 4
@@ -1416,7 +1416,7 @@ EventScript_169E03:: @ 8169E03
PalletTown_ProfessorOaksLab_EventScript_169E1A:: @ 8169E1A
lock
faceplayer
- checkflag 2092
+ checkflag FLAG_0x82C
goto_if 1, EventScript_169E2F
loadword 0, gUnknown_818EBE6
callstd 4
diff --git a/data/maps/PewterCity/scripts.inc b/data/maps/PewterCity/scripts.inc
index ee311aab2..61b542ae3 100644
--- a/data/maps/PewterCity/scripts.inc
+++ b/data/maps/PewterCity/scripts.inc
@@ -1492,7 +1492,7 @@ EventScript_1662DE:: @ 81662DE
callstd 4
closemessage
removeobject 7
- setflag 2095
+ setflag FLAG_0x82F
setvar VAR_0x406C, 2
return
diff --git a/data/maps/PokemonLeague_AgathasRoom/scripts.inc b/data/maps/PokemonLeague_AgathasRoom/scripts.inc
index 9507276fe..072fb633d 100644
--- a/data/maps/PokemonLeague_AgathasRoom/scripts.inc
+++ b/data/maps/PokemonLeague_AgathasRoom/scripts.inc
@@ -61,15 +61,15 @@ PokemonLeague_AgathasRoom_EventScript_162877:: @ 8162877
setvar VAR_0x8004, 0
setvar VAR_0x8005, 4
special SetFlavorTextFlagFromSpecialVars
- checkflag 2092
+ checkflag FLAG_0x82C
call_if 0, EventScript_1628E9
- checkflag 2092
+ checkflag FLAG_0x82C
call_if 1, EventScript_1628F2
setflag FLAG_0x003
setflag FLAG_0x005
- checkflag 2116
+ checkflag FLAG_0x844
call_if 0, EventScript_1628FB
- checkflag 2116
+ checkflag FLAG_0x844
call_if 1, EventScript_162906
clearflag FLAG_0x005
goto EventScript_16291B
diff --git a/data/maps/PokemonLeague_BrunosRoom/scripts.inc b/data/maps/PokemonLeague_BrunosRoom/scripts.inc
index 4553cfa0c..9f97097ca 100644
--- a/data/maps/PokemonLeague_BrunosRoom/scripts.inc
+++ b/data/maps/PokemonLeague_BrunosRoom/scripts.inc
@@ -58,15 +58,15 @@ PokemonLeague_BrunosRoom_EventScript_1626EC:: @ 81626EC
setvar VAR_0x8004, 10
setvar VAR_0x8005, 1
special SetFlavorTextFlagFromSpecialVars
- checkflag 2092
+ checkflag FLAG_0x82C
call_if 0, EventScript_162751
- checkflag 2092
+ checkflag FLAG_0x82C
call_if 1, EventScript_16275A
setflag FLAG_0x003
setflag FLAG_0x005
- checkflag 2116
+ checkflag FLAG_0x844
call_if 0, EventScript_162763
- checkflag 2116
+ checkflag FLAG_0x844
call_if 1, EventScript_16276E
clearflag FLAG_0x005
goto EventScript_1627B0
diff --git a/data/maps/PokemonLeague_ChampionsRoom/scripts.inc b/data/maps/PokemonLeague_ChampionsRoom/scripts.inc
index 8c499fc32..bc445f685 100644
--- a/data/maps/PokemonLeague_ChampionsRoom/scripts.inc
+++ b/data/maps/PokemonLeague_ChampionsRoom/scripts.inc
@@ -16,23 +16,23 @@ PokemonLeague_ChampionsRoom_MapScript2_162AF2:: @ 8162AF2
end
EventScript_162B1E:: @ 8162B1E
- checktrainerflag 438
+ checktrainerflag FLAG_0x1B6
goto_if 1, EventScript_162B57
- checktrainerflag 739
+ checktrainerflag FLAG_0x2E3
goto_if 1, EventScript_162B57
return
EventScript_162B31:: @ 8162B31
- checktrainerflag 439
+ checktrainerflag FLAG_0x1B7
goto_if 1, EventScript_162B57
- checktrainerflag 740
+ checktrainerflag FLAG_0x2E4
goto_if 1, EventScript_162B57
return
EventScript_162B44:: @ 8162B44
- checktrainerflag 440
+ checktrainerflag FLAG_0x1B8
goto_if 1, EventScript_162B57
- checktrainerflag 741
+ checktrainerflag FLAG_0x2E5
goto_if 1, EventScript_162B57
return
@@ -59,9 +59,9 @@ EventScript_162B76:: @ 8162B76
applymovement 255, Movement_162D07
waitmovement 0
delay 20
- checkflag 2092
+ checkflag FLAG_0x82C
call_if 0, EventScript_162CB3
- checkflag 2092
+ checkflag FLAG_0x82C
call_if 1, EventScript_162CBC
special sub_8110AB4
compare_var_to_value VAR_RESULT, 2
@@ -69,9 +69,9 @@ EventScript_162B76:: @ 8162B76
setflag FLAG_0x003
setflag FLAG_0x005
savebgm BGM_FRLG_KACHI_LEADER
- checkflag 2116
+ checkflag FLAG_0x844
call_if 0, EventScript_162C6F
- checkflag 2116
+ checkflag FLAG_0x844
call_if 1, EventScript_162C91
setflag FLAG_0x004
clearflag FLAG_0x005
diff --git a/data/maps/PokemonLeague_LancesRoom/scripts.inc b/data/maps/PokemonLeague_LancesRoom/scripts.inc
index 883441628..77d9fb158 100644
--- a/data/maps/PokemonLeague_LancesRoom/scripts.inc
+++ b/data/maps/PokemonLeague_LancesRoom/scripts.inc
@@ -112,15 +112,15 @@ PokemonLeague_LancesRoom_EventScript_162A14:: @ 8162A14
setvar VAR_0x8004, 12
setvar VAR_0x8005, 1
special SetFlavorTextFlagFromSpecialVars
- checkflag 2092
+ checkflag FLAG_0x82C
call_if 0, EventScript_162A79
- checkflag 2092
+ checkflag FLAG_0x82C
call_if 1, EventScript_162A82
setflag FLAG_0x003
setflag FLAG_0x005
- checkflag 2116
+ checkflag FLAG_0x844
call_if 0, EventScript_162A8B
- checkflag 2116
+ checkflag FLAG_0x844
call_if 1, EventScript_162A96
clearflag FLAG_0x005
goto EventScript_162AAB
diff --git a/data/maps/PokemonLeague_LoreleisRoom/scripts.inc b/data/maps/PokemonLeague_LoreleisRoom/scripts.inc
index 519278fff..f50f9a1e4 100644
--- a/data/maps/PokemonLeague_LoreleisRoom/scripts.inc
+++ b/data/maps/PokemonLeague_LoreleisRoom/scripts.inc
@@ -63,15 +63,15 @@ PokemonLeague_LoreleisRoom_EventScript_1625DC:: @ 81625DC
setvar VAR_0x8004, 9
setvar VAR_0x8005, 1
special SetFlavorTextFlagFromSpecialVars
- checkflag 2116
+ checkflag FLAG_0x844
call_if 0, EventScript_162641
- checkflag 2116
+ checkflag FLAG_0x844
call_if 1, EventScript_16264A
setflag FLAG_0x003
setflag FLAG_0x005
- checkflag 2116
+ checkflag FLAG_0x844
call_if 0, EventScript_162653
- checkflag 2116
+ checkflag FLAG_0x844
call_if 1, EventScript_16265E
clearflag FLAG_0x005
goto EventScript_162673
diff --git a/data/maps/PowerPlant/scripts.inc b/data/maps/PowerPlant/scripts.inc
index 988c84fa0..5567d8ec8 100644
--- a/data/maps/PowerPlant/scripts.inc
+++ b/data/maps/PowerPlant/scripts.inc
@@ -4,7 +4,7 @@ PowerPlant_MapScripts:: @ 8163764
.byte 0
PowerPlant_MapScript1_16376F:: @ 816376F
- checkflag 2055
+ checkflag FLAG_0x807
call_if 1, EventScript_163779
end
@@ -53,10 +53,10 @@ PowerPlant_EventScript_1637B8:: @ 81637B8
delay 10
playbgm BGM_FRLG_LEADER_EYE, 0
waitbuttonpress
- setflag 2055
+ setflag FLAG_0x807
special sub_807F9D8
waitstate
- clearflag 2055
+ clearflag FLAG_0x807
specialvar VAR_RESULT, sub_80CA74C
compare_var_to_value VAR_RESULT, 1
goto_if 1, EventScript_16381B
@@ -89,9 +89,9 @@ PowerPlant_EventScript_16382F:: @ 816382F
playmoncry SPECIES_ELECTRODE, 2
delay 40
waitmoncry
- setflag 2055
+ setflag FLAG_0x807
dowildbattle
- clearflag 2055
+ clearflag FLAG_0x807
special sub_8112364
specialvar VAR_RESULT, sub_80CA74C
compare_var_to_value VAR_RESULT, 1
@@ -120,9 +120,9 @@ PowerPlant_EventScript_16388D:: @ 816388D
playmoncry SPECIES_ELECTRODE, 2
delay 40
waitmoncry
- setflag 2055
+ setflag FLAG_0x807
dowildbattle
- clearflag 2055
+ clearflag FLAG_0x807
special sub_8112364
specialvar VAR_RESULT, sub_80CA74C
compare_var_to_value VAR_RESULT, 1
diff --git a/data/maps/RocketHideout_B1F/scripts.inc b/data/maps/RocketHideout_B1F/scripts.inc
index f7b2e0515..0d4fcd1bd 100644
--- a/data/maps/RocketHideout_B1F/scripts.inc
+++ b/data/maps/RocketHideout_B1F/scripts.inc
@@ -4,7 +4,7 @@ RocketHideout_B1F_MapScripts:: @ 8161195
.byte 0
RocketHideout_B1F_MapScript1_1611A0:: @ 81611A0
- checktrainerflag 362
+ checktrainerflag FLAG_0x16A
call_if 0, EventScript_161233
end
diff --git a/data/maps/RocketHideout_B4F/scripts.inc b/data/maps/RocketHideout_B4F/scripts.inc
index f6227cd82..06eb3b4e9 100644
--- a/data/maps/RocketHideout_B4F/scripts.inc
+++ b/data/maps/RocketHideout_B4F/scripts.inc
@@ -4,9 +4,9 @@ RocketHideout_B4F_MapScripts:: @ 81612E8
RocketHideout_B4F_MapScript1_1612EE:: @ 81612EE
setvar VAR_0x4001, 0
- checktrainerflag 366
+ checktrainerflag FLAG_0x16E
call_if 1, EventScript_161311
- checktrainerflag 367
+ checktrainerflag FLAG_0x16F
call_if 1, EventScript_161311
compare_var_to_value VAR_0x4001, 2
call_if 5, EventScript_16146A
@@ -90,9 +90,9 @@ RocketHideout_B4F_EventScript_1613CE:: @ 81613CE
EventScript_1613E9:: @ 81613E9
setvar VAR_0x4001, 0
- checktrainerflag 366
+ checktrainerflag FLAG_0x16E
call_if 1, EventScript_161311
- checktrainerflag 367
+ checktrainerflag FLAG_0x16F
call_if 1, EventScript_161311
compare_var_to_value VAR_0x4001, 2
call_if 1, EventScript_1614A1
@@ -109,9 +109,9 @@ RocketHideout_B4F_EventScript_161418:: @ 8161418
EventScript_161433:: @ 8161433
setvar VAR_0x4001, 0
- checktrainerflag 366
+ checktrainerflag FLAG_0x16E
call_if 1, EventScript_161311
- checktrainerflag 367
+ checktrainerflag FLAG_0x16F
call_if 1, EventScript_161311
compare_var_to_value VAR_0x4001, 2
call_if 1, EventScript_1614A1
diff --git a/data/maps/Route12/scripts.inc b/data/maps/Route12/scripts.inc
index dbe51fb9d..3fdc41c2a 100644
--- a/data/maps/Route12/scripts.inc
+++ b/data/maps/Route12/scripts.inc
@@ -3,7 +3,7 @@ Route12_MapScripts:: @ 8168000
.byte 0
Route12_MapScript1_168006:: @ 8168006
- checkflag 2055
+ checkflag FLAG_0x807
call_if 1, EventScript_168010
end
@@ -31,10 +31,10 @@ Route12_EventScript_168014:: @ 8168014
delay 40
waitmoncry
setflag FLAG_0x054
- setflag 2055
+ setflag FLAG_0x807
setflag FLAG_0x253
dowildbattle
- clearflag 2055
+ clearflag FLAG_0x807
specialvar VAR_RESULT, sub_80CA74C
compare_var_to_value VAR_RESULT, 1
goto_if 1, EventScript_16808F
diff --git a/data/maps/Route16/scripts.inc b/data/maps/Route16/scripts.inc
index 3bccccb50..9d2d1d621 100644
--- a/data/maps/Route16/scripts.inc
+++ b/data/maps/Route16/scripts.inc
@@ -5,7 +5,7 @@ Route16_MapScripts:: @ 81680E5
.byte 0
Route16_MapScript1_1680F5:: @ 81680F5
- checkflag 2055
+ checkflag FLAG_0x807
call_if 1, EventScript_1680FF
end
@@ -19,7 +19,7 @@ Route16_MapScript2_168103:: @ 8168103
end
EventScript_16810F:: @ 816810F
- setflag 2096
+ setflag FLAG_0x830
return
Route16_MapScript3_168113:: @ 8168113
@@ -50,9 +50,9 @@ Route16_EventScript_168121:: @ 8168121
delay 40
waitmoncry
setflag FLAG_0x080
- setflag 2055
+ setflag FLAG_0x807
dowildbattle
- clearflag 2055
+ clearflag FLAG_0x807
specialvar VAR_RESULT, sub_80CA74C
compare_var_to_value VAR_RESULT, 1
goto_if 1, EventScript_168199
diff --git a/data/maps/Route16_NorthEntrance_1F/scripts.inc b/data/maps/Route16_NorthEntrance_1F/scripts.inc
index 3e5bd6921..792f604cd 100644
--- a/data/maps/Route16_NorthEntrance_1F/scripts.inc
+++ b/data/maps/Route16_NorthEntrance_1F/scripts.inc
@@ -3,7 +3,7 @@ Route16_NorthEntrance_1F_MapScripts:: @ 81701C2
.byte 0
Route16_NorthEntrance_1F_MapScript1_1701C8:: @ 81701C8
- clearflag 2096
+ clearflag FLAG_0x830
checkflag FLAG_0x271
call_if 1, EventScript_1701D5
end
diff --git a/data/maps/Route18/scripts.inc b/data/maps/Route18/scripts.inc
index 97f574984..d4471a3be 100644
--- a/data/maps/Route18/scripts.inc
+++ b/data/maps/Route18/scripts.inc
@@ -9,7 +9,7 @@ Route18_MapScript1_168201:: @ 8168201
end
EventScript_16820D:: @ 816820D
- setflag 2096
+ setflag FLAG_0x830
return
Route18_MapScript2_168211:: @ 8168211
diff --git a/data/maps/Route18_EastEntrance_1F/scripts.inc b/data/maps/Route18_EastEntrance_1F/scripts.inc
index be12d62b0..840a35ec5 100644
--- a/data/maps/Route18_EastEntrance_1F/scripts.inc
+++ b/data/maps/Route18_EastEntrance_1F/scripts.inc
@@ -3,7 +3,7 @@ Route18_EastEntrance_1F_MapScripts:: @ 8170378
.byte 0
Route18_EastEntrance_1F_MapScript1_17037E:: @ 817037E
- clearflag 2096
+ clearflag FLAG_0x830
checkflag FLAG_0x271
call_if 1, EventScript_17038B
end
diff --git a/data/maps/Route25_SeaCottage/scripts.inc b/data/maps/Route25_SeaCottage/scripts.inc
index 5b830385c..841bb5159 100644
--- a/data/maps/Route25_SeaCottage/scripts.inc
+++ b/data/maps/Route25_SeaCottage/scripts.inc
@@ -128,7 +128,7 @@ EventScript_17064A:: @ 817064A
setflag FLAG_0x235
setflag FLAG_0x031
setflag FLAG_0x234
- setflag 2100
+ setflag FLAG_0x834
goto EventScript_170640
end
diff --git a/data/maps/SaffronCity_Dojo/scripts.inc b/data/maps/SaffronCity_Dojo/scripts.inc
index a84a444af..53b26e09a 100644
--- a/data/maps/SaffronCity_Dojo/scripts.inc
+++ b/data/maps/SaffronCity_Dojo/scripts.inc
@@ -63,7 +63,7 @@ SaffronCity_Dojo_EventScript_16EC46:: @ 816EC46
EventScript_16EC82:: @ 816EC82
erasemonpic
- givemon 16385, 25, ITEM_NONE, 0, 0, 0
+ givemon VAR_0x4001, 25, ITEM_NONE, 0, 0, 0
compare_var_to_value VAR_RESULT, 0
goto_if 1, EventScript_16ECB5
compare_var_to_value VAR_RESULT, 1
@@ -75,7 +75,7 @@ EventScript_16EC82:: @ 816EC82
EventScript_16ECB5:: @ 816ECB5
removeobject VAR_LAST_TALKED
- getspeciesname 0, 16385
+ getspeciesname 0, VAR_0x4001
playfanfare MUS_FANFA1
message Text_19B473
waitmessage
@@ -92,7 +92,7 @@ EventScript_16ECB5:: @ 816ECB5
EventScript_16ECEC:: @ 816ECEC
removeobject VAR_LAST_TALKED
- getspeciesname 0, 16385
+ getspeciesname 0, VAR_0x4001
playfanfare MUS_FANFA1
message Text_19B473
waitmessage
diff --git a/data/maps/SaffronCity_Gym/scripts.inc b/data/maps/SaffronCity_Gym/scripts.inc
index 3fefa622e..4924a6c2c 100644
--- a/data/maps/SaffronCity_Gym/scripts.inc
+++ b/data/maps/SaffronCity_Gym/scripts.inc
@@ -22,7 +22,7 @@ EventScript_16EE0A:: @ 816EE0A
special SetFlavorTextFlagFromSpecialVars
clearflag FLAG_0x0AE
setflag FLAG_0x4B5
- setflag 2085
+ setflag FLAG_0x825
setvar VAR_0x8008, 6
call EventScript_1A6B18
goto EventScript_16EE3D
@@ -115,7 +115,7 @@ EventScript_16EF4B:: @ 816EF4B
SaffronCity_Gym_EventScript_16EF55:: @ 816EF55
lockall
- checkflag 2085
+ checkflag FLAG_0x825
goto_if 1, EventScript_16EF69
loadword 0, gUnknown_819BDFE
callstd 4
diff --git a/data/maps/SeafoamIslands_B4F/scripts.inc b/data/maps/SeafoamIslands_B4F/scripts.inc
index b9d1ca5ba..6d459ef93 100644
--- a/data/maps/SeafoamIslands_B4F/scripts.inc
+++ b/data/maps/SeafoamIslands_B4F/scripts.inc
@@ -7,7 +7,7 @@ SeafoamIslands_B4F_MapScripts:: @ 816302E
.byte 0
SeafoamIslands_B4F_MapScript2_163048:: @ 8163048
- checkflag 2055
+ checkflag FLAG_0x807
call_if 1, EventScript_163052
end
@@ -178,10 +178,10 @@ SeafoamIslands_B4F_EventScript_1631AC:: @ 81631AC
delay 10
playbgm BGM_FRLG_LEADER_EYE, 0
waitbuttonpress
- setflag 2055
+ setflag FLAG_0x807
special sub_807F9D8
waitstate
- clearflag 2055
+ clearflag FLAG_0x807
specialvar VAR_RESULT, sub_80CA74C
compare_var_to_value VAR_RESULT, 1
goto_if 1, EventScript_16320F
diff --git a/data/maps/SevenIsland_SeavaultCanyon_TanobyKey/scripts.inc b/data/maps/SevenIsland_SeavaultCanyon_TanobyKey/scripts.inc
index 45637c673..1b0db15d2 100644
--- a/data/maps/SevenIsland_SeavaultCanyon_TanobyKey/scripts.inc
+++ b/data/maps/SevenIsland_SeavaultCanyon_TanobyKey/scripts.inc
@@ -4,7 +4,7 @@ SevenIsland_SeavaultCanyon_TanobyKey_MapScripts:: @ 8164DCC
SevenIsland_SeavaultCanyon_TanobyKey_MapScript1_164DD2:: @ 8164DD2
setworldmapflag FLAG_WORLD_MAP_SEVEN_ISLAND_SEAVAULT_CANYON_TANOBY_KEY
- checkflag 2121
+ checkflag FLAG_0x849
call_if 1, EventScript_164E07
setvar VAR_0x4001, 0
setvar VAR_0x4002, 0
@@ -139,6 +139,6 @@ EventScript_164F8C:: @ 8164F8C
call EventScript_164F51
loadword 0, gUnknown_817D31B
callstd 4
- setflag 2121
+ setflag FLAG_0x849
releaseall
end
diff --git a/data/maps/ThreeIsland_Port/scripts.inc b/data/maps/ThreeIsland_Port/scripts.inc
index 0e0760109..ae3ed949e 100644
--- a/data/maps/ThreeIsland_Port/scripts.inc
+++ b/data/maps/ThreeIsland_Port/scripts.inc
@@ -3,7 +3,7 @@ ThreeIsland_Port_MapScripts:: @ 8168789
.byte 0
ThreeIsland_Port_MapScript1_16878F:: @ 816878F
- clearflag 2113
+ clearflag FLAG_0x841
setflag FLAG_0x2A1
end
diff --git a/data/maps/TwoIsland/scripts.inc b/data/maps/TwoIsland/scripts.inc
index 950cfbf84..6feebdb9c 100644
--- a/data/maps/TwoIsland/scripts.inc
+++ b/data/maps/TwoIsland/scripts.inc
@@ -9,9 +9,9 @@ TwoIsland_MapScript1_16756A:: @ 816756A
end
EventScript_167576:: @ 8167576
- checkflag 2116
+ checkflag FLAG_0x844
goto_if 1, EventScript_167597
- checkflag 2092
+ checkflag FLAG_0x82C
goto_if 1, EventScript_1675B8
checkflag FLAG_0x2A3
goto_if 1, EventScript_1675D9
diff --git a/data/maps/VermilionCity/scripts.inc b/data/maps/VermilionCity/scripts.inc
index f1b10e1d2..838408344 100644
--- a/data/maps/VermilionCity/scripts.inc
+++ b/data/maps/VermilionCity/scripts.inc
@@ -62,7 +62,7 @@ VermilionCity_EventScript_166941:: @ 8166941
end
EventScript_166958:: @ 8166958
- checkflag 2122
+ checkflag FLAG_0x84A
goto_if 0, EventScript_1A77B0
checkitem ITEM_MYSTIC_TICKET, 1
compare_var_to_value VAR_RESULT, 0
@@ -71,7 +71,7 @@ EventScript_166958:: @ 8166958
end
EventScript_166977:: @ 8166977
- checkflag 2123
+ checkflag FLAG_0x84B
goto_if 0, EventScript_1A77B0
checkitem ITEM_AURORA_TICKET, 1
compare_var_to_value VAR_RESULT, 0
diff --git a/data/maps/VermilionCity_Gym/scripts.inc b/data/maps/VermilionCity_Gym/scripts.inc
index d11f43e4c..b2a2fa8b1 100644
--- a/data/maps/VermilionCity_Gym/scripts.inc
+++ b/data/maps/VermilionCity_Gym/scripts.inc
@@ -232,7 +232,7 @@ EventScript_16B97C:: @ 816B97C
call_if 0, EventScript_16B9AB
clearflag FLAG_0x0A0
setflag FLAG_0x4B2
- setflag 2082
+ setflag FLAG_0x822
setvar VAR_0x8008, 3
call EventScript_1A6B18
goto EventScript_16B9AF
@@ -315,7 +315,7 @@ EventScript_16BA81:: @ 816BA81
VermilionCity_Gym_EventScript_16BA8B:: @ 816BA8B
lockall
- checkflag 2082
+ checkflag FLAG_0x822
goto_if 1, EventScript_16BA9F
loadword 0, gUnknown_819520B
callstd 4
diff --git a/data/maps/VermilionCity_PokemonFanClub/scripts.inc b/data/maps/VermilionCity_PokemonFanClub/scripts.inc
index 43d82659b..58c03b78b 100644
--- a/data/maps/VermilionCity_PokemonFanClub/scripts.inc
+++ b/data/maps/VermilionCity_PokemonFanClub/scripts.inc
@@ -48,7 +48,7 @@ EventScript_16B4F2:: @ 816B4F2
VermilionCity_PokemonFanClub_EventScript_16B4FC:: @ 816B4FC
lock
faceplayer
- checkflag 2092
+ checkflag FLAG_0x82C
goto_if 1, EventScript_16B511
loadword 0, gUnknown_81948E6
callstd 4
diff --git a/data/maps/ViridianCity/scripts.inc b/data/maps/ViridianCity/scripts.inc
index 07f567ccf..876219174 100644
--- a/data/maps/ViridianCity/scripts.inc
+++ b/data/maps/ViridianCity/scripts.inc
@@ -31,15 +31,15 @@ EventScript_165920:: @ 8165920
return
EventScript_165931:: @ 8165931
- checkflag 2081
+ checkflag FLAG_0x821
goto_if 0, EventScript_1A77A9
- checkflag 2082
+ checkflag FLAG_0x822
goto_if 0, EventScript_1A77A9
- checkflag 2083
+ checkflag FLAG_0x823
goto_if 0, EventScript_1A77A9
checkflag FLAG_UNK824
goto_if 0, EventScript_1A77A9
- checkflag 2085
+ checkflag FLAG_0x825
goto_if 0, EventScript_1A77A9
checkflag FLAG_UNK826
goto_if 0, EventScript_1A77A9
diff --git a/data/maps/ViridianCity_Gym/scripts.inc b/data/maps/ViridianCity_Gym/scripts.inc
index 2ff6b010b..d714546da 100644
--- a/data/maps/ViridianCity_Gym/scripts.inc
+++ b/data/maps/ViridianCity_Gym/scripts.inc
@@ -23,7 +23,7 @@ EventScript_169F04:: @ 8169F04
special SetFlavorTextFlagFromSpecialVars
setflag FLAG_0x0AD
setflag FLAG_0x4B7
- setflag 2087
+ setflag FLAG_0x827
setvar VAR_0x4054, 3
setvar VAR_0x8008, 8
call EventScript_1A6B18
@@ -123,7 +123,7 @@ EventScript_16A047:: @ 816A047
ViridianCity_Gym_EventScript_16A05E:: @ 816A05E
lockall
- checkflag 2087
+ checkflag FLAG_0x827
goto_if 1, EventScript_16A072
loadword 0, gUnknown_818FB8D
callstd 4
diff --git a/data/maps/ViridianCity_Mart/scripts.inc b/data/maps/ViridianCity_Mart/scripts.inc
index 383960ddc..c1a07d1e0 100644
--- a/data/maps/ViridianCity_Mart/scripts.inc
+++ b/data/maps/ViridianCity_Mart/scripts.inc
@@ -4,7 +4,7 @@ ViridianCity_Mart_MapScripts:: @ 816A1D3
.byte 0
ViridianCity_Mart_MapScript1_16A1DE:: @ 816A1DE
- checkflag 2089
+ checkflag FLAG_0x829
goto_if 0, EventScript_16A1E8
end
diff --git a/include/constants/flags.h b/include/constants/flags.h
index aac4d809a..8ecac9769 100644
--- a/include/constants/flags.h
+++ b/include/constants/flags.h
@@ -54,6 +54,32 @@
#define FLAG_WORLD_MAP_SEVEN_ISLAND_SEAVAULT_CANYON_TANOBY_KEY 0x8c1
#define FLAG_WORLD_MAP_BIRTH_ISLAND_EXTERIOR 0x8c2
+// Unknown
+
+#define FLAG_0x807 0x807
+#define FLAG_0x821 0x821
+#define FLAG_0x822 0x822
+#define FLAG_0x823 0x823
+#define FLAG_0x825 0x825
+#define FLAG_0x827 0x827
+#define FLAG_0x828 0x828
+#define FLAG_0x829 0x829
+#define FLAG_0x82C 0x82C
+#define FLAG_0x82F 0x82F
+#define FLAG_0x830 0x830
+#define FLAG_0x834 0x834
+#define FLAG_0x83E 0x83E
+#define FLAG_0x841 0x841
+#define FLAG_0x844 0x844
+#define FLAG_0x845 0x845
+#define FLAG_0x846 0x846
+#define FLAG_0x847 0x847
+#define FLAG_0x848 0x848
+#define FLAG_0x849 0x849
+#define FLAG_0x84A 0x84A
+#define FLAG_0x84B 0x84B
+
+
// Emerald Flags
// TODO: Get correct names and numbers