shithub: pokecrystal

Download patch

ref: 73bd376cfd3fc39e30d0c06178e8f34f36604f84
parent: 3134b26f7b5e27242eb9f2a4cdc976a250cf0813
author: yenatch <[email protected]>
date: Mon Sep 23 23:51:42 EDT 2013

rename bit2 script commands to flag

--- a/engine/scripting.asm
+++ b/engine/scripting.asm
@@ -51,9 +51,9 @@
 	dw Script_checkevent
 	dw Script_clearevent
 	dw Script_setevent
-	dw Script_checkbit2
-	dw Script_clearbit2
-	dw Script_setbit2
+	dw Script_checkflag
+	dw Script_clearflag
+	dw Script_setflag
 	dw Script_wildon
 	dw Script_wildoff
 	dw Script_xycompare
@@ -2715,7 +2715,7 @@
 	ret
 ; 0x979bb
 
-Script_setbit2: ; 0x979bb
+Script_setflag: ; 0x979bb
 ; script command 0x36
 ; parameters:
 ;     bit_number (MultiByteParam)
@@ -2729,7 +2729,7 @@
 	ret
 ; 0x979c9
 
-Script_clearbit2: ; 0x979c9
+Script_clearflag: ; 0x979c9
 ; script command 0x35
 ; parameters:
 ;     bit_number (MultiByteParam)
@@ -2743,7 +2743,7 @@
 	ret
 ; 0x979d7
 
-Script_checkbit2: ; 0x979d7
+Script_checkflag: ; 0x979d7
 ; script command 0x34
 ; parameters:
 ;     bit_number (MultiByteParam)
--- a/engine/std_scripts.asm
+++ b/engine/std_scripts.asm
@@ -138,7 +138,7 @@
 	checkphonecall
 	iftrue .done
 ; Has Pokerus already been found in the Pokecenter?
-	checkbit2 $000d
+	checkflag $000d
 	iftrue .done
 ; Check for Pokerus
 	special $004e ; SPECIAL_CHECKPOKERUS
@@ -178,7 +178,7 @@
 	loadmovesprites
 .endpokerus
 ; Don't tell us about Pokerus again
-	setbit2 $000d
+	setflag $000d
 ; Trigger Elm's Pokerus phone call
 	specialphonecall $0001
 	end
@@ -359,7 +359,7 @@
 ; 0xbc242
 
 UnknownScript_0xbc242: ; 0xbc242
-	setbit2 $0013
+	setflag $0013
 	setevent $06cf
 	setevent $06d1
 	clearevent $06ce
@@ -380,7 +380,7 @@
 	applymovement $0, MovementData_0xbcea1
 
 UnknownScript_0xbc274: ; bc274
-	clearbit2 $0011
+	clearflag $0011
 	clearevent $02d2
 	clearevent $0313
 	clearevent $0314
@@ -440,7 +440,7 @@
 	setevent $0727
 	setevent $0728
 	setevent $0729
-	setbit2 $0051
+	setflag $0051
 	special $003c
 	end
 ; 0xbc31e
@@ -659,8 +659,8 @@
 	setevent $07af
 	setevent $07ae
 	setevent $07cf
-	setbit2 $000e
-	setbit2 $0017
+	setflag $000e
+	setflag $0017
 	variablesprite $4, $52
 	variablesprite $5, $4
 	variablesprite $6, $35
@@ -2398,7 +2398,7 @@
 	2jump UnknownScript_0xbcf37
 
 UnknownScript_0xbcf37: ; 0xbcf37
-	checkbit2 $0008
+	checkflag $0008
 	iffalse UnknownScript_0xbcf49
 	checkmoney $1, 0
 	if_equal $0, UnknownScript_0xbcf55
@@ -2436,13 +2436,13 @@
 	2jump MomPhoneWontSaveMoneyScript
 
 MomPhoneSaveMoneyScript: ; 0xbcf87
-	setbit2 $0008
+	setflag $0008
 	3writetext $6d, $4289
 	keeptextopen
 	2jump MomPhoneHangUpScript
 
 MomPhoneWontSaveMoneyScript: ; 0xbcf92
-	clearbit2 $0008
+	clearflag $0008
 	3writetext BANK(MomPhoneWontSaveMoneyText), MomPhoneWontSaveMoneyText
 	keeptextopen
 	2jump MomPhoneHangUpScript
@@ -2465,7 +2465,7 @@
 
 MomPhoneLectureScript: ; 0xbcfb1
 	setevent $0040
-	setbit2 $0009
+	setflag $0009
 	specialphonecall $0000
 	3writetext BANK(MomPhoneLectureText), MomPhoneLectureText
 	yesorno
--- a/maps/AzaleaGym.asm
+++ b/maps/AzaleaGym.asm
@@ -23,7 +23,7 @@
 	2writetext UnknownText_0x18ee14
 	playsound $009c
 	waitbutton
-	setbit2 $001c
+	setflag $001c
 	checkcode $7
 	2call UnknownScript_0x18ec73
 UnknownScript_0x18ec48: ; 0x18ec48
@@ -230,7 +230,7 @@
 ; 0x18ecfb
 
 MapAzaleaGymSignpost1Script: ; 0x18ecfb
-	checkbit2 $001c
+	checkflag $001c
 	iftrue UnknownScript_0x18ed04
 	jumpstd $002d
 ; 0x18ed04
--- a/maps/AzaleaTown.asm
+++ b/maps/AzaleaTown.asm
@@ -28,7 +28,7 @@
 ; 0x198014
 
 UnknownScript_0x198014: ; 0x198014
-	setbit2 $0044
+	setflag $0044
 	return
 ; 0x198018
 
@@ -175,7 +175,7 @@
 	closetext
 	verbosegiveitem GS_BALL, 1
 	spriteface $d, $2
-	setbit2 $0064
+	setflag $0064
 	clearevent $06ed
 	setevent $06eb
 	dotrigger $0
--- a/maps/BlackthornCity.asm
+++ b/maps/BlackthornCity.asm
@@ -13,7 +13,7 @@
 ; 0x1a46d8
 
 UnknownScript_0x1a46d8: ; 0x1a46d8
-	setbit2 $004b
+	setflag $004b
 	return
 ; 0x1a46dc
 
--- a/maps/BlackthornGym1F.asm
+++ b/maps/BlackthornGym1F.asm
@@ -29,7 +29,7 @@
 ClairScript_0x194e24: ; 0x194e24
 	faceplayer
 	loadfont
-	checkbit2 $0022
+	checkflag $0022
 	iftrue UnknownScript_0x194e69
 	checkevent EVENT_BEAT_CLAIR
 	iftrue UnknownScript_0x194e63
@@ -200,7 +200,7 @@
 ; 0x194eea
 
 MapBlackthornGym1FSignpost1Script: ; 0x194eea
-	checkbit2 $0022
+	checkflag $0022
 	iftrue UnknownScript_0x194ef3
 	jumpstd $002d
 ; 0x194ef3
--- a/maps/BluesHouse.asm
+++ b/maps/BluesHouse.asm
@@ -18,7 +18,7 @@
 ; 0x19b0de
 
 UnknownScript_0x19b0de: ; 0x19b0de
-	checkbit2 $005c
+	checkflag $005c
 	iftrue UnknownScript_0x19b11e
 	2writetext UnknownText_0x19b1b6
 	yesorno
@@ -28,7 +28,7 @@
 	special $0063
 	if_equal $0, UnknownScript_0x19b124
 	if_equal $1, UnknownScript_0x19b12a
-	setbit2 $005c
+	setflag $005c
 	2writetext UnknownText_0x19b266
 	closetext
 	loadmovesprites
--- a/maps/CeladonCity.asm
+++ b/maps/CeladonCity.asm
@@ -11,7 +11,7 @@
 ; 0x1a9f3f
 
 UnknownScript_0x1a9f3f: ; 0x1a9f3f
-	setbit2 $003d
+	setflag $003d
 	return
 ; 0x1a9f43
 
--- a/maps/CeladonGym.asm
+++ b/maps/CeladonGym.asm
@@ -9,7 +9,7 @@
 ErikaScript_0x72a6a: ; 0x72a6a
 	faceplayer
 	loadfont
-	checkbit2 $0026
+	checkflag $0026
 	iftrue UnknownScript_0x72a9b
 	2writetext UnknownText_0x72b28
 	closetext
@@ -27,7 +27,7 @@
 	2writetext UnknownText_0x72c96
 	playsound $009c
 	waitbutton
-	setbit2 $0026
+	setflag $0026
 UnknownScript_0x72a9b: ; 0x72a9b
 	checkevent EVENT_GOT_TM19_GIGA_DRAIN
 	iftrue UnknownScript_0x72aae
@@ -189,7 +189,7 @@
 ; 0x72b18
 
 MapCeladonGymSignpost1Script: ; 0x72b18
-	checkbit2 $0026
+	checkflag $0026
 	iftrue UnknownScript_0x72b21
 	jumpstd $002d
 ; 0x72b21
--- a/maps/CeruleanCity.asm
+++ b/maps/CeruleanCity.asm
@@ -11,7 +11,7 @@
 ; 0x184005
 
 UnknownScript_0x184005: ; 0x184005
-	setbit2 $0038
+	setflag $0038
 	return
 ; 0x184009
 
--- a/maps/CeruleanGym.asm
+++ b/maps/CeruleanGym.asm
@@ -59,7 +59,7 @@
 MistyScript_0x188432: ; 0x188432
 	faceplayer
 	loadfont
-	checkbit2 $0024
+	checkflag $0024
 	iftrue UnknownScript_0x188460
 	2writetext UnknownText_0x188674
 	closetext
@@ -76,7 +76,7 @@
 	2writetext UnknownText_0x188768
 	playsound $009c
 	waitbutton
-	setbit2 $0024
+	setflag $0024
 UnknownScript_0x188460: ; 0x188460
 	2writetext UnknownText_0x188782
 	closetext
@@ -215,7 +215,7 @@
 ; 0x1884d3
 
 UnknownScript_0x1884d3: ; 0x1884d3
-	checkbit2 $0024
+	checkflag $0024
 	iftrue UnknownScript_0x1884dc
 	jumpstd $002d
 ; 0x1884dc
--- a/maps/CherrygroveCity.asm
+++ b/maps/CherrygroveCity.asm
@@ -23,7 +23,7 @@
 ; 0x19c00f
 
 UnknownScript_0x19c00f: ; 0x19c00f
-	setbit2 $0042
+	setflag $0042
 	return
 ; 0x19c013
 
@@ -75,7 +75,7 @@
 	keeptextopen
 	stringtotext .mapcardname, $1
 	2call .UnknownScript_0x19c097
-	setbit2 $0001
+	setflag $0001
 	2writetext UnknownText_0x19c438
 	keeptextopen
 	2writetext UnknownText_0x19c451
@@ -192,7 +192,7 @@
 TeacherScript_0x19c146: ; 0x19c146
 	faceplayer
 	loadfont
-	checkbit2 $0001
+	checkflag $0001
 	iftrue UnknownScript_0x19c154
 	2writetext UnknownText_0x19c650
 	closetext
@@ -210,7 +210,7 @@
 YoungsterScript_0x19c15a: ; 0x19c15a
 	faceplayer
 	loadfont
-	checkbit2 $000b
+	checkflag $000b
 	iftrue UnknownScript_0x19c168
 	2writetext UnknownText_0x19c6d6
 	closetext
--- a/maps/CianwoodCity.asm
+++ b/maps/CianwoodCity.asm
@@ -23,7 +23,7 @@
 ; 0x1a000f
 
 UnknownScript_0x1a000f: ; 0x1a000f
-	setbit2 $0045
+	setflag $0045
 	setevent $07aa
 	checkevent $0333
 	iffalse UnknownScript_0x1a001d
--- a/maps/CianwoodGym.asm
+++ b/maps/CianwoodGym.asm
@@ -38,7 +38,7 @@
 	2writetext UnknownText_0x9d835
 	playsound $009c
 	waitbutton
-	setbit2 $0020
+	setflag $0020
 	checkcode $7
 	2call UnknownScript_0x9d681
 UnknownScript_0x9d656: ; 0x9d656
@@ -202,7 +202,7 @@
 ; 0x9d6e3
 
 MapCianwoodGymSignpost1Script: ; 0x9d6e3
-	checkbit2 $0020
+	checkflag $0020
 	iftrue UnknownScript_0x9d6ec
 	jumpstd $002d
 ; 0x9d6ec
--- a/maps/CinnabarIsland.asm
+++ b/maps/CinnabarIsland.asm
@@ -11,7 +11,7 @@
 ; 0x1ac9ac
 
 UnknownScript_0x1ac9ac: ; 0x1ac9ac
-	setbit2 $003f
+	setflag $003f
 	return
 ; 0x1ac9b0
 
--- a/maps/CopycatsHouse2F.asm
+++ b/maps/CopycatsHouse2F.asm
@@ -11,7 +11,7 @@
 ; 0x18ae9f
 
 UnknownScript_0x18ae9f: ; 0x18ae9f
-	checkbit2 $0063
+	checkflag $0063
 	iftrue UnknownScript_0x18aeac
 	disappear $7
 	appear $2
