pokefirered/data/maps/TwoIsland/scripts.inc
2020-02-26 01:46:21 -05:00

224 lines
6.4 KiB
PHP

TwoIsland_MapScripts:: @ 8167564
map_script MAP_SCRIPT_ON_TRANSITION, TwoIsland_OnTransition
.byte 0
TwoIsland_OnTransition:: @ 816756A
setworldmapflag FLAG_WORLD_MAP_TWO_ISLAND
setflag FLAG_VISITED_TWO_ISLAND
call TwoIsland_EventScript_SetShopState
end
TwoIsland_EventScript_SetShopState:: @ 8167576
goto_if_set FLAG_SYS_CAN_LINK_WITH_RS, TwoIsland_EventScript_SetShopStateAfterHoennLink
goto_if_set FLAG_SYS_GAME_CLEAR, TwoIsland_EventScript_SetShopStateAfterChampion
goto_if_set FLAG_RESCUED_LOSTELLE, TwoIsland_EventScript_SetShopStateAfterLostelleRescue
goto TwoIsland_EventScript_SetShopStateDefault
end
TwoIsland_EventScript_SetShopStateAfterHoennLink:: @ 8167597
goto_if_unset FLAG_TWO_ISLAND_SHOP_INTRODUCED, TwoIsland_EventScript_SetShopInitial
goto_if_unset FLAG_TWO_ISLAND_SHOP_EXPANDED_1, TwoIsland_EventScript_SetShopExpanded1
goto_if_unset FLAG_TWO_ISLAND_SHOP_EXPANDED_2, TwoIsland_EventScript_SetShopExpanded2
goto TwoIsland_EventScript_SetShopExpanded3
end
TwoIsland_EventScript_SetShopStateAfterChampion:: @ 81675B8
goto_if_unset FLAG_TWO_ISLAND_SHOP_INTRODUCED, TwoIsland_EventScript_SetShopInitial
goto_if_unset FLAG_RESCUED_LOSTELLE, TwoIsland_EventScript_SetShopInitial
goto_if_unset FLAG_TWO_ISLAND_SHOP_EXPANDED_1, TwoIsland_EventScript_SetShopExpanded1
goto TwoIsland_EventScript_SetShopExpanded2
end
TwoIsland_EventScript_SetShopStateAfterLostelleRescue:: @ 81675D9
goto_if_unset FLAG_TWO_ISLAND_SHOP_INTRODUCED, TwoIsland_EventScript_SetShopInitial
goto TwoIsland_EventScript_SetShopExpanded1
end
TwoIsland_EventScript_SetShopStateDefault:: @ 81675E8
goto TwoIsland_EventScript_SetShopInitial
end
TwoIsland_EventScript_SetShopInitial:: @ 81675EE
setvar VAR_MAP_SCENE_TWO_ISLAND, 1
return
TwoIsland_EventScript_SetShopExpanded1:: @ 81675F4
setvar VAR_MAP_SCENE_TWO_ISLAND, 2
clearflag FLAG_HIDE_TWO_ISLAND_WOMAN
return
TwoIsland_EventScript_SetShopExpanded2:: @ 81675FD
setvar VAR_MAP_SCENE_TWO_ISLAND, 3
clearflag FLAG_HIDE_TWO_ISLAND_BEAUTY
return
TwoIsland_EventScript_SetShopExpanded3:: @ 8167606
setvar VAR_MAP_SCENE_TWO_ISLAND, 4
clearflag FLAG_HIDE_TWO_ISLAND_SUPER_NERD
return
TwoIsland_EventScript_Clerk:: @ 816760F
goto_if_questlog EventScript_ReleaseEnd
lock
faceplayer
compare VAR_MAP_SCENE_TWO_ISLAND, 4
goto_if_eq TwoIsland_EventScript_ClerkShopExpanded3
compare VAR_MAP_SCENE_TWO_ISLAND, 3
goto_if_eq TwoIsland_EventScript_ClerkShopExpanded2
compare VAR_MAP_SCENE_TWO_ISLAND, 2
goto_if_eq TwoIsland_EventScript_ClerkShopExpanded1
goto TwoIsland_EventScript_ClerkShopInitial
end
TwoIsland_EventScript_ClerkShopExpanded3:: @ 8167646
goto_if_set FLAG_TWO_ISLAND_SHOP_EXPANDED_3, TwoIsland_EventScript_ClerkShopSkipIntro
setflag FLAG_TWO_ISLAND_SHOP_EXPANDED_3
message TwoIsland_Text_BringingItemsFromDistantLands
waitmessage
goto TwoIsland_EventScript_ShopExpanded3
end
TwoIsland_EventScript_ClerkShopExpanded2:: @ 816765E
goto_if_set FLAG_TWO_ISLAND_SHOP_EXPANDED_2, TwoIsland_EventScript_ClerkShopSkipIntro
setflag FLAG_TWO_ISLAND_SHOP_EXPANDED_2
message TwoIsland_Text_HopeYouGiveItYourBest
waitmessage
goto TwoIsland_EventScript_ShopExpanded2
end
TwoIsland_EventScript_ClerkShopExpanded1:: @ 8167676
goto_if_set FLAG_TWO_ISLAND_SHOP_EXPANDED_1, TwoIsland_EventScript_ClerkShopSkipIntro
setflag FLAG_TWO_ISLAND_SHOP_EXPANDED_1
message TwoIsland_Text_AddedMerchandiseForLostelle
waitmessage
goto TwoIsland_EventScript_ShopExpanded1
end
TwoIsland_EventScript_ClerkShopInitial:: @ 816768E
goto_if_set FLAG_TWO_ISLAND_SHOP_INTRODUCED, TwoIsland_EventScript_ClerkShopSkipIntro
setflag FLAG_TWO_ISLAND_SHOP_INTRODUCED
message TwoIsland_Text_WelcomeToShopMerchandiseLimited
waitmessage
goto TwoIsland_EventScript_ShopInitial
end
TwoIsland_EventScript_ClerkShopSkipIntro:: @ 81676A6
message Text_MayIHelpYou
waitmessage
compare VAR_MAP_SCENE_TWO_ISLAND, 4
goto_if_eq TwoIsland_EventScript_ShopExpanded3
compare VAR_MAP_SCENE_TWO_ISLAND, 3
goto_if_eq TwoIsland_EventScript_ShopExpanded2
compare VAR_MAP_SCENE_TWO_ISLAND, 2
goto_if_eq TwoIsland_EventScript_ShopExpanded1
goto TwoIsland_EventScript_ShopInitial
end
TwoIsland_EventScript_ShopInitial:: @ 81676D3
pokemart TwoIsland_Items_ShopInitial
msgbox Text_PleaseComeAgain
release
end
.align 2
TwoIsland_Items_ShopInitial:: @ 81676E4
.2byte ITEM_GREAT_BALL
.2byte ITEM_FRESH_WATER
.2byte ITEM_NONE
release
end
TwoIsland_EventScript_ShopExpanded1:: @ 81676EC
pokemart TwoIsland_Items_ShopExpanded1
msgbox Text_PleaseComeAgain
release
end
.align 2
TwoIsland_Items_ShopExpanded1:: @ 81676FC
.2byte ITEM_ULTRA_BALL
.2byte ITEM_GREAT_BALL
.2byte ITEM_SODA_POP
.2byte ITEM_FRESH_WATER
.2byte ITEM_NONE
release
end
TwoIsland_EventScript_ShopExpanded2:: @ 8167708
pokemart TwoIsland_Items_ShopExpanded2
msgbox Text_PleaseComeAgain
release
end
.align 2
TwoIsland_Items_ShopExpanded2:: @ 8167718
.2byte ITEM_ULTRA_BALL
.2byte ITEM_GREAT_BALL
.2byte ITEM_LEMONADE
.2byte ITEM_SODA_POP
.2byte ITEM_FRESH_WATER
.2byte ITEM_MOOMOO_MILK
.2byte ITEM_NONE
release
end
TwoIsland_EventScript_ShopExpanded3:: @ 8167728
pokemart TwoIsland_Items_ShopExpanded3
msgbox Text_PleaseComeAgain
release
end
.align 2
TwoIsland_Items_ShopExpanded3:: @ 8167738
.2byte ITEM_ULTRA_BALL
.2byte ITEM_REPEAT_BALL
.2byte ITEM_TIMER_BALL
.2byte ITEM_LEMONADE
.2byte ITEM_SODA_POP
.2byte ITEM_FRESH_WATER
.2byte ITEM_MOOMOO_MILK
.2byte ITEM_LAVA_COOKIE
.2byte ITEM_NONE
release
end
TwoIsland_EventScript_Sailor:: @ 816774C
msgbox TwoIsland_Text_FellowMovedFromCeladonCity, MSGBOX_NPC
end
TwoIsland_EventScript_Woman:: @ 8167755
msgbox TwoIsland_Text_ShopkeepersBrotherWorksGameCorner, MSGBOX_NPC
end
TwoIsland_EventScript_Beauty:: @ 816775E
lock
faceplayer
famechecker FAMECHECKER_BRUNO, 4
msgbox TwoIsland_Text_BrunoCameToIslandWhileBack
release
end
TwoIsland_EventScript_SuperNerd:: @ 8167777
msgbox TwoIsland_Text_BuyRareItemsHere, MSGBOX_NPC
end
TwoIsland_EventScript_Boy:: @ 8167780
msgbox TwoIsland_Text_OldWomanLivesOutOnCape, MSGBOX_NPC
end
TwoIsland_EventScript_LittleBoy:: @ 8167789
msgbox TwoIsland_Text_HaveYouTriedJumpingGame, MSGBOX_NPC
end
TwoIsland_EventScript_IslandSign:: @ 8167792
msgbox TwoIsland_Text_IslandSign, MSGBOX_SIGN
end
TwoIsland_EventScript_JoyfulGameCornerSign:: @ 816779B
msgbox TwoIsland_Text_JoyfulGameCornerSign, MSGBOX_SIGN
end
TwoIsland_EventScript_FastCurrentSign:: @ 81677A4
msgbox TwoIsland_Text_DangerFastCurrent, MSGBOX_SIGN
end