SCTX |
Scriptname Dark18MotherScript
Short Finale
float Timer
short Conv
short Traitor
short ArquenGasp
float TraitorTimer
short Ritual
float AllOverTimer
short HappyEnding
short NightMotherSleep
float AttackTimer
short Prayer
short ArquenStatue
float StatueTimer
short StatueMove
float IntoCryptTimer
short MoveOut
short AttackAgain
short Positions
short Accuse
float AccuseTimer
short NightMotherTalk
Float fQuestDelayTime
short PopUp
short Stand
Begin GameMode
;Make Arquen forcegreet the player when they get to the Night Mother ritual
if Dark00General.ArquenBravilGreet == 0
if GetStage Dark18Mother == 10
if player.GetInCell Bravil == 1
set Dark00General.ArquenTalkTimer to ( Dark00General.ArquenTalkTimer + GetSecondsPassed )
endif
endif
endif
if Dark00General.ArquenBravilGreet == 0
if Dark00General.ArquenTalkTimer > 5
ArquenRef.StartConversation player, Greeting
set Dark00General.ArquenBravilGreet to 1
endif
endif
if Dark00General.RitualPosition == 1
if MenuMode == 0
DisablePlayerControls
set Dark00General.RitualPosition to 2
Player.MoveToMarker PlayerRitualRef
endif
endif
if Dark00General.RitualPosition == 2
set Dark00General.TeleportTimer to ( Dark00General.TeleportTimer + GetSecondsPassed )
endif
if Dark00General.RitualPosition == 2
if Dark00General.TeleportTimer > 2
ArquenRef.MoveToMarker ArquenRitualRef
MathieuBellamontRef.MoveToMarker MathieuRitualRef
BanusAlorRef.MoveToMarker BanusRitualRef
BelisariusAriusRef.MoveToMarker BelisariusRitualRef
set Dark00General.RitualPosition to 3
endif
endif
;This unlocks the player's controls when the ritual is over
if Ritual == 0 && Positions == 0
if GetStage Dark18Mother == 30
if ArquenRef.GetInCell BravilCryptOfTheNightMother == 1
if MathieuBellamontRef.GetInCell BravilCryptOfTheNightMother == 1
if BelisariusAriusRef.GetInCell BravilCryptOfTheNightMother == 1
if BanusAlorRef.GetInCell BravilCryptOfTheNightMother == 1
set Positions to 1
endif
endif
endif
endif
endif
endif
If Positions == 1
set Positions to 2
ArquenRef.MoveToMarker ArquenCryptRef
MathieuBellamontRef.MoveToMarker MathieuCryptRef
BanusAlorRef.MoveToMarker BanusCryptRef
BelisariusAriusRef.MoveToMarker BelisariusCryptRef
endif
if Positions == 2
MathieuBellamontRef.RemoveItem Torch02 1
BelisariusAriusRef.RemoveItem Torch02 1
BanusAlorRef.RemoveItem Torch02 1
MathieuBellamontRef.Look NightMotherRef
BelisariusAriusRef.Look NightMotherRef
BanusAlorRef.Look NightMotherRef
;SetStage Dark18Mother 30
EnablePlayerControls
set Ritual to 1
set Positions to 3
endif
;This controls all the stuff for the ending "cutscene" in the Crypt of the Night Mother
if Finale == 0
if GetStage Dark18Mother == 30
if Player.GetInCell BravilCryptOfTheNightMother == 1
if ArquenRef.GetInCell BravilCryptOfTheNightMother == 1
if MathieuBellamontRef.GetInCell BravilCryptOfTheNightMother == 1
if BelisariusAriusRef.GetInCell BravilCryptOfTheNightMother == 1
if BanusAlorRef.GetInCell BravilCryptOfTheNightMother == 1
DisablePlayerControls
set Timer to ( Timer + GetSecondsPassed )
set Traitor to 1
ArquenRef.SetFactionRank DarkBrotherhood -1
MathieuBellamontRef.SetFactionRank DarkBrotherhood -1
BanusAlorRef.SetFactionRank DarkBrotherhood -1
BelisariusAriusRef.SetFactionRank DarkBrotherhood -1
ArquenRef.SetFactionRank DarkRitualFaction 0
MathieuBellamontRef.SetFactionRank DarkRitualFaction 0
BanusAlorRef.SetFactionRank DarkRitualFaction 0
BelisariusAriusRef.SetFactionRank DarkRitualFaction 0
Player.SetFactionRank DarkRitualFaction 0
NightMotherCryptDoorRef.Lock 100
endif
endif
endif
endif
endif
endif
endif
if Finale == 0
if Timer > 3
NightMotherRef.StartConversation ArquenRef Dark18NightConvo
set Finale to 1
endif
endif
if Traitor == 1
MathieuBellamontRef.Look Player
set TraitorTimer to ( TraitorTimer + GetSecondsPassed )
endif
if Traitor == 1
if TraitorTimer > 48
MathieuBellamontRef.SetAlert 1
MathieuBellamontRef.Say Dark18TraitorTalk
ArquenRef.StopLook
;ArquenRef.Look MathieuBellamontRef
BanusAlorRef.Look MathieuBellamontRef
BelisariusAriusRef.Look MathieuBellamontRef
BanusAlorRef.SetAlert 1
BelisariusAriusRef.SetAlert 1
;ArquenRef.SetAlert 1
Set Traitor to 2
endif
endif
if Traitor == 2
set AttackTimer to ( AttackTimer + GetSecondsPassed )
endif
If Traitor == 2
if AttackTimer > 10
Set Traitor to 3
endif
endif
If Traitor == 3
BelisariusAriusRef.SetAv Health 1
BelisariusAriusRef.SetRestrained 1
BanusAlorRef.SetAV Health 1
BanusAlorRef.SetRestrained 1
MathieuBellamontRef.StartCombat BelisariusAriusRef
MathieuBellamontRef.StartCombat BanusAlorRef
NightMotherRef.StopCombat MathieuBellamontRef
NightMotherRef.ModDisposition MathieuBellamontRef 50
Set Traitor to 4
endif
if ArquenGasp == 0 && Accuse == 0
if Traitor == 4
if BanusAlorRef.getdead == 1
if BelisariusAriusRef.getdead == 1
ArquenRef.SayTo Player Dark18ArquenTalk
;MathieuBellamontRef.StartCombat Player
MathieuBellamontRef.StartCombat NightMotherRef
NightMotherRef.StopCombat MathieuBellamontRef
NightMotherRef.SetActorValue "Aggression" , 0
set Accuse to 1
endif
endif
endif
endif
if Accuse == 1
set AccuseTimer to ( AccuseTimer + GetSecondsPassed )
endif
if Accuse == 1
if AccuseTimer > 7
set ArquenGasp to 1
set Accuse to 2
set AccuseTimer to 0
endif
endif
If ArquenGasp == 1
ArquenRef.SetAv Health 2000
EnablePlayerControls
NightMotherRef.StopCombat MathieuBellamontRef
NightMotherRef.SetActorValue "Aggression" , 0
ArquenRef.StartCombat MathieuBellamontRef
;MathieuBellamontRef.StartCombat ArquenRef
MathieuBellamontRef.StartCombat Player
set ArquenGasp to 2
NightMotherRef.EvaluatePackage
endif
if ArquenGasp == 2
if MathieuBellamontRef.getdead == 1
ArquenRef.StopCombat Player
ArquenRef.SetActorValue "Aggression" , 0
SetStage Dark18Mother 40
set Dark00General.ArquenBravilGreet to 3
set ArquenGasp to 3
set HappyEnding to 1
endif
endif
if HappyEnding == 1
set AllOverTimer to ( AllOverTimer + GetSecondsPassed )
endif
if HappyEnding == 1
if AllOverTimer > 5
NightMotherRef.StartConversation player, Greeting
Set HappyEnding to 2
endif
endif
if NightMotherSleep == 1
ArquenRef.SetFactionRank DarkBrotherhood 3
ArquenRef.SetFactionRank DarkRitualFaction -1
NightMotherCryptDoorRef.Disable
set NightMotherSleep to 2
ArquenRef.MoveToMarker SancArquenRef
Player.MoveToMarker SancPlayerRef
endif
if NightMotherSleep == 2 && Player.GetInCell CheydinhalSanctuary == 1
SetStage Dark18Mother 60
set NightMotherSleep to 3
endif
;If NightMotherSleep == 1
;If ArquenRef.GetInCell CheydinhalSanctuary == 1
;If Player.GetInCell CheydinhalSanctuary == 1
;ArquenRef.StartConversation player, Greeting
;set NightMotherSleep to 2
;endif
;endif
;endif
if ArquenStatue == 0 && Prayer == 1 && Stand == 1
;if ArquenStatue == 0 && Prayer == 2
;if ArquenRef.GetDistance ArquenRitualRef <= 25
ArquenRef.Say Dark18ArquenPrayer
set ArquenStatue to 1
;endif
endif
if Prayer == 2
set StatueTimer to ( StatueTimer + GetSecondsPassed )
endif
if StatueMove == 0
if StatueTimer > 10
set StatueMove to 1
set StatueTimer to 0
endif
endif
If StatueMove == 1
Playsound "AMBNightMotherStatue"
NightMotherBaseRef.playgroup equip 1
NightMotherStatueRef.playgroup equip 1
set StatueMove to 2
endif
if StatueMove == 2
set IntoCryptTimer to ( IntoCryptTimer + GetSecondsPassed )
endif
if MoveOut == 0
if IntoCryptTimer > 5
Set Dark00General.ArquenBravilGreet to 2
SetStage Dark18Mother 30
Set IntoCryptTimer to 0
Set MoveOut to 1
endif
endif
;if PopUp == 0
;if MoveOut == 1
;if ArquenRef.GetInCell BravilCryptOfTheNightMother == 1
;if MathieuBellamontRef.GetInCell BravilCryptOfTheNightMother == 1
;if BelisariusAriusRef.GetInCell BravilCryptOfTheNightMother == 1
;if BanusAlorRef.GetInCell BravilCryptOfTheNightMother == 1
;SetStage Dark18Mother 30
;Set PopUp to 1
;endif
;endif
;endif
;endif
endif
;endif
End |