@@ -33,7 +33,7 @@
 	iftrue UnknownScript_0x18af5b
 	checkitem LOST_ITEM
 	iftrue UnknownScript_0x18af4a
-	checkbit2 $0063
+	checkflag $0063
 	iftrue UnknownScript_0x18aed4
 	applymovement $2, MovementData_0x18afd0
 	faceplayer
@@ -50,7 +50,7 @@
 	checkevent EVENT_RETURNED_MACHINE_PART
 	iftrue UnknownScript_0x18af16
 	loadfont
-	checkbit2 $0063
+	checkflag $0063
 	iftrue UnknownScript_0x18aef2
 	2writetext UnknownText_0x18afda
 	2jump UnknownScript_0x18aef5
@@ -61,7 +61,7 @@
 UnknownScript_0x18aef5: ; 0x18aef5
 	closetext
 	loadmovesprites
-	checkbit2 $0063
+	checkflag $0063
 	iftrue UnknownScript_0x18af04
 	applymovement $2, MovementData_0x18afd0
 	2jump UnknownScript_0x18af08
@@ -82,7 +82,7 @@
 
 UnknownScript_0x18af16: ; 0x18af16
 	loadfont
-	checkbit2 $0063
+	checkflag $0063
 	iftrue UnknownScript_0x18af23
 	2writetext UnknownText_0x18b064
 	2jump UnknownScript_0x18af26
@@ -93,7 +93,7 @@
 UnknownScript_0x18af26: ; 0x18af26
 	closetext
 	loadmovesprites
-	checkbit2 $0063
+	checkflag $0063
 	iftrue UnknownScript_0x18af35
 	applymovement $2, MovementData_0x18afd0
 	2jump UnknownScript_0x18af39
@@ -138,7 +138,7 @@
 ; 0x18af6f
 
 UnknownScript_0x18af6f: ; 0x18af6f
-	checkbit2 $0063
+	checkflag $0063
 	iftrue UnknownScript_0x18af80
 	applymovement $2, MovementData_0x18afd0
 	faceplayer
@@ -153,7 +153,7 @@
 UnknownScript_0x18af88: ; 0x18af88
 	special $005e
 	loadfont
-	checkbit2 $0063
+	checkflag $0063
 	iftrue UnknownScript_0x18af98
 	2writetext UnknownText_0x18b298
 	2jump UnknownScript_0x18af9b
@@ -164,7 +164,7 @@
 UnknownScript_0x18af9b: ; 0x18af9b
 	closetext
 	loadmovesprites
-	checkbit2 $0063
+	checkflag $0063
 	iftrue UnknownScript_0x18afaa
 	applymovement $2, MovementData_0x18afd0
 	2jump UnknownScript_0x18afae
--- a/maps/DanceTheatre.asm
+++ b/maps/DanceTheatre.asm
@@ -172,7 +172,7 @@
 ; 0x994f3
 
 UnknownScript_0x994f3: ; 0x994f3
-	checkbit2 $0063
+	checkflag $0063
 	iftrue UnknownScript_0x994ff
 	2writetext UnknownText_0x99891
 	closetext
--- a/maps/DayCare.asm
+++ b/maps/DayCare.asm
@@ -11,7 +11,7 @@
 ; 0x62f7b
 
 UnknownScript_0x62f7b: ; 0x62f7b
-	checkbit2 $0005
+	checkflag $0005
 	iftrue UnknownScript_0x62f88
 	clearevent $06e5
 	setevent $06e6
@@ -64,7 +64,7 @@
 GrannyScript_0x62fc3: ; 0x62fc3
 	faceplayer
 	loadfont
-	checkbit2 $0005
+	checkflag $0005
 	iftrue UnknownScript_0x62fd1
 	special $001f
 	closetext
--- a/maps/DragonShrine.asm
+++ b/maps/DragonShrine.asm
@@ -160,7 +160,7 @@
 	loadfont
 	2writetext UnknownText_0x18d9bf
 	closetext
-	setbit2 $0022
+	setflag $0022
 	playsound $009c
 	waitbutton
 	special $003d
--- a/maps/EcruteakCity.asm
+++ b/maps/EcruteakCity.asm
@@ -11,7 +11,7 @@
 ; 0x1a4005
 
 UnknownScript_0x1a4005: ; 0x1a4005
-	setbit2 $0048
+	setflag $0048
 	return
 ; 0x1a4009
 
--- a/maps/EcruteakGym.asm
+++ b/maps/EcruteakGym.asm
@@ -36,7 +36,7 @@
 	2writetext UnknownText_0x9a043
 	playsound $009c
 	waitbutton
-	setbit2 $001e
+	setflag $001e
 	checkcode $7
 	2call UnknownScript_0x99db7
 	domaptrigger GROUP_ECRUTEAK_HOUSE, MAP_ECRUTEAK_HOUSE, $1
@@ -233,7 +233,7 @@
 ; 0x99e4d
 
 MapEcruteakGymSignpost1Script: ; 0x99e4d
-	checkbit2 $001e
+	checkflag $001e
 	iftrue UnknownScript_0x99e56
 	jumpstd $002d
 ; 0x99e56
--- a/maps/EcruteakHouse.asm
+++ b/maps/EcruteakHouse.asm
@@ -79,7 +79,7 @@
 	loadfont
 	checkevent EVENT_CLEARED_RADIO_TOWER
 	iftrue UnknownScript_0x9807c
-	checkbit2 $001e
+	checkflag $001e
 	iftrue UnknownScript_0x98076
 	2writetext UnknownText_0x980d1
 	closetext
--- a/maps/EcruteakPokeCenter1F.asm
+++ b/maps/EcruteakPokeCenter1F.asm
@@ -51,7 +51,7 @@
 	playsound $0023
 	disappear $6
 	clearevent $0712
-	setbit2 $0053
+	setflag $0053
 	dotrigger $1
 	waitbutton
 	end
--- a/maps/ElmsLab.asm
+++ b/maps/ElmsLab.asm
@@ -105,7 +105,7 @@
 UnknownScript_0x78bee: ; 0x78bee
 	checkevent EVENT_GOT_MASTER_BALL_FROM_ELM
 	iftrue UnknownScript_0x78bfa
-	checkbit2 $0022
+	checkflag $0022
 	iftrue ElmGiveMasterBallScript
 UnknownScript_0x78bfa: ; 0x78bfa
 	checkevent EVENT_GOT_EVERSTONE_FROM_ELM
@@ -144,7 +144,7 @@
 UnknownScript_0x78c41: ; 0x78c41
 	checkevent EVENT_GOT_TOGEPI_EGG_FROM_ELMS_AIDE ; why are we checking it again?
 	iftrue ElmWaitingEggHatchScript
-	checkbit2 $001b
+	checkflag $001b
 	iftrue ElmAideHasEggScript
 	checkevent EVENT_GAVE_MYSTERY_EGG_TO_ELM
 	iftrue ElmStudyingEggScript
@@ -362,7 +362,7 @@
 	2writetext ElmAfterTheftText5
 	keeptextopen
 	setevent EVENT_GAVE_MYSTERY_EGG_TO_ELM
-	setbit2 $0010
+	setflag $0010
 	domaptrigger GROUP_ROUTE_29, MAP_ROUTE_29, $1
 	clearevent $0715
 	setevent $0714
@@ -615,7 +615,7 @@
 
 MapElmsLabSignpost14Script: ; 0x78f33
 	loadfont
-	checkbit2 $0043
+	checkflag $0043
 	iftrue UnknownScript_0x78f49
 	checkevent EVENT_ELM_CALLED_ABOUT_STOLEN_POKEMON
 	iftrue UnknownScript_0x78f43
--- a/maps/FastShipCabins.asm
+++ b/maps/FastShipCabins.asm
@@ -52,7 +52,7 @@
 	showemote $0, $3, 15
 	applymovement $4, MovementData_0x7600c
 	spriteface $3, $3
-	checkbit2 $0063
+	checkflag $0063
 	iftrue UnknownScript_0x75f03
 	loadfont
 	2writetext UnknownText_0x76284
--- a/maps/FastShipCabins_SE_SSE_CaptainsCabin.asm
+++ b/maps/FastShipCabins_SE_SSE_CaptainsCabin.asm
@@ -52,7 +52,7 @@
 	showemote $0, $3, 15
 	applymovement $4, MovementData_0x7600c
 	spriteface $3, $3
-	checkbit2 $0063
+	checkflag $0063
 	iftrue UnknownScript_0x75f03
 	loadfont
 	2writetext UnknownText_0x76284
--- a/maps/FuchsiaCity.asm
+++ b/maps/FuchsiaCity.asm
@@ -11,7 +11,7 @@
 ; 0x194b1e
 
 UnknownScript_0x194b1e: ; 0x194b1e
-	setbit2 $003e
+	setflag $003e
 	return
 ; 0x194b22
 
--- a/maps/FuchsiaGym.asm
+++ b/maps/FuchsiaGym.asm
@@ -7,7 +7,7 @@
 ; 0x195db9
 
 JanineScript_0x195db9: ; 0x195db9
-	checkbit2 $0027
+	checkflag $0027
 	iftrue UnknownScript_0x195e00
 	applymovement $2, MovementData_0x195f27
 	faceplayer
@@ -33,7 +33,7 @@
 	2writetext UnknownText_0x195feb
 	playsound $009c
 	waitbutton
-	setbit2 $0027
+	setflag $0027
 	2jump UnknownScript_0x195e02
 ; 0x195e00
 
@@ -221,7 +221,7 @@
 ; 0x195f17
 
 MapFuchsiaGymSignpost1Script: ; 0x195f17
-	checkbit2 $0027
+	checkflag $0027
 	iftrue UnknownScript_0x195f20
 	jumpstd $002d
 ; 0x195f20
--- a/maps/GoldenrodBikeShop.asm
+++ b/maps/GoldenrodBikeShop.asm
@@ -26,7 +26,7 @@
 	playsound $0091
 	waitbutton
 	itemnotify
-	setbit2 $0014
+	setflag $0014
 	setevent EVENT_GOT_BICYCLE
 UnknownScript_0x54775: ; 0x54775
 	2writetext UnknownText_0x5485f
--- a/maps/GoldenrodCity.asm
+++ b/maps/GoldenrodCity.asm
@@ -13,8 +13,8 @@
 ; 0x1988d8
 
 UnknownScript_0x1988d8: ; 0x1988d8
-	setbit2 $0046
-	setbit2 $0016
+	setflag $0046
+	setflag $0016
 	checkevent $00b9
 	iftrue UnknownScript_0x1988e7
 	clearevent $0769
@@ -36,7 +36,7 @@
 ; 0x198900
 
 UnknownScript_0x198900: ; 0x198900
-	checkbit2 $005e
+	checkflag $005e
 	iftrue UnknownScript_0x198908
 	appear $10
 UnknownScript_0x198908: ; 0x198908
@@ -144,7 +144,7 @@
 	playsound $001f
 	disappear $10
 	clearevent $076b
-	setbit2 $005e
+	setflag $005e
 	waitbutton
 	end
 ; 0x1989d7
@@ -192,7 +192,7 @@
 CooltrainerFScript_0x1989fd: ; 0x1989fd
 	faceplayer
 	loadfont
-	checkbit2 $0000
+	checkflag $0000
 	iftrue UnknownScript_0x198a0b
 	2writetext UnknownText_0x198b73
 	closetext
--- a/maps/GoldenrodDeptStore5F.asm
+++ b/maps/GoldenrodDeptStore5F.asm
@@ -67,7 +67,7 @@
 	loadfont
 	checkcode $b
 	if_not_equal SUNDAY, UnknownScript_0x56112
-	checkbit2 $005b
+	checkflag $005b
 	iftrue UnknownScript_0x56112
 	special $0059
 	2writetext UnknownText_0x56143
@@ -82,7 +82,7 @@
 	keeptextopen
 	verbosegiveitem TM_27, 1
 	iffalse UnknownScript_0x56116
-	setbit2 $005b
+	setflag $005b
 	loadmovesprites
 	end
 ; 0x560fd
@@ -99,7 +99,7 @@
 	keeptextopen
 	verbosegiveitem TM_21, 1
 	iffalse UnknownScript_0x56116
-	setbit2 $005b
+	setflag $005b
 	loadmovesprites
 	end
 ; 0x56112
--- a/maps/GoldenrodDeptStoreRoof.asm
+++ b/maps/GoldenrodDeptStoreRoof.asm
@@ -13,7 +13,7 @@
 ; 0x5671b
 
 UnknownScript_0x5671b: ; 0x5671b
-	checkbit2 $0061
+	checkflag $0061
 	iftrue UnknownScript_0x56722
 	return
 ; 0x56722
@@ -25,7 +25,7 @@
 ; 0x5672b
 
 UnknownScript_0x5672b: ; 0x5672b
-	checkbit2 $0061
+	checkflag $0061
 	iftrue UnknownScript_0x56738
 	setevent $06f0
 	clearevent $06f1
--- a/maps/GoldenrodFlowerShop.asm
+++ b/maps/GoldenrodFlowerShop.asm
@@ -15,7 +15,7 @@
 	iffalse UnknownScript_0x5539f
 	checkevent $00ba
 	iffalse UnknownScript_0x5538f
