enderalse/source/scripts/_00e_mqp01_startsc.psc
2024-01-11 21:24:54 +01:00

50 lines
1.3 KiB
Plaintext

Scriptname _00E_MQP01_StartSC extends ObjectReference
Event OnTriggerEnter (ObjectReference akActionREF)
if akActionRef == PlayerREF && !bDone
bDone = true ; deletion may take some time
Delete()
If !MQ10a.IsRunning()
If !MQ12c.IsRunning()
if EnderalFunctions.GetNewGameCount() > 1
Game.QuitToMainMenu()
Debug.MessageBox("Due to an engine bug, new game should not be started after quitting to the main menu. Please, restart Enderal first.")
return
endif
if _00E_QuickStartPrompt.Show() > 0
MQP01.CompleteAllObjectives()
MQP01.CompleteQuest()
MQP02.CompleteAllObjectives()
MQP02.CompleteQuest()
Utility.wait(0.5)
PlayerREF.MoveTo(_00E_ClassMenuOrigin)
Debug.SendAnimationEvent(PlayerRef, "IdleForceDefaultState")
Game.ShowRaceMenu()
Game.DisablePlayerControls(false, true, true, false, true, false, false, true)
MQP03.SetCurrentStageID(15)
(MQP02 as _00E_MQP02_Functions).AddRacialAbilites()
else
MQP01.SetCurrentStageID(10)
endif
EndIf
EndIf
EndIf
EndEvent
bool bDone
Quest Property MQP01 Auto
Quest Property MQP02 Auto
Quest Property MQP03 Auto
Quest Property MQ12c Auto
Quest Property MQ10a Auto
Actor Property PlayerREF Auto
Message Property _00E_QuickStartPrompt Auto
ObjectReference Property _00E_ClassMenuOrigin Auto