goto_if_eq and switch/case in scripts
This commit is contained in:
@@ -5,17 +5,17 @@ CeruleanCity_House5_EventScript_16AE50:: @ 816AE50
|
||||
lock
|
||||
faceplayer
|
||||
checkflag FLAG_0x2BB
|
||||
goto_if 1, EventScript_16AEB7
|
||||
goto_if_eq EventScript_16AEB7
|
||||
msgbox gUnknown_8192F67, MSGBOX_YESNO
|
||||
compare_var_to_value VAR_RESULT, 0
|
||||
goto_if 1, EventScript_16AEAD
|
||||
goto_if_eq EventScript_16AEAD
|
||||
checkflag FLAG_0x847
|
||||
goto_if 0, EventScript_16AEA3
|
||||
msgbox gUnknown_8193003
|
||||
setflag FLAG_0x2BB
|
||||
giveitem ITEM_POWDER_JAR
|
||||
compare_var_to_value VAR_RESULT, 0
|
||||
goto_if 1, EventScript_1A6BF9
|
||||
goto_if_eq EventScript_1A6BF9
|
||||
msgbox gUnknown_8193033
|
||||
release
|
||||
end
|
||||
@@ -42,33 +42,20 @@ EventScript_16AEC8:: @ 816AEC8
|
||||
setvar VAR_0x8004, 5
|
||||
special sub_80CB7C4
|
||||
waitstate
|
||||
copyvar VAR_0x8000, VAR_RESULT
|
||||
compare_var_to_value VAR_0x8000, 0
|
||||
goto_if 1, EventScript_16AF6C
|
||||
compare_var_to_value VAR_0x8000, 1
|
||||
goto_if 1, EventScript_16AF80
|
||||
compare_var_to_value VAR_0x8000, 2
|
||||
goto_if 1, EventScript_16AF94
|
||||
compare_var_to_value VAR_0x8000, 3
|
||||
goto_if 1, EventScript_16AFA8
|
||||
compare_var_to_value VAR_0x8000, 4
|
||||
goto_if 1, EventScript_16AFBC
|
||||
compare_var_to_value VAR_0x8000, 5
|
||||
goto_if 1, EventScript_16AFD0
|
||||
compare_var_to_value VAR_0x8000, 6
|
||||
goto_if 1, EventScript_16AFE4
|
||||
compare_var_to_value VAR_0x8000, 7
|
||||
goto_if 1, EventScript_16AFF8
|
||||
compare_var_to_value VAR_0x8000, 8
|
||||
goto_if 1, EventScript_16B00C
|
||||
compare_var_to_value VAR_0x8000, 9
|
||||
goto_if 1, EventScript_16B020
|
||||
compare_var_to_value VAR_0x8000, 10
|
||||
goto_if 1, EventScript_16B034
|
||||
compare_var_to_value VAR_0x8000, 11
|
||||
goto_if 1, EventScript_16B048
|
||||
compare_var_to_value VAR_0x8000, 127
|
||||
goto_if 1, EventScript_16B048
|
||||
switch VAR_RESULT
|
||||
case 0, EventScript_16AF6C
|
||||
case 1, EventScript_16AF80
|
||||
case 2, EventScript_16AF94
|
||||
case 3, EventScript_16AFA8
|
||||
case 4, EventScript_16AFBC
|
||||
case 5, EventScript_16AFD0
|
||||
case 6, EventScript_16AFE4
|
||||
case 7, EventScript_16AFF8
|
||||
case 8, EventScript_16B00C
|
||||
case 9, EventScript_16B020
|
||||
case 10, EventScript_16B034
|
||||
case 11, EventScript_16B048
|
||||
case 127, EventScript_16B048
|
||||
end
|
||||
|
||||
EventScript_16AF6C:: @ 816AF6C
|
||||
@@ -157,20 +144,20 @@ EventScript_16B048:: @ 816B048
|
||||
EventScript_16B055:: @ 816B055
|
||||
msgbox gUnknown_819331E, MSGBOX_YESNO
|
||||
compare_var_to_value VAR_RESULT, 0
|
||||
goto_if 1, EventScript_16AEC8
|
||||
goto_if_eq EventScript_16AEC8
|
||||
copyvar VAR_0x8004, VAR_0x8009
|
||||
specialvar VAR_RESULT, sub_815EEB0
|
||||
compare_var_to_value VAR_RESULT, 0
|
||||
goto_if 1, EventScript_16B0CC
|
||||
goto_if_eq EventScript_16B0CC
|
||||
giveitem VAR_0x8008
|
||||
compare_var_to_value VAR_RESULT, 0
|
||||
goto_if 1, EventScript_16B0BF
|
||||
goto_if_eq EventScript_16B0BF
|
||||
copyvar VAR_0x8004, VAR_0x8009
|
||||
special sub_815EF5C
|
||||
special sub_815F070
|
||||
msgbox gUnknown_819337A, MSGBOX_YESNO
|
||||
compare_var_to_value VAR_RESULT, 1
|
||||
goto_if 1, EventScript_16AEC8
|
||||
goto_if_eq EventScript_16AEC8
|
||||
msgbox gUnknown_81933FB
|
||||
special sub_815F114
|
||||
release
|
||||
@@ -191,7 +178,7 @@ CeruleanCity_House5_EventScript_16B0DA:: @ 816B0DA
|
||||
lockall
|
||||
special sub_8110AB4
|
||||
compare_var_to_value VAR_RESULT, 2
|
||||
goto_if 1, EventScript_1A7AE0
|
||||
goto_if_eq EventScript_1A7AE0
|
||||
special sub_814EA7C
|
||||
waitstate
|
||||
releaseall
|
||||
|
||||
Reference in New Issue
Block a user