pokeemerald/data/scripts/gabby_and_ty.inc

321 lines
11 KiB
PHP
Raw Normal View History

2019-10-23 01:44:38 +02:00
@ Gabby and Ty always move to the same spots for the first 5 battles
@ From the 6th battle onwards, they move randomly between locations 6-8
2021-04-25 23:22:45 +02:00
@ Note: The local IDs of Gabby and Ty are hard-coded in GetGabbyAndTyLocalIds
2021-07-20 21:18:31 +02:00
GabbyAndTy_EventScript_UpdateLocation::
cleartrainerflag TRAINER_GABBY_AND_TY_6
specialvar VAR_RESULT, GabbyAndTyGetBattleNum
switch VAR_RESULT
2019-10-23 01:44:38 +02:00
case 0, GabbyAndTy_EventScript_MoveForBattle1
case 1, GabbyAndTy_EventScript_MoveForBattle2
case 2, GabbyAndTy_EventScript_MoveForBattle3
case 3, GabbyAndTy_EventScript_MoveForBattle4
case 4, GabbyAndTy_EventScript_MoveForBattle5
case 5, GabbyAndTy_EventScript_MoveForBattle6
case 6, GabbyAndTy_EventScript_MoveForBattle7
case 7, GabbyAndTy_EventScript_MoveForBattle8
case 8, GabbyAndTy_EventScript_MoveForBattle9
end
2021-07-20 21:18:31 +02:00
GabbyAndTy_EventScript_MoveForBattle1::
2019-10-23 01:44:38 +02:00
call GabbyAndTy_EventScript_ShowAtRoute111_1
return
2021-07-20 21:18:31 +02:00
GabbyAndTy_EventScript_MoveForBattle2::
2019-10-23 01:44:38 +02:00
call GabbyAndTy_EventScript_ShowAtRoute118_1
call GabbyAndTy_EventScript_HideAtRoute111_1
return
2021-07-20 21:18:31 +02:00
GabbyAndTy_EventScript_MoveForBattle3::
2019-10-23 01:44:38 +02:00
call GabbyAndTy_EventScript_ShowAtRoute120_1
call GabbyAndTy_EventScript_HideAtRoute118_1
return
2021-07-20 21:18:31 +02:00
GabbyAndTy_EventScript_MoveForBattle4::
2019-10-23 01:44:38 +02:00
call GabbyAndTy_EventScript_ShowAtRoute111_3
call GabbyAndTy_EventScript_HideAtRoute120_1
return
2021-07-20 21:18:31 +02:00
GabbyAndTy_EventScript_MoveForBattle5::
2019-10-23 01:44:38 +02:00
call GabbyAndTy_EventScript_ShowAtRoute118_2
call GabbyAndTy_EventScript_HideAtRoute111_3
return
2021-07-20 21:18:31 +02:00
GabbyAndTy_EventScript_MoveForBattle6::
2019-10-23 01:44:38 +02:00
call GabbyAndTy_EventScript_ShowAtRoute120_2
call GabbyAndTy_EventScript_HideAtRoute118_2
return
2021-07-20 21:18:31 +02:00
GabbyAndTy_EventScript_MoveForBattle7::
2019-10-23 01:44:38 +02:00
call GabbyAndTy_EventScript_ShowAtRoute111_2
call GabbyAndTy_EventScript_HideAtRoute120_2
return
2021-07-20 21:18:31 +02:00
GabbyAndTy_EventScript_MoveForBattle8::
2019-10-23 01:44:38 +02:00
call GabbyAndTy_EventScript_ShowAtRoute118_3
call GabbyAndTy_EventScript_HideAtRoute111_2
return
2021-07-20 21:18:31 +02:00
GabbyAndTy_EventScript_MoveForBattle9::
2019-10-23 01:44:38 +02:00
call GabbyAndTy_EventScript_ShowAtRoute120_2
call GabbyAndTy_EventScript_HideAtRoute118_3
return
2021-07-20 21:18:31 +02:00
GabbyAndTy_EventScript_HideAtRoute111_1::
2018-10-19 19:04:47 +02:00
setflag FLAG_HIDE_ROUTE_111_GABBY_AND_TY_1
return
2021-07-20 21:18:31 +02:00
GabbyAndTy_EventScript_ShowAtRoute111_1::
2018-10-19 19:04:47 +02:00
clearflag FLAG_HIDE_ROUTE_111_GABBY_AND_TY_1
return
2021-07-20 21:18:31 +02:00
GabbyAndTy_EventScript_HideAtRoute118_1::
2018-10-19 19:04:47 +02:00
setflag FLAG_HIDE_ROUTE_118_GABBY_AND_TY_1
return
2021-07-20 21:18:31 +02:00
GabbyAndTy_EventScript_ShowAtRoute118_1::
2018-10-19 19:04:47 +02:00
clearflag FLAG_HIDE_ROUTE_118_GABBY_AND_TY_1
return
2021-07-20 21:18:31 +02:00
GabbyAndTy_EventScript_HideAtRoute120_1::
2018-10-19 19:04:47 +02:00
setflag FLAG_HIDE_ROUTE_120_GABBY_AND_TY_1
return
2021-07-20 21:18:31 +02:00
GabbyAndTy_EventScript_ShowAtRoute120_1::
2018-10-19 19:04:47 +02:00
clearflag FLAG_HIDE_ROUTE_120_GABBY_AND_TY_1
return
2021-07-20 21:18:31 +02:00
GabbyAndTy_EventScript_HideAtRoute111_3::
2018-10-19 19:04:47 +02:00
setflag FLAG_HIDE_ROUTE_111_GABBY_AND_TY_3
return
2021-07-20 21:18:31 +02:00
GabbyAndTy_EventScript_ShowAtRoute111_3::
2018-10-19 19:04:47 +02:00
clearflag FLAG_HIDE_ROUTE_111_GABBY_AND_TY_3
return
2021-07-20 21:18:31 +02:00
GabbyAndTy_EventScript_HideAtRoute118_2::
2018-10-19 19:04:47 +02:00
setflag FLAG_HIDE_ROUTE_118_GABBY_AND_TY_2
return
2021-07-20 21:18:31 +02:00
GabbyAndTy_EventScript_ShowAtRoute118_2::
2018-10-19 19:04:47 +02:00
clearflag FLAG_HIDE_ROUTE_118_GABBY_AND_TY_2
return
2021-07-20 21:18:31 +02:00
GabbyAndTy_EventScript_HideAtRoute120_2::
2018-10-19 19:04:47 +02:00
setflag FLAG_HIDE_ROUTE_120_GABBY_AND_TY_2
return
2021-07-20 21:18:31 +02:00
GabbyAndTy_EventScript_ShowAtRoute120_2::
2018-10-19 19:04:47 +02:00
clearflag FLAG_HIDE_ROUTE_120_GABBY_AND_TY_2
return
2021-07-20 21:18:31 +02:00
GabbyAndTy_EventScript_HideAtRoute111_2::
2018-10-19 19:04:47 +02:00
setflag FLAG_HIDE_ROUTE_111_GABBY_AND_TY_2
return
2021-07-20 21:18:31 +02:00
GabbyAndTy_EventScript_ShowAtRoute111_2::
2018-10-19 19:04:47 +02:00
clearflag FLAG_HIDE_ROUTE_111_GABBY_AND_TY_2
return
2021-07-20 21:18:31 +02:00
GabbyAndTy_EventScript_HideAtRoute118_3::
2018-10-19 19:04:47 +02:00
setflag FLAG_HIDE_ROUTE_118_GABBY_AND_TY_3
return
2021-07-20 21:18:31 +02:00
GabbyAndTy_EventScript_ShowAtRoute118_3::
2018-10-19 19:04:47 +02:00
clearflag FLAG_HIDE_ROUTE_118_GABBY_AND_TY_3
return
2021-07-20 21:18:31 +02:00
GabbyAndTy_EventScript_GabbyBattle1::
2019-10-23 01:44:38 +02:00
trainerbattle_double TRAINER_GABBY_AND_TY_1, GabbyAndTy_Text_GabbyPreFirstBattle, GabbyAndTy_Text_GabbyDefeatFirstTime, GabbyAndTy_Text_GabbyNotEnoughMons, GabbyAndTy_EventScript_FirstInterview
msgbox GabbyAndTy_Text_KeepingAnEyeOutForYou, MSGBOX_DEFAULT
release
end
2021-07-20 21:18:31 +02:00
GabbyAndTy_EventScript_TyBattle1::
2019-10-23 01:44:38 +02:00
trainerbattle_double TRAINER_GABBY_AND_TY_1, GabbyAndTy_Text_TyPreFirstBattle, GabbyAndTy_Text_TyDefeatFirstTime, GabbyAndTy_Text_TyNotEnoughMons, GabbyAndTy_EventScript_FirstInterview
msgbox GabbyAndTy_Text_TyPostBattle, MSGBOX_DEFAULT
release
end
2021-07-20 21:18:31 +02:00
GabbyAndTy_EventScript_GabbyBattle2::
2020-01-08 21:12:10 +01:00
trainerbattle_double TRAINER_GABBY_AND_TY_2, GabbyAndTy_Text_GabbyIntro, GabbyAndTy_Text_GabbyDefeat, GabbyAndTy_Text_GabbyNotEnoughMons, GabbyAndTy_EventScript_RequestInterview
2019-10-23 01:44:38 +02:00
msgbox GabbyAndTy_Text_KeepingAnEyeOutForYou, MSGBOX_DEFAULT
release
end
2021-07-20 21:18:31 +02:00
GabbyAndTy_EventScript_TyBattle2::
2020-01-08 21:12:10 +01:00
trainerbattle_double TRAINER_GABBY_AND_TY_2, GabbyAndTy_Text_TyIntro, GabbyAndTy_Text_TyDefeat, GabbyAndTy_Text_TyNotEnoughMons, GabbyAndTy_EventScript_RequestInterview
2019-10-23 01:44:38 +02:00
msgbox GabbyAndTy_Text_TyPostBattle, MSGBOX_DEFAULT
release
end
2021-07-20 21:18:31 +02:00
GabbyAndTy_EventScript_GabbyBattle3::
2020-01-08 21:12:10 +01:00
trainerbattle_double TRAINER_GABBY_AND_TY_3, GabbyAndTy_Text_GabbyIntro, GabbyAndTy_Text_GabbyDefeat, GabbyAndTy_Text_GabbyNotEnoughMons, GabbyAndTy_EventScript_RequestInterview
2019-10-23 01:44:38 +02:00
msgbox GabbyAndTy_Text_KeepingAnEyeOutForYou, MSGBOX_DEFAULT
release
end
2021-07-20 21:18:31 +02:00
GabbyAndTy_EventScript_TyBattle3::
2020-01-08 21:12:10 +01:00
trainerbattle_double TRAINER_GABBY_AND_TY_3, GabbyAndTy_Text_TyIntro, GabbyAndTy_Text_TyDefeat, GabbyAndTy_Text_TyNotEnoughMons, GabbyAndTy_EventScript_RequestInterview
2019-10-23 01:44:38 +02:00
msgbox GabbyAndTy_Text_TyPostBattle, MSGBOX_DEFAULT
release
end
2021-07-20 21:18:31 +02:00
GabbyAndTy_EventScript_GabbyBattle4::
2020-01-08 21:12:10 +01:00
trainerbattle_double TRAINER_GABBY_AND_TY_4, GabbyAndTy_Text_GabbyIntro, GabbyAndTy_Text_GabbyDefeat, GabbyAndTy_Text_GabbyNotEnoughMons, GabbyAndTy_EventScript_RequestInterview
2019-10-23 01:44:38 +02:00
msgbox GabbyAndTy_Text_KeepingAnEyeOutForYou, MSGBOX_DEFAULT
release
end
2021-07-20 21:18:31 +02:00
GabbyAndTy_EventScript_TyBattle4::
2020-01-08 21:12:10 +01:00
trainerbattle_double TRAINER_GABBY_AND_TY_4, GabbyAndTy_Text_TyIntro, GabbyAndTy_Text_TyDefeat, GabbyAndTy_Text_TyNotEnoughMons, GabbyAndTy_EventScript_RequestInterview
2019-10-23 01:44:38 +02:00
msgbox GabbyAndTy_Text_TyPostBattle, MSGBOX_DEFAULT
release
end
2021-07-20 21:18:31 +02:00
GabbyAndTy_EventScript_GabbyBattle5::
2020-01-08 21:12:10 +01:00
trainerbattle_double TRAINER_GABBY_AND_TY_5, GabbyAndTy_Text_GabbyIntro, GabbyAndTy_Text_GabbyDefeat, GabbyAndTy_Text_GabbyNotEnoughMons, GabbyAndTy_EventScript_RequestInterview
2019-10-23 01:44:38 +02:00
msgbox GabbyAndTy_Text_KeepingAnEyeOutForYou, MSGBOX_DEFAULT
release
end
2021-07-20 21:18:31 +02:00
GabbyAndTy_EventScript_TyBattle5::
2020-01-08 21:12:10 +01:00
trainerbattle_double TRAINER_GABBY_AND_TY_5, GabbyAndTy_Text_TyIntro, GabbyAndTy_Text_TyDefeat, GabbyAndTy_Text_TyNotEnoughMons, GabbyAndTy_EventScript_RequestInterview
2019-10-23 01:44:38 +02:00
msgbox GabbyAndTy_Text_TyPostBattle, MSGBOX_DEFAULT
release
end
2021-07-20 21:18:31 +02:00
GabbyAndTy_EventScript_GabbyBattle6::
2020-01-08 21:12:10 +01:00
trainerbattle_double TRAINER_GABBY_AND_TY_6, GabbyAndTy_Text_GabbyIntro, GabbyAndTy_Text_GabbyDefeat, GabbyAndTy_Text_GabbyNotEnoughMons, GabbyAndTy_EventScript_RequestInterview
2019-10-23 01:44:38 +02:00
msgbox GabbyAndTy_Text_KeepingAnEyeOutForYou, MSGBOX_DEFAULT
release
end
2021-07-20 21:18:31 +02:00
GabbyAndTy_EventScript_TyBattle6::
2020-01-08 21:12:10 +01:00
trainerbattle_double TRAINER_GABBY_AND_TY_6, GabbyAndTy_Text_TyIntro, GabbyAndTy_Text_TyDefeat, GabbyAndTy_Text_TyNotEnoughMons, GabbyAndTy_EventScript_RequestInterview
2019-10-23 01:44:38 +02:00
msgbox GabbyAndTy_Text_TyPostBattle, MSGBOX_DEFAULT
release
end
2021-07-20 21:18:31 +02:00
GabbyAndTy_EventScript_FirstInterview::
special GabbyAndTyBeforeInterview
2021-04-25 23:22:45 +02:00
special GetGabbyAndTyLocalIds
2019-10-07 06:14:10 +02:00
compare VAR_FACING, DIR_NORTH
2019-10-23 01:44:38 +02:00
call_if_eq GabbyAndTy_EventScript_FacePlayerNorth
2019-10-07 06:14:10 +02:00
compare VAR_FACING, DIR_SOUTH
2019-10-23 01:44:38 +02:00
call_if_eq GabbyAndTy_EventScript_FacePlayerSouth
2019-10-07 06:14:10 +02:00
compare VAR_FACING, DIR_EAST
2019-10-23 01:44:38 +02:00
call_if_eq GabbyAndTy_EventScript_FacePlayerEast
goto_if_set FLAG_TEMP_1, GabbyAndTy_EventScript_KeepingAnEyeOutForYou
msgbox GabbyAndTy_Text_WhoAreYouInterview, MSGBOX_YESNO
goto GabbyAndTy_EventScript_Interview
end
2021-07-20 21:18:31 +02:00
GabbyAndTy_EventScript_FacePlayerNorth::
2019-10-23 01:44:38 +02:00
applymovement VAR_0x8004, GabbyAndTy_Movement_WalkInPlaceDown
waitmovement 0
return
2021-07-20 21:18:31 +02:00
GabbyAndTy_EventScript_FacePlayerSouth::
2019-10-23 01:44:38 +02:00
applymovement VAR_0x8004, GabbyAndTy_Movement_WalkInPlaceUp
2019-10-06 19:55:30 +02:00
applymovement VAR_0x8005, Common_Movement_WalkInPlaceFastestUp
waitmovement 0
return
2021-07-20 21:18:31 +02:00
GabbyAndTy_EventScript_FacePlayerEast::
2019-10-23 01:44:38 +02:00
applymovement VAR_0x8004, GabbyAndTy_Movement_WalkInPlaceLeft
2019-10-06 19:55:30 +02:00
applymovement VAR_0x8005, Common_Movement_WalkInPlaceFastestLeft
waitmovement 0
return
2021-07-20 21:18:31 +02:00
GabbyAndTy_EventScript_RequestInterview::
special GabbyAndTyBeforeInterview
2021-04-25 23:22:45 +02:00
special GetGabbyAndTyLocalIds
2019-10-07 06:14:10 +02:00
compare VAR_FACING, DIR_NORTH
2019-10-23 01:44:38 +02:00
call_if_eq GabbyAndTy_EventScript_FacePlayerNorth
2019-10-07 06:14:10 +02:00
compare VAR_FACING, DIR_SOUTH
2019-10-23 01:44:38 +02:00
call_if_eq GabbyAndTy_EventScript_FacePlayerSouth
2019-10-07 06:14:10 +02:00
compare VAR_FACING, DIR_EAST
2019-10-23 01:44:38 +02:00
call_if_eq GabbyAndTy_EventScript_FacePlayerEast
goto_if_set FLAG_TEMP_1, GabbyAndTy_EventScript_KeepingAnEyeOutForYou
specialvar VAR_RESULT, GabbyAndTyGetLastQuote
compare VAR_RESULT, 0
2019-10-23 01:44:38 +02:00
goto_if_eq GabbyAndTy_EventScript_DidntInterviewLastTime
msgbox GabbyAndTy_Text_QuoteFromLastInterview, MSGBOX_DEFAULT
specialvar VAR_RESULT, GabbyAndTyGetLastBattleTrivia
switch VAR_RESULT
2019-10-23 01:44:38 +02:00
case 0, GabbyAndTy_EventScript_RequestInterviewNoTrivia
case 1, GabbyAndTy_EventScript_RequestInterviewShortBattle
case 2, GabbyAndTy_EventScript_RequestInterviewThrewBall
case 3, GabbyAndTy_EventScript_RequestInterviewUsedItems
case 4, GabbyAndTy_EventScript_RequestInterviewLostAMon
end
2021-07-20 21:18:31 +02:00
GabbyAndTy_Movement_WalkInPlaceDown:
walk_in_place_down
step_end
2021-07-20 21:18:31 +02:00
GabbyAndTy_Movement_WalkInPlaceUp:
walk_in_place_up
step_end
2021-07-20 21:18:31 +02:00
GabbyAndTy_Movement_WalkInPlaceLeft:
walk_in_place_left
step_end
2021-07-20 21:18:31 +02:00
GabbyAndTy_EventScript_DidntInterviewLastTime::
2019-10-23 01:44:38 +02:00
msgbox GabbyAndTy_Text_GiveUsAnInterviewThisTime, MSGBOX_YESNO
goto GabbyAndTy_EventScript_Interview
end
2021-07-20 21:18:31 +02:00
GabbyAndTy_EventScript_RequestInterviewNoTrivia::
2019-10-23 01:44:38 +02:00
msgbox GabbyAndTy_Text_InterviewAgain, MSGBOX_YESNO
goto GabbyAndTy_EventScript_Interview
end
2021-07-20 21:18:31 +02:00
GabbyAndTy_EventScript_RequestInterviewShortBattle::
2019-10-23 01:44:38 +02:00
msgbox GabbyAndTy_Text_YouStompedUsInterviewAgain, MSGBOX_YESNO
goto GabbyAndTy_EventScript_Interview
end
2021-07-20 21:18:31 +02:00
GabbyAndTy_EventScript_RequestInterviewThrewBall::
2019-10-23 01:44:38 +02:00
msgbox GabbyAndTy_Text_YouThrewABallAtUsInterviewAgain, MSGBOX_YESNO
goto GabbyAndTy_EventScript_Interview
end
2021-07-20 21:18:31 +02:00
GabbyAndTy_EventScript_RequestInterviewUsedItems::
2019-10-23 01:44:38 +02:00
msgbox GabbyAndTy_Text_CleverItemSkillsInterviewAgain, MSGBOX_YESNO
goto GabbyAndTy_EventScript_Interview
end
2021-07-20 21:18:31 +02:00
GabbyAndTy_EventScript_RequestInterviewLostAMon::
2019-10-23 01:44:38 +02:00
msgbox GabbyAndTy_Text_WeLookedRespectableInterviewAgain, MSGBOX_YESNO
goto GabbyAndTy_EventScript_Interview
end
2021-07-20 21:18:31 +02:00
GabbyAndTy_EventScript_Interview::
2019-11-02 17:34:53 +01:00
compare VAR_RESULT, NO
2019-10-23 01:44:38 +02:00
goto_if_eq GabbyAndTy_EventScript_DontGiveUpKeepingEyeOut
msgbox GabbyAndTy_Text_DescribeYourFeelings, MSGBOX_DEFAULT
2019-02-27 19:45:31 +01:00
setvar VAR_0x8004, EASY_CHAT_TYPE_GABBY_AND_TY
call Common_ShowEasyChatScreen
lock
faceplayer
compare VAR_RESULT, 0
2019-10-23 01:44:38 +02:00
goto_if_eq GabbyAndTy_EventScript_DontGiveUpKeepingEyeOut
msgbox GabbyAndTy_Text_PerfectWellBeSeeingYou, MSGBOX_DEFAULT
special GabbyAndTyAfterInterview
2018-10-17 18:25:12 +02:00
setflag FLAG_TEMP_1
release
end
2021-07-20 21:18:31 +02:00
GabbyAndTy_EventScript_DontGiveUpKeepingEyeOut::
2019-10-23 01:44:38 +02:00
msgbox GabbyAndTy_Text_DontGiveUpKeepingEyeOut, MSGBOX_DEFAULT
2018-10-17 18:25:12 +02:00
setflag FLAG_TEMP_1
release
end
2021-07-20 21:18:31 +02:00
GabbyAndTy_EventScript_KeepingAnEyeOutForYou::
2019-10-23 01:44:38 +02:00
msgbox GabbyAndTy_Text_KeepingAnEyeOutForYou, MSGBOX_DEFAULT
release
end