goto_if_eq and switch/case in scripts
This commit is contained in:
@@ -25,13 +25,13 @@ PalletTown_GarysHouse_EventScript_168D56:: @ 8168D56
|
||||
setvar VAR_0x8005, 2
|
||||
special UpdatePickStateFromSpecialVar8005
|
||||
checkflag FLAG_0x82C
|
||||
goto_if 1, EventScript_168DB9
|
||||
goto_if_eq EventScript_168DB9
|
||||
compare_var_to_value VAR_0x4001, 1
|
||||
goto_if 1, EventScript_168EEC
|
||||
goto_if_eq EventScript_168EEC
|
||||
compare_var_to_value VAR_0x4058, 2
|
||||
goto_if 1, EventScript_168F59
|
||||
goto_if_eq EventScript_168F59
|
||||
compare_var_to_value VAR_0x4058, 1
|
||||
goto_if 1, EventScript_168EF6
|
||||
goto_if_eq EventScript_168EF6
|
||||
compare_var_to_value VAR_MAP_SCENE_PALLET_TOWN_PROFESSOR_OAKS_LAB, 1
|
||||
goto_if 4, EventScript_168DAF
|
||||
msgbox gUnknown_818D58C
|
||||
@@ -49,13 +49,13 @@ EventScript_168DAF:: @ 8168DAF
|
||||
EventScript_168DB9:: @ 8168DB9
|
||||
special sub_8110AB4
|
||||
compare_var_to_value VAR_RESULT, 2
|
||||
goto_if 1, EventScript_1A7AE0
|
||||
goto_if_eq EventScript_1A7AE0
|
||||
special sub_8112364
|
||||
compare_var_to_value VAR_MIRAGE_RND_L, 500
|
||||
goto_if 0, EventScript_168E46
|
||||
msgbox gUnknown_818D7D3, MSGBOX_YESNO
|
||||
compare_var_to_value VAR_RESULT, 0
|
||||
goto_if 1, EventScript_168E3C
|
||||
goto_if_eq EventScript_168E3C
|
||||
msgbox gUnknown_818D8B2
|
||||
special sub_80BF8FC
|
||||
waitstate
|
||||
@@ -65,7 +65,7 @@ EventScript_168DB9:: @ 8168DB9
|
||||
goto_if 4, EventScript_168E3C
|
||||
specialvar VAR_RESULT, sub_80CAD54
|
||||
compare_var_to_value VAR_RESULT, SPECIES_EGG
|
||||
goto_if 1, EventScript_168E32
|
||||
goto_if_eq EventScript_168E32
|
||||
msgbox gUnknown_818D8CC
|
||||
closemessage
|
||||
fadescreen 1
|
||||
@@ -91,21 +91,14 @@ EventScript_168E3C:: @ 8168E3C
|
||||
EventScript_168E46:: @ 8168E46
|
||||
msgbox gUnknown_818D9A5
|
||||
specialvar VAR_RESULT, sub_80CA76C
|
||||
copyvar VAR_0x8000, VAR_RESULT
|
||||
compare_var_to_value VAR_0x8000, 0
|
||||
goto_if 1, EventScript_168EA6
|
||||
compare_var_to_value VAR_0x8000, 1
|
||||
goto_if 1, EventScript_168EB0
|
||||
compare_var_to_value VAR_0x8000, 2
|
||||
goto_if 1, EventScript_168EBA
|
||||
compare_var_to_value VAR_0x8000, 3
|
||||
goto_if 1, EventScript_168EC4
|
||||
compare_var_to_value VAR_0x8000, 4
|
||||
goto_if 1, EventScript_168ECE
|
||||
compare_var_to_value VAR_0x8000, 5
|
||||
goto_if 1, EventScript_168ED8
|
||||
compare_var_to_value VAR_0x8000, 6
|
||||
goto_if 1, EventScript_168EE2
|
||||
switch VAR_RESULT
|
||||
case 0, EventScript_168EA6
|
||||
case 1, EventScript_168EB0
|
||||
case 2, EventScript_168EBA
|
||||
case 3, EventScript_168EC4
|
||||
case 4, EventScript_168ECE
|
||||
case 5, EventScript_168ED8
|
||||
case 6, EventScript_168EE2
|
||||
end
|
||||
|
||||
EventScript_168EA6:: @ 8168EA6
|
||||
@@ -153,7 +146,7 @@ EventScript_168EF6:: @ 8168EF6
|
||||
closemessage
|
||||
checkitemspace ITEM_TOWN_MAP, 1
|
||||
compare_var_to_value VAR_RESULT, 0
|
||||
goto_if 1, EventScript_168F4F
|
||||
goto_if_eq EventScript_168F4F
|
||||
applymovement 1, Movement_1A75EB
|
||||
waitmovement 0
|
||||
removeobject 2
|
||||
|
||||
Reference in New Issue
Block a user