-	checkbit2 $001d
+	checkflag $001d
 	iffalse UnknownScript_0x5539c
 	faceplayer
 	loadfont
--- a/maps/GoldenrodGameCorner.asm
+++ b/maps/GoldenrodGameCorner.asm
@@ -24,7 +24,7 @@
 ; 0x56c11
 
 UnknownScript_0x56c11: ; 0x56c11
-	checkbit2 $005e
+	checkflag $005e
 	iftrue UnknownScript_0x56c19
 	disappear $d
 UnknownScript_0x56c19: ;0x56c19
--- a/maps/GoldenrodGym.asm
+++ b/maps/GoldenrodGym.asm
@@ -50,7 +50,7 @@
 UnknownScript_0x54044: ; 0x54044
 	checkevent EVENT_GOT_TM45_ATTRACT
 	iftrue UnknownScript_0x54077
-	checkbit2 $001d
+	checkflag $001d
 	iftrue UnknownScript_0x54064
 	2writetext UnknownText_0x54222
 	keeptextopen
@@ -58,7 +58,7 @@
 	2writetext UnknownText_0x54273
 	playsound $009c
 	waitbutton
-	setbit2 $001d
+	setflag $001d
 	checkcode $7
 	2call UnknownScript_0x5407d
 UnknownScript_0x54064: ; 0x54064
@@ -244,7 +244,7 @@
 ; 0x5410c
 
 MapGoldenrodGymSignpost1Script: ; 0x5410c
-	checkbit2 $001d
+	checkflag $001d
 	iftrue UnknownScript_0x54115
 	jumpstd $002d
 ; 0x54115
--- a/maps/IlexForest.asm
+++ b/maps/IlexForest.asm
@@ -528,7 +528,7 @@
 	pause 30
 	spriteface $0, $0
 	pause 20
-	clearbit2 $0064
+	clearflag $0064
 	special $008f
 	loadpokedata CELEBI, 30
 	startbattle
--- a/maps/IndigoPlateauPokeCenter1F.asm
+++ b/maps/IndigoPlateauPokeCenter1F.asm
@@ -46,7 +46,7 @@
 UnknownScript_0x180053: ; 0x180053
 	checkevent EVENT_BEAT_RIVAL_IN_MT_MOON
 	iffalse UnknownScript_0x18012b
-	checkbit2 $005d
+	checkflag $005d
 	iftrue UnknownScript_0x18012b
 	checkcode $b
 	if_equal SUNDAY, UnknownScript_0x18012b
@@ -69,7 +69,7 @@
 UnknownScript_0x180094: ; 0x180094
 	checkevent EVENT_BEAT_RIVAL_IN_MT_MOON
 	iffalse UnknownScript_0x18012b
-	checkbit2 $005d
+	checkflag $005d
 	iftrue UnknownScript_0x18012b
 	checkcode $b
 	if_equal SUNDAY, UnknownScript_0x18012b
@@ -135,7 +135,7 @@
 	disappear $5
 	dotrigger $0
 	playmapmusic
-	setbit2 $005d
+	setflag $005d
 UnknownScript_0x18012b: ; 0x18012b
 	end
 ; 0x18012c
--- a/maps/KrissHouse1F.asm
+++ b/maps/KrissHouse1F.asm
@@ -40,8 +40,8 @@
 	keeptextopen
 	stringtotext GearName, $1
 	2call UnknownScript_0x7a57e
-	setbit2 $0004
-	setbit2 $0002
+	setflag $0004
+	setflag $0002
 	addcellnum $1
 	dotrigger $1
 	setevent $06c7
--- a/maps/KurtsHouse.asm
+++ b/maps/KurtsHouse.asm
@@ -15,7 +15,7 @@
 	iffalse UnknownScript_0x18e177
 	checkevent $00c0
 	iftrue UnknownScript_0x18e177
-	checkbit2 $0050
+	checkflag $0050
 	iftrue UnknownScript_0x18e16f
 	disappear $5
 	appear $2
@@ -178,7 +178,7 @@
 
 UnknownScript_0x18e299: ; 0x18e299
 	setevent $0000
-	setbit2 $0050
+	setflag $0050
 UnknownScript_0x18e29f: ; 0x18e29f
 	2writetext UnknownText_0x18e779
 	closetext
@@ -204,7 +204,7 @@
 ; 0x18e2b4
 
 UnknownScript_0x18e2b4: ; 0x18e2b4
-	checkbit2 $0050
+	checkflag $0050
 	iftrue UnknownScript_0x18e3c5
 	2writetext UnknownText_0x18e7fb
 	keeptextopen
@@ -216,7 +216,7 @@
 ; 0x18e2ca
 
 UnknownScript_0x18e2ca: ; 0x18e2ca
-	checkbit2 $0050
+	checkflag $0050
 	iftrue UnknownScript_0x18e3c5
 	2writetext UnknownText_0x18e7fb
 	keeptextopen
@@ -228,7 +228,7 @@
 ; 0x18e2e0
 
 UnknownScript_0x18e2e0: ; 0x18e2e0
-	checkbit2 $0050
+	checkflag $0050
 	iftrue UnknownScript_0x18e3c5
 	2writetext UnknownText_0x18e7fb
 	keeptextopen
@@ -240,7 +240,7 @@
 ; 0x18e2f6
 
 UnknownScript_0x18e2f6: ; 0x18e2f6
-	checkbit2 $0050
+	checkflag $0050
 	iftrue UnknownScript_0x18e3c5
 	2writetext UnknownText_0x18e7fb
 	keeptextopen
@@ -252,7 +252,7 @@
 ; 0x18e30c
 
 UnknownScript_0x18e30c: ; 0x18e30c
-	checkbit2 $0050
+	checkflag $0050
 	iftrue UnknownScript_0x18e3c5
 	2writetext UnknownText_0x18e7fb
 	keeptextopen
@@ -264,7 +264,7 @@
 ; 0x18e322
 
 UnknownScript_0x18e322: ; 0x18e322
-	checkbit2 $0050
+	checkflag $0050
 	iftrue UnknownScript_0x18e3c5
 	2writetext UnknownText_0x18e7fb
 	keeptextopen
@@ -276,7 +276,7 @@
 ; 0x18e338
 
 UnknownScript_0x18e338: ; 0x18e338
-	checkbit2 $0050
+	checkflag $0050
 	iftrue UnknownScript_0x18e3c5
 	2writetext UnknownText_0x18e7fb
 	keeptextopen
@@ -297,12 +297,12 @@
 	loadmovesprites
 	setevent $00bf
 	takeitem GS_BALL, 1
-	setbit2 $0050
+	setflag $0050
 	end
 ; 0x18e368
 
 UnknownScript_0x18e368: ; 0x18e368
-	checkbit2 $0050
+	checkflag $0050
 	iffalse UnknownScript_0x18e378
 	2writetext UnknownText_0x18e934
 	closetext
--- a/maps/LakeofRage.asm
+++ b/maps/LakeofRage.asm
@@ -25,7 +25,7 @@
 ; 0x70012
 
 UnknownScript_0x70012: ; 0x70012
-	setbit2 $004a
+	setflag $004a
 	return
 ; 0x70016
 
--- a/maps/LavRadioTower1F.asm
+++ b/maps/LavRadioTower1F.asm
@@ -21,7 +21,7 @@
 GentlemanScript_0x7ee6c: ; 0x7ee6c
 	faceplayer
 	loadfont
-	checkbit2 $0003
+	checkflag $0003
 	iftrue .UnknownScript_0x7ee8e
 	checkevent EVENT_RETURNED_MACHINE_PART
 	iftrue .UnknownScript_0x7ee80
@@ -36,7 +36,7 @@
 	keeptextopen
 	stringtotext .expncardname, $1
 	2call .UnknownScript_0x7ee94
-	setbit2 $0003
+	setflag $0003
 .UnknownScript_0x7ee8e ; 0x7ee8e
 	2writetext UnknownText_0x7f141
 	closetext
@@ -56,7 +56,7 @@
 SuperNerdScript_0x7eea2: ; 0x7eea2
 	faceplayer
 	loadfont
-	checkbit2 $0003
+	checkflag $0003
 	iftrue UnknownScript_0x7eeb0
 	2writetext UnknownText_0x7f193
 	closetext
--- a/maps/LavenderTown.asm
+++ b/maps/LavenderTown.asm
@@ -11,7 +11,7 @@
 ; 0x1ad6e0
 
 UnknownScript_0x1ad6e0: ; 0x1ad6e0
-	setbit2 $003b
+	setflag $003b
 	return
 ; 0x1ad6e4
 
--- a/maps/MahoganyGym.asm
+++ b/maps/MahoganyGym.asm
@@ -23,7 +23,7 @@
 	2writetext UnknownText_0x199d3b
 	playsound $009c
 	waitbutton
-	setbit2 $0021
+	setflag $0021
 	checkcode $7
 	2call UnknownScript_0x199af6
 UnknownScript_0x199ac8: ; 0x199ac8
@@ -230,7 +230,7 @@
 ; 0x199b7d
 
 MapMahoganyGymSignpost1Script: ; 0x199b7d
-	checkbit2 $0021
+	checkflag $0021
 	iftrue UnknownScript_0x199b86
 	jumpstd $002d
 ; 0x199b86
--- a/maps/MahoganyRedGyaradosSpeechHouse.asm
+++ b/maps/MahoganyRedGyaradosSpeechHouse.asm
@@ -13,7 +13,7 @@
 TeacherScript_0x199982: ; 0x199982
 	faceplayer
 	loadfont
-	checkbit2 $0013
+	checkflag $0013
 	iftrue UnknownScript_0x199990
 	2writetext UnknownText_0x199a0e
 	closetext
--- a/maps/MahoganyTown.asm
+++ b/maps/MahoganyTown.asm
@@ -23,7 +23,7 @@
 ; 0x19000f
 
 UnknownScript_0x19000f: ; 0x19000f
-	setbit2 $0049
+	setflag $0049
 	return
 ; 0x190013
 
--- a/maps/ManiasHouse.asm
+++ b/maps/ManiasHouse.asm
@@ -30,7 +30,7 @@
 ; 0x9d2a4
 
 UnknownScript_0x9d2a4: ; 0x9d2a4
-	checkbit2 $0055
+	checkflag $0055
 	iffalse UnknownScript_0x9d2bc
 	2writetext UnknownText_0x9d3ed
 	closetext
--- a/maps/MountMoonSquare.asm
+++ b/maps/MountMoonSquare.asm
@@ -30,7 +30,7 @@
 ; 0x7709a
 
 UnknownScript_0x7709a: ; 0x7709a
-	checkbit2 $0058
+	checkflag $0058
 	iftrue UnknownScript_0x77117
 	checkcode $b
 	if_not_equal MONDAY, UnknownScript_0x77117
@@ -73,7 +73,7 @@
 	disappear $3
 	stopfollow
 	clearevent $00ec
-	setbit2 $0058
+	setflag $0058
 	end
 ; 0x77117
 
--- a/maps/MrPokemonsHouse.asm
+++ b/maps/MrPokemonsHouse.asm
@@ -100,7 +100,7 @@
 	2writetext UnknownText_0x1973cc
 	playsound $0001
 	waitbutton
-	setbit2 $000b
+	setflag $000b
 	2writetext UnknownText_0x1973de
 	closetext
 	loadmovesprites
--- a/maps/NationalPark.asm
+++ b/maps/NationalPark.asm
@@ -88,7 +88,7 @@
 	writecode $17, $5
 	talkaftercancel
 	loadfont
-	checkbit2 $0065
+	checkflag $0065
 	iftrue UnknownScript_0x5c088
 	checkcellnum $5
 	iftrue UnknownScript_0x5c108
@@ -131,7 +131,7 @@
 	checkevent EVENT_CLEARED_RADIO_TOWER
 	iftrue UnknownScript_0x5c0d9
 UnknownScript_0x5c0b9: ; 0x5c0b9
-	checkbit2 $0047
+	checkflag $0047
 	iftrue UnknownScript_0x5c0cc
 UnknownScript_0x5c0bf: ; 0x5c0bf
 	loadtrainer SCHOOLBOY, JACK1
@@ -138,7 +138,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $d9f2, $1
-	clearbit2 $0065
+	clearflag $0065
 	end
 ; 0x5c0cc
 
@@ -147,7 +147,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $d9f2, $2
-	clearbit2 $0065
+	clearflag $0065
 	end
 ; 0x5c0d9
 
@@ -156,7 +156,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $d9f2, $3
-	clearbit2 $0065
+	clearflag $0065
 	end
 ; 0x5c0e6
 
@@ -165,7 +165,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $d9f2, $4
-	clearbit2 $0065
+	clearflag $0065
 	end
 ; 0x5c0f3
 
@@ -173,7 +173,7 @@
 	loadtrainer SCHOOLBOY, JACK5
 	startbattle
 	returnafterbattle
-	clearbit2 $0065
+	clearflag $0065
 	end
 ; 0x5c0fc
 
@@ -265,7 +265,7 @@
 	writecode $17, $6
 	talkaftercancel
 	loadfont
