GraniteCave_B3F_MapScripts:: //map_script MAP_SCRIPT_ON_LOAD, GraniteCave_B3F_OnTransition //map_script MAP_SCRIPT_ON_TRANSITION, GraniteCave_B3F_OnTransition .byte 0 GraniteCave_B3F_EventScript_CheckOnSteven:: msgbox GraniteCave_B3F_Text_CheckOnSteven, MSGBOX_NPC applymovement OBJ_EVENT_ID_PLAYER, GraniteCave_B3F_Movement_WalkDown end GraniteCave_B3F_EventScript_WhatDidHeFind:: msgbox GraniteCave_B3F_Text_WhatDidHeFind, MSGBOX_NPC applymovement OBJ_EVENT_ID_PLAYER, GraniteCave_B3F_Movement_WalkDown end GraniteCave_B3F_Text_WhatDidHeFind: .string "I should see what STEVEN found$" GraniteCave_B3F_Text_CheckOnSteven: .string "STEVEN: Just a second, we should come up\n" .string "with a plan.$" GraniteCave_B3F_Movement_WalkDown: walk_down step_end GraniteCave_B3F_Fell:: goto_if_unset FLAG_STEVENS_CAVE_DUGDEEPER, GraniteCave_B3F_EventScript_DugDeeper goto_if_eq VAR_GRANITECAVE_AGGRON, 0, GraniteCave_B3F_EventScript_StayAndStudy goto_if_eq VAR_GRANITECAVE_AGGRON, 9, GraniteCave_B3F_EventScript_StayAndStudy goto_if_eq VAR_GRANITECAVE_AGGRON, 3, GraniteCave_B3F_Exit msgbox GraniteCave_B3F_Text_FindAnything, MSGBOX_NPC end GraniteCave_B3F_Exit:: msgbox GraniteCave_B3F_Text_ExitThatWay, MSGBOX_NPC end GraniteCave_B3F_Movement_LookUp: face_up step_end GraniteCave_B3F_Movement_LookRight: face_right step_end GraniteCave_B3F_Text_FindAnything: .string "I haven't found anything yet...\n" .string "If I do, I will find you.$" GraniteCave_B3F_Text_CheckOnPlayer: .string "Are you ok?\n" .string "Here, let me heal your POKéMON.$" GraniteCave_B3F_Text_DugDeeper: .string "I can't say that I planned on this\n" .string "today...\p" .string "At least there seems to be a path to\n" .string "continue moving forward.\p" .string "I wonder what could have caused that\n" .string "earthquake.\p" .string "I am going to explore this section with\n" .string "Baltoy and see if we can find any other\l" .string "path back up.\p" .string "Why don't you continue exploring\n" .string "further as well.$" GraniteCave_B3F_EventScript_DugDeeper:: lock setflag FLAG_STEVENS_CAVE_DUGDEEPER applymovement OBJ_EVENT_ID_PLAYER, GraniteCave_B3F_Movement_LookUp msgbox GraniteCave_B3F_Text_CheckOnPlayer, MSGBOX_NPC special HealPlayerParty playse SE_USE_ITEM waitse msgbox GraniteCave_B3F_Text_DugDeeper, MSGBOX_NPC setvar VAR_GRANITECAVE_AGGRON, 1 end GraniteCave_B3F_Trigger_Agron:: goto_if_unset FLAG_STEVENS_CAVE_AGRON, GraniteCave_B3F_Movement_AgronChargePlayer end GraniteCave_B3F_Movement_CheckRightLeft: face_right delay_16 face_left delay_16 step_end GraniteCave_B3F_Movement_CheckDownLeft: face_down delay_16 face_left delay_16 face_down delay_16 face_left step_end GraniteCave_B3F_Movement_AgronChargePlayer: face_right walk_fast_right walk_fast_right walk_fast_right walk_fast_right walk_fast_right walk_fast_right walk_fast_right walk_fast_right step_end GraniteCave_B3F_Movement_KnockBack: jump_2_right delay_16 face_left step_end GraniteCave_B3F_Movement_Larion: walk_fast_up walk_fast_up walk_fast_up step_end GraniteCave_B3F_Movement_StevenRun: walk_fast_down walk_fast_down walk_fast_down walk_fast_down walk_fast_down face_left delay_16 lock_facing_direction delay_16 walk_right unlock_facing_direction step_end GraniteCave_B3F_Movement_FaceDown: face_down delay_16 step_end GraniteCave_B3F_Movement_WalkRight: walk_right step_end GraniteCave_B3F_Text_AggronAttack: .string "STEVEN: I'll deal with this one!$" GraniteCave_B3F_Text_LaironAttack: .string "LARION charges!$" GraniteCave_B3F_EventScript_Agron:: lock //Setup Scene fadeoutbgm 1 //Start Look Around applymovement OBJ_EVENT_ID_PLAYER, GraniteCave_B3F_Movement_CheckRightLeft waitmovement 0 delay 32 playse SE_PIN applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_ExclamationMark waitmovement 0 delay 16 //Sounds playbgm MUS_HELP, TRUE playmoncry SPECIES_AGGRON, CRY_MODE_ENCOUNTER //Move Agron setobjectxyperm 4, 15, 23 showobjectat 4, MAP_GRANITE_CAVE_B3F addobject 4 //Move Lairon setobjectxyperm 5, 26, 26 showobjectat 5, MAP_GRANITE_CAVE_B3F addobject 5 delay 16 //Charge Scene applymovement 4, GraniteCave_B3F_Movement_AgronChargePlayer waitmovement 0 setvar VAR_0x8004, 0 @ vertical pan setvar VAR_0x8005, 2 @ horizontal pan setvar VAR_0x8006, 5 @ num shakes setvar VAR_0x8007, 2 @ shake delay special ShakeCamera applymovement OBJ_EVENT_ID_PLAYER, GraniteCave_B3F_Movement_KnockBack fadescreen FADE_TO_BLACK hidefollower waitmovement 0 fadescreen FADE_FROM_BLACK playmoncry SPECIES_AGGRON, CRY_MODE_ENCOUNTER delay 32 //Move in Larion applymovement 5, GraniteCave_B3F_Movement_Larion waitmovement 0 playmoncry SPECIES_LAIRON, CRY_MODE_ENCOUNTER delay 32 applymovement OBJ_EVENT_ID_PLAYER, GraniteCave_B3F_Movement_CheckDownLeft waitmovement 0 //Move in Steven setobjectxyperm 1, 24, 18 showobjectat 1, MAP_GRANITE_CAVE_B3F addobject 1 applymovement 1, GraniteCave_B3F_Movement_StevenRun waitmovement 0 //applymovement 4, GraniteCave_B3F_Movement_WalkRight //waitmovement 0 applymovement OBJ_EVENT_ID_PLAYER, GraniteCave_B3F_Movement_FaceDown waitmovement 0 msgbox GraniteCave_B3F_Text_AggronAttack, MSGBOX_DEFAULT //Start Battle delay 32 msgbox GraniteCave_B3F_Text_LaironAttack, MSGBOX_DEFAULT special LaironBattle waitstate showfollower //remove the pokemon removeobject 4 removeobject 5 setvar VAR_GRANITECAVE_AGGRON, 0 setflag FLAG_STEVENS_CAVE_AGRON specialvar VAR_RESULT, GetBattleOutcome playbgm MUS_PETALBURG_WOODS, TRUE applymovement 1, GraniteCave_B3F_Movement_LookRight goto_if_eq VAR_RESULT, B_OUTCOME_WON, GraniteCave_B3F_EventScript_AgronDefeated goto_if_eq VAR_RESULT, B_OUTCOME_LOST, GraniteCave_B3F_EventScript_PlayerDefeated //goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, SkyPillar_Top_EventScript_RanFromRayquaza. release end GraniteCave_B3F_Text_AgronDefeated: .string "STEVEN: That was a close one, but that\n" .string "LARION was no match for you.\l" .string "Here, let me heal your POKéMON.$" GraniteCave_B3F_EventScript_AgronDefeated:: msgbox GraniteCave_B3F_Text_AgronDefeated, MSGBOX_NPC goto GraniteCave_B3F_EventScript_ShinyRock end GraniteCave_B3F_Text_PlayerDefeated: .string "STEVEN: That was a close one. The LARION\n" .string "ran off after the AGGRON did.\p" .string "Here, let me heal your POKéMON$" GraniteCave_B3F_EventScript_PlayerDefeated:: msgbox GraniteCave_B3F_Text_PlayerDefeated, MSGBOX_NPC goto GraniteCave_B3F_EventScript_ShinyRock end GraniteCave_B3F_Text_MetangFlash: .string "STEVEN: METANG, use Flash!$" GraniteCave_B3F_Text_ShinyRock: .string "STEVEN: What's that over there?$" GraniteCave_B3F_Movement_GoToStone: walk_left walk_down walk_down walk_down walk_down step_end GraniteCave_B3F_EventScript_ShinyRock:: lock special HealPlayerParty playse SE_USE_ITEM waitse applymovement 1, GraniteCave_B3F_Movement_FaceDown waitmovement 0 msgbox GraniteCave_B3F_Text_MetangFlash, MSGBOX_DEFAULT delay 32 animateflash 1 delay 32 playse SE_PIN applymovement 1, Common_Movement_ExclamationMark waitmovement 0 msgbox GraniteCave_B3F_Text_ShinyRock, MSGBOX_DEFAULT applymovement 1, GraniteCave_B3F_Movement_GoToStone waitmovement 0 release releaseall end GraniteCave_B3F_Text_StayAndStudy: .string "STEVEN: Look at that brilliant shimmer.\n" .string "I wonder if this could be...\p" .string "Thank you for you help {PLAYER}.\n" .string "I will stay here and investiage this\l" .string "odd stone.\p" .string "Oh! You had a letter for me?$" GraniteCave_B3F_Text_ExitThatWay: .string "I feel a faint breeze coming from over\n" .string "there. I think the exit is that way.$" GraniteCave_B3F_EventScript_StayAndStudy:: msgbox GraniteCave_B3F_Text_StayAndStudy, MSGBOX_NPC setvar VAR_0x8004, ITEM_LETTER call Common_EventScript_PlayerHandedOverTheItem setflag FLAG_DELIVERED_STEVEN_LETTER msgbox GraniteCave_StevensRoom_Text_ThankYouTakeThis, MSGBOX_DEFAULT giveitem ITEM_TM47 call_if_eq VAR_RESULT, FALSE, GraniteCave_StevensRoom_EventScript_BagFull msgbox GraniteCave_StevensRoom_Text_CouldBecomeChampionLetsRegister, MSGBOX_DEFAULT closemessage delay 30 playfanfare MUS_REGISTER_MATCH_CALL msgbox GraniteCave_StevensRoom_Text_RegisteredSteven, MSGBOX_DEFAULT waitfanfare closemessage delay 30 setflag FLAG_REGISTERED_STEVEN_POKENAV msgbox GraniteCave_B3F_Text_ExitThatWay, MSGBOX_NPC setvar VAR_GRANITECAVE_AGGRON, 3 end GraniteCave_B3F_EventScript_CompletedScript:: setvar VAR_GRANITECAVE_AGGRON, 9 end