2021-10-05 22:59:59 +00:00
|
|
|
Scriptname _00E_MyradSystem02 extends Quest
|
2021-10-05 22:15:58 +00:00
|
|
|
|
|
|
|
import UIExtensions
|
|
|
|
import Utility
|
|
|
|
|
|
|
|
Actor akCurrentMyrad
|
|
|
|
|
|
|
|
Function CallMyradFlight(Actor akMyrad = None)
|
|
|
|
akCurrentMyrad = akMyrad
|
2024-02-12 18:56:25 +00:00
|
|
|
|
|
|
|
; If we call Message.Show() in a Goodbye script, dialogue menu will stay on screen
|
|
|
|
; Registering for an update, we allow it to close before the location menu
|
|
|
|
RegisterForSingleUpdate(0.1)
|
2021-10-05 22:15:58 +00:00
|
|
|
EndFunction
|
|
|
|
|
2024-02-12 18:56:25 +00:00
|
|
|
event OnUpdate()
|
|
|
|
if SKSE.GetVersion()
|
|
|
|
CallLocationList()
|
|
|
|
else
|
|
|
|
CallLocationListVanilla()
|
|
|
|
endif
|
|
|
|
endevent
|
2021-10-05 22:15:58 +00:00
|
|
|
|
2024-02-12 18:56:25 +00:00
|
|
|
Function CallLocationList()
|
2021-10-05 22:15:58 +00:00
|
|
|
|
|
|
|
UIListMenu listmenu = GetMenu("UIListMenu") as UIListMenu
|
|
|
|
|
|
|
|
string[] MyradTravelList = new string[13]
|
|
|
|
MyradTravelList[0] = "$Myradtravel00"
|
|
|
|
MyradTravelList[1] = "$Myradtravel01"
|
|
|
|
MyradTravelList[2] = "$Myradtravel02"
|
|
|
|
MyradTravelList[3] = "$Myradtravel03"
|
|
|
|
MyradTravelList[4] = "$Myradtravel04"
|
|
|
|
MyradTravelList[5] = "$Myradtravel05"
|
|
|
|
MyradTravelList[6] = "$Myradtravel06"
|
|
|
|
MyradTravelList[7] = "$Myradtravel07"
|
|
|
|
MyradTravelList[8] = "$Myradtravel08"
|
|
|
|
MyradTravelList[9] = "$Myradtravel09"
|
|
|
|
MyradTravelList[10] = "$Myradtravel10"
|
|
|
|
MyradTravelList[11] = "$Myradtravel11"
|
|
|
|
MyradTravelList[12] = "$Back"
|
|
|
|
|
|
|
|
Int iLength = 0
|
|
|
|
|
|
|
|
While iLength < MyradTravelList.length
|
|
|
|
listmenu.AddEntryItem(MyradTravelList[iLength], -1, -1, false)
|
|
|
|
iLength += 1
|
|
|
|
EndWhile
|
|
|
|
|
|
|
|
int iListMenu = listmenu.OpenMenu()
|
|
|
|
int iListButton = listmenu.GetResultInt()
|
|
|
|
|
|
|
|
If iListButton == 0
|
|
|
|
PortPlayer(ArkDestination)
|
|
|
|
ElseIf iListButton == 1
|
|
|
|
PortPlayer(ArkDestinationOutside)
|
|
|
|
ElseIf iListButton == 2
|
|
|
|
PortPlayer(RiverhomeDestination)
|
|
|
|
Elseif iListButton == 3
|
|
|
|
PortPlayer(HeartlandBorderregionDestination)
|
|
|
|
Elseif iListButton == 4
|
|
|
|
PortPlayer(HeartlandWatchtowerDestination)
|
|
|
|
Elseif iListButton == 5
|
|
|
|
PortPlayer(HeartlandNordicDestination)
|
|
|
|
Elseif iListButton == 6
|
|
|
|
PortPlayer(FarmerscoastDestination)
|
|
|
|
ElseIf iListButton == 7
|
|
|
|
PortPlayer(FrostcliffDestination)
|
|
|
|
ElseIf iListButton == 8
|
|
|
|
PortPlayer(DunehomeDestination)
|
|
|
|
Elseif iListButton == 09
|
|
|
|
PortPlayer(QuellwachtDestination)
|
|
|
|
Elseif iListButton == 10
|
|
|
|
PortPlayer(MisthomeDestination)
|
|
|
|
Elseif iListButton == 11
|
|
|
|
PortPlayer(DuestertalDesitnation)
|
|
|
|
Elseif iListButton == 12
|
|
|
|
return
|
|
|
|
EndIf
|
|
|
|
|
|
|
|
EndFunction
|
|
|
|
|
2024-02-12 18:56:25 +00:00
|
|
|
Function CallLocationListVanilla()
|
|
|
|
|
|
|
|
int iListButton = _00E_MyradFlightPage1.Show()
|
|
|
|
|
|
|
|
If iListButton == 0
|
|
|
|
PortPlayer(ArkDestination)
|
|
|
|
ElseIf iListButton == 1
|
|
|
|
PortPlayer(ArkDestinationOutside)
|
|
|
|
ElseIf iListButton == 2
|
|
|
|
PortPlayer(RiverhomeDestination)
|
|
|
|
Elseif iListButton == 3
|
|
|
|
PortPlayer(HeartlandBorderregionDestination)
|
|
|
|
Elseif iListButton == 4
|
|
|
|
PortPlayer(HeartlandWatchtowerDestination)
|
|
|
|
Elseif iListButton == 5
|
|
|
|
PortPlayer(HeartlandNordicDestination)
|
|
|
|
Elseif iListButton == 6
|
|
|
|
PortPlayer(FarmerscoastDestination)
|
|
|
|
elseif iListButton == 8 ; Exit
|
|
|
|
return
|
|
|
|
else ; More
|
|
|
|
|
|
|
|
int iListButton2 = _00E_MyradFlightPage2.Show()
|
|
|
|
|
|
|
|
If iListButton2 == 0
|
|
|
|
PortPlayer(FrostcliffDestination)
|
|
|
|
ElseIf iListButton2 == 1
|
|
|
|
PortPlayer(DunehomeDestination)
|
|
|
|
Elseif iListButton2 == 2
|
|
|
|
PortPlayer(QuellwachtDestination)
|
|
|
|
Elseif iListButton2 == 3
|
|
|
|
PortPlayer(MisthomeDestination)
|
|
|
|
Elseif iListButton2 == 4
|
|
|
|
PortPlayer(DuestertalDesitnation)
|
|
|
|
Elseif iListButton2 == 6 ; Exit
|
|
|
|
return
|
|
|
|
else ; Return
|
|
|
|
CallLocationListVanilla()
|
|
|
|
endif
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
endfunction
|
|
|
|
|
2021-10-05 22:15:58 +00:00
|
|
|
Function CallFlightAnimation(Actor akMyrad)
|
|
|
|
|
|
|
|
FadeToBlackAndBackQuick.Apply()
|
2024-02-13 09:02:30 +00:00
|
|
|
|
|
|
|
_00E_EquipControl.SheatheWeapon(PlayerREF as Actor)
|
2021-10-05 22:15:58 +00:00
|
|
|
Wait(0.75)
|
2024-02-13 09:02:30 +00:00
|
|
|
|
2021-10-05 22:15:58 +00:00
|
|
|
ObjectReference objTakeOffMarker = akMyrad.GetLinkedRef(_00E_FS_MyradTakeOffMarker)
|
|
|
|
akMyrad.MoveTo(objTakeOffMarker)
|
|
|
|
akMyrad.SetScale(1)
|
|
|
|
_FS_TheriantrophistControlQuest.TransformBackIfTransformed()
|
|
|
|
akMyrad.PlayIdleWithTarget(groundMountDragon, PlayerREF)
|
|
|
|
Wait(4.0)
|
|
|
|
akMyrad.PlayImpactEffect(FXDragonTakeoffImpactSet, "NPC Tail8", 0, 0, -1, 512, true, false)
|
|
|
|
Wait(8.0)
|
|
|
|
|
|
|
|
EndFunction
|
|
|
|
|
|
|
|
Function ResetMyradAndPlayer(Actor akMyrad)
|
|
|
|
|
|
|
|
Debug.SendAnimationEvent(PlayerREF, "IdleCartExitInstant")
|
|
|
|
akMyrad.Disable()
|
|
|
|
akMyrad.Enable()
|
|
|
|
akMyrad.MoveTo(akMyrad.GetLinkedRef())
|
|
|
|
akMyrad.EvaluatePackage()
|
|
|
|
|
|
|
|
EndFunction
|
|
|
|
|
|
|
|
Function PortPlayer(ObjectReference Destination)
|
|
|
|
|
2024-02-12 19:27:51 +00:00
|
|
|
PlayerRef.RemoveItem(Gold001, MyradTripPrice.GetValue() as int)
|
2021-10-05 22:15:58 +00:00
|
|
|
|
|
|
|
if akCurrentMyrad != None
|
|
|
|
CallFlightAnimation(akCurrentMyrad)
|
|
|
|
endif
|
|
|
|
|
|
|
|
FadeToBlackImod.Apply()
|
|
|
|
Game.SetHudCartMode(true)
|
|
|
|
Wait(1)
|
|
|
|
FadeToBlackHoldImod.ApplyCrossFade()
|
|
|
|
Wait(0.5)
|
|
|
|
PlayerRef.MoveTo(Destination)
|
|
|
|
Wait(0.5)
|
|
|
|
|
|
|
|
if akCurrentMyrad != None
|
|
|
|
ResetMyradAndPlayer(akCurrentMyrad)
|
|
|
|
endif
|
|
|
|
|
|
|
|
FadeToBlackBackImod.ApplyCrossFade()
|
|
|
|
Game.SetHudCartMode(false)
|
|
|
|
|
2024-01-10 14:08:24 +00:00
|
|
|
If MQ04.GetCurrentStageID() >= 10 && !bDone
|
2021-10-05 22:15:58 +00:00
|
|
|
bDone = True
|
|
|
|
MQ04.SetObjectiveCompleted(20)
|
2024-01-09 22:00:18 +00:00
|
|
|
_00E_EPHandler.GiveEP(150)
|
2021-10-05 22:15:58 +00:00
|
|
|
EndIf
|
|
|
|
|
|
|
|
MyradFligthCounter += 1
|
|
|
|
|
2024-01-10 00:46:13 +00:00
|
|
|
If MyradFligthCounter == 20
|
2022-08-03 21:19:58 +00:00
|
|
|
Steam.UnlockAchievement("END_MYRAD_01")
|
2021-10-05 22:15:58 +00:00
|
|
|
EndIf
|
|
|
|
|
2021-10-05 22:59:59 +00:00
|
|
|
_FS_Phasmalist_ControlQuest.MoveApparitionToPlayer()
|
2021-10-05 22:15:58 +00:00
|
|
|
|
|
|
|
Game.RequestAutoSave()
|
|
|
|
|
|
|
|
EndFunction
|
|
|
|
|
|
|
|
bool bDone
|
|
|
|
int MyradFligthCounter = 0
|
|
|
|
|
|
|
|
Quest Property MQ04 Auto
|
|
|
|
|
|
|
|
Keyword Property _00E_FS_MyradTakeOffMarker Auto
|
|
|
|
|
|
|
|
Message Property _00E_MyradFlightPage1 Auto
|
|
|
|
Message Property _00E_MyradFlightPage2 Auto
|
|
|
|
ObjectReference Property PlayerRef Auto
|
|
|
|
MiscObject Property Gold001 Auto
|
2024-02-12 19:27:51 +00:00
|
|
|
GlobalVariable Property MyradTripPrice Auto
|
2021-10-05 22:15:58 +00:00
|
|
|
|
|
|
|
Idle Property groundMountDragon Auto
|
|
|
|
ImpactDataSet Property FXDragonTakeoffImpactSet Auto
|
|
|
|
|
|
|
|
ObjectReference Property ArkDestination Auto
|
|
|
|
ObjectReference Property ArkDestinationOutside Auto
|
|
|
|
ObjectReference Property RiverhomeDestination Auto
|
|
|
|
ObjectReference Property HeartlandBorderregionDestination Auto
|
|
|
|
ObjectReference Property HeartlandWatchtowerDestination Auto
|
|
|
|
ObjectReference Property HeartlandNordicDestination Auto
|
|
|
|
ObjectReference Property FarmerscoastDestination Auto
|
|
|
|
ObjectReference Property FrostcliffDestination Auto
|
|
|
|
ObjectReference Property DunehomeDestination Auto
|
|
|
|
ObjectReference Property QuellwachtDestination Auto
|
|
|
|
ObjectReference Property MisthomeDestination Auto
|
|
|
|
ObjectReference Property DuestertalDesitnation Auto
|
|
|
|
|
|
|
|
ImageSpaceModifier Property FadeToBlackImod Auto
|
|
|
|
ImageSpaceModifier Property FadeToBlackHoldImod Auto
|
|
|
|
ImageSpaceModifier Property FadeToBlackBackImod Auto
|
|
|
|
ImageSpaceModifier Property FadeToBlackAndBackQuick Auto
|