-	checkbit2 $007d
+	checkflag $007d
 	iftrue UnknownScript_0x5c177
 	checkcellnum $6
 	iftrue UnknownScript_0x5c19b
@@ -295,7 +295,7 @@
 	2call UnknownScript_0x5c1a7
 	verbosegiveitem NUGGET, 1
 	iffalse UnknownScript_0x5c186
-	clearbit2 $007d
+	clearflag $007d
 	2jump UnknownScript_0x5c19b
 ; 0x5c186
 
--- a/maps/NewBarkTown.asm
+++ b/maps/NewBarkTown.asm
@@ -23,7 +23,7 @@
 ; 0x1a800f
 
 UnknownScript_0x1a800f: ; 0x1a800f
-	setbit2 $0041
+	setflag $0041
 	clearevent $0076
 	return
 ; 0x1a8016
--- a/maps/OlivineCity.asm
+++ b/maps/OlivineCity.asm
@@ -23,7 +23,7 @@
 ; 0x1a882f
 
 UnknownScript_0x1a882f: ; 0x1a882f
-	setbit2 $0047
+	setflag $0047
 	return
 ; 0x1a8833
 
--- a/maps/OlivineGym.asm
+++ b/maps/OlivineGym.asm
@@ -23,7 +23,7 @@
 	2writetext UnknownText_0x9c33a
 	playsound $009c
 	waitbutton
-	setbit2 $001f
+	setflag $001f
 	checkcode $7
 	2call UnknownScript_0x9c178
 UnknownScript_0x9c159: ; 0x9c159
@@ -92,7 +92,7 @@
 ; 0x9c1a9
 
 MapOlivineGymSignpost1Script: ; 0x9c1a9
-	checkbit2 $001f
+	checkflag $001f
 	iftrue UnknownScript_0x9c1b2
 	jumpstd $002d
 ; 0x9c1b2
--- a/maps/OlivineLighthouse2F.asm
+++ b/maps/OlivineLighthouse2F.asm
@@ -59,7 +59,7 @@
 	writecode $17, $7
 	talkaftercancel
 	loadfont
-	checkbit2 $0066
+	checkflag $0066
 	iftrue UnknownScript_0x5afc7
 	checkcellnum $7
 	iftrue UnknownScript_0x5b05f
@@ -103,7 +103,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $d9f4, $1
-	clearbit2 $0066
+	clearflag $0066
 	end
 ; 0x5b001
 
@@ -112,7 +112,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $d9f4, $2
-	clearbit2 $0066
+	clearflag $0066
 	end
 ; 0x5b00e
 
@@ -121,7 +121,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $d9f4, $3
-	clearbit2 $0066
+	clearflag $0066
 	end
 ; 0x5b01b
 
@@ -129,7 +129,7 @@
 	loadtrainer SAILOR, HUEY4
 	startbattle
 	returnafterbattle
-	clearbit2 $0066
+	clearflag $0066
 	checkevent EVENT_HUEY_PROTEIN
 	iftrue UnknownScript_0x5b03f
 	checkevent $0265
--- a/maps/PalletTown.asm
+++ b/maps/PalletTown.asm
@@ -11,7 +11,7 @@
 ; 0x1ac6d1
 
 UnknownScript_0x1ac6d1: ; 0x1ac6d1
-	setbit2 $0035
+	setflag $0035
 	return
 ; 0x1ac6d5
 
--- a/maps/PewterCity.asm
+++ b/maps/PewterCity.asm
@@ -11,7 +11,7 @@
 ; 0x18c005
 
 UnknownScript_0x18c005: ; 0x18c005
-	setbit2 $0037
+	setflag $0037
 	return
 ; 0x18c009
 
--- a/maps/PewterGym.asm
+++ b/maps/PewterGym.asm
@@ -9,7 +9,7 @@
 BrockScript_0x1a2864: ; 0x1a2864
 	faceplayer
 	loadfont
-	checkbit2 $0023
+	checkflag $0023
 	iftrue UnknownScript_0x1a2892
 	2writetext UnknownText_0x1a28d0
 	closetext
@@ -24,7 +24,7 @@
 	2writetext UnknownText_0x1a2a3d
 	playsound $009c
 	waitbutton
-	setbit2 $0023
+	setflag $0023
 	2writetext UnknownText_0x1a2a57
 	closetext
 	loadmovesprites
@@ -85,7 +85,7 @@
 ; 0x1a28c0
 
 MapPewterGymSignpost1Script: ; 0x1a28c0
-	checkbit2 $0023
+	checkflag $0023
 	iftrue UnknownScript_0x1a28c9
 	jumpstd $002d
 ; 0x1a28c9
--- a/maps/PokeCenter2F.asm
+++ b/maps/PokeCenter2F.asm
@@ -333,7 +333,7 @@
 LinkReceptionistScript_0x192a2d: ; 0x192a2d
 	checkevent $0712
 	iftrue UnknownScript_0x192a25
-	checkbit2 $0053
+	checkflag $0053
 	iftrue UnknownScript_0x192a25
 	special $000a
 	faceplayer
@@ -460,7 +460,7 @@
 ; 0x192b04
 
 UnknownScript_0x192b04: ; 0x192b04
-	checkbit2 $0063
+	checkflag $0063
 	iftrue UnknownScript_0x192b12
 	applymovement2 MovementData_0x192cca
 	applymovement $0, MovementData_0x192cde
@@ -485,7 +485,7 @@
 	writebyte $80
 	special $0098
 	applymovement $0, MovementData_0x192d1c
-	setbit2 $009f
+	setflag $009f
 	special $0038
 	loadfont
 	2writetext UnknownText_0x19329a
@@ -497,7 +497,7 @@
 ; 0x192b50
 
 UnknownScript_0x192b50: ; 0x192b50
-	checkbit2 $009f
+	checkflag $009f
 	iftrue UnknownScript_0x192b63
 	applymovement $2, MovementData_0x192d04
 	applymovement $0, MovementData_0x192cf5
@@ -508,7 +508,7 @@
 UnknownScript_0x192b63: ; 0x192b63
 	applymovement $2, MovementData_0x192d04
 	applymovement $0, MovementData_0x192d28
-	clearbit2 $009f
+	clearflag $009f
 	playsound $00ca
 	applymovement $0, MovementData_0x192d17
 	writebyte $90
@@ -521,7 +521,7 @@
 ; 0x192b8a
 
 UnknownScript_0x192b8a: ; 0x192b8a
-	checkbit2 $009f
+	checkflag $009f
 	iftrue UnknownScript_0x192b9d
 	applymovement $3, MovementData_0x192d04
 	applymovement $0, MovementData_0x192cf5
@@ -532,7 +532,7 @@
 UnknownScript_0x192b9d: ; 0x192b9d
 	applymovement $3, MovementData_0x192d04
 	applymovement $0, MovementData_0x192d28
-	clearbit2 $009f
+	clearflag $009f
 	playsound $00ca
 	applymovement $0, MovementData_0x192d17
 	writebyte $90
@@ -545,7 +545,7 @@
 ; 0x192bc4
 
 UnknownScript_0x192bc4: ; 0x192bc4
-	checkbit2 $0063
+	checkflag $0063
 	iftrue UnknownScript_0x192bec
 	checkcode $9
 	if_equal $2, UnknownScript_0x192bdc
@@ -604,7 +604,7 @@
 	special $0098
 	applymovement $0, MovementData_0x192d22
 	faceperson $0, $4
-	setbit2 $009f
+	setflag $009f
 	special $0038
 	loadfont
 	2writetext UnknownText_0x19329a
@@ -617,7 +617,7 @@
 
 UnknownScript_0x192c4e: ; 0x192c4e
 	special $0008
-	checkbit2 $009f
+	checkflag $009f
 	iftrue UnknownScript_0x192c66
 	applymovement $4, MovementData_0x192d08
 	applymovement $0, MovementData_0x192cf9
@@ -628,7 +628,7 @@
 UnknownScript_0x192c66: ; 0x192c66
 	applymovement $4, MovementData_0x192d08
 	applymovement $0, MovementData_0x192cfc
-	clearbit2 $009f
+	clearflag $009f
 	playsound $00ca
 	applymovement $0, MovementData_0x192d17
 	writebyte $90
--- a/maps/RadioTower1F.asm
+++ b/maps/RadioTower1F.asm
@@ -9,7 +9,7 @@
 ReceptionistScript_0x5cd29: ; 0x5cd29
 	faceplayer
 	loadfont
-	checkbit2 $0013
+	checkflag $0013
 	iftrue UnknownScript_0x5cd37
 	2writetext UnknownText_0x5ce77
 	closetext
@@ -34,7 +34,7 @@
 	special $0054
 UnknownScript_0x5cd4c: ; 0x5cd4c
 	special $0055
-	checkbit2 $004e
+	checkflag $004e
 	iftrue UnknownScript_0x5cd84
 	2writetext UnknownText_0x5cf3a
 	keeptextopen
@@ -73,7 +73,7 @@
 	giveitem MASTER_BALL, $1
 	iffalse UnknownScript_0x5cdcf
 	itemnotify
-	setbit2 $004e
+	setflag $004e
 	2jump UnknownScript_0x5cd84
 ; 0x5cd9f
 
@@ -85,7 +85,7 @@
 	giveitem EXP_SHARE, $1
 	iffalse UnknownScript_0x5cdcf
 	itemnotify
-	setbit2 $004e
+	setflag $004e
 	2jump UnknownScript_0x5cd84
 ; 0x5cdb4
 
@@ -97,7 +97,7 @@
 	giveitem PP_UP, $1
 	iffalse UnknownScript_0x5cdcf
 	itemnotify
-	setbit2 $004e
+	setflag $004e
 	2jump UnknownScript_0x5cd84
 ; 0x5cdc9
 
@@ -118,7 +118,7 @@
 CooltrainerFScript_0x5cdd5: ; 0x5cdd5
 	faceplayer
 	loadfont
-	checkbit2 $0000
+	checkflag $0000
 	iftrue UnknownScript_0x5ce2d
 	2writetext UnknownText_0x5d12d
 	yesorno
@@ -154,7 +154,7 @@
 	2call UnknownScript_0x5ce3e
 	2writetext UnknownText_0x5d3c0
 	keeptextopen
-	setbit2 $0000
+	setflag $0000
 UnknownScript_0x5ce2d: ; 0x5ce2d
 	2writetext UnknownText_0x5d3e5
 	closetext
--- a/maps/RadioTower2F.asm
+++ b/maps/RadioTower2F.asm
@@ -17,7 +17,7 @@
 TeacherScript_0x5d701: ; 0x5d701
 	faceplayer
 	loadfont
-	checkbit2 $0013
+	checkflag $0013
 	iftrue UnknownScript_0x5d70f
 	2writetext UnknownText_0x5d956
 	closetext
@@ -168,15 +168,15 @@
 BuenaScript_0x5d775: ; 0x5d775
 	faceplayer
 	loadfont
-	checkbit2 $0013
+	checkflag $0013
 	iftrue UnknownScript_0x5d865
 	checkevent EVENT_MET_BUENA
 	iffalse UnknownScript_0x5d800
-	checkbit2 $0060
+	checkflag $0060
 	iftrue UnknownScript_0x5d82f
 	checkcode $a
 	if_greater_than $12, UnknownScript_0x5d893
-	checkbit2 $005f
+	checkflag $005f
 	iffalse UnknownScript_0x5d80a
 	checkitem BLUE_CARD
 	iffalse UnknownScript_0x5d86b
@@ -213,7 +213,7 @@
 	writevarcode $18
 	waitbutton
 	playsound $0022
-	setbit2 $0060
+	setflag $0060
 	pause 20
 	spriteface $b, $3
 	loadfont
@@ -272,7 +272,7 @@
 ; 0x5d845
 
 UnknownScript_0x5d845: ; 0x5d845
-	setbit2 $0060
+	setflag $0060
 	loadfont
 	2writetext UnknownText_0x5e01c
 	closetext
--- a/maps/RadioTower5F.asm
+++ b/maps/RadioTower5F.asm
@@ -123,12 +123,12 @@
 	special $0032
 	setevent $0571
 	setevent EVENT_CLEARED_RADIO_TOWER
-	clearbit2 $0013
+	clearflag $0013
 	setevent $06cc
 	setevent $06cd
 	setevent $06ce
 	clearevent $0736
-	clearbit2 $0017
+	clearflag $0017
 	clearevent $06cf
 	clearevent $06d0
 	setevent $06e3
--- a/maps/Route16.asm
+++ b/maps/Route16.asm
@@ -15,12 +15,12 @@
 	if_greater_than $5, UnknownScript_0x1ad328
 	checkcode $12
 	if_less_than $d, UnknownScript_0x1ad328
-	setbit2 $0019
+	setflag $0019
 	return
 ; 0x1ad328
 
 UnknownScript_0x1ad328: ; 0x1ad328
-	clearbit2 $0019
+	clearflag $0019
 	return
 ; 0x1ad32c
 
--- a/maps/Route17.asm
+++ b/maps/Route17.asm
@@ -11,8 +11,8 @@
 ; 0x1ad0ab
 
 UnknownScript_0x1ad0ab: ; 0x1ad0ab
