diff options
Diffstat (limited to 'data')
-rw-r--r-- | data/map_event_scripts.inc | 118 | ||||
-rw-r--r-- | data/maps/CeladonCity_GameCorner/scripts.inc | 10 | ||||
-rw-r--r-- | data/maps/CeladonCity_GameCorner_PrizeRoom/scripts.inc | 6 | ||||
-rw-r--r-- | data/maps/CeladonCity_Restaurant/scripts.inc | 4 | ||||
-rw-r--r-- | data/specials.inc | 2 |
5 files changed, 109 insertions, 31 deletions
diff --git a/data/map_event_scripts.inc b/data/map_event_scripts.inc index cf0ce85fe..0695499a9 100644 --- a/data/map_event_scripts.inc +++ b/data/map_event_scripts.inc @@ -1576,27 +1576,23 @@ EventScript_1A661D:: @ 81A661D waitmessage applymovement VAR_LAST_TALKED, Movement_1A666C waitmovement 0 - loadword 0, Text_1A5511 - callstd 4 + msgbox Text_1A5511 return EventScript_1A6636:: @ 81A6636 checkflag 2114 goto_if_eq EventScript_1A661D - loadword 0, Text_1A552B - callstd 4 + msgbox Text_1A552B setflag 2114 message Text_1BCCCA waitmessage applymovement VAR_LAST_TALKED, Movement_1A666C waitmovement 0 - loadword 0, Text_1A5511 - callstd 4 + msgbox Text_1A5511 return EventScript_1A6663:: @ 81A6663 - loadword 0, Text_1A5511 - callstd 4 + msgbox Text_1A5511 return Movement_1A666C:: @ 81A666C @@ -1681,8 +1677,7 @@ EventScript_1A6749:: @ 81A6749 message Text_1A51F6 waitfanfare waitmessage - loadword 0, gUnknown_81A5218 - callstd 4 + msgbox gUnknown_81A5218 setvar VAR_RESULT, 1 return @@ -1717,8 +1712,7 @@ EventScript_1A6795:: @ 81A6795 message Text_1A52F0 waitfanfare waitmessage - loadword 0, gUnknown_81A532F - callstd 4 + msgbox gUnknown_81A532F setvar VAR_RESULT, 1 return @@ -1755,8 +1749,7 @@ EventScript_1A67EE:: @ 81A67EE call_if 1, EventScript_1A6827 waitfanfare waitmessage - loadword 0, gUnknown_81A5218 - callstd 4 + msgbox gUnknown_81A5218 return EventScript_1A6821:: @ 81A6821 @@ -1768,15 +1761,100 @@ EventScript_1A6827:: @ 81A6827 return EventScript_1A682D:: @ 81A682D - loadword 0, Text_1A51F6 - callstd 4 - loadword 0, gUnknown_81A5242 - callstd 4 + msgbox Text_1A51F6 + msgbox gUnknown_81A5242 setvar VAR_RESULT, 0 return -gUnknown_81A6843:: @ 81A6843 - .incbin "baserom.gba", 0x1A6843, 0x112 +EventScript_PickUpHiddenItem:: @ 81A6843 + lockall + textcolor 3 + waitse + compare_var_to_value VAR_0x8005, 0 + goto_if_eq EventScript_PickUpHiddenCoins + call EventScript_GiveItem + compare_var_to_value VAR_0x8007, 1 + goto_if_eq EventScript_ItemInPocketMessage + compare_var_to_value VAR_0x8007, 0 + goto_if_eq EventScript_BagIsFullMessage + end + +EventScript_GiveItem:: + additem VAR_0x8005, VAR_0x8006 + copyvar VAR_0x8007, VAR_RESULT + getitemname 1, VAR_0x8005 + checkitemtype VAR_0x8005 + call EventScript_1A66BC + return + +EventScript_ItemInPocketMessage:: + compare_var_to_value VAR_0x8006, 1 + call_if 1, EventScript_FoundSingleItemMessage + compare_var_to_value VAR_0x8006, 1 + call_if 5, EventScript_FoundMultipleItemsMessage + waitfanfare + waitmessage + msgbox gUnknown_81A5218 + special sub_80CA758 + releaseall + end + +EventScript_FoundSingleItemMessage:: + message Text_1A5231 + return + +EventScript_FoundCoinsMessage:: + getnumberstring 0, VAR_0x8006 + message Text_1A525C + return + +EventScript_FoundMultipleItemsMessage:: + getnumberstring 0, VAR_0x8006 + message Text_1A52DD + return + +EventScript_BagIsFullMessage:: + msgbox Text_1A5231 + msgbox gUnknown_81A5242 + setvar VAR_RESULT, 0 + releaseall + end + +EventScript_PickUpHiddenCoins:: + checkflag FLAG_GOT_COIN_CASE + goto_if 0, EventScript_HiddenCoinsButNoCoinCase + checkcoins VAR_RESULT + specialvar VAR_RESULT, Special_CheckAddCoins + compare_var_to_value VAR_RESULT, 0 + goto_if_eq EventScript_HiddenCoinsButTheCoinCaseIsFull + givecoins VAR_0x8006 + getstdstring 1, 0x17 + call EventScript_1A6764 + call EventScript_FoundCoinsMessage + waitfanfare + waitmessage + msgbox Text_1A526C + special sub_80CA758 + releaseall + end + +EventScript_HiddenCoinsButTheCoinCaseIsFull:: + getnumberstring 0, VAR_0x8006 + getstdstring 1, 0x17 + msgbox Text_1A525C + msgbox Text_1A5294 + setvar VAR_RESULT, 0 + releaseall + end + +EventScript_HiddenCoinsButNoCoinCase:: + getnumberstring 0, VAR_0x8006 + getstdstring 1, 0x17 + msgbox Text_1A525C + msgbox Text_1A52B4 + setvar VAR_RESULT, 0 + releaseall + end gUnknown_81A6955:: @ 81A6955 .incbin "baserom.gba", 0x1A6955, 0x173 diff --git a/data/maps/CeladonCity_GameCorner/scripts.inc b/data/maps/CeladonCity_GameCorner/scripts.inc index dca647299..9115b2812 100644 --- a/data/maps/CeladonCity_GameCorner/scripts.inc +++ b/data/maps/CeladonCity_GameCorner/scripts.inc @@ -39,7 +39,7 @@ CeladonCity_GameCorner_EventScript_16C68D:: @ 816C68D end EventScript_16C6E6:: @ 816C6E6 - checkflag FLAG_0x243 + checkflag FLAG_GOT_COIN_CASE goto_if 0, EventScript_16C790 compare_var_to_value VAR_0x8009, 0 goto_if_eq EventScript_16C734 @@ -134,7 +134,7 @@ CeladonCity_GameCorner_EventScript_16C7E7:: @ 816C7E7 checkflag FLAG_0x26E goto_if_eq EventScript_16C849 msgbox gUnknown_8196AF3 - checkflag FLAG_0x243 + checkflag FLAG_GOT_COIN_CASE goto_if 0, EventScript_16C839 checkcoins VAR_0x4001 compare_var_to_value VAR_0x4001, 9990 @@ -198,7 +198,7 @@ CeladonCity_GameCorner_EventScript_16C89E:: @ 816C89E checkflag FLAG_0x26F goto_if_eq EventScript_16C8F0 msgbox gUnknown_8196D2B - checkflag FLAG_0x243 + checkflag FLAG_GOT_COIN_CASE goto_if 0, EventScript_16C839 checkcoins VAR_0x4001 compare_var_to_value VAR_0x4001, 9980 @@ -228,7 +228,7 @@ CeladonCity_GameCorner_EventScript_16C8FE:: @ 816C8FE checkflag FLAG_0x270 goto_if_eq EventScript_16C950 msgbox gUnknown_8196DB7 - checkflag FLAG_0x243 + checkflag FLAG_GOT_COIN_CASE goto_if 0, EventScript_16C839 checkcoins VAR_0x4001 compare_var_to_value VAR_0x4001, 9980 @@ -263,7 +263,7 @@ EventScript_16C96A:: @ 816C96A end EventScript_16C96C:: @ 816C96C - checkflag FLAG_0x243 + checkflag FLAG_GOT_COIN_CASE goto_if 0, EventScript_16CAA0 msgbox gUnknown_8196F46, MSGBOX_YESNO compare_var_to_value VAR_RESULT, 0 diff --git a/data/maps/CeladonCity_GameCorner_PrizeRoom/scripts.inc b/data/maps/CeladonCity_GameCorner_PrizeRoom/scripts.inc index 911847541..4a60c9814 100644 --- a/data/maps/CeladonCity_GameCorner_PrizeRoom/scripts.inc +++ b/data/maps/CeladonCity_GameCorner_PrizeRoom/scripts.inc @@ -12,7 +12,7 @@ CeladonCity_GameCorner_PrizeRoom_EventScript_16CB7F:: @ 816CB7F CeladonCity_GameCorner_PrizeRoom_EventScript_16CB88:: @ 816CB88 lock faceplayer - checkflag FLAG_0x243 + checkflag FLAG_GOT_COIN_CASE goto_if 0, EventScript_16CD99 special sub_8110AB4 compare_var_to_value VAR_RESULT, 2 @@ -191,7 +191,7 @@ EventScript_16CE12:: @ 816CE12 CeladonCity_GameCorner_PrizeRoom_EventScript_16CE1D:: @ 816CE1D lock faceplayer - checkflag FLAG_0x243 + checkflag FLAG_GOT_COIN_CASE goto_if 0, EventScript_16CD99 special sub_8110AB4 compare_var_to_value VAR_RESULT, 2 @@ -289,7 +289,7 @@ EventScript_16CF79:: @ 816CF79 CeladonCity_GameCorner_PrizeRoom_EventScript_16CF88:: @ 816CF88 lock faceplayer - checkflag FLAG_0x243 + checkflag FLAG_GOT_COIN_CASE goto_if 0, EventScript_16CD99 special sub_8110AB4 compare_var_to_value VAR_RESULT, 2 diff --git a/data/maps/CeladonCity_Restaurant/scripts.inc b/data/maps/CeladonCity_Restaurant/scripts.inc index e52d88636..379d07271 100644 --- a/data/maps/CeladonCity_Restaurant/scripts.inc +++ b/data/maps/CeladonCity_Restaurant/scripts.inc @@ -12,7 +12,7 @@ CeladonCity_Restaurant_EventScript_16D1F4:: @ 816D1F4 CeladonCity_Restaurant_EventScript_16D1FD:: @ 816D1FD lock faceplayer - checkflag FLAG_0x243 + checkflag FLAG_GOT_COIN_CASE goto_if_eq EventScript_16D24B msgbox gUnknown_81979C1 checkitemspace ITEM_COIN_CASE, 1 @@ -20,7 +20,7 @@ CeladonCity_Restaurant_EventScript_16D1FD:: @ 816D1FD goto_if_eq EventScript_16D241 additem ITEM_COIN_CASE, 1 giveitemfanfaremsg gUnknown_8197A38, ITEM_COIN_CASE - setflag FLAG_0x243 + setflag FLAG_GOT_COIN_CASE release end diff --git a/data/specials.inc b/data/specials.inc index 5905d825f..13809e274 100644 --- a/data/specials.inc +++ b/data/specials.inc @@ -359,7 +359,7 @@ gSpecials:: @ 815FD60 def_special sub_80CADEC def_special sub_805D1A8 def_special sub_80CB0A8 - def_special sub_80CB1D8 + def_special Special_CheckAddCoins def_special GetDaycarePokemonCount def_special sub_80CB63C def_special sub_80CBD80 |