2021-10-05 22:15:58 +00:00
|
|
|
Scriptname _00E_DGIntimidatePlayerScript extends ReferenceAlias
|
|
|
|
|
|
|
|
import game
|
|
|
|
|
|
|
|
Event OnHit(ObjectReference akAggressor, Form akWeapon, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked)
|
|
|
|
; if the player is hit with any weapon other than hands, or by anyone but the brawlers
|
|
|
|
if akAggressor != Opponent.GetRef() && akAggressor != OpponentFriend.GetRef()
|
2024-01-10 14:08:24 +00:00
|
|
|
GetOwningQuest().SetCurrentStageID(200)
|
2021-10-05 22:15:58 +00:00
|
|
|
endif
|
|
|
|
endEvent
|
|
|
|
|
|
|
|
Event OnMagicEffectApply(ObjectReference akCaster, MagicEffect akEffect)
|
|
|
|
; if player is hit with any magic effect (not by himself)
|
|
|
|
if akCaster != GetPlayer()
|
2024-01-10 14:08:24 +00:00
|
|
|
GetOwningQuest().SetCurrentStageID(150)
|
2021-10-05 22:15:58 +00:00
|
|
|
endif
|
|
|
|
endEvent
|
|
|
|
|
|
|
|
Event OnEnterBleedout()
|
|
|
|
; Debug.Trace("player enters bleedout")
|
|
|
|
GetPlayer().SetNoBleedoutRecovery(false)
|
2024-01-10 14:08:24 +00:00
|
|
|
GetOwningQuest().SetCurrentStageID(180)
|
2021-10-05 22:15:58 +00:00
|
|
|
Utility.Wait(7)
|
2024-01-10 14:08:24 +00:00
|
|
|
GetOwningQuest().SetCurrentStageID(200)
|
2021-10-05 22:15:58 +00:00
|
|
|
EndEvent
|
|
|
|
|
|
|
|
Event OnLocationChange(Location akOldLoc, Location akNewLoc)
|
2023-12-08 02:57:30 +00:00
|
|
|
if GetPlayer().IsInLocation(Opponent.GetActorReference().GetCurrentLocation()) == False
|
2021-10-05 22:15:58 +00:00
|
|
|
; Debug.Trace(self + "Player has left opponent's location, shutting down")
|
2024-01-10 14:08:24 +00:00
|
|
|
GetOwningQuest().SetCurrentStageID(200)
|
2021-10-05 22:15:58 +00:00
|
|
|
endIf
|
|
|
|
endEvent
|
|
|
|
|
|
|
|
|
|
|
|
; Version update
|
|
|
|
Int curScriptVersion = 0
|
|
|
|
Int Property LATEST_SCRIPT_VERSION = 1 AutoReadOnly
|
|
|
|
|
|
|
|
Function Setup()
|
|
|
|
curScriptVersion = LATEST_SCRIPT_VERSION
|
|
|
|
EndFunction
|
|
|
|
|
|
|
|
Event OnPlayerLoadGame()
|
|
|
|
If curScriptVersion < LATEST_SCRIPT_VERSION
|
|
|
|
curScriptVersion = LATEST_SCRIPT_VERSION
|
|
|
|
|
2024-01-10 14:08:24 +00:00
|
|
|
Int curStage = GetOwningQuest().GetCurrentStageID()
|
2021-10-05 22:15:58 +00:00
|
|
|
If curStage >= 150 && curStage < 200 ; Terminate the quest if it's stuck
|
2024-01-10 14:08:24 +00:00
|
|
|
GetOwningQuest().SetCurrentStageID(200)
|
2021-10-05 22:15:58 +00:00
|
|
|
EndIf
|
|
|
|
EndIf
|
|
|
|
EndEvent
|
|
|
|
|
|
|
|
|
|
|
|
ReferenceAlias Property Opponent Auto
|
|
|
|
ReferenceAlias Property OpponentFriend Auto
|