-	setbit2 $0019
-	setbit2 $001a
+	setflag $0019
+	setflag $001a
 	return
 ; 0x1ad0b2
 
--- a/maps/Route23.asm
+++ b/maps/Route23.asm
@@ -11,7 +11,7 @@
 ; 0x1ae533
 
 UnknownScript_0x1ae533: ; 0x1ae533
-	setbit2 $0040
+	setflag $0040
 	return
 ; 0x1ae537
 
--- a/maps/Route26.asm
+++ b/maps/Route26.asm
@@ -59,7 +59,7 @@
 	writecode $17, $b
 	talkaftercancel
 	loadfont
-	checkbit2 $0067
+	checkflag $0067
 	iftrue UnknownScript_0x1a4d79
 	checkcellnum $b
 	iftrue UnknownScript_0x1a4dcb
@@ -101,7 +101,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $d9f5, $1
-	clearbit2 $0067
+	clearflag $0067
 	end
 ; 0x1a4da9
 
@@ -110,7 +110,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $d9f5, $2
-	clearbit2 $0067
+	clearflag $0067
 	end
 ; 0x1a4db6
 
@@ -118,7 +118,7 @@
 	loadtrainer COOLTRAINERM, GAVEN2
 	startbattle
 	returnafterbattle
-	clearbit2 $0067
+	clearflag $0067
 	end
 ; 0x1a4dbf
 
@@ -210,7 +210,7 @@
 	writecode $17, $c
 	talkaftercancel
 	loadfont
-	checkbit2 $0068
+	checkflag $0068
 	iftrue UnknownScript_0x1a4e35
 	checkcellnum $c
 	iftrue UnknownScript_0x1a4e87
@@ -252,7 +252,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $d9f6, $1
-	clearbit2 $0068
+	clearflag $0068
 	end
 ; 0x1a4e65
 
@@ -261,7 +261,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $d9f6, $2
-	clearbit2 $0068
+	clearflag $0068
 	end
 ; 0x1a4e72
 
@@ -269,7 +269,7 @@
 	loadtrainer COOLTRAINERF, BETH3
 	startbattle
 	returnafterbattle
-	clearbit2 $0068
+	clearflag $0068
 	end
 ; 0x1a4e7b
 
--- a/maps/Route27.asm
+++ b/maps/Route27.asm
@@ -98,9 +98,9 @@
 	writecode $17, $d
 	talkaftercancel
 	loadfont
-	checkbit2 $0069
+	checkflag $0069
 	iftrue UnknownScript_0x1a08ff
-	checkbit2 $007e
+	checkflag $007e
 	iftrue UnknownScript_0x1a0945
 	checkcellnum $d
 	iftrue UnknownScript_0x1a0963
@@ -142,7 +142,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $d9f7, $1
-	clearbit2 $0069
+	clearflag $0069
 	end
 ; 0x1a092f
 
@@ -151,7 +151,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $d9f7, $2
-	clearbit2 $0069
+	clearflag $0069
 	end
 ; 0x1a093c
 
@@ -159,7 +159,7 @@
 	loadtrainer BIRD_KEEPER, JOSE3
 	startbattle
 	returnafterbattle
-	clearbit2 $0069
+	clearflag $0069
 	end
 ; 0x1a0945
 
@@ -167,7 +167,7 @@
 	2call UnknownScript_0x1a0973
 	verbosegiveitem STAR_PIECE, 1
 	iffalse UnknownScript_0x1a0954
-	clearbit2 $007e
+	clearflag $007e
 	2jump UnknownScript_0x1a0963
 ; 0x1a0954
 
@@ -302,7 +302,7 @@
 	writecode $17, $e
 	talkaftercancel
 	loadfont
-	checkbit2 $006a
+	checkflag $006a
 	iftrue UnknownScript_0x1a09e9
 	checkcellnum $e
 	iftrue UnknownScript_0x1a0a3b
@@ -344,7 +344,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $d9f8, $1
-	clearbit2 $006a
+	clearflag $006a
 	end
 ; 0x1a0a19
 
@@ -353,7 +353,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $d9f8, $2
-	clearbit2 $006a
+	clearflag $006a
 	end
 ; 0x1a0a26
 
@@ -361,7 +361,7 @@
 	loadtrainer COOLTRAINERF, REENA3
 	startbattle
 	returnafterbattle
-	clearbit2 $006a
+	clearflag $006a
 	end
 ; 0x1a0a2f
 
--- a/maps/Route29.asm
+++ b/maps/Route29.asm
@@ -23,7 +23,7 @@
 ; 0x1a0f5b
 
 UnknownScript_0x1a0f5b: ; 0x1a0f5b
-	checkbit2 $001b
+	checkflag $001b
 	iftrue UnknownScript_0x1a0f64
 UnknownScript_0x1a0f61: ; 0x1a0f61
 	disappear $8
--- a/maps/Route30.asm
+++ b/maps/Route30.asm
@@ -51,7 +51,7 @@
 	writecode $17, $f
 	talkaftercancel
 	loadfont
-	checkbit2 $006b
+	checkflag $006b
 	iftrue UnknownScript_0x1a16e0
 	checkcellnum $f
 	iftrue UnknownScript_0x1a178f
@@ -91,10 +91,10 @@
 	checkevent EVENT_CLEARED_RADIO_TOWER
 	iftrue UnknownScript_0x1a173e
 UnknownScript_0x1a170b: ; 0x1a170b
-	checkbit2 $0047
+	checkflag $0047
 	iftrue UnknownScript_0x1a1731
 UnknownScript_0x1a1711: ; 0x1a1711
-	checkbit2 $0046
+	checkflag $0046
 	iftrue UnknownScript_0x1a1724
 UnknownScript_0x1a1717: ; 0x1a717
 	loadtrainer YOUNGSTER, JOEY1
@@ -101,7 +101,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $d9f9, $1
-	clearbit2 $006b
+	clearflag $006b
 	end
 ; 0x1a1724
 
@@ -110,7 +110,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $d9f9, $2
-	clearbit2 $006b
+	clearflag $006b
 	end
 ; 0x1a1731
 
@@ -119,7 +119,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $d9f9, $3
-	clearbit2 $006b
+	clearflag $006b
 	end
 ; 0x1a173e
 
@@ -128,7 +128,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $d9f9, $4
-	clearbit2 $006b
+	clearflag $006b
 	end
 ; 0x1a174b
 
@@ -136,7 +136,7 @@
 	loadtrainer YOUNGSTER, JOEY5
 	startbattle
 	returnafterbattle
-	clearbit2 $006b
+	clearflag $006b
 	checkevent EVENT_JOEY_HP_UP
 	iftrue UnknownScript_0x1a176f
 	checkevent $0266
--- a/maps/Route31.asm
+++ b/maps/Route31.asm
@@ -45,9 +45,9 @@
 	writecode $17, $10
 	talkaftercancel
 	loadfont
-	checkbit2 $006c
+	checkflag $006c
 	iftrue UnknownScript_0x1a5493
-	checkbit2 $007f
+	checkflag $007f
 	iftrue UnknownScript_0x1a5507
 	checkcellnum $10
 	iftrue UnknownScript_0x1a5558
@@ -87,10 +87,10 @@
 	checkevent EVENT_CLEARED_RADIO_TOWER
 	iftrue UnknownScript_0x1a54f1
 UnknownScript_0x1a54be: ; 0x1a54be
-	checkbit2 $0049
+	checkflag $0049
 	iftrue UnknownScript_0x1a54e4
 UnknownScript_0x1a54c4: ; 0x1a54c4
-	checkbit2 $0046
+	checkflag $0046
 	iftrue UnknownScript_0x1a54d7
 UnknownScript_0x1a54ca: ; 0x1a54ca
 	loadtrainer BUG_CATCHER, WADE1
@@ -97,7 +97,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $d9fa, $1
-	clearbit2 $006c
+	clearflag $006c
 	end
 ; 0x1a54d7
 
@@ -106,7 +106,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $d9fa, $2
-	clearbit2 $006c
+	clearflag $006c
 	end
 ; 0x1a54e4
 
@@ -115,7 +115,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $d9fa, $3
-	clearbit2 $006c
+	clearflag $006c
 	end
 ; 0x1a54f1
 
@@ -124,7 +124,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $d9fa, $4
-	clearbit2 $006c
+	clearflag $006c
 	end
 ; 0x1a54fe
 
@@ -132,7 +132,7 @@
 	loadtrainer BUG_CATCHER, WADE5
 	startbattle
 	returnafterbattle
-	clearbit2 $006c
+	clearflag $006c
 	end
 ; 0x1a5507
 
@@ -168,7 +168,7 @@
 	verbosegiveitem BITTER_BERRY, 1
 	iffalse UnknownScript_0x1a5549
 UnknownScript_0x1a5543: ; 0x1a5543
-	clearbit2 $007f
+	clearflag $007f
 	2jump UnknownScript_0x1a5558
 ; 0x1a5549
 
--- a/maps/Route32.asm
+++ b/maps/Route32.asm
@@ -45,7 +45,7 @@
 	loadfont
 	checkevent EVENT_GOT_MIRACLE_SEED_IN_ROUTE_32
 	iftrue UnknownScript_0x1904a5
-	checkbit2 $001b
+	checkflag $001b
 	iffalse UnknownScript_0x19049f
 	checkevent EVENT_GOT_TOGEPI_EGG_FROM_ELMS_AIDE
 	iftrue UnknownScript_0x19048f
@@ -230,9 +230,9 @@
 	writecode $17, $11
 	talkaftercancel
 	loadfont
-	checkbit2 $006d
+	checkflag $006d
 	iftrue UnknownScript_0x19057d
-	checkbit2 $0052
+	checkflag $0052
 	iftrue UnknownScript_0x1905f1
 	checkcellnum $11
 	iftrue UnknownScript_0x190603
@@ -272,10 +272,10 @@
 	checkevent $0044
 	iftrue UnknownScript_0x1905db
 UnknownScript_0x1905a8: ; 0x1905a8
-	checkbit2 $004a
+	checkflag $004a
 	iftrue UnknownScript_0x1905ce
 UnknownScript_0x1905ae: ; 0x1905ae
-	checkbit2 $0048
+	checkflag $0048
 	iftrue UnknownScript_0x1905c1
 UnknownScript_0x1905b4: ; 0x1905b4
 	loadtrainer FISHER, RALPH1
@@ -282,7 +282,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $d9fb, $1
-	clearbit2 $006d
+	clearflag $006d
 	end
 ; 0x1905c1
 
@@ -291,7 +291,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $d9fb, $2
-	clearbit2 $006d
+	clearflag $006d
 	end
 ; 0x1905ce
 
@@ -300,7 +300,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $d9fb, $3
-	clearbit2 $006d
+	clearflag $006d
 	end
 ; 0x1905db
 
@@ -309,7 +309,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $d9fb, $4
-	clearbit2 $006d
+	clearflag $006d
 	end
 ; 0x1905e8
 
@@ -317,7 +317,7 @@
 	loadtrainer FISHER, RALPH5
 	startbattle
 	returnafterbattle
-	clearbit2 $006d
+	clearflag $006d
 	end
 ; 0x1905f1
 
@@ -416,7 +416,7 @@
 	writecode $17, $12
 	talkaftercancel
 	loadfont
-	checkbit2 $006e
+	checkflag $006e
 	iftrue UnknownScript_0x19066d
 	checkcellnum $12
 	iftrue UnknownScript_0x1906ed
@@ -459,7 +459,7 @@
 	checkevent EVENT_CLEARED_ROCKET_HIDEOUT
 	iftrue UnknownScript_0x1906be
 UnknownScript_0x19069e: ; 0x19069e
-	checkbit2 $0048
+	checkflag $0048
 	iftrue UnknownScript_0x1906b1
 UnknownScript_0x1906a4: ; 0x1906a4
 	loadtrainer PICNICKER, LIZ1
@@ -466,7 +466,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $d9fc, $1
-	clearbit2 $006e
+	clearflag $006e
 	end
 ; 0x1906b1
 
@@ -475,7 +475,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $d9fc, $2
-	clearbit2 $006e
+	clearflag $006e
 	end
 ; 0x1906be
 
@@ -484,7 +484,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $d9fc, $3
-	clearbit2 $006e
+	clearflag $006e
 	end
 ; 0x1906cb
 
@@ -493,7 +493,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $d9fc, $4
-	clearbit2 $006e
+	clearflag $006e
 	end
 ; 0x1906d8
 
@@ -501,7 +501,7 @@
 	loadtrainer PICNICKER, LIZ5
 	startbattle
 	returnafterbattle
-	clearbit2 $006e
+	clearflag $006e
 	end
 ; 0x1906e1
 
--- a/maps/Route33.asm
+++ b/maps/Route33.asm
@@ -34,9 +34,9 @@
 	writecode $17, $13
 	talkaftercancel
 	loadfont
-	checkbit2 $006f
+	checkflag $006f
 	iftrue UnknownScript_0x1ac051
-	checkbit2 $00a0
+	checkflag $00a0
 	iftrue UnknownScript_0x1ac0c5
 	checkcellnum $13
 	iftrue UnknownScript_0x1ac0d7
