summaryrefslogtreecommitdiff
path: root/data/scripts/pc.inc
diff options
context:
space:
mode:
authorGriffinR <griffin.g.richards@gmail.com>2020-07-20 18:02:50 -0400
committerGitHub <noreply@github.com>2020-07-20 18:02:50 -0400
commitaeeff84462973b267e62031a945603d96afed716 (patch)
tree046ce2a73b467844e95a490b1cfa9cdda5e5f4df /data/scripts/pc.inc
parentd3bfb6cfc63f9f64295cbd864f98df9cf4c643b4 (diff)
parentf0bf1e641cb8532611c97354beaf46afaca7c417 (diff)
Merge pull request #780 from GriffinRichards/sync-scripts
Sync some scripts with pokeemerald
Diffstat (limited to 'data/scripts/pc.inc')
-rw-r--r--data/scripts/pc.inc66
1 files changed, 66 insertions, 0 deletions
diff --git a/data/scripts/pc.inc b/data/scripts/pc.inc
new file mode 100644
index 000000000..91b47004d
--- /dev/null
+++ b/data/scripts/pc.inc
@@ -0,0 +1,66 @@
+EventScript_PC:: @ 81A0009
+ lockall
+ setvar VAR_0x8004, 0
+ special DoPCTurnOnEffect
+ playse SE_PC_ON
+ msgbox Text_BootUpPC, MSGBOX_DEFAULT
+ goto EventScript_PCMainMenu
+ end
+
+EventScript_PCMainMenu:
+ message Text_WhichPCShouldBeAccessed
+ waitmessage
+ special ScriptMenu_CreatePCMultichoice
+ waitstate
+ goto EventScript_AccessPC
+ end
+
+EventScript_AccessPC:
+ switch VAR_RESULT
+ case 0, EventScript_AccessPokemonStorage
+ case 1, EventScript_AccessPlayersPC
+ case 2, EventScript_AccessHallOfFame
+ case 3, EventScript_TurnOffPC
+ case MULTI_B_PRESSED, EventScript_TurnOffPC
+ end
+
+EventScript_AccessPlayersPC:
+ playse SE_PC_LOGON
+ msgbox Text_AccessedPlayersPC, MSGBOX_DEFAULT
+ special PlayerPC
+ waitstate
+ goto EventScript_PCMainMenu
+ end
+
+EventScript_AccessPokemonStorage:
+ playse SE_PC_LOGON
+ call_if_unset FLAG_SYS_PC_LANETTE, EventScript_AccessSomeonesPC
+ call_if_set FLAG_SYS_PC_LANETTE, EventScript_AccessLanettesPC
+ msgbox Text_StorageSystemOpened, MSGBOX_DEFAULT
+ special ShowPokemonStorageSystem
+ waitstate
+ goto EventScript_PCMainMenu
+ end
+
+EventScript_AccessSomeonesPC:
+ msgbox Text_AccessedSomeonesPC, MSGBOX_DEFAULT
+ return
+
+EventScript_AccessLanettesPC:
+ msgbox Text_AccessedLanettesPC, MSGBOX_DEFAULT
+ return
+
+EventScript_TurnOffPC:
+ setvar VAR_0x8004, 0
+ playse SE_PC_OFF
+ special DoPCTurnOffEffect
+ releaseall
+ end
+
+EventScript_AccessHallOfFame:
+ goto_if_unset FLAG_SYS_GAME_CLEAR, EventScript_TurnOffPC
+ playse SE_PC_LOGON
+ special AccessHallOfFamePC
+ waitstate
+ goto EventScript_AccessPC
+ end