diff options
author | GriffinR <griffin.g.richards@gmail.com> | 2020-01-09 13:25:10 -0500 |
---|---|---|
committer | GriffinR <griffin.g.richards@gmail.com> | 2020-01-09 14:01:45 -0500 |
commit | d071f055041d551b33fafac01e6bbe28aaee746f (patch) | |
tree | a830c98d960889d005e818bca5f1cfadce8e8560 /data/scripts | |
parent | a40c63fe4896ccd76f6f63bdbd940de8cc946fae (diff) |
Split more files from event_scripts.s
Diffstat (limited to 'data/scripts')
-rw-r--r-- | data/scripts/obtain_item.inc | 248 | ||||
-rw-r--r-- | data/scripts/pc.inc | 108 | ||||
-rw-r--r-- | data/scripts/silphco_doors.inc | 585 | ||||
-rw-r--r-- | data/scripts/test.inc | 27 |
4 files changed, 968 insertions, 0 deletions
diff --git a/data/scripts/obtain_item.inc b/data/scripts/obtain_item.inc new file mode 100644 index 000000000..d919d5fc6 --- /dev/null +++ b/data/scripts/obtain_item.inc @@ -0,0 +1,248 @@ +EventScript_1A666F:: @ 81A666F + copyvar VAR_MON_BOX_POS, VAR_MON_BOX_ID + return + +EventScript_1A6675:: @ 81A6675 + copyvar VAR_MON_BOX_ID, VAR_MON_BOX_POS + return + +Std_ObtainItem:: @ 81A667B + copyvar VAR_MON_BOX_POS, VAR_MON_BOX_ID + textcolor 3 + additem VAR_0x8000, VAR_0x8001 + copyvar VAR_0x8007, VAR_RESULT + call EventScript_1A6697 + copyvar VAR_MON_BOX_ID, VAR_MON_BOX_POS + return + +EventScript_1A6697:: @ 81A6697 + bufferitemnameplural 1, VAR_0x8000, VAR_0x8001 + checkitemtype VAR_0x8000 + call EventScript_1A66BC + compare VAR_0x8007, 1 + call_if eq, EventScript_1A6749 + compare VAR_0x8007, 0 + call_if eq, EventScript_1A675E + return + +EventScript_1A66BC:: @ 81A66BC + switch VAR_RESULT + case POCKET_ITEMS, EventScript_1A66F9 + case POCKET_KEY_ITEMS, EventScript_1A6709 + case POCKET_POKE_BALLS, EventScript_1A6719 + case POCKET_TM_CASE, EventScript_1A6729 + case POCKET_BERRY_POUCH, EventScript_1A6739 + end + +EventScript_1A66F9:: @ 81A66F9 + getstdstring 2, 24 + compare VAR_0x8007, 1 + call_if eq, EventScript_1A6764 + return + +EventScript_1A6709:: @ 81A6709 + getstdstring 2, 25 + compare VAR_0x8007, 1 + call_if eq, EventScript_1A6764 + return + +EventScript_1A6719:: @ 81A6719 + getstdstring 2, 26 + compare VAR_0x8007, 1 + call_if eq, EventScript_1A6764 + return + +EventScript_1A6729:: @ 81A6729 + getstdstring 2, 27 + compare VAR_0x8007, 1 + call_if eq, EventScript_1A6768 + return + +EventScript_1A6739:: @ 81A6739 + getstdstring 2, 28 + compare VAR_0x8007, 1 + call_if eq, EventScript_1A6764 + return + +EventScript_1A6749:: @ 81A6749 + message Text_ObtainedTheX + waitfanfare + waitmessage + msgbox Text_PutItemAway + setvar VAR_RESULT, 1 + return + +EventScript_1A675E:: @ 81A675E + setvar VAR_RESULT, 0 + return + +EventScript_1A6764:: @ 81A6764 + playfanfare MUS_FANFA1 + return + +EventScript_1A6768:: @ 81A6768 + playfanfare MUS_FANFA1 + return + +Std_ObtainDecoration:: @ 81A676C + adddecor VAR_0x8000 + copyvar VAR_0x8007, VAR_RESULT + call EventScript_1A677A + return + +EventScript_1A677A:: @ 81A677A + getdecorname 1, VAR_0x8000 + compare VAR_0x8007, 1 + call_if eq, EventScript_1A6795 + compare VAR_0x8007, 0 + call_if eq, EventScript_1A67AD + return + +EventScript_1A6795:: @ 81A6795 + playfanfare MUS_FANFA4 + message Text_1A52F0 + waitfanfare + waitmessage + msgbox gUnknown_81A532F + setvar VAR_RESULT, 1 + return + +EventScript_1A67AD:: @ 81A67AD + setvar VAR_RESULT, 0 + return + +Std_FindItem:: @ 81A67B3 + lock + faceplayer + waitse + copyvar VAR_0x8004, VAR_0x8000 + copyvar VAR_0x8005, VAR_0x8001 + checkitemspace VAR_0x8000, VAR_0x8001 + copyvar VAR_0x8007, VAR_RESULT + getitemname 1, VAR_0x8000 + checkitemtype VAR_0x8000 + call EventScript_1A66BC + compare VAR_0x8007, 1 + call_if eq, EventScript_1A67EE + compare VAR_0x8007, 0 + call_if eq, EventScript_1A682D + release + return + +EventScript_1A67EE:: @ 81A67EE + removeobject VAR_LAST_TALKED + additem VAR_0x8004, VAR_0x8005 + specialvar VAR_RESULT, Special_ItemIsTM_GetMoveName + copyvar VAR_0x8008, VAR_RESULT + compare VAR_0x8008, 1 + call_if eq, EventScript_1A6821 + compare VAR_0x8008, 0 + call_if eq, EventScript_1A6827 + waitfanfare + waitmessage + msgbox Text_PutItemAway + return + +EventScript_1A6821:: @ 81A6821 + message Text_1A63E8 + return + +EventScript_1A6827:: @ 81A6827 + message Text_FoundOneItem + return + +EventScript_1A682D:: @ 81A682D + msgbox Text_ObtainedTheX + msgbox Text_TooBadBagFull + setvar VAR_RESULT, 0 + return + +EventScript_PickUpHiddenItem:: @ 81A6843 + lockall + textcolor 3 + waitse + compare VAR_0x8005, 0 + goto_if eq, EventScript_PickUpHiddenCoins + call EventScript_GiveItem + compare VAR_0x8007, 1 + goto_if eq, EventScript_ItemInPocketMessage + compare 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_0x8006, 1 + call_if eq, EventScript_FoundSingleItemMessage + compare VAR_0x8006, 1 + call_if ne, EventScript_FoundMultipleItemsMessage + waitfanfare + waitmessage + msgbox Text_PutItemAway + special Special_SetHiddenItemFlag + releaseall + end + +EventScript_FoundSingleItemMessage:: + message Text_FoundOneItem + return + +EventScript_FoundCoinsMessage:: + getnumberstring 0, VAR_0x8006 + message Text_FoundXCoins + return + +EventScript_FoundMultipleItemsMessage:: + getnumberstring 0, VAR_0x8006 + message Text_FoundXItems + return + +EventScript_BagIsFullMessage:: + msgbox Text_FoundOneItem + msgbox Text_TooBadBagFull + setvar VAR_RESULT, 0 + releaseall + end + +EventScript_PickUpHiddenCoins:: + checkflag FLAG_GOT_COIN_CASE + goto_if FALSE, EventScript_HiddenCoinsButNoCoinCase + checkcoins VAR_RESULT + specialvar VAR_RESULT, Special_CheckAddCoins + compare VAR_RESULT, 0 + goto_if eq, EventScript_HiddenCoinsButTheCoinCaseIsFull + givecoins VAR_0x8006 + getstdstring 1, 0x17 + call EventScript_1A6764 + call EventScript_FoundCoinsMessage + waitfanfare + waitmessage + msgbox Text_PutCoinsAwayInCoinCase + special Special_SetHiddenItemFlag + releaseall + end + +EventScript_HiddenCoinsButTheCoinCaseIsFull:: + getnumberstring 0, VAR_0x8006 + getstdstring 1, 0x17 + msgbox Text_FoundXCoins + msgbox Text_CoinCaseIsFull + setvar VAR_RESULT, 0 + releaseall + end + +EventScript_HiddenCoinsButNoCoinCase:: + getnumberstring 0, VAR_0x8006 + getstdstring 1, 0x17 + msgbox Text_FoundXCoins + msgbox Text_NothingToPutThemIn + setvar VAR_RESULT, 0 + releaseall + end diff --git a/data/scripts/pc.inc b/data/scripts/pc.inc new file mode 100644 index 000000000..9666a1fd1 --- /dev/null +++ b/data/scripts/pc.inc @@ -0,0 +1,108 @@ +EventScript_PC:: @ 81A6955 + special sub_8110AB4 + compare VAR_RESULT, 2 + goto_if eq, EventScript_1A7AE0 + lockall + checkflag FLAG_SYS_PC_STORAGE_DISABLED + goto_if TRUE, EventScript_PCDisabled + setvar VAR_0x8004, 27 + special Special_SetSomeVariable + setvar VAR_0x8004, 0 + special Special_AnimatePcTurnOn + playse SE_PC_ON + msgbox Text_BootedUpPC + goto EventScript_PCMainMenu + end + +EventScript_PCDisabled:: @ 81A698E + msgbox Text_UsualPCServicesUnavailable + releaseall + end + +EventScript_PCMainMenu:: @ 81A6998 + message Text_AccessWhichPC + waitmessage + special ScrSpecial_CreatePCMenu + waitstate + goto EventScript_ChoosePCMenu + end + +EventScript_ChoosePCMenu:: @ 81A69A8 + switch VAR_RESULT + case 0, EventScript_AccessPokemonStorage + case 1, EventScript_AccessPlayersPC + case 2, EventScript_AccessProfOaksPC + case 3, EventScript_1A6A56 + case 4, EventScript_1A6A46 + case SCR_MENU_CANCEL, EventScript_1A6A46 + end + +EventScript_AccessPlayersPC:: @ 81A69F0 + playse SE_PC_LOGIN + msgbox Text_AccessedPlayersPC + special PlayerPC + waitstate + goto EventScript_PCMainMenu + end + +EventScript_AccessPokemonStorage:: @ 81A6A05 + playse SE_PC_LOGIN + checkflag FLAG_SYS_NOT_SOMEONES_PC + call_if FALSE, EventScript_1A6A34 + checkflag FLAG_SYS_NOT_SOMEONES_PC + call_if TRUE, EventScript_1A6A3D + msgbox Text_OpenedPkmnStorage + special ShowPokemonStorageSystem + waitstate + setvar VAR_0x8004, 27 + special Special_SetSomeVariable + goto EventScript_PCMainMenu + end + +EventScript_1A6A34:: @ 81A6A34 + msgbox Text_AccessedSomeonesPC + return + +EventScript_1A6A3D:: @ 81A6A3D + msgbox Text_AccessedBillsPC + return + +EventScript_1A6A46:: @ 81A6A46 + setvar VAR_0x8004, 0 + playse SE_PC_OFF + special Special_AnimatePcTurnOff + special sub_812B35C + releaseall + end + +EventScript_1A6A56:: @ 81A6A56 + checkflag FLAG_SYS_GAME_CLEAR + goto_if FALSE, EventScript_1A6A46 + playse SE_PC_LOGIN + setvar VAR_0x8004, 31 + special HelpSystem_BackupSomeVariable + special Special_SetSomeVariable + special HallOfFamePCBeginFade + waitstate + special HelpSystem_RestoreSomeVariable + goto EventScript_ChoosePCMenu + end + +EventScript_AccessProfOaksPC:: @ 81A6A7A + checkflag FLAG_SYS_POKEDEX_GET + goto_if FALSE, EventScript_1A6A46 + playse SE_PC_LOGIN + msgbox Text_AccessedProfOaksPC + msgbox Text_HavePokedexRated, MSGBOX_YESNO + compare VAR_RESULT, NO + goto_if eq, EventScript_ExitOaksPC + setflag FLAG_OAKS_RATING_IS_VIA_PC + call EventScript_1A73E0 + clearflag FLAG_OAKS_RATING_IS_VIA_PC + goto EventScript_ExitOaksPC + end + +EventScript_ExitOaksPC:: @ 81A6AB2 + msgbox Text_ClosedLinkToProfOaksPC + goto EventScript_PCMainMenu + end diff --git a/data/scripts/silphco_doors.inc b/data/scripts/silphco_doors.inc new file mode 100644 index 000000000..07e1db17d --- /dev/null +++ b/data/scripts/silphco_doors.inc @@ -0,0 +1,585 @@ +EventScript_NeedCardKey:: @ 81A8135 + msgbox Text_ItNeedsCardKey + releaseall + end + +EventScript_DoorUnlocked:: @ 81A813F + msgbox Text_TheDoorIsOpen + releaseall + end + +EventScript_Close2FDoor1:: @ 81A8149 + setmetatile 5, 8, 944, 1 + setmetatile 6, 8, 945, 1 + setmetatile 5, 9, 952, 1 + setmetatile 6, 9, 953, 1 + setmetatile 6, 10, 821, 0 + return + +EventScript_Close2FDoor2:: @ 81A8177 + setmetatile 5, 15, 944, 1 + setmetatile 6, 15, 945, 1 + setmetatile 5, 16, 952, 1 + setmetatile 6, 16, 953, 1 + setmetatile 6, 17, 821, 0 + return + +EventScript_Close3FDoor1:: @ 81A81A5 + setmetatile 9, 11, 960, 1 + setmetatile 10, 11, 961, 1 + setmetatile 9, 12, 962, 1 + setmetatile 10, 12, 963, 1 + setmetatile 9, 13, 964, 1 + setmetatile 10, 13, 965, 1 + return + +EventScript_Close3FDoor2:: @ 81A81DC + setmetatile 20, 11, 960, 1 + setmetatile 21, 11, 961, 1 + setmetatile 20, 12, 962, 1 + setmetatile 21, 12, 963, 1 + setmetatile 20, 13, 964, 1 + setmetatile 21, 13, 965, 1 + return + +EventScript_Close4FDoor1:: @ 81A8213 + setmetatile 3, 16, 944, 1 + setmetatile 4, 16, 945, 1 + setmetatile 3, 17, 952, 1 + setmetatile 4, 17, 953, 1 + setmetatile 4, 18, 821, 0 + return + +EventScript_Close4FDoor2:: @ 81A8241 + setmetatile 14, 11, 944, 1 + setmetatile 15, 11, 945, 1 + setmetatile 14, 12, 952, 1 + setmetatile 15, 12, 953, 1 + setmetatile 15, 13, 821, 0 + return + +EventScript_Close5FDoor1:: @ 81A826F + setmetatile 7, 8, 960, 1 + setmetatile 8, 8, 961, 1 + setmetatile 7, 9, 962, 1 + setmetatile 8, 9, 963, 1 + setmetatile 7, 10, 964, 1 + setmetatile 8, 10, 965, 1 + return + +EventScript_Close5FDoor2:: @ 81A82A6 + setmetatile 7, 17, 960, 1 + setmetatile 8, 17, 961, 1 + setmetatile 7, 18, 962, 1 + setmetatile 8, 18, 963, 1 + setmetatile 7, 19, 964, 1 + setmetatile 8, 19, 965, 1 + return + +EventScript_Close5FDoor3:: @ 81A82DD + setmetatile 18, 12, 960, 1 + setmetatile 19, 12, 961, 1 + setmetatile 18, 13, 962, 1 + setmetatile 19, 13, 963, 1 + setmetatile 18, 14, 964, 1 + setmetatile 19, 14, 965, 1 + return + +EventScript_Close6FDoor:: @ 81A8314 + setmetatile 5, 14, 960, 1 + setmetatile 6, 14, 961, 1 + setmetatile 5, 15, 962, 1 + setmetatile 6, 15, 963, 1 + setmetatile 5, 16, 964, 1 + setmetatile 6, 16, 965, 1 + return + +EventScript_Close7FDoor1:: @ 81A834B + setmetatile 11, 8, 944, 1 + setmetatile 12, 8, 945, 1 + setmetatile 11, 9, 952, 1 + setmetatile 12, 9, 953, 1 + setmetatile 12, 10, 821, 0 + return + +EventScript_Close7FDoor2:: @ 81A8379 + setmetatile 24, 7, 944, 1 + setmetatile 25, 7, 945, 1 + setmetatile 24, 8, 952, 1 + setmetatile 25, 8, 953, 1 + setmetatile 25, 9, 821, 0 + return + +EventScript_Close7FDoor3:: @ 81A83A7 + setmetatile 25, 13, 944, 1 + setmetatile 26, 13, 945, 1 + setmetatile 25, 14, 952, 1 + setmetatile 26, 14, 953, 1 + setmetatile 26, 15, 821, 0 + return + +EventScript_Close8FDoor:: @ 81A83D5 + setmetatile 5, 9, 960, 1 + setmetatile 6, 9, 961, 1 + setmetatile 5, 10, 962, 1 + setmetatile 6, 10, 963, 1 + setmetatile 5, 11, 964, 1 + setmetatile 6, 11, 965, 1 + return + +EventScript_Close9FDoor1:: @ 81A840C + setmetatile 2, 9, 960, 1 + setmetatile 3, 9, 961, 1 + setmetatile 2, 10, 962, 1 + setmetatile 3, 10, 963, 1 + setmetatile 2, 11, 964, 1 + setmetatile 3, 11, 965, 1 + return + +EventScript_Close9FDoor2:: @ 81A8443 + setmetatile 12, 15, 960, 1 + setmetatile 13, 15, 961, 1 + setmetatile 12, 16, 962, 1 + setmetatile 13, 16, 963, 1 + setmetatile 12, 17, 964, 1 + setmetatile 13, 17, 965, 1 + return + +EventScript_Close9FDoor3:: @ 81A847A + setmetatile 21, 6, 944, 1 + setmetatile 22, 6, 945, 1 + setmetatile 21, 7, 952, 1 + setmetatile 22, 7, 953, 1 + setmetatile 22, 8, 821, 0 + return + +EventScript_Close9FDoor4:: @ 81A84A8 + setmetatile 21, 12, 944, 1 + setmetatile 22, 12, 945, 1 + setmetatile 21, 13, 952, 1 + setmetatile 22, 13, 953, 1 + setmetatile 22, 14, 821, 0 + return + +EventScript_Close10FDoor:: @ 81A84D6 + setmetatile 12, 11, 944, 1 + setmetatile 13, 11, 945, 1 + setmetatile 12, 12, 952, 1 + setmetatile 13, 12, 953, 1 + setmetatile 13, 13, 821, 0 + return + +EventScript_Close11FDoor:: @ 81A8504 + setmetatile 5, 16, 944, 1 + setmetatile 6, 16, 945, 1 + setmetatile 5, 17, 952, 1 + setmetatile 6, 17, 953, 1 + setmetatile 6, 18, 821, 0 + return + +EventScript_Open2FDoor1:: @ 81A8532 + setmetatile 5, 8, 821, 0 + setmetatile 6, 8, 820, 0 + setmetatile 5, 9, 821, 0 + setmetatile 6, 9, 820, 0 + setmetatile 6, 10, 820, 0 + return + +EventScript_Open2FDoor2:: @ 81A8560 + setmetatile 5, 15, 821, 0 + setmetatile 6, 15, 820, 0 + setmetatile 5, 16, 821, 0 + setmetatile 6, 16, 820, 0 + setmetatile 6, 17, 820, 0 + return + +EventScript_Open3FDoor1:: @ 81A858E + setmetatile 9, 11, 839, 1 + setmetatile 10, 11, 838, 1 + setmetatile 9, 12, 821, 0 + setmetatile 10, 12, 821, 0 + setmetatile 9, 13, 825, 0 + setmetatile 10, 13, 826, 0 + return + +EventScript_Open3FDoor2:: @ 81A85C5 + setmetatile 20, 11, 839, 1 + setmetatile 21, 11, 838, 1 + setmetatile 20, 12, 821, 0 + setmetatile 21, 12, 821, 0 + setmetatile 20, 13, 825, 0 + setmetatile 21, 13, 826, 0 + return + +EventScript_Open4FDoor1:: @ 81A85FC + setmetatile 3, 16, 821, 0 + setmetatile 4, 16, 820, 0 + setmetatile 3, 17, 821, 0 + setmetatile 4, 17, 820, 0 + setmetatile 4, 18, 820, 0 + return + +EventScript_Open4FDoor2:: @ 81A862A + setmetatile 14, 11, 821, 0 + setmetatile 15, 11, 820, 0 + setmetatile 14, 12, 821, 0 + setmetatile 15, 12, 820, 0 + setmetatile 15, 13, 820, 0 + return + +EventScript_Open5FDoor1:: @ 81A8658 + setmetatile 7, 8, 839, 1 + setmetatile 8, 8, 838, 1 + setmetatile 7, 9, 821, 0 + setmetatile 8, 9, 821, 0 + setmetatile 7, 10, 825, 0 + setmetatile 8, 10, 826, 0 + return + +EventScript_Open5FDoor2:: @ 81A868F + setmetatile 7, 17, 839, 1 + setmetatile 8, 17, 838, 1 + setmetatile 7, 18, 821, 0 + setmetatile 8, 18, 821, 0 + setmetatile 7, 19, 825, 0 + setmetatile 8, 19, 826, 0 + return + +EventScript_Open5FDoor3:: @ 81A86C6 + setmetatile 18, 12, 839, 1 + setmetatile 19, 12, 838, 1 + setmetatile 18, 13, 821, 0 + setmetatile 19, 13, 821, 0 + setmetatile 18, 14, 825, 0 + setmetatile 19, 14, 826, 0 + return + +EventScript_Open6FDoor:: @ 81A86FD + setmetatile 5, 14, 839, 1 + setmetatile 6, 14, 838, 1 + setmetatile 5, 15, 821, 0 + setmetatile 6, 15, 821, 0 + setmetatile 5, 16, 825, 0 + setmetatile 6, 16, 826, 0 + return + +EventScript_Open7FDoor1:: @ 81A8734 + setmetatile 11, 8, 821, 0 + setmetatile 12, 8, 820, 0 + setmetatile 11, 9, 821, 0 + setmetatile 12, 9, 820, 0 + setmetatile 12, 10, 820, 0 + return + +EventScript_Open7FDoor2:: @ 81A8762 + setmetatile 24, 7, 821, 0 + setmetatile 25, 7, 820, 0 + setmetatile 24, 8, 821, 0 + setmetatile 25, 8, 820, 0 + setmetatile 25, 9, 820, 0 + return + +EventScript_Open7FDoor3:: @ 81A8790 + setmetatile 25, 13, 821, 0 + setmetatile 26, 13, 820, 0 + setmetatile 25, 14, 821, 0 + setmetatile 26, 14, 820, 0 + setmetatile 26, 15, 820, 0 + return + +EventScript_Open8FDoor:: @ 81A87BE + setmetatile 5, 9, 839, 1 + setmetatile 6, 9, 838, 1 + setmetatile 5, 10, 821, 0 + setmetatile 6, 10, 821, 0 + setmetatile 5, 11, 825, 0 + setmetatile 6, 11, 826, 0 + return + +EventScript_Open9FDoor1:: @ 81A87F5 + setmetatile 2, 9, 839, 1 + setmetatile 3, 9, 838, 1 + setmetatile 2, 10, 821, 0 + setmetatile 3, 10, 821, 0 + setmetatile 2, 11, 825, 0 + setmetatile 3, 11, 826, 0 + return + +EventScript_Open9FDoor2:: @ 81A882C + setmetatile 12, 15, 839, 1 + setmetatile 13, 15, 838, 1 + setmetatile 12, 16, 821, 0 + setmetatile 13, 16, 821, 0 + setmetatile 12, 17, 825, 0 + setmetatile 13, 17, 826, 0 + return + +EventScript_Open9FDoor3:: @ 81A8863 + setmetatile 21, 6, 821, 0 + setmetatile 22, 6, 820, 0 + setmetatile 21, 7, 821, 0 + setmetatile 22, 7, 820, 0 + setmetatile 22, 8, 820, 0 + return + +EventScript_Open9FDoor4:: @ 81A8891 + setmetatile 21, 12, 821, 0 + setmetatile 22, 12, 820, 0 + setmetatile 21, 13, 821, 0 + setmetatile 22, 13, 820, 0 + setmetatile 22, 14, 820, 0 + return + +EventScript_Open10FDoor:: @ 81A88BF + setmetatile 12, 11, 821, 0 + setmetatile 13, 11, 820, 0 + setmetatile 12, 12, 821, 0 + setmetatile 13, 12, 820, 0 + setmetatile 13, 13, 820, 0 + return + +EventScript_Open11FDoor:: @ 81A88ED + setmetatile 5, 16, 821, 0 + setmetatile 6, 16, 820, 0 + setmetatile 5, 17, 821, 0 + setmetatile 6, 17, 820, 0 + setmetatile 6, 18, 820, 0 + return + +SilphCo_2F_EventScript_Door1:: @ 81A891B + lockall + setvar VAR_0x4001, 1 + setvar VAR_0x8004, 634 + checkflag FLAG_SILPH_2F_DOOR_1 + goto_if TRUE, EventScript_DoorUnlocked + goto EventScript_TryUnlockDoor + end + +SilphCo_2F_EventScript_Door2:: @ 81A8935 + lockall + setvar VAR_0x4001, 2 + setvar VAR_0x8004, 635 + checkflag FLAG_SILPH_2F_DOOR_2 + goto_if TRUE, EventScript_DoorUnlocked + goto EventScript_TryUnlockDoor + end + +SilphCo_3F_EventScript_Door1:: @ 81A894F + lockall + setvar VAR_0x4001, 3 + setvar VAR_0x8004, 636 + checkflag FLAG_SILPH_3F_DOOR_1 + goto_if TRUE, EventScript_DoorUnlocked + goto EventScript_TryUnlockDoor + end + +SilphCo_3F_EventScript_Door2:: @ 81A8969 + lockall + setvar VAR_0x4001, 4 + setvar VAR_0x8004, 637 + checkflag FLAG_SILPH_3F_DOOR_2 + goto_if TRUE, EventScript_DoorUnlocked + goto EventScript_TryUnlockDoor + end + +SilphCo_4F_EventScript_Door1:: @ 81A8983 + lockall + setvar VAR_0x4001, 5 + setvar VAR_0x8004, 638 + checkflag FLAG_SILPH_4F_DOOR_1 + goto_if TRUE, EventScript_DoorUnlocked + goto EventScript_TryUnlockDoor + end + +SilphCo_4F_EventScript_Door2:: @ 81A899D + lockall + setvar VAR_0x4001, 6 + setvar VAR_0x8004, 639 + checkflag FLAG_SILPH_4F_DOOR_2 + goto_if TRUE, EventScript_DoorUnlocked + goto EventScript_TryUnlockDoor + end + +SilphCo_5F_EventScript_Door1:: @ 81A89B7 + lockall + setvar VAR_0x4001, 7 + setvar VAR_0x8004, 640 + checkflag FLAG_SILPH_5F_DOOR_1 + goto_if TRUE, EventScript_DoorUnlocked + goto EventScript_TryUnlockDoor + end + +SilphCo_5F_EventScript_Door2:: @ 81A89D1 + lockall + setvar VAR_0x4001, 8 + setvar VAR_0x8004, 641 + checkflag FLAG_SILPH_5F_DOOR_2 + goto_if TRUE, EventScript_DoorUnlocked + goto EventScript_TryUnlockDoor + end + +SilphCo_5F_EventScript_Door3:: @ 81A89EB + lockall + setvar VAR_0x4001, 9 + setvar VAR_0x8004, 642 + checkflag FLAG_SILPH_5F_DOOR_3 + goto_if TRUE, EventScript_DoorUnlocked + goto EventScript_TryUnlockDoor + end + +SilphCo_6F_EventScript_Door:: @ 81A8A05 + lockall + setvar VAR_0x4001, 10 + setvar VAR_0x8004, 643 + checkflag FLAG_SILPH_6F_DOOR + goto_if TRUE, EventScript_DoorUnlocked + goto EventScript_TryUnlockDoor + end + +SilphCo_7F_EventScript_Door1:: @ 81A8A1F + lockall + setvar VAR_0x4001, 11 + setvar VAR_0x8004, 644 + checkflag FLAG_SILPH_7F_DOOR_1 + goto_if TRUE, EventScript_DoorUnlocked + goto EventScript_TryUnlockDoor + end + +SilphCo_7F_EventScript_Door2:: @ 81A8A39 + lockall + setvar VAR_0x4001, 12 + setvar VAR_0x8004, 645 + checkflag FLAG_SILPH_7F_DOOR_2 + goto_if TRUE, EventScript_DoorUnlocked + goto EventScript_TryUnlockDoor + end + +SilphCo_7F_EventScript_Door3:: @ 81A8A53 + lockall + setvar VAR_0x4001, 13 + setvar VAR_0x8004, 646 + checkflag FLAG_SILPH_7F_DOOR_3 + goto_if TRUE, EventScript_DoorUnlocked + goto EventScript_TryUnlockDoor + end + +SilphCo_8F_EventScript_Door:: @ 81A8A6D + lockall + setvar VAR_0x4001, 14 + setvar VAR_0x8004, 647 + checkflag FLAG_SILPH_8F_DOOR + goto_if TRUE, EventScript_DoorUnlocked + goto EventScript_TryUnlockDoor + end + +SilphCo_9F_EventScript_Door1:: @ 81A8A87 + lockall + setvar VAR_0x4001, 15 + setvar VAR_0x8004, 648 + checkflag FLAG_SILPH_9F_DOOR_1 + goto_if TRUE, EventScript_DoorUnlocked + goto EventScript_TryUnlockDoor + end + +SilphCo_9F_EventScript_Door2:: @ 81A8AA1 + lockall + setvar VAR_0x4001, 16 + setvar VAR_0x8004, 649 + checkflag FLAG_SILPH_9F_DOOR_2 + goto_if TRUE, EventScript_DoorUnlocked + goto EventScript_TryUnlockDoor + end + +SilphCo_9F_EventScript_Door3:: @ 81A8ABB + lockall + setvar VAR_0x4001, 17 + setvar VAR_0x8004, 650 + checkflag FLAG_SILPH_9F_DOOR_3 + goto_if TRUE, EventScript_DoorUnlocked + goto EventScript_TryUnlockDoor + end + +SilphCo_9F_EventScript_Door4:: @ 81A8AD5 + lockall + setvar VAR_0x4001, 18 + setvar VAR_0x8004, 651 + checkflag FLAG_SILPH_9F_DOOR_4 + goto_if TRUE, EventScript_DoorUnlocked + goto EventScript_TryUnlockDoor + end + +SilphCo_10F_EventScript_Door:: @ 81A8AEF + lockall + setvar VAR_0x4001, 19 + setvar VAR_0x8004, 652 + checkflag FLAG_SILPH_10F_DOOR + goto_if TRUE, EventScript_DoorUnlocked + goto EventScript_TryUnlockDoor + end + +SilphCo_11F_EventScript_Door:: @ 81A8B09 + lockall + setvar VAR_0x4001, 20 + setvar VAR_0x8004, 653 + checkflag FLAG_SILPH_11F_DOOR + goto_if TRUE, EventScript_DoorUnlocked + goto EventScript_TryUnlockDoor + end + +EventScript_TryUnlockDoor:: @ 81A8B23 + checkflag FLAG_HIDE_SILPH_CO_5F_CARD_KEY + goto_if TRUE, EventScript_OpenDoor + goto EventScript_NeedCardKey + end + +EventScript_OpenDoor:: @ 81A8B32 + playfanfare MUS_FANFA1 + msgbox Text_CardKeyOpenedDoor + waitfanfare + compare VAR_0x4001, 1 + call_if eq, EventScript_Open2FDoor1 + compare VAR_0x4001, 2 + call_if eq, EventScript_Open2FDoor2 + compare VAR_0x4001, 3 + call_if eq, EventScript_Open3FDoor1 + compare VAR_0x4001, 4 + call_if eq, EventScript_Open3FDoor2 + compare VAR_0x4001, 5 + call_if eq, EventScript_Open4FDoor1 + compare VAR_0x4001, 6 + call_if eq, EventScript_Open4FDoor2 + compare VAR_0x4001, 7 + call_if eq, EventScript_Open5FDoor1 + compare VAR_0x4001, 8 + call_if eq, EventScript_Open5FDoor2 + compare VAR_0x4001, 9 + call_if eq, EventScript_Open5FDoor3 + compare VAR_0x4001, 10 + call_if eq, EventScript_Open6FDoor + compare VAR_0x4001, 11 + call_if eq, EventScript_Open7FDoor1 + compare VAR_0x4001, 12 + call_if eq, EventScript_Open7FDoor2 + compare VAR_0x4001, 13 + call_if eq, EventScript_Open7FDoor3 + compare VAR_0x4001, 14 + call_if eq, EventScript_Open8FDoor + compare VAR_0x4001, 15 + call_if eq, EventScript_Open9FDoor1 + compare VAR_0x4001, 16 + call_if eq, EventScript_Open9FDoor2 + compare VAR_0x4001, 17 + call_if eq, EventScript_Open9FDoor3 + compare VAR_0x4001, 18 + call_if eq, EventScript_Open9FDoor4 + compare VAR_0x4001, 19 + call_if eq, EventScript_Open10FDoor + compare VAR_0x4001, 20 + call_if eq, EventScript_Open11FDoor + waitse + playse SE_KI_GASYAN + special DrawWholeMapView + waitse + special Special_SetHiddenItemFlag + releaseall + end diff --git a/data/scripts/test.inc b/data/scripts/test.inc new file mode 100644 index 000000000..55578f159 --- /dev/null +++ b/data/scripts/test.inc @@ -0,0 +1,27 @@ +EventScript_1C5550:: @ 81C5552 + msgbox Text_1C556D, MSGBOX_NPC + end + +EventScript_1C555B:: @ 81C555B + msgbox Text_1C558D, MSGBOX_SIGN + end + +EventScript_1C5564:: @ 81C5564 + msgbox Text_1C55A4, MSGBOX_SIGN + end + +Text_1C556D:: @ 81C556D + .string "テストよう メッセージです!\n" + .string "ポケモンの せかいへ ようこそ!$" + +Text_1C558D:: @ 81C558D + .string "テストよう メッセージです!\n" + .string "かんばん です$" + +Text_1C55A4:: @ 81C55A4 + .string "テストよう メッセージです!\n" + .string "ざひょう チェックの イベントです$" + + .align 2 +Text_1C55C8:: @ 81C55C8 + .string "$" |