enderalse/source/scripts/_00e_dgintimidatealiasscript.psc

48 lines
1.6 KiB
Plaintext
Raw Normal View History

scriptName _00E_DGIntimidateAliasScript extends ReferenceAlias
;-- Properties --------------------------------------
Weapon property UnarmedWeapon auto
Faction Property DGIntimidateFaction Auto
;-- Variables ---------------------------------------
;-- Functions ---------------------------------------
Event OnUpdate()
2023-12-08 02:57:30 +00:00
actor pActor = self.GetActorReference()
2024-01-10 14:08:24 +00:00
if pActor.IsInCombat() == 0 && pActor.IsBleedingOut() == 0 && GetOwningQuest().GetCurrentStageID() <= 15 ;&& GetOwningQuest().GetCurrentStageID() < 15
GetOwningQuest().SetCurrentStageID(200)
endIf
EndEvent
Event OnEnterBleedout()
2024-01-10 14:08:24 +00:00
GetOwningQuest().SetCurrentStageID(15)
self.GetActorReference().EvaluatePackage()
Utility.Wait(3)
self.GetActorReference().StopCombat()
EndEvent
Event OnMagicEffectApply(ObjectReference akCaster, MagicEffect akEffect)
if akCaster == game.GetPlayer() && akEffect.IsEffectFlagSet(0x00000001) ; Hit by player with a hostile ME
2024-01-10 14:08:24 +00:00
GetOwningQuest().SetCurrentStageID(150)
endIf
EndEvent
Event OnHit(ObjectReference akAggressor, Form akWeapon, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked)
2023-12-08 02:57:30 +00:00
actor pActor = self.GetActorReference()
actor pPlayer = game.GetPlayer()
if akAggressor == pPlayer
if akProjectile || (akWeapon && akWeapon != UnarmedWeapon)
pPlayer.RemoveFromFaction(DGIntimidateFaction)
pActor.RemoveFromFaction(DGIntimidateFaction)
pActor.StopCombat()
pActor.SendAssaultAlarm()
pActor.StartCombat(pPlayer)
2024-01-10 14:08:24 +00:00
GetOwningQuest().SetCurrentStageID(150)
endIf
else
2024-01-10 14:08:24 +00:00
GetOwningQuest().SetCurrentStageID(150)
endIf
EndEvent