@@ -79,7 +79,7 @@
 	checkevent EVENT_CLEARED_RADIO_TOWER
 	iftrue UnknownScript_0x1ac0a2
 UnknownScript_0x1ac082: ; 0x1ac082
-	checkbit2 $0047
+	checkflag $0047
 	iftrue UnknownScript_0x1ac095
 UnknownScript_0x1ac088: ; 0x1ac088
 	loadtrainer HIKER, ANTHONY2
@@ -86,7 +86,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $d9fd, $1
-	clearbit2 $006f
+	clearflag $006f
 	end
 ; 0x1ac095
 
@@ -95,7 +95,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $d9fd, $2
-	clearbit2 $006f
+	clearflag $006f
 	end
 ; 0x1ac0a2
 
@@ -104,7 +104,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $d9fd, $3
-	clearbit2 $006f
+	clearflag $006f
 	end
 ; 0x1ac0af
 
@@ -113,7 +113,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $d9fd, $4
-	clearbit2 $006f
+	clearflag $006f
 	end
 ; 0x1ac0bc
 
@@ -121,7 +121,7 @@
 	loadtrainer HIKER, ANTHONY5
 	startbattle
 	returnafterbattle
-	clearbit2 $006f
+	clearflag $006f
 	end
 ; 0x1ac0c5
 
--- a/maps/Route34.asm
+++ b/maps/Route34.asm
@@ -11,7 +11,7 @@
 ; 0x78005
 
 UnknownScript_0x78005: ; 0x78005
-	checkbit2 $0005
+	checkflag $0005
 	iftrue UnknownScript_0x78014
 	clearevent $06e5
 	setevent $06e6
@@ -25,7 +25,7 @@
 ; 0x7801d
 
 UnknownScript_0x7801d: ; 0x7801d
-	checkbit2 $0006
+	checkflag $0006
 	iffalse UnknownScript_0x78029
 	clearevent $06e7
 	2jump UnknownScript_0x7802f
@@ -37,7 +37,7 @@
 ; 0x7802f
 
 UnknownScript_0x7802f: ; 0x7802f
-	checkbit2 $0007
+	checkflag $0007
 	iffalse UnknownScript_0x78039
 	clearevent $06e8
 	return
@@ -55,7 +55,7 @@
 	closetext
 	loadmovesprites
 	if_equal $1, UnknownScript_0x7805a
-	clearbit2 $0005
+	clearflag $0005
 	checkcode $9
 	if_equal $3, UnknownScript_0x7805b
 	applymovement $8, MovementData_0x78333
@@ -110,9 +110,9 @@
 	writecode $17, $14
 	talkaftercancel
 	loadfont
-	checkbit2 $0070
+	checkflag $0070
 	iftrue UnknownScript_0x780bd
-	checkbit2 $0061
+	checkflag $0061
 	iftrue UnknownScript_0x78131
 	checkcellnum $14
 	iftrue UnknownScript_0x78143
@@ -152,10 +152,10 @@
 	checkevent $0044
 	iftrue UnknownScript_0x7811b
 UnknownScript_0x780e8: ; 0x780e8
-	checkbit2 $004b
+	checkflag $004b
 	iftrue UnknownScript_0x7810e
 UnknownScript_0x780ee: ; 0x780ee
-	checkbit2 $0045
+	checkflag $0045
 	iftrue UnknownScript_0x78101
 UnknownScript_0x780f4: ; 0x780f4
 	loadtrainer CAMPER, TODD1
@@ -162,7 +162,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $d9fe, $1
-	clearbit2 $0070
+	clearflag $0070
 	end
 ; 0x78101
 
@@ -171,7 +171,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $d9fe, $2
-	clearbit2 $0070
+	clearflag $0070
 	end
 ; 0x7810e
 
@@ -180,7 +180,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $d9fe, $3
-	clearbit2 $0070
+	clearflag $0070
 	end
 ; 0x7811b
 
@@ -189,7 +189,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $d9fe, $4
-	clearbit2 $0070
+	clearflag $0070
 	end
 ; 0x78128
 
@@ -197,7 +197,7 @@
 	loadtrainer CAMPER, TODD5
 	startbattle
 	returnafterbattle
-	clearbit2 $0070
+	clearflag $0070
 	end
 ; 0x78131
 
@@ -267,9 +267,9 @@
 	writecode $17, $15
 	talkaftercancel
 	loadfont
-	checkbit2 $0071
+	checkflag $0071
 	iftrue UnknownScript_0x7819f
-	checkbit2 $0080
+	checkflag $0080
 	iftrue UnknownScript_0x78213
 	checkcellnum $15
 	iftrue UnknownScript_0x78234
@@ -312,7 +312,7 @@
 	checkevent EVENT_CLEARED_RADIO_TOWER
 	iftrue UnknownScript_0x781f0
 UnknownScript_0x781d0: ; 0x781d0
-	checkbit2 $0049
+	checkflag $0049
 	iftrue UnknownScript_0x781e3
 UnknownScript_0x781d6: ; 0x781d6
 	loadtrainer PICNICKER, GINA1
@@ -319,7 +319,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $d9ff, $1
-	clearbit2 $0071
+	clearflag $0071
 	end
 ; 0x781e3
 
@@ -328,7 +328,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $d9ff, $2
-	clearbit2 $0071
+	clearflag $0071
 	end
 ; 0x781f0
 
@@ -337,7 +337,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $d9ff, $3
-	clearbit2 $0071
+	clearflag $0071
 	end
 ; 0x781fd
 
@@ -346,7 +346,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $d9ff, $4
-	clearbit2 $0071
+	clearflag $0071
 	end
 ; 0x7820a
 
@@ -354,7 +354,7 @@
 	loadtrainer PICNICKER, GINA5
 	startbattle
 	returnafterbattle
-	clearbit2 $0071
+	clearflag $0071
 	end
 ; 0x78213
 
@@ -362,7 +362,7 @@
 	2call UnknownScript_0x78244
 	verbosegiveitem LEAF_STONE, 1
 	iffalse UnknownScript_0x78225
-	clearbit2 $0080
+	clearflag $0080
 	setevent $0100
 	2jump UnknownScript_0x78234
 ; 0x78225
--- a/maps/Route35.asm
+++ b/maps/Route35.asm
@@ -256,9 +256,9 @@
 	writecode $17, $17
 	talkaftercancel
 	loadfont
-	checkbit2 $0072
+	checkflag $0072
 	iftrue UnknownScript_0x19c9bb
-	checkbit2 $00a1
+	checkflag $00a1
 	iftrue UnknownScript_0x19ca2f
 	checkcellnum $17
 	iftrue UnknownScript_0x19c90f
@@ -298,10 +298,10 @@
 	checkevent $0044
 	iftrue UnknownScript_0x19ca19
 UnknownScript_0x19c9e6: ; 0x19c9e6
-	checkbit2 $004b
+	checkflag $004b
 	iftrue UnknownScript_0x19ca0c
 UnknownScript_0x19c9ec: ; 0x19c9ec
-	checkbit2 $004a
+	checkflag $004a
 	iftrue UnknownScript_0x19c9ff
 UnknownScript_0x19c9f2: ; 0x19c9f2
 	loadtrainer BUG_CATCHER, ARNIE1
@@ -308,7 +308,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $da01, $1
-	clearbit2 $0072
+	clearflag $0072
 	end
 ; 0x19c9ff
 
@@ -317,7 +317,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $da01, $2
-	clearbit2 $0072
+	clearflag $0072
 	end
 ; 0x19ca0c
 
@@ -326,7 +326,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $da01, $3
-	clearbit2 $0072
+	clearflag $0072
 	end
 ; 0x19ca19
 
@@ -335,7 +335,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $da01, $4
-	clearbit2 $0072
+	clearflag $0072
 	end
 ; 0x19ca26
 
@@ -343,7 +343,7 @@
 	loadtrainer BUG_CATCHER, ARNIE5
 	startbattle
 	returnafterbattle
-	clearbit2 $0072
+	clearflag $0072
 	end
 ; 0x19ca2f
 
--- a/maps/Route35NationalParkgate.asm
+++ b/maps/Route35NationalParkgate.asm
@@ -31,7 +31,7 @@
 ; 0x6a1a3
 
 UnknownScript_0x6a1a3: ; 0x6a1a3
-	checkbit2 $0011
+	checkflag $0011
 	iftrue UnknownScript_0x6a1ac
 	dotrigger $0
 	return
@@ -47,7 +47,7 @@
 	if_equal TUESDAY, UnknownScript_0x6a1ca
 	if_equal THURSDAY, UnknownScript_0x6a1ca
 	if_equal SATURDAY, UnknownScript_0x6a1ca
-	checkbit2 $0011
+	checkflag $0011
 	iftrue UnknownScript_0x6a1ac
 	disappear $2
 	appear $3
@@ -98,7 +98,7 @@
 	if_equal FRIDAY, UnknownScript_0x6a2c7
 	faceplayer
 	loadfont
-	checkbit2 $0051
+	checkflag $0051
 	iftrue UnknownScript_0x6a2c1
 	2call UnknownScript_0x6a2de
 	2writetext UnknownText_0x6a2eb
@@ -109,7 +109,7 @@
 	special $0016
 	clearevent $0308
 UnknownScript_0x6a234: ; 0x6a234
-	setbit2 $0011
+	setflag $0011
 	special $003c
 	2writetext UnknownText_0x6a39d
 	keeptextopen
@@ -212,7 +212,7 @@
 OfficerScript_0x6a2ca: ; 0x6a2ca
 	faceplayer
 	loadfont
-	checkbit2 $0051
+	checkflag $0051
 	iftrue UnknownScript_0x6a2c1
 	2writetext UnknownText_0x6a894
 	closetext
--- a/maps/Route36.asm
+++ b/maps/Route36.asm
@@ -203,9 +203,9 @@
 	writecode $17, $18
 	talkaftercancel
 	loadfont
-	checkbit2 $0073
+	checkflag $0073
 	iftrue UnknownScript_0x194140
-	checkbit2 $0081
+	checkflag $0081
 	iftrue UnknownScript_0x1941b4
 	checkcellnum $18
 	iftrue UnknownScript_0x1941d5
@@ -245,10 +245,10 @@
 	checkevent $0044
 	iftrue UnknownScript_0x19419e
 UnknownScript_0x19416b: ; 0x19416b
-	checkbit2 $004b
+	checkflag $004b
 	iftrue UnknownScript_0x194191
 UnknownScript_0x194171: ; 0x194171
-	checkbit2 $0047
+	checkflag $0047
 	iftrue UnknownScript_0x194184
 UnknownScript_0x194177: ; 0x194177
 	loadtrainer SCHOOLBOY, ALAN1
@@ -255,7 +255,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $da02, $1
-	clearbit2 $0073
+	clearflag $0073
 	end
 ; 0x194184
 
@@ -264,7 +264,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $da02, $2
-	clearbit2 $0073
+	clearflag $0073
 	end
 ; 0x194191
 
@@ -273,7 +273,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $da02, $3
-	clearbit2 $0073
+	clearflag $0073
 	end
 ; 0x19419e
 
@@ -282,7 +282,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $da02, $4
-	clearbit2 $0073
+	clearflag $0073
 	end
 ; 0x1941ab
 
@@ -290,7 +290,7 @@
 	loadtrainer SCHOOLBOY, ALAN5
 	startbattle
 	returnafterbattle
-	clearbit2 $0073
+	clearflag $0073
 	end
 ; 0x1941b4
 
@@ -298,7 +298,7 @@
 	2call UnknownScript_0x1941e5
 	verbosegiveitem FIRE_STONE, 1
 	iffalse UnknownScript_0x1941c6
-	clearbit2 $0081
+	clearflag $0081
 	setevent $0101
 	2jump UnknownScript_0x1941d5
 ; 0x1941c6
--- a/maps/Route36NationalParkgate.asm
+++ b/maps/Route36NationalParkgate.asm
@@ -31,7 +31,7 @@
 ; 0x6ab17
 
 UnknownScript_0x6ab17: ; 0x6ab17
-	checkbit2 $0011
+	checkflag $0011
 	iftrue UnknownScript_0x6ab20
 	dotrigger $0
 	return
@@ -49,7 +49,7 @@
 	if_equal TUESDAY, UnknownScript_0x6ab42
 	if_equal THURSDAY, UnknownScript_0x6ab42
 	if_equal SATURDAY, UnknownScript_0x6ab42
-	checkbit2 $0011
+	checkflag $0011
 	iftrue UnknownScript_0x6ab42
 	disappear $2
 	appear $d
@@ -151,7 +151,7 @@
 	if_equal FRIDAY, UnknownScript_0x6acf1
 	faceplayer
 	loadfont
-	checkbit2 $0051
+	checkflag $0051
 	iftrue UnknownScript_0x6ac91
 	2call UnknownScript_0x6ad02
 	2writetext UnknownText_0x6add5
@@ -162,7 +162,7 @@
 	special $0016
 	clearevent $0308
 UnknownScript_0x6ac10: ; 0x6ac10
-	setbit2 $0011
+	setflag $0011
 	special $003c
 	2writetext UnknownText_0x6ae87
 	keeptextopen
@@ -173,7 +173,7 @@
 	2writetext UnknownText_0x6aecc
 	closetext
 	loadmovesprites
