summaryrefslogtreecommitdiff
path: root/data/maps/VermilionCity/scripts.inc
diff options
context:
space:
mode:
Diffstat (limited to 'data/maps/VermilionCity/scripts.inc')
-rw-r--r--data/maps/VermilionCity/scripts.inc128
1 files changed, 60 insertions, 68 deletions
diff --git a/data/maps/VermilionCity/scripts.inc b/data/maps/VermilionCity/scripts.inc
index fcacff2e3..7767bbb2b 100644
--- a/data/maps/VermilionCity/scripts.inc
+++ b/data/maps/VermilionCity/scripts.inc
@@ -1,29 +1,28 @@
VermilionCity_MapScripts:: @ 81668DC
- map_script 3, VermilionCity_MapScript1_166906
- map_script 2, VermilionCity_MapScript2_1668E7
+ map_script MAP_SCRIPT_ON_TRANSITION, VermilionCity_OnTransition
+ map_script MAP_SCRIPT_ON_FRAME_TABLE, VermilionCity_OnFrame
.byte 0
-VermilionCity_MapScript2_1668E7:: @ 81668E7
+VermilionCity_OnFrame:: @ 81668E7
map_script_2 VAR_MAP_SCENE_VERMILION_CITY, 2, EventScript_1668F1
.2byte 0
EventScript_1668F1:: @ 81668F1
lockall
- applymovement 255, Movement_166903
+ applymovement OBJ_EVENT_ID_PLAYER, Movement_166903
waitmovement 0
setvar VAR_MAP_SCENE_VERMILION_CITY, 3
releaseall
end
Movement_166903:: @ 8166903
- step_11
- step_11
+ walk_up
+ walk_up
step_end
-VermilionCity_MapScript1_166906:: @ 8166906
+VermilionCity_OnTransition:: @ 8166906
setworldmapflag FLAG_WORLD_MAP_VERMILION_CITY
- checkflag FLAG_TALKED_TO_OAKS_AIDE_IN_VERMILION
- call_if TRUE, EventScript_166913
+ call_if_set FLAG_TALKED_TO_OAKS_AIDE_IN_VERMILION, EventScript_166913
end
EventScript_166913:: @ 8166913
@@ -31,14 +30,14 @@ EventScript_166913:: @ 8166913
return
VermilionCity_EventScript_166917:: @ 8166917
- msgbox gUnknown_817F723, 2
+ msgbox gUnknown_817F723, MSGBOX_NPC
end
VermilionCity_EventScript_166920:: @ 8166920
lock
faceplayer
- compare_var_to_value VAR_MAP_SCENE_VERMILION_CITY, 3
- goto_if eq, EventScript_166937
+ compare VAR_MAP_SCENE_VERMILION_CITY, 3
+ goto_if_eq EventScript_166937
msgbox gUnknown_817F776
release
end
@@ -51,51 +50,49 @@ EventScript_166937:: @ 8166937
VermilionCity_EventScript_166941:: @ 8166941
lock
faceplayer
- compare_var_to_value VAR_MAP_SCENE_VERMILION_CITY, 3
- goto_if eq, EventScript_166996
+ compare VAR_MAP_SCENE_VERMILION_CITY, 3
+ goto_if_eq EventScript_166996
msgbox gUnknown_817FA22
release
end
EventScript_166958:: @ 8166958
- checkflag FLAG_SYS_GOT_MYSTIC_TICKET
- goto_if FALSE, EventScript_1A77B0
+ goto_if_unset FLAG_SYS_GOT_MYSTIC_TICKET, EventScript_SetResultFalse
checkitem ITEM_MYSTIC_TICKET, 1
- compare_var_to_value VAR_RESULT, 0
- goto_if eq, EventScript_1A77B0
- goto EventScript_1A77AA
+ compare VAR_RESULT, FALSE
+ goto_if_eq EventScript_SetResultFalse
+ goto EventScript_SetResultTrue
end
EventScript_166977:: @ 8166977
- checkflag FLAG_SYS_GOT_AURORA_TICKET
- goto_if FALSE, EventScript_1A77B0
+ goto_if_unset FLAG_SYS_GOT_AURORA_TICKET, EventScript_SetResultFalse
checkitem ITEM_AURORA_TICKET, 1
- compare_var_to_value VAR_RESULT, 0
- goto_if eq, EventScript_1A77B0
- goto EventScript_1A77AA
+ compare VAR_RESULT, FALSE
+ goto_if_eq EventScript_SetResultFalse
+ goto EventScript_SetResultTrue
end
EventScript_166996:: @ 8166996
setvar VAR_0x8004, SEAGALLOP_VERMILION_CITY
- compare_var_to_value VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 5
- goto_if ge, EventScript_1669BB
- compare_var_to_value VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 1
- goto_if ge, EventScript_166B3B
+ compare VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 5
+ goto_if_ge EventScript_1669BB
+ compare VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 1
+ goto_if_ge EventScript_166B3B
msgbox gUnknown_817FB10
release
end
EventScript_1669BB:: @ 81669BB
special sub_8110AB4
- compare_var_to_value VAR_RESULT, 2
- goto_if eq, EventScript_1A7AE0
+ compare VAR_RESULT, 2
+ goto_if_eq EventScript_1A7AE0
special sub_8112364
call EventScript_166958
- compare_var_to_value VAR_RESULT, 1
- goto_if eq, EventScript_1669FD
+ compare VAR_RESULT, 1
+ goto_if_eq EventScript_1669FD
call EventScript_166977
- compare_var_to_value VAR_RESULT, 1
- goto_if eq, EventScript_166A5F
+ compare VAR_RESULT, 1
+ goto_if_eq EventScript_166A5F
setvar VAR_0x8004, SEAGALLOP_VERMILION_CITY
message Text_17FBB8
waitmessage
@@ -104,18 +101,17 @@ EventScript_1669BB:: @ 81669BB
EventScript_1669FD:: @ 81669FD
call EventScript_166977
- compare_var_to_value VAR_RESULT, 1
- goto_if eq, EventScript_166AB1
- checkflag FLAG_SHOWED_MYSTICTICKET_TO_CAPTAIN
- call_if FALSE, EventScript_166A53
+ compare VAR_RESULT, 1
+ goto_if_eq EventScript_166AB1
+ call_if_unset FLAG_SHOWED_MYSTICTICKET_TO_CAPTAIN, EventScript_166A53
message Text_17FCC1
waitmessage
multichoice 17, 6, MULTICHOICE_SEVII_NAVEL, FALSE
switch VAR_RESULT
case 0, EventScript_1A911E
case 1, EventScript_166B0B
- case 2, EventScript_1A90F6
- case 127, EventScript_1A90F6
+ case 2, EventScript_CancelSail
+ case 127, EventScript_CancelSail
end
EventScript_166A53:: @ 8166A53
@@ -124,16 +120,15 @@ EventScript_166A53:: @ 8166A53
return
EventScript_166A5F:: @ 8166A5F
- checkflag FLAG_SHOWED_AURORATICKET_TO_CAPTAIN
- call_if FALSE, EventScript_166AA5
+ call_if_unset FLAG_SHOWED_AURORATICKET_TO_CAPTAIN, EventScript_166AA5
message Text_17FCC1
waitmessage
multichoice 13, 6, MULTICHOICE_SEVII_BIRTH, FALSE
switch VAR_RESULT
case 0, EventScript_1A911E
case 1, EventScript_166B23
- case 2, EventScript_1A90F6
- case 127, EventScript_1A90F6
+ case 2, EventScript_CancelSail
+ case 127, EventScript_CancelSail
end
EventScript_166AA5:: @ 8166AA5
@@ -142,10 +137,8 @@ EventScript_166AA5:: @ 8166AA5
return
EventScript_166AB1:: @ 8166AB1
- checkflag FLAG_SHOWED_MYSTICTICKET_TO_CAPTAIN
- call_if FALSE, EventScript_166A53
- checkflag FLAG_SHOWED_AURORATICKET_TO_CAPTAIN
- call_if FALSE, EventScript_166AA5
+ call_if_unset FLAG_SHOWED_MYSTICTICKET_TO_CAPTAIN, EventScript_166A53
+ call_if_unset FLAG_SHOWED_AURORATICKET_TO_CAPTAIN, EventScript_166AA5
message Text_17FCC1
waitmessage
multichoice 13, 5, MULTICHOICE_SEVII_NAVEL_BIRTH, FALSE
@@ -153,8 +146,8 @@ EventScript_166AB1:: @ 8166AB1
case 0, EventScript_1A911E
case 1, EventScript_166B0B
case 2, EventScript_166B23
- case 3, EventScript_1A90F6
- case 127, EventScript_1A90F6
+ case 3, EventScript_CancelSail
+ case 127, EventScript_CancelSail
end
EventScript_166B0B:: @ 8166B0B
@@ -180,8 +173,8 @@ EventScript_166B3B:: @ 8166B3B
case 0, EventScript_1A8FEE
case 1, EventScript_1A8FF9
case 2, EventScript_1A9004
- case 3, EventScript_1A90F6
- case 127, EventScript_1A90F6
+ case 3, EventScript_CancelSail
+ case 127, EventScript_CancelSail
end
EventScript_166B88:: @ 8166B88
@@ -206,14 +199,13 @@ VermilionCity_EventScript_166B98:: @ 8166B98
EventScript_166BA0:: @ 8166BA0
textcolor 0
- applymovement 6, Movement_1A75E7
- applymovement 255, Movement_1A75EB
+ applymovement 6, Movement_WalkInPlaceFastestLeft
+ applymovement OBJ_EVENT_ID_PLAYER, Movement_WalkInPlaceFastestRight
waitmovement 0
- compare_var_to_value VAR_MAP_SCENE_VERMILION_CITY, 3
- goto_if eq, EventScript_166BED
+ compare VAR_MAP_SCENE_VERMILION_CITY, 3
+ goto_if_eq EventScript_166BED
msgbox gUnknown_817FA3C
- checkflag FLAG_GOT_SS_TICKET
- goto_if FALSE, EventScript_166BDE
+ goto_if_unset FLAG_GOT_SS_TICKET, EventScript_166BDE
msgbox gUnknown_817FA77
setvar VAR_VERMILION_CITY_TICKET_CHECK_TRIGGER, 1
releaseall
@@ -227,17 +219,17 @@ EventScript_166BDE:: @ 8166BDE
EventScript_166BED:: @ 8166BED
setvar VAR_0x8004, SEAGALLOP_VERMILION_CITY
- compare_var_to_value VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 5
- goto_if ge, EventScript_1669BB
- compare_var_to_value VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 1
- goto_if ge, EventScript_166B3B
+ compare VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 5
+ goto_if_ge EventScript_1669BB
+ compare VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 1
+ goto_if_ge EventScript_166B3B
msgbox gUnknown_817FB10
closemessage
goto EventScript_1A9108
end
VermilionCity_EventScript_166C17:: @ 8166C17
- msgbox gUnknown_817F8AC, 2
+ msgbox gUnknown_817F8AC, MSGBOX_NPC
end
VermilionCity_EventScript_166C20:: @ 8166C20
@@ -249,7 +241,7 @@ VermilionCity_EventScript_166C20:: @ 8166C20
end
VermilionCity_EventScript_166C2F:: @ 8166C2F
- msgbox gUnknown_817F7FD, 2
+ msgbox gUnknown_817F7FD, MSGBOX_NPC
end
VermilionCity_EventScript_166C38:: @ 8166C38
@@ -264,15 +256,15 @@ VermilionCity_EventScript_166C38:: @ 8166C38
end
VermilionCity_EventScript_166C53:: @ 8166C53
- msgbox gUnknown_817F8FB, 3
+ msgbox gUnknown_817F8FB, MSGBOX_SIGN
end
VermilionCity_EventScript_166C5C:: @ 8166C5C
- msgbox gUnknown_817F928, 3
+ msgbox gUnknown_817F928, MSGBOX_SIGN
end
VermilionCity_EventScript_166C65:: @ 8166C65
- msgbox gUnknown_817F9A1, 3
+ msgbox gUnknown_817F9A1, MSGBOX_SIGN
end
VermilionCity_EventScript_166C6E:: @ 8166C6E
@@ -283,5 +275,5 @@ VermilionCity_EventScript_166C6E:: @ 8166C6E
end
VermilionCity_EventScript_166C86:: @ 8166C86
- msgbox gUnknown_817FA11, 3
+ msgbox gUnknown_817FA11, MSGBOX_SIGN
end