improve goto_if macros

This commit is contained in:
Melody
2018-12-21 20:28:24 -05:00
parent 87fd6b8dc2
commit ac2e4adf2d
273 changed files with 2555 additions and 3036 deletions
@@ -4,8 +4,7 @@ SlateportCity_PokemonFanClub_MapScripts:: @ 8209E95
SlateportCity_PokemonFanClub_EventScript_209E96:: @ 8209E96
lock
faceplayer
checkflag FLAG_0x155
goto_if 0, SlateportCity_PokemonFanClub_EventScript_20A152
goto_if_unset FLAG_0x155, SlateportCity_PokemonFanClub_EventScript_20A152
checkflag FLAG_0x156
call_if 0, SlateportCity_PokemonFanClub_EventScript_20A172
switch VAR_0x40B7
@@ -36,7 +35,7 @@ SlateportCity_PokemonFanClub_EventScript_209EE5:: @ 8209EE5
compare VAR_TEMP_2, 5
call_if 1, SlateportCity_PokemonFanClub_EventScript_209FCA
compare VAR_0x40B7, 2
goto_eq SlateportCity_PokemonFanClub_EventScript_209F3B
goto_if_eq SlateportCity_PokemonFanClub_EventScript_209F3B
msgbox SlateportCity_PokemonFanClub_Text_20A62A, MSGBOX_DEFAULT
goto SlateportCity_PokemonFanClub_EventScript_209F45
end
@@ -86,7 +85,7 @@ SlateportCity_PokemonFanClub_EventScript_209FD6:: @ 8209FD6
SlateportCity_PokemonFanClub_EventScript_209FE0:: @ 8209FE0
checkitemspace ITEM_RED_SCARF, 1
compare VAR_RESULT, 0
goto_eq SlateportCity_PokemonFanClub_EventScript_20A0D5
goto_if_eq SlateportCity_PokemonFanClub_EventScript_20A0D5
msgbox SlateportCity_PokemonFanClub_Text_20A795, MSGBOX_DEFAULT
setflag FLAG_0x0C8
giveitem_std ITEM_RED_SCARF
@@ -97,7 +96,7 @@ SlateportCity_PokemonFanClub_EventScript_209FE0:: @ 8209FE0
SlateportCity_PokemonFanClub_EventScript_20A011:: @ 820A011
checkitemspace ITEM_BLUE_SCARF, 1
compare VAR_RESULT, 0
goto_eq SlateportCity_PokemonFanClub_EventScript_20A0D5
goto_if_eq SlateportCity_PokemonFanClub_EventScript_20A0D5
msgbox SlateportCity_PokemonFanClub_Text_20A795, MSGBOX_DEFAULT
setflag FLAG_0x0C9
giveitem_std ITEM_BLUE_SCARF
@@ -108,7 +107,7 @@ SlateportCity_PokemonFanClub_EventScript_20A011:: @ 820A011
SlateportCity_PokemonFanClub_EventScript_20A042:: @ 820A042
checkitemspace ITEM_PINK_SCARF, 1
compare VAR_RESULT, 0
goto_eq SlateportCity_PokemonFanClub_EventScript_20A0D5
goto_if_eq SlateportCity_PokemonFanClub_EventScript_20A0D5
msgbox SlateportCity_PokemonFanClub_Text_20A795, MSGBOX_DEFAULT
setflag FLAG_0x0CA
giveitem_std ITEM_PINK_SCARF
@@ -119,7 +118,7 @@ SlateportCity_PokemonFanClub_EventScript_20A042:: @ 820A042
SlateportCity_PokemonFanClub_EventScript_20A073:: @ 820A073
checkitemspace ITEM_GREEN_SCARF, 1
compare VAR_RESULT, 0
goto_eq SlateportCity_PokemonFanClub_EventScript_20A0D5
goto_if_eq SlateportCity_PokemonFanClub_EventScript_20A0D5
msgbox SlateportCity_PokemonFanClub_Text_20A795, MSGBOX_DEFAULT
setflag FLAG_0x0CB
giveitem_std ITEM_GREEN_SCARF
@@ -130,7 +129,7 @@ SlateportCity_PokemonFanClub_EventScript_20A073:: @ 820A073
SlateportCity_PokemonFanClub_EventScript_20A0A4:: @ 820A0A4
checkitemspace ITEM_YELLOW_SCARF, 1
compare VAR_RESULT, 0
goto_eq SlateportCity_PokemonFanClub_EventScript_20A0D5
goto_if_eq SlateportCity_PokemonFanClub_EventScript_20A0D5
msgbox SlateportCity_PokemonFanClub_Text_20A795, MSGBOX_DEFAULT
setflag FLAG_0x0CC
giveitem_std ITEM_YELLOW_SCARF
@@ -194,8 +193,7 @@ SlateportCity_PokemonFanClub_EventScript_20A14C:: @ 820A14C
return
SlateportCity_PokemonFanClub_EventScript_20A152:: @ 820A152
checkflag FLAG_0x156
goto_eq SlateportCity_PokemonFanClub_EventScript_20A168
goto_if_set FLAG_0x156, SlateportCity_PokemonFanClub_EventScript_20A168
msgbox SlateportCity_PokemonFanClub_Text_20A233, MSGBOX_DEFAULT
setflag FLAG_0x156
release
@@ -214,12 +212,11 @@ SlateportCity_PokemonFanClub_EventScript_20A172:: @ 820A172
SlateportCity_PokemonFanClub_EventScript_20A17E:: @ 820A17E
lock
faceplayer
checkflag FLAG_0x116
goto_eq SlateportCity_PokemonFanClub_EventScript_20A1DE
goto_if_set FLAG_0x116, SlateportCity_PokemonFanClub_EventScript_20A1DE
msgbox SlateportCity_PokemonFanClub_Text_20AA77, MSGBOX_DEFAULT
specialvar VAR_RESULT, GetLeadMonFriendshipScore
compare VAR_RESULT, 4
goto_if 4, SlateportCity_PokemonFanClub_EventScript_20A1A3
goto_if_ge SlateportCity_PokemonFanClub_EventScript_20A1A3
release
end
@@ -232,7 +229,7 @@ SlateportCity_PokemonFanClub_EventScript_20A1A3:: @ 820A1A3
msgbox SlateportCity_PokemonFanClub_Text_20AB63, MSGBOX_DEFAULT
giveitem_std ITEM_SOOTHE_BELL
compare VAR_RESULT, 0
goto_eq SlateportCity_PokemonFanClub_EventScript_272054
goto_if_eq SlateportCity_PokemonFanClub_EventScript_272054
setflag FLAG_0x116
release
end