-	setbit2 $0011
+	setflag $0011
 	special $0018
 	spriteface $0, $2
 	playsound $0023
@@ -311,7 +311,7 @@
 OfficerScript_0x6acf4: ; 0x6acf4
 	faceplayer
 	loadfont
-	checkbit2 $0051
+	checkflag $0051
 	iftrue UnknownScript_0x6ac91
 	2writetext UnknownText_0x6b370
 	closetext
--- a/maps/Route37.asm
+++ b/maps/Route37.asm
@@ -122,7 +122,7 @@
 	keeptextopen
 	setevent EVENT_MET_SUNNY_OF_SUNDAY
 UnknownScript_0x1a8dda: ; 0x1a8dda
-	checkbit2 $0063
+	checkflag $0063
 	iftrue UnknownScript_0x1a8de7
 	2writetext UnknownText_0x1a9004
 	keeptextopen
--- a/maps/Route38.asm
+++ b/maps/Route38.asm
@@ -88,9 +88,9 @@
 	writecode $17, $1a
 	talkaftercancel
 	loadfont
-	checkbit2 $0074
+	checkflag $0074
 	iftrue UnknownScript_0x1a1d82
-	checkbit2 $0082
+	checkflag $0082
 	iftrue UnknownScript_0x1a1df6
 	checkcellnum $1a
 	iftrue UnknownScript_0x1a1e17
@@ -133,7 +133,7 @@
 	checkevent EVENT_CLEARED_RADIO_TOWER
 	iftrue UnknownScript_0x1a1dd3
 UnknownScript_0x1a1db3: ; 0x1a1db3
-	checkbit2 $0045
+	checkflag $0045
 	iftrue UnknownScript_0x1a1dc6
 UnknownScript_0x1a1db9: ; 0x1a1db9
 	loadtrainer LASS, DANA1
@@ -140,7 +140,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $da03, $1
-	clearbit2 $0074
+	clearflag $0074
 	end
 ; 0x1a1dc6
 
@@ -149,7 +149,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $da03, $2
-	clearbit2 $0074
+	clearflag $0074
 	end
 ; 0x1a1dd3
 
@@ -158,7 +158,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $da03, $3
-	clearbit2 $0074
+	clearflag $0074
 	end
 ; 0x1a1de0
 
@@ -167,7 +167,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $da03, $4
-	clearbit2 $0074
+	clearflag $0074
 	end
 ; 0x1a1ded
 
@@ -175,7 +175,7 @@
 	loadtrainer LASS, DANA5
 	startbattle
 	returnafterbattle
-	clearbit2 $0074
+	clearflag $0074
 	end
 ; 0x1a1df6
 
@@ -183,7 +183,7 @@
 	2call UnknownScript_0x1a1e27
 	verbosegiveitem THUNDERSTONE, 1
 	iffalse UnknownScript_0x1a1e08
-	clearbit2 $0082
+	clearflag $0082
 	setevent $0102
 	2jump UnknownScript_0x1a1e17
 ; 0x1a1e08
@@ -261,7 +261,7 @@
 	writecode $17, $1b
 	talkaftercancel
 	loadfont
-	checkbit2 $0075
+	checkflag $0075
 	iftrue UnknownScript_0x1a1e75
 	checkcellnum $1b
 	iftrue UnknownScript_0x1a1ef5
@@ -304,7 +304,7 @@
 	checkevent EVENT_CLEARED_RADIO_TOWER
 	iftrue UnknownScript_0x1a1ec6
 UnknownScript_0x1a1ea6: ; 0x1a1ea6
-	checkbit2 $0049
+	checkflag $0049
 	iftrue UnknownScript_0x1a1eb9
 UnknownScript_0x1a1eac: ; 0x1a1eac
 	loadtrainer SCHOOLBOY, CHAD1
@@ -311,7 +311,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $da04, $1
-	clearbit2 $0075
+	clearflag $0075
 	end
 ; 0x1a1eb9
 
@@ -320,7 +320,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $da04, $2
-	clearbit2 $0075
+	clearflag $0075
 	end
 ; 0x1a1ec6
 
@@ -329,7 +329,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $da04, $3
-	clearbit2 $0075
+	clearflag $0075
 	end
 ; 0x1a1ed3
 
@@ -338,7 +338,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $da04, $4
-	clearbit2 $0075
+	clearflag $0075
 	end
 ; 0x1a1ee0
 
@@ -346,7 +346,7 @@
 	loadtrainer SCHOOLBOY, CHAD5
 	startbattle
 	returnafterbattle
-	clearbit2 $0075
+	clearflag $0075
 	end
 ; 0x1a1ee9
 
--- a/maps/Route39.asm
+++ b/maps/Route39.asm
@@ -39,7 +39,7 @@
 	writecode $17, $1c
 	talkaftercancel
 	loadfont
-	checkbit2 $0083
+	checkflag $0083
 	iftrue UnknownScript_0x1a5b4a
 	checkcellnum $1c
 	iftrue UnknownScript_0x1a5b6e
@@ -69,7 +69,7 @@
 	2call UnknownScript_0x1a5b7a
 	verbosegiveitem NUGGET, 1
 	iffalse UnknownScript_0x1a5b59
-	clearbit2 $0083
+	clearflag $0083
 	2jump UnknownScript_0x1a5b6e
 ; 0x1a5b59
 
--- a/maps/Route42.asm
+++ b/maps/Route42.asm
@@ -55,9 +55,9 @@
 	writecode $17, $1d
 	talkaftercancel
 	loadfont
-	checkbit2 $0076
+	checkflag $0076
 	iftrue UnknownScript_0x1a927f
-	checkbit2 $0084
+	checkflag $0084
 	iftrue UnknownScript_0x1a92dc
 	checkcellnum $1d
 	iftrue UnknownScript_0x1a92fd
@@ -103,7 +103,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $da06, $1
-	clearbit2 $0076
+	clearflag $0076
 	end
 ; 0x1a92b9
 
@@ -112,7 +112,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $da06, $2
-	clearbit2 $0076
+	clearflag $0076
 	end
 ; 0x1a92c6
 
@@ -121,7 +121,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $da06, $3
-	clearbit2 $0076
+	clearflag $0076
 	end
 ; 0x1a92d3
 
@@ -129,7 +129,7 @@
 	loadtrainer FISHER, TULLY4
 	startbattle
 	returnafterbattle
-	clearbit2 $0076
+	clearflag $0076
 	end
 ; 0x1a92dc
 
@@ -137,7 +137,7 @@
 	2call UnknownScript_0x1a930d
 	verbosegiveitem WATER_STONE, 1
 	iffalse UnknownScript_0x1a92ee
-	clearbit2 $0084
+	clearflag $0084
 	setevent $0103
 	2jump UnknownScript_0x1a92fd
 ; 0x1a92ee
--- a/maps/Route43.asm
+++ b/maps/Route43.asm
@@ -104,7 +104,7 @@
 	writecode $17, $1e
 	talkaftercancel
 	loadfont
-	checkbit2 $0077
+	checkflag $0077
 	iftrue UnknownScript_0x19d0cf
 	checkcellnum $1e
 	iftrue UnknownScript_0x19d138
@@ -150,7 +150,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $da07, $1
-	clearbit2 $0077
+	clearflag $0077
 	end
 ; 0x19d109
 
@@ -159,7 +159,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $da07, $2
-	clearbit2 $0077
+	clearflag $0077
 	end
 ; 0x19d116
 
@@ -168,7 +168,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $da07, $3
-	clearbit2 $0077
+	clearflag $0077
 	end
 ; 0x19d123
 
@@ -176,7 +176,7 @@
 	loadtrainer POKEMANIAC, BRENT4
 	startbattle
 	returnafterbattle
-	clearbit2 $0077
+	clearflag $0077
 	end
 ; 0x19d12c
 
@@ -297,9 +297,9 @@
 	writecode $17, $1f
 	talkaftercancel
 	loadfont
-	checkbit2 $0078
+	checkflag $0078
 	iftrue UnknownScript_0x19d1c1
-	checkbit2 $0085
+	checkflag $0085
 	iftrue UnknownScript_0x19d21e
 	checkcellnum $1f
 	iftrue UnknownScript_0x19d245
@@ -347,7 +347,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $da08, $1
-	clearbit2 $0078
+	clearflag $0078
 	end
 ; 0x19d1fb
 
@@ -356,7 +356,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $da08, $2
-	clearbit2 $0078
+	clearflag $0078
 	end
 ; 0x19d208
 
@@ -365,7 +365,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $da08, $3
-	clearbit2 $0078
+	clearflag $0078
 	end
 ; 0x19d215
 
@@ -373,7 +373,7 @@
 	loadtrainer PICNICKER, TIFFANY4
 	startbattle
 	returnafterbattle
-	clearbit2 $0078
+	clearflag $0078
 	end
 ; 0x19d21e
 
@@ -381,7 +381,7 @@
 	2call UnknownScript_0x19d255
 	verbosegiveitem PINK_BOW, 1
 	iffalse UnknownScript_0x19d230
-	clearbit2 $0085
+	clearflag $0085
 	setevent $0104
 	2jump UnknownScript_0x19d245
 ; 0x19d230
--- a/maps/Route44.asm
+++ b/maps/Route44.asm
@@ -30,7 +30,7 @@
 	writecode $17, $20
 	talkaftercancel
 	loadfont
-	checkbit2 $0079
+	checkflag $0079
 	iftrue UnknownScript_0x19d86a
 	checkcellnum $20
 	iftrue UnknownScript_0x19d8eb
@@ -72,7 +72,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $da09, $1
-	clearbit2 $0079
+	clearflag $0079
 	end
 ; 0x19d89a
 
@@ -81,7 +81,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $da09, $2
-	clearbit2 $0079
+	clearflag $0079
 	end
 ; 0x19d8a7
 
@@ -89,7 +89,7 @@
 	loadtrainer BIRD_KEEPER, VANCE3
 	startbattle
 	returnafterbattle
-	clearbit2 $0079
+	clearflag $0079
 	checkevent EVENT_VANCE_CARBOS
 	iftrue UnknownScript_0x19d8cb
 	checkevent $0267
@@ -225,9 +225,9 @@
 	writecode $17, $21
 	talkaftercancel
 	loadfont
-	checkbit2 $007a
+	checkflag $007a
 	iftrue UnknownScript_0x19d96e
-	checkbit2 $0086
+	checkflag $0086
 	iftrue UnknownScript_0x19d9b4
 	checkcellnum $21
 	iftrue UnknownScript_0x19d8eb
@@ -269,7 +269,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $da0a, $1
-	clearbit2 $007a
+	clearflag $007a
 	end
 ; 0x19d99e
 
@@ -278,7 +278,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $da0a, $2
-	clearbit2 $007a
+	clearflag $007a
 	end
 ; 0x19d9ab
 
@@ -286,7 +286,7 @@
 	loadtrainer FISHER, WILTON3
 	startbattle
 	returnafterbattle
-	clearbit2 $007a
+	clearflag $007a
 	end
 ; 0x19d9b4
 
@@ -314,7 +314,7 @@
 	verbosegiveitem POKE_BALL, 1
 	iffalse UnknownScript_0x19d9e7
 UnknownScript_0x19d9e1: ; 0x19d9e1
-	clearbit2 $0086
+	clearflag $0086
 	2jump UnknownScript_0x19d8eb
 ; 0x19d9e7
 
--- a/maps/Route45.asm
+++ b/maps/Route45.asm
@@ -226,7 +226,7 @@
 	writecode $17, $23
 	talkaftercancel
 	loadfont
-	checkbit2 $007b
+	checkflag $007b
 	iftrue UnknownScript_0x19e1b8
 	checkcellnum $23
 	iftrue UnknownScript_0x19e127
@@ -268,7 +268,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $da0c, $1
-	clearbit2 $007b
+	clearflag $007b
 	end
 ; 0x19e1e8
 
@@ -277,7 +277,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $da0c, $2
-	clearbit2 $007b
+	clearflag $007b
 	end
 ; 0x19e1f5
 
@@ -285,7 +285,7 @@
 	loadtrainer HIKER, PARRY2
 	startbattle
 	returnafterbattle
-	clearbit2 $007b
+	clearflag $007b
 	checkevent EVENT_PARRY_IRON
 	iftrue UnknownScript_0x19e219
 	checkevent $0268
--- a/maps/Route46.asm
+++ b/maps/Route46.asm
@@ -59,7 +59,7 @@
 	writecode $17, $24
 	talkaftercancel
 	loadfont
-	checkbit2 $007c
+	checkflag $007c
 	iftrue UnknownScript_0x1a96da
 	checkcellnum $24
 	iftrue UnknownScript_0x1a975b
@@ -101,7 +101,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $da0d, $1
-	clearbit2 $007c
+	clearflag $007c
 	end
 ; 0x1a970a
 
@@ -110,7 +110,7 @@
 	startbattle
 	returnafterbattle
 	loadvar $da0d, $2
-	clearbit2 $007c
+	clearflag $007c
 	end
 ; 0x1a9717
 
@@ -118,7 +118,7 @@
 	loadtrainer PICNICKER, ERIN3
 	startbattle
 	returnafterbattle
