enderalse/scripts/source/qf_dgintimidatequest_0011a493.psc

189 lines
5.2 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
Actor OpponentREF = Alias_Opponent.GetActorRef()
Actor FriendREF = Alias_OpponentFriend.GetActorRef()
(Alias_Player as _00E_DGIntimidatePlayerScript).Setup()
;make sure the opponent doesn't run
kmyquest.OpponentCon = OpponentREF.GetAV("Confidence") as int
OpponentREF.SetAv("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)
Alias_Opponent.GetActorRef().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)
Actor OpponentREF = Alias_Opponent.GetActorRef()
Actor OpponentFriendREF = Alias_OpponentFriend.GetActorRef()
Actor PlayerREF = Game.GetPlayer()
OpponentREF.AllowBleedoutDialogue(False)
OpponentREF.SetAv("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)
Actor myOpponent = Alias_Opponent.GetActorRef()
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
SetStage(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
Alias_Opponent.GetActorRef().StopCombatAlarm()
If Alias_OpponentFriend.GetActorRef() != None
Alias_OpponentFriend.GetActorRef().StopCombatAlarm()
EndIf
;END CODE
EndFunction
;END FRAGMENT
;END FRAGMENT CODE - Do not edit anything between this and the begin comment
Weapon Property Unarmed Auto