enderalse/source/scripts/qf_dgintimidatequest_0011a493.psc

189 lines
5.3 KiB
Plaintext
Raw Normal View History

;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment
;NEXT FRAGMENT INDEX 16
Scriptname QF_DGIntimidateQuest_0011A493 Extends Quest Hidden
;BEGIN ALIAS PROPERTY opponent
;ALIAS PROPERTY TYPE ReferenceAlias
ReferenceAlias Property Alias_opponent Auto
;END ALIAS PROPERTY
;BEGIN ALIAS PROPERTY Friend1
;ALIAS PROPERTY TYPE ReferenceAlias
ReferenceAlias Property Alias_Friend1 Auto
;END ALIAS PROPERTY
;BEGIN ALIAS PROPERTY OpponentFriend
;ALIAS PROPERTY TYPE ReferenceAlias
ReferenceAlias Property Alias_OpponentFriend Auto
;END ALIAS PROPERTY
;BEGIN ALIAS PROPERTY Player
;ALIAS PROPERTY TYPE ReferenceAlias
ReferenceAlias Property Alias_Player Auto
;END ALIAS PROPERTY
;BEGIN ALIAS PROPERTY Bystander4
;ALIAS PROPERTY TYPE ReferenceAlias
ReferenceAlias Property Alias_Bystander4 Auto
;END ALIAS PROPERTY
;BEGIN ALIAS PROPERTY Bystander2
;ALIAS PROPERTY TYPE ReferenceAlias
ReferenceAlias Property Alias_Bystander2 Auto
;END ALIAS PROPERTY
;BEGIN ALIAS PROPERTY Bystander5
;ALIAS PROPERTY TYPE ReferenceAlias
ReferenceAlias Property Alias_Bystander5 Auto
;END ALIAS PROPERTY
;BEGIN ALIAS PROPERTY Bystander1
;ALIAS PROPERTY TYPE ReferenceAlias
ReferenceAlias Property Alias_Bystander1 Auto
;END ALIAS PROPERTY
;BEGIN ALIAS PROPERTY Bystander3
;ALIAS PROPERTY TYPE ReferenceAlias
ReferenceAlias Property Alias_Bystander3 Auto
;END ALIAS PROPERTY
;BEGIN FRAGMENT Fragment_3
Function Fragment_3()
;BEGIN AUTOCAST TYPE DGIntimidateQuestScript
Quest __temp = self as Quest
DGIntimidateQuestScript kmyQuest = __temp as DGIntimidateQuestScript
;END AUTOCAST
;BEGIN CODE
; Stage 10: Start
; fill the alias if this is CR04 and don't end quest if player fights dirty
2023-12-08 02:57:30 +00:00
Actor OpponentREF = Alias_Opponent.GetActorReference()
Actor FriendREF = Alias_OpponentFriend.GetActorReference()
(Alias_Player as _00E_DGIntimidatePlayerScript).Setup()
;make sure the opponent doesn't run
2023-12-08 02:45:53 +00:00
kmyquest.OpponentCon = OpponentREF.GetActorValue("Confidence") as int
OpponentREF.SetActorValue("Confidence", 4)
;remove player's weapons
_FS_TheriantrophistControlQuest theriantrophistQuest = _FS_TheriantrophistControlQuest.getControlQuest()
If theriantrophistQuest.IsTransformed()
_FS_TheriantrophistControlQuest.TransformBackIfTransformed()
Utility.Wait(1)
EndIf
Game.GetPlayer().EquipItem(Unarmed, abSilent=True)
OpponentREF.EquipItem(Unarmed, abSilent=True)
OpponentREF.StartCombat(Game.GetPlayer())
; if friend exists, start combat as well
if FriendREF
FriendREF.EquipItem(Unarmed, abSilent=True)
FriendREF.StartCombat(Game.GetPlayer())
endif
Alias_Opponent.RegisterForUpdate(5)
if FriendREF
Alias_OpponentFriend.RegisterForUpdate(5)
endif
;END CODE
EndFunction
;END FRAGMENT
;BEGIN FRAGMENT Fragment_11
Function Fragment_11()
;BEGIN AUTOCAST TYPE DGIntimidateQuestScript
Quest __temp = self as Quest
DGIntimidateQuestScript kmyQuest = __temp as DGIntimidateQuestScript
;END AUTOCAST
;BEGIN CODE
; Stage 20: forcegreet is done (never happens in Enderal)
2023-12-08 02:57:30 +00:00
Alias_Opponent.GetActorReference().EvaluatePackage()
;END CODE
EndFunction
;END FRAGMENT
;BEGIN FRAGMENT Fragment_10
Function Fragment_10()
;BEGIN AUTOCAST TYPE DGIntimidateQuestScript
Quest __temp = self as Quest
DGIntimidateQuestScript kmyQuest = __temp as DGIntimidateQuestScript
;END AUTOCAST
;BEGIN CODE
; Stage 200: End quest (1st phase)
2023-12-08 02:57:30 +00:00
Actor OpponentREF = Alias_Opponent.GetActorReference()
Actor OpponentFriendREF = Alias_OpponentFriend.GetActorReference()
Actor PlayerREF = Game.GetPlayer()
OpponentREF.AllowBleedoutDialogue(False)
2023-12-08 02:45:53 +00:00
OpponentREF.SetActorValue("Confidence", kmyquest.OpponentCon)
Alias_Opponent.UnregisterForUpdate()
if OpponentFriendREF
Alias_OpponentFriend.UnregisterForUpdate()
endif
; if player lost, restore health to above 0
kmyQuest.RestoreActorHealthOnBleedOut(PlayerREF)
; if opponent is down, restore health to above 0
kmyQuest.RestoreActorHealthOnBleedOut(OpponentREF)
; if opponentfriend is down, restore health to above 0
if OpponentFriendREF
kmyQuest.RestoreActorHealthOnBleedOut(OpponentFriendREF)
endif
Stop()
;END CODE
EndFunction
;END FRAGMENT
;BEGIN FRAGMENT Fragment_15
Function Fragment_15()
;BEGIN CODE
; Stage 250: Terminating quest (stage 150 done)
;END CODE
EndFunction
;END FRAGMENT
;BEGIN FRAGMENT Fragment_9
Function Fragment_9()
;BEGIN CODE
; Stage 15: opponent is down, cue victory dialogue (victory dialogue does not happen in Enderal)
2023-12-08 02:57:30 +00:00
Actor myOpponent = Alias_Opponent.GetActorReference()
myOpponent.AllowBleedoutDialogue(True)
Game.IncrementStat( "Brawls Won" )
;END CODE
EndFunction
;END FRAGMENT
;BEGIN FRAGMENT Fragment_5
Function Fragment_5()
;BEGIN CODE
; Stage 100: player's victory, victory forcegreet done (does not happen in Enderal)
; Game.IncrementStat( "Brawls Won" ) ; Moved to Stage 15
2024-01-10 14:08:24 +00:00
SetCurrentStageID(200)
;END CODE
EndFunction
;END FRAGMENT
;BEGIN FRAGMENT Fragment_14
Function Fragment_14()
;BEGIN CODE
; Stage 250: Terminating quest (stage 150 not done)
; if the player hasn't cheated, stop combat
; debug.Trace(self + "Stopping Brawl combat alarm")
Game.GetPlayer().StopCombatAlarm()
;make sure player's hired hands don't aggro
2023-12-08 02:57:30 +00:00
Alias_Opponent.GetActorReference().StopCombatAlarm()
If Alias_OpponentFriend.GetActorReference() != None
Alias_OpponentFriend.GetActorReference().StopCombatAlarm()
EndIf
;END CODE
EndFunction
;END FRAGMENT
;END FRAGMENT CODE - Do not edit anything between this and the begin comment
Weapon Property Unarmed Auto