-	clearbit2 $007c
+	clearflag $007c
 	checkevent EVENT_ERIN_CALCIUM
 	iftrue UnknownScript_0x1a973b
 	checkevent $0269
--- a/maps/RuinsofAlphAerodactylChamber.asm
+++ b/maps/RuinsofAlphAerodactylChamber.asm
@@ -71,7 +71,7 @@
 UnknownScript_0x58df7: ; 0x58df7
 	setevent $0705
 	setevent $02a3
-	setbit2 $002d
+	setflag $002d
 	domaptrigger GROUP_RUINS_OF_ALPH_INNER_CHAMBER, MAP_RUINS_OF_ALPH_INNER_CHAMBER, $1
 	earthquake 30
 	showemote $0, $0, 15
--- a/maps/RuinsofAlphHoOhChamber.asm
+++ b/maps/RuinsofAlphHoOhChamber.asm
@@ -72,7 +72,7 @@
 UnknownScript_0x585ba: ; 0x585ba
 	setevent $0705
 	setevent $02a0
-	setbit2 $002e
+	setflag $002e
 	domaptrigger GROUP_RUINS_OF_ALPH_INNER_CHAMBER, MAP_RUINS_OF_ALPH_INNER_CHAMBER, $1
 	earthquake 30
 	showemote $0, $0, 15
--- a/maps/RuinsofAlphKabutoChamber.asm
+++ b/maps/RuinsofAlphKabutoChamber.asm
@@ -78,7 +78,7 @@
 UnknownScript_0x58778: ; 0x58778
 	setevent $0705
 	setevent $02a1
-	setbit2 $002b
+	setflag $002b
 	setevent $074e
 	domaptrigger GROUP_RUINS_OF_ALPH_INNER_CHAMBER, MAP_RUINS_OF_ALPH_INNER_CHAMBER, $1
 	earthquake 30
--- a/maps/RuinsofAlphOmanyteChamber.asm
+++ b/maps/RuinsofAlphOmanyteChamber.asm
@@ -72,7 +72,7 @@
 UnknownScript_0x58c36: ; 0x58c36
 	setevent $0705
 	setevent $02a2
-	setbit2 $002c
+	setflag $002c
 	domaptrigger GROUP_RUINS_OF_ALPH_INNER_CHAMBER, MAP_RUINS_OF_ALPH_INNER_CHAMBER, $1
 	earthquake 30
 	showemote $0, $0, 15
--- a/maps/RuinsofAlphOutside.asm
+++ b/maps/RuinsofAlphOutside.asm
@@ -23,7 +23,7 @@
 ; 0x5800f
 
 UnknownScript_0x5800f: ; 0x5800f
-	checkbit2 $000c
+	checkflag $000c
 	iftrue UnknownScript_0x5802c
 	checkevent EVENT_MADE_UNOWN_APPEAR_IN_RUINS
 	iftrue UnknownScript_0x5801e
--- a/maps/RuinsofAlphResearchCenter.asm
+++ b/maps/RuinsofAlphResearchCenter.asm
@@ -55,7 +55,7 @@
 	2writetext UnknownText_0x592fa
 	playsound $0001
 	waitbutton
-	setbit2 $000c
+	setflag $000c
 	2writetext UnknownText_0x59311
 	closetext
 	loadmovesprites
@@ -88,7 +88,7 @@
 	loadfont
 	checkcode $e
 	if_equal 26, UnknownScript_0x5920b
-	checkbit2 $000c
+	checkflag $000c
 	iftrue UnknownScript_0x59205
 	checkevent EVENT_MADE_UNOWN_APPEAR_IN_RUINS
 	iftrue UnknownScript_0x591ff
--- a/maps/SaffronCity.asm
+++ b/maps/SaffronCity.asm
@@ -11,7 +11,7 @@
 ; 0x199326
 
 UnknownScript_0x199326: ; 0x199326
-	setbit2 $003c
+	setflag $003c
 	return
 ; 0x19932a
 
--- a/maps/SaffronGym.asm
+++ b/maps/SaffronGym.asm
@@ -9,7 +9,7 @@
 SabrinaScript_0x189c2e: ; 0x189c2e
 	faceplayer
 	loadfont
-	checkbit2 $0028
+	checkflag $0028
 	iftrue UnknownScript_0x189c65
 	2writetext UnknownText_0x189cdf
 	closetext
@@ -27,7 +27,7 @@
 	2writetext UnknownText_0x189e95
 	playsound $009c
 	waitbutton
-	setbit2 $0028
+	setflag $0028
 	2writetext UnknownText_0x189ead
 	closetext
 	loadmovesprites
@@ -175,7 +175,7 @@
 ; 0x189ccf
 
 MapSaffronGymSignpost0Script: ; 0x189ccf
-	checkbit2 $0028
+	checkflag $0028
 	iftrue UnknownScript_0x189cd8
 	jumpstd $002d
 ; 0x189cd8
--- a/maps/SeafoamGym.asm
+++ b/maps/SeafoamGym.asm
@@ -16,7 +16,7 @@
 BlaineScript_0x1ab4fb: ; 0x1ab4fb
 	faceplayer
 	loadfont
-	checkbit2 $0029
+	checkflag $0029
 	iftrue UnknownScript_0x1ab52b
 	2writetext UnknownText_0x1ab548
 	closetext
@@ -33,7 +33,7 @@
 	2writetext UnknownText_0x1ab683
 	playsound $009c
 	waitbutton
-	setbit2 $0029
+	setflag $0029
 	2writetext UnknownText_0x1ab69d
 	closetext
 	loadmovesprites
--- a/maps/SilverCaveOutside.asm
+++ b/maps/SilverCaveOutside.asm
@@ -11,7 +11,7 @@
 ; 0x1b2047
 
 UnknownScript_0x1b2047: ; 0x1b2047
-	setbit2 $004c
+	setflag $004c
 	return
 ; 0x1b204b
 
--- a/maps/TeamRocketBaseB2F.asm
+++ b/maps/TeamRocketBaseB2F.asm
@@ -362,7 +362,7 @@
 	applymovement $4, MovementData_0x6d283
 	disappear $4
 	setevent EVENT_CLEARED_ROCKET_HIDEOUT
-	clearbit2 $000e
+	clearflag $000e
 	setevent $06dc
 	setevent $0757
 	dotrigger $3
--- a/maps/TrainerHouseB1F.asm
+++ b/maps/TrainerHouseB1F.asm
@@ -16,7 +16,7 @@
 UnknownScript_0x9b38b: ; 0x9b38b
 	spriteface $0, $1
 	loadfont
-	checkbit2 $0057
+	checkflag $0057
 	iftrue UnknownScript_0x9b3f7
 	2writetext UnknownText_0x9b420
 	keeptextopen
@@ -34,7 +34,7 @@
 	2writetext UnknownText_0x9b487
 	yesorno
 	iffalse UnknownScript_0x9b3ed
-	setbit2 $0057
+	setflag $0057
 	2writetext UnknownText_0x9b4a2
 	closetext
 	loadmovesprites
--- a/maps/UnionCaveB2F.asm
+++ b/maps/UnionCaveB2F.asm
@@ -11,7 +11,7 @@
 ; 0x5a30d
 
 UnknownScript_0x5a30d: ; 0x5a30d
-	checkbit2 $0059
+	checkflag $0059
 	iftrue UnknownScript_0x5a319
 	checkcode $b
 	if_equal FRIDAY, UnknownScript_0x5a31c
@@ -31,7 +31,7 @@
 	loadpokedata LAPRAS, 20
 	startbattle
 	disappear $7
-	setbit2 $0059
+	setflag $0059
 	returnafterbattle
 	end
 ; 0x5a32e
--- a/maps/VermilionCity.asm
+++ b/maps/VermilionCity.asm
@@ -11,7 +11,7 @@
 ; 0x1aa97f
 
 UnknownScript_0x1aa97f: ; 0x1aa97f
-	setbit2 $003a
+	setflag $003a
 	return
 ; 0x1aa983
 
--- a/maps/VermilionGym.asm
+++ b/maps/VermilionGym.asm
@@ -9,7 +9,7 @@
 SurgeScript_0x1920a5: ; 0x1920a5
 	faceplayer
 	loadfont
-	checkbit2 $0025
+	checkflag $0025
 	iftrue UnknownScript_0x1920d9
 	2writetext UnknownText_0x192142
 	closetext
@@ -26,7 +26,7 @@
 	2writetext UnknownText_0x192277
 	playsound $009c
 	waitbutton
-	setbit2 $0025
+	setflag $0025
 	2writetext UnknownText_0x192291
 	closetext
 	loadmovesprites
@@ -149,7 +149,7 @@
 ; 0x192132
 
 MapVermilionGymSignpost16Script: ; 0x192132
-	checkbit2 $0025
+	checkflag $0025
 	iftrue UnknownScript_0x19213b
 	jumpstd $002d
 ; 0x19213b
--- a/maps/VermilionPort.asm
+++ b/maps/VermilionPort.asm
@@ -24,7 +24,7 @@
 ; 0x74da2
 
 UnknownScript_0x74da2: ; 0x74da2
-	setbit2 $003a
+	setflag $003a
 	return
 ; 0x74da6
 
--- a/maps/VioletCity.asm
+++ b/maps/VioletCity.asm
@@ -11,7 +11,7 @@
 ; 0x1a83b7
 
 UnknownScript_0x1a83b7: ; 0x1a83b7
-	setbit2 $0043
+	setflag $0043
 	return
 ; 0x1a83bb
 
--- a/maps/VioletGym.asm
+++ b/maps/VioletGym.asm
@@ -23,7 +23,7 @@
 	2writetext UnknownText_0x685af
 	playsound $009c
 	waitbutton
-	setbit2 $001b
+	setflag $001b
 	checkcode $7
 	2call UnknownScript_0x68418
 UnknownScript_0x683ec: ; 0x683ec
@@ -142,7 +142,7 @@
 ; 0x68463
 
 MapVioletGymSignpost1Script: ; 0x68463
-	checkbit2 $001b
+	checkflag $001b
 	iftrue UnknownScript_0x6846c
 	jumpstd $002d
 ; 0x6846c
--- a/maps/ViridianCity.asm
+++ b/maps/ViridianCity.asm
@@ -11,7 +11,7 @@
 ; 0x1a9a48
 
 UnknownScript_0x1a9a48: ; 0x1a9a48
-	setbit2 $0036
+	setflag $0036
 	return
 ; 0x1a9a4c
 
--- a/maps/ViridianGym.asm
+++ b/maps/ViridianGym.asm
@@ -9,7 +9,7 @@
 BlueScript_0x9aa26: ; 0x9aa26
 	faceplayer
 	loadfont
-	checkbit2 $002a
+	checkflag $002a
 	iftrue UnknownScript_0x9aa51
 	2writetext UnknownText_0x9aa7b
 	closetext
@@ -23,7 +23,7 @@
 	2writetext UnknownText_0x9ac0f
 	playsound $009c
 	waitbutton
-	setbit2 $002a
+	setflag $002a
 	2writetext UnknownText_0x9ac27
 	closetext
 	loadmovesprites
@@ -55,7 +55,7 @@
 ; 0x9aa6b
 
 MapViridianGymSignpost1Script: ; 0x9aa6b
-	checkbit2 $002a
+	checkflag $002a
 	iftrue UnknownScript_0x9aa74
 	jumpstd $002d
 ; 0x9aa74
--- a/maps/WarehouseEntrance.asm
+++ b/maps/WarehouseEntrance.asm
@@ -245,7 +245,7 @@
 
 GrampsScript_0x7c146: ; 0x7c146
 	loadfont
-	checkbit2 $0056
+	checkflag $0056
 	iftrue UnknownScript_0x7c300
 	checkcode $b
 	if_equal MONDAY, UnknownScript_0x7c156
@@ -270,7 +270,7 @@
 ; 0x7c173
 
 UnknownScript_0x7c173: ; 0x7c173
-	checkbit2 $005a
+	checkflag $005a
 	iftrue UnknownScript_0x7c208
 	special $0051
 	2writetext UnknownText_0x7c5f9
@@ -283,7 +283,7 @@
 	special $0061
 	if_equal $0, UnknownScript_0x7c1fc
 	if_equal $1, UnknownScript_0x7c1fc
-	setbit2 $005a
+	setflag $005a
 	if_equal $2, UnknownScript_0x7c1a9
 	if_equal $3, UnknownScript_0x7c1b5
 	2jump UnknownScript_0x7c1c1
@@ -362,7 +362,7 @@
 ; 0x7c220
 
 UnknownScript_0x7c220: ; 0x7c220
-	checkbit2 $005a
+	checkflag $005a
 	iftrue UnknownScript_0x7c2b5
 	special $0051
 	2writetext UnknownText_0x7c75c
@@ -375,7 +375,7 @@
 	special $0062
 	if_equal $0, UnknownScript_0x7c2a9
 	if_equal $1, UnknownScript_0x7c2a9
-	setbit2 $005a
+	setflag $005a
 	if_equal $2, UnknownScript_0x7c256
 	if_equal $3, UnknownScript_0x7c262
 	2jump UnknownScript_0x7c26e