.set LOCALID_WALLY, 6 .set LOCALID_WALLYS_UNCLE, 7 .set LOCALID_SCOTT, 11 MauvilleCity_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, MauvilleCity_OnTransition .byte 0 MauvilleCity_OnTransition: setflag FLAG_VISITED_MAUVILLE_CITY clearflag FLAG_FORCE_MIRAGE_TOWER_VISIBLE clearflag FLAG_HIDE_SLATEPORT_MUSEUM_POPULATION setflag FLAG_SYS_TV_START clearflag FLAG_MAUVILLE_GYM_BARRIERS_STATE setvar VAR_MAUVILLE_GYM_STATE, 0 call_if_set FLAG_GOT_TM24_FROM_WATTSON, MauvilleCity_EventScript_MoveWattsonBackToGym end MauvilleCity_EventScript_MoveWattsonBackToGym:: clearflag FLAG_HIDE_MAUVILLE_GYM_WATTSON setflag FLAG_HIDE_MAUVILLE_CITY_WATTSON setflag FLAG_WATTSON_REMATCH_AVAILABLE return MauvilleCity_EventScript_Boy:: msgbox MauvilleCity_Text_NurseHurtMonBackToHealth, MSGBOX_NPC end MauvilleCity_EventScript_Maniac:: msgbox MauvilleCity_Text_AllSortsOfPeopleComeThrough, MSGBOX_NPC end MauvilleCity_EventScript_Woman:: msgbox MauvilleCity_Text_RydelVeryGenerous, MSGBOX_NPC end MauvilleCity_EventScript_RichBoy:: msgbox MauvilleCity_Text_PokemonCanJumpYouOnBike, MSGBOX_NPC end MauvilleCity_EventScript_CitySign:: msgbox MauvilleCity_Text_CitySign, MSGBOX_SIGN end MauvilleCity_EventScript_GymSign:: msgbox MauvilleCity_Text_GymSign, MSGBOX_SIGN end MauvilleCity_EventScript_BikeShopSign:: msgbox MauvilleCity_Text_BikeShopSign, MSGBOX_SIGN end MauvilleCity_EventScript_GameCornerSign:: msgbox MauvilleCity_Text_GameCornerSign, MSGBOX_SIGN end MauvilleCity_EventScript_SchoolKidM:: lock faceplayer goto_if_set FLAG_TV_EXPLAINED, MauvilleCity_EventScript_TVExplained msgbox MauvilleCity_Text_ExplainTV, MSGBOX_DEFAULT setflag FLAG_TV_EXPLAINED release end MauvilleCity_EventScript_TVExplained:: msgbox MauvilleCity_Text_BeenCheckingOutTV, MSGBOX_DEFAULT release end MauvilleCity_EventScript_WallysUncle:: lock faceplayer goto_if_set FLAG_DECLINED_WALLY_BATTLE_MAUVILLE, MauvilleCity_EventScript_UncleAskPlayerToBattleWally msgbox MauvilleCity_Text_UncleHesTooPeppy, MSGBOX_DEFAULT closemessage applymovement LOCALID_WALLYS_UNCLE, Common_Movement_FaceOriginalDirection waitmovement 0 release end MauvilleCity_EventScript_UncleAskPlayerToBattleWally:: msgbox MauvilleCity_Text_UncleCanYouBattleWally, MSGBOX_DEFAULT closemessage applymovement LOCALID_WALLYS_UNCLE, Common_Movement_FaceOriginalDirection waitmovement 0 release end MauvilleCity_EventScript_Wally:: lockall goto_if_set FLAG_DECLINED_WALLY_BATTLE_MAUVILLE, MauvilleCity_EventScript_WallyRequestBattleAgain applymovement LOCALID_WALLY, Common_Movement_WalkInPlaceFasterRight waitmovement 0 msgbox MauvilleCity_Text_WallyWantToChallengeGym, MSGBOX_DEFAULT msgbox MauvilleCity_Text_UncleYourePushingIt, MSGBOX_DEFAULT msgbox MauvilleCity_Text_WallyWeCanBeatAnyone, MSGBOX_DEFAULT applymovement LOCALID_WALLY, Common_Movement_FacePlayer waitmovement 0 playse SE_PIN applymovement LOCALID_WALLY, Common_Movement_ExclamationMark waitmovement 0 applymovement LOCALID_WALLY, Common_Movement_Delay48 waitmovement 0 msgbox MauvilleCity_Text_WallyWillYouBattleMe, MSGBOX_YESNO goto MauvilleCity_EventScript_BattleWallyPrompt end MauvilleCity_EventScript_BattleWallyPrompt:: call_if_eq VAR_RESULT, YES, MauvilleCity_EventScript_BattleWally goto_if_eq VAR_RESULT, NO, MauvilleCity_EventScript_DeclineWallyBattle closemessage switch VAR_FACING case DIR_NORTH, MauvilleCity_EventScript_WallyAndUncleExitNorth case DIR_EAST, MauvilleCity_EventScript_WallyAndUncleExitEast end MauvilleCity_EventScript_WallyAndUncleExitNorth:: applymovement OBJ_EVENT_ID_PLAYER, MauvilleCity_Movement_PlayerWatchWallyExitNorth1 applymovement LOCALID_WALLY, MauvilleCity_Movement_WallyExitNorth1 applymovement LOCALID_WALLYS_UNCLE, MauvilleCity_Movement_WallysUncleExitNorth1 waitmovement 0 applymovement LOCALID_WALLY, Common_Movement_WalkInPlaceFasterRight waitmovement 0 delay 30 applymovement OBJ_EVENT_ID_PLAYER, MauvilleCity_Movement_PlayerFaceUncleNorth applymovement LOCALID_WALLYS_UNCLE, MauvilleCity_Movement_WallysUncleApproachPlayerNorth waitmovement 0 msgbox MauvilleCity_Text_UncleVisitUsSometime, MSGBOX_DEFAULT closemessage applymovement OBJ_EVENT_ID_PLAYER, MauvilleCity_Movement_PlayerWatchWallyExitNorth2 applymovement LOCALID_WALLYS_UNCLE, MauvilleCity_Movement_WallysUncleExitNorth2 applymovement LOCALID_WALLY, MauvilleCity_Movement_WallyExitNorth2 waitmovement 0 goto MauvilleCity_EventScript_DefeatedWally end MauvilleCity_EventScript_WallyAndUncleExitEast:: applymovement OBJ_EVENT_ID_PLAYER, MauvilleCity_Movement_PlayerWatchWallyExitEast1 applymovement LOCALID_WALLY, MauvilleCity_Movement_WallyExitEast1 applymovement LOCALID_WALLYS_UNCLE, MauvilleCity_Movement_WallysUncleExitEast1 waitmovement 0 applymovement LOCALID_WALLY, Common_Movement_WalkInPlaceFasterRight waitmovement 0 delay 30 applymovement LOCALID_WALLYS_UNCLE, MauvilleCity_Movement_WallysUncleApproachPlayerEast waitmovement 0 msgbox MauvilleCity_Text_UncleVisitUsSometime, MSGBOX_DEFAULT closemessage applymovement OBJ_EVENT_ID_PLAYER, MauvilleCity_Movement_PlayerWatchWallyExitEast2 applymovement LOCALID_WALLYS_UNCLE, MauvilleCity_Movement_WallysUncleExitEast2 applymovement LOCALID_WALLY, MauvilleCity_Movement_WallyExitEast2 waitmovement 0 goto MauvilleCity_EventScript_DefeatedWally end MauvilleCity_EventScript_DefeatedWally:: removeobject LOCALID_WALLY removeobject LOCALID_WALLYS_UNCLE clearflag FLAG_HIDE_VERDANTURF_TOWN_WANDAS_HOUSE_WALLY clearflag FLAG_HIDE_VERDANTURF_TOWN_WANDAS_HOUSE_WALLYS_UNCLE setflag FLAG_DEFEATED_WALLY_MAUVILLE setvar VAR_WALLY_CALL_STEP_COUNTER, 0 setflag FLAG_ENABLE_FIRST_WALLY_POKENAV_CALL call_if_eq VAR_FACING, DIR_NORTH, MauvilleCity_EventScript_ScottApproachPlayerNorth call_if_eq VAR_FACING, DIR_EAST, MauvilleCity_EventScript_ScottApproachPlayerEast applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterDown waitmovement 0 msgbox MauvilleCity_Text_ScottYouDidntHoldBack, MSGBOX_DEFAULT closemessage addvar VAR_SCOTT_STATE, 1 call_if_eq VAR_FACING, DIR_NORTH, MauvilleCity_EventScript_ScottExitNorth call_if_eq VAR_FACING, DIR_EAST, MauvilleCity_EventScript_ScottExitEast removeobject LOCALID_SCOTT releaseall end MauvilleCity_EventScript_ScottApproachPlayerNorth:: addobject LOCALID_SCOTT applymovement LOCALID_SCOTT, MauvilleCity_Movement_ScottApproachPlayerNorth waitmovement 0 return MauvilleCity_EventScript_ScottApproachPlayerEast:: setobjectxyperm LOCALID_SCOTT, 12, 13 addobject LOCALID_SCOTT applymovement LOCALID_SCOTT, MauvilleCity_Movement_ScottApproachPlayerEast waitmovement 0 return MauvilleCity_EventScript_ScottExitNorth:: applymovement OBJ_EVENT_ID_PLAYER, MauvilleCity_Movement_PlayerWatchScottExitNorth applymovement LOCALID_SCOTT, MauvilleCity_Movement_ScottExitNorth waitmovement 0 return MauvilleCity_EventScript_ScottExitEast:: applymovement OBJ_EVENT_ID_PLAYER, MauvilleCity_Movement_PlayerWatchScottExitEast applymovement LOCALID_SCOTT, MauvilleCity_Movement_ScottExitEast waitmovement 0 return MauvilleCity_EventScript_BattleWally:: msgbox MauvilleCity_Text_WallyHereICome, MSGBOX_DEFAULT trainerbattle_no_intro TRAINER_WALLY_MAUVILLE, MauvilleCity_Text_WallyDefeat applymovement LOCALID_WALLY, Common_Movement_WalkInPlaceFasterRight waitmovement 0 msgbox MauvilleCity_Text_WallyIllGoBackToVerdanturf, MSGBOX_DEFAULT applymovement LOCALID_WALLY, Common_Movement_FacePlayer waitmovement 0 msgbox MauvilleCity_Text_ThankYouNotEnoughToBattle, MSGBOX_DEFAULT applymovement LOCALID_WALLY, Common_Movement_WalkInPlaceFasterRight waitmovement 0 msgbox MauvilleCity_Text_UncleNoNeedToBeDown, MSGBOX_DEFAULT return MauvilleCity_EventScript_DeclineWallyBattle:: setflag FLAG_DECLINED_WALLY_BATTLE_MAUVILLE msgbox MauvilleCity_Text_WallyMyUncleWontKnowImStrong, MSGBOX_DEFAULT release end MauvilleCity_EventScript_WallyRequestBattleAgain:: applymovement LOCALID_WALLY, Common_Movement_FacePlayer waitmovement 0 msgbox MauvilleCity_Text_WallyPleaseBattleMe, MSGBOX_YESNO goto MauvilleCity_EventScript_BattleWallyPrompt end MauvilleCity_Movement_WallyExitNorth1: walk_left walk_left walk_down walk_down walk_left step_end MauvilleCity_Movement_WallyExitEast1: walk_down walk_down walk_left walk_left walk_left step_end MauvilleCity_Movement_WallyExitNorth2: delay_16 delay_16 walk_left walk_left walk_left walk_left walk_left walk_left walk_left walk_left delay_8 step_end MauvilleCity_Movement_WallyExitEast2: delay_16 delay_16 walk_left walk_left walk_left walk_left walk_left walk_left walk_left walk_left delay_8 step_end MauvilleCity_Movement_PlayerWatchWallyExitNorth2: delay_16 delay_8 walk_in_place_faster_left step_end MauvilleCity_Movement_PlayerWatchWallyExitEast2: delay_16 delay_16 delay_16 walk_in_place_faster_left step_end MauvilleCity_Movement_PlayerWatchScottExitNorth: delay_16 walk_in_place_faster_left step_end MauvilleCity_Movement_PlayerWatchScottExitEast: delay_16 delay_16 walk_in_place_faster_left step_end MauvilleCity_Movement_PlayerWatchWallyExitEast1: delay_16 walk_in_place_faster_down step_end MauvilleCity_Movement_PlayerWatchWallyExitNorth1: delay_16 walk_in_place_faster_left step_end MauvilleCity_Movement_WallysUncleExitNorth1: walk_left walk_left walk_left walk_down walk_down step_end MauvilleCity_Movement_WallysUncleExitEast1: walk_left walk_down walk_down walk_left walk_left step_end MauvilleCity_Movement_PlayerFaceUncleNorth: delay_16 delay_8 delay_4 walk_in_place_faster_down step_end MauvilleCity_Movement_WallysUncleApproachPlayerNorth: walk_right walk_right walk_in_place_faster_up step_end MauvilleCity_Movement_WallysUncleApproachPlayerEast: walk_right walk_up step_end MauvilleCity_Movement_WallysUncleExitNorth2: walk_left walk_left walk_left walk_left walk_left walk_left walk_left walk_left step_end MauvilleCity_Movement_WallysUncleExitEast2: walk_down walk_left walk_left walk_left walk_left walk_left walk_left walk_left walk_left step_end MauvilleCity_Movement_ScottApproachPlayerNorth: walk_up walk_up walk_up walk_up walk_up walk_up walk_left walk_left walk_left walk_left walk_in_place_faster_up step_end MauvilleCity_Movement_ScottApproachPlayerEast: walk_up walk_up walk_up walk_up walk_up walk_left walk_left walk_left walk_left walk_left walk_up step_end MauvilleCity_Movement_ScottExitNorth: walk_left walk_left walk_left walk_left walk_left walk_left walk_left walk_left walk_left step_end MauvilleCity_Movement_ScottExitEast: walk_down walk_left walk_left walk_left walk_left walk_left walk_left walk_left walk_left walk_left step_end MauvilleCity_EventScript_Wattson:: lock faceplayer goto_if_set FLAG_GOT_TM24_FROM_WATTSON, MauvilleCity_EventScript_ReceivedThunderbolt goto_if_eq VAR_NEW_MAUVILLE_STATE, 2, MauvilleCity_EventScript_CompletedNewMauville goto_if_set FLAG_GOT_BASEMENT_KEY_FROM_WATTSON, MauvilleCity_EventScript_BegunNewMauville msgbox MauvilleCity_Text_WattsonNeedFavorTakeKey, MSGBOX_DEFAULT giveitem ITEM_BASEMENT_KEY setflag FLAG_GOT_BASEMENT_KEY_FROM_WATTSON msgbox MauvilleCity_Text_WattsonWontBeChallenge, MSGBOX_DEFAULT release end MauvilleCity_EventScript_BegunNewMauville:: msgbox MauvilleCity_Text_WattsonWontBeChallenge, MSGBOX_DEFAULT release end MauvilleCity_EventScript_CompletedNewMauville:: msgbox MauvilleCity_Text_WattsonThanksTakeTM, MSGBOX_DEFAULT giveitem ITEM_TM24 goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_GOT_TM24_FROM_WATTSON msgbox MauvilleCity_Text_WattsonYoungTakeCharge, MSGBOX_DEFAULT release end MauvilleCity_EventScript_ReceivedThunderbolt:: msgbox MauvilleCity_Text_WattsonYoungTakeCharge, MSGBOX_DEFAULT release end MauvilleCity_EventScript_RegisterWallyCall:: lockall pokenavcall MauvilleCity_Text_WallyPokenavCall waitmessage delay 30 playfanfare MUS_REGISTER_MATCH_CALL msgbox MauvilleCity_Text_RegisteredWally, MSGBOX_DEFAULT waitfanfare closemessage delay 30 setflag FLAG_ENABLE_WALLY_MATCH_CALL clearflag FLAG_ENABLE_FIRST_WALLY_POKENAV_CALL releaseall end MauvilleCity_Text_UncleHesTooPeppy: .string "Uncle: It's because of Pokémon that\n" .string "this boy's got more pep, I suppose…\l" .string "But he's become a bit too peppy…$" MauvilleCity_Text_WallyWantToChallengeGym: .string "Wally: Aww, Uncle, please?\p" .string "I want to challenge this Gym and see\n" .string "how much better I've become.\p" .string "Please? May I, please?$" MauvilleCity_Text_UncleYourePushingIt: .string "Uncle: Now hold on, Wally.\p" .string "Since you started living with Pokémon,\n" .string "you have grown quite a lot stronger.\p" .string "But don't you think you're pushing it\n" .string "to suddenly challenge a Gym?$" MauvilleCity_Text_WallyWeCanBeatAnyone: .string "Wally: I'm not pushing it.\p" .string "If I combine forces with Ralts,\n" .string "we can beat anyone!$" MauvilleCity_Text_WallyWillYouBattleMe: .string "Wally: Oh! Hi, {PLAYER}!\p" .string "I've gotten a lot stronger since\n" .string "we met.\p" .string "{PLAYER}, I want you and my Uncle to\n" .string "understand that.\p" .string "{PLAYER}, please, will you have\n" .string "a battle with me?$" MauvilleCity_Text_WallyMyUncleWontKnowImStrong: .string "Wally: Oh… If you won't battle me,\n" .string "{PLAYER}, my Uncle won't know that I've\l" .string "become really strong.$" MauvilleCity_Text_UncleCanYouBattleWally: .string "Uncle: {PLAYER}{KUN}, was it?\n" .string "On Wally's behalf, can I ask you to\l" .string "battle with him just this once?\p" .string "I don't think he's going to listen to\n" .string "any reason the way he is now.$" MauvilleCity_Text_WallyPleaseBattleMe: .string "Wally: {PLAYER}, please!\n" .string "Battle with me, please.$" MauvilleCity_Text_WallyHereICome: .string "Wally: {PLAYER}, thank you.\p" .string "Okay… Here I come!$" MauvilleCity_Text_WallyDefeat: .string "Wally: … … … … … … …\p" .string "… … … … … … … …\p" .string "I lost…$" MauvilleCity_Text_WallyIllGoBackToVerdanturf: .string "Wally: Uncle…\n" .string "I'll go back to Verdanturf…$" MauvilleCity_Text_ThankYouNotEnoughToBattle: .string "{PLAYER}, thank you.\n" .string "Being a Trainer is tough, isn't it?\p" .string "It's not enough just to have Pokémon\n" .string "and make them battle. That isn't what\l" .string "being a real Trainer is about.$" MauvilleCity_Text_UncleNoNeedToBeDown: .string "Uncle: Wally, there's no need to be so\n" .string "down on yourself.\p" .string "Why, what's keeping you from becoming\n" .string "stronger and stronger?\p" .string "Come on, let's go home.\n" .string "Everyone's waiting for you.$" MauvilleCity_Text_UncleVisitUsSometime: .string "Uncle: {PLAYER}{KUN}, it just dawned on me\n" .string "that you must be the Trainer who kept\l" .string "an eye out for Wally when he caught\l" .string "his Pokémon.\p" .string "Why don't you visit us in Verdanturf\n" .string "sometime?\l" .string "I'm sure Wally would enjoy it.$" MauvilleCity_Text_WallyPokenavCall: .string "… … … … … …\n" .string "… … … … … Beep!\p" .string "Wally: Oh, hello, {PLAYER}!\p" .string "I just wanted to tell you that\n" .string "my uncle bought me a Pokénav!\p" .string "Now I can get in touch with you\n" .string "anytime, {PLAYER}!\p" .string "… … … … … …\n" .string "… … … … … Click!$" MauvilleCity_Text_RegisteredWally: .string "Registered Wally\n" .string "in the Pokénav.$" MauvilleCity_Text_ScottYouDidntHoldBack: .string "Scott: Hehe…\n" .string "I was watching that match!\p" .string "You're friends with that boy Wally,\n" .string "aren't you?\p" .string "But you didn't hold anything back\n" .string "and beat him impressively.\p" .string "Yeah! That's what a real Pokémon\n" .string "battle is all about!\p" .string "I idolize Trainers like that!\p" .string "… … … … … …\n" .string "I'll be cheering for you!$" MauvilleCity_Text_WattsonNeedFavorTakeKey: .string "Wattson: Oh, {PLAYER}{KUN}!\n" .string "You look like you have a lot of zip!\l" .string "That's a good thing, wahahahaha!\p" .string "Fine! I've decided!\n" .string "I need a favor, {PLAYER}{KUN}!\p" .string "Mauville City has an underground\n" .string "sector called New Mauville.\p" .string "{PLAYER}{KUN}, I'd like you to go there and\n" .string "switch off the Generator.\p" .string "The Generator has been running a bit\n" .string "haywire. It's getting unsafe.\p" .string "Here, this is the Key to get into\n" .string "New Mauville.$" MauvilleCity_Text_WattsonWontBeChallenge: .string "Wattson: Don't you worry about it.\n" .string "It won't be a challenge to you.\p" .string "The entrance to New Mauville is just\n" .string "a short Surf away from Route 110.\p" .string "That's it, then, you have my trust!\n" .string "Wahahahaha!$" MauvilleCity_Text_WattsonThanksTakeTM: .string "Wattson: Wahahahaha!\p" .string "I knew it, {PLAYER}{KUN}! I knew I'd made\n" .string "the right choice asking you!\p" .string "This is my thanks--a TM containing\n" .string "Thunderbolt!\p" .string "Go on, you've earned it!$" MauvilleCity_Text_WattsonYoungTakeCharge: .string "Wattson: Wahahahaha!\p" .string "It pleases me to no end to see\n" .string "the young step up and take charge!$" MauvilleCity_Text_NurseHurtMonBackToHealth: .string "You know, it's cool to have Pokémon\n" .string "battles and stuff…\p" .string "But if your Pokémon gets hurt,\n" .string "you have to nurse it back to health.$" MauvilleCity_Text_AllSortsOfPeopleComeThrough: .string "The roads of this town stretch north\n" .string "and south, and east and west.\p" .string "Because of that, we get all sorts of\n" .string "people coming through.$" MauvilleCity_Text_RydelVeryGenerous: .string "Have you been to Rydel's Cycles yet?\p" .string "Rydel, the owner, is a very generous\n" .string "man.$" MauvilleCity_Text_PokemonCanJumpYouOnBike: .string "Even if you're riding a Bike,\n" .string "wild Pokémon could jump you.$" MauvilleCity_Text_CitySign: .string "Mauville City\n" .string "“The bright and shiny city of fun!”$" MauvilleCity_Text_GymSign: .string "Mauville City Pokémon Gym\n" .string "Leader: Wattson\l" .string "“The cheerfully electrifying man!”$" MauvilleCity_Text_BikeShopSign: .string "“Ride in gravel and shake up your\n" .string "soul!”\l" .string "Rydel's Cycles$" MauvilleCity_Text_GameCornerSign: .string "“The play spot for all!”\n" .string "Mauville Game Corner$" MauvilleCity_Text_ExplainTV: .string "Hi, do you check out Tv at all?\p" .string "They've added a bunch of cool new\n" .string "shows recently.\p" .string "Tv is so cool. I've seen my friends on\n" .string "Tv just out of the blue.\p" .string "And, sometimes, they even put you on Tv\n" .string "without telling you.\p" .string "I wish I would be on Tv sometime.\p" .string "That's why I think you should check\n" .string "out TVs whenever you can.$" MauvilleCity_Text_BeenCheckingOutTV: .string "Hi, have you been checking out TVs?$"