enderalse/source/scripts/_00e_dgintimidatealiasscript.psc

48 lines
1.6 KiB
Plaintext

scriptName _00E_DGIntimidateAliasScript extends ReferenceAlias
;-- Properties --------------------------------------
Weapon property UnarmedWeapon auto
Faction Property DGIntimidateFaction Auto
;-- Variables ---------------------------------------
;-- Functions ---------------------------------------
Event OnUpdate()
actor pActor = self.GetActorReference()
if pActor.IsInCombat() == 0 && pActor.IsBleedingOut() == 0 && GetOwningQuest().GetCurrentStageID() <= 15 ;&& GetOwningQuest().GetCurrentStageID() < 15
GetOwningQuest().SetCurrentStageID(200)
endIf
EndEvent
Event OnEnterBleedout()
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
GetOwningQuest().SetCurrentStageID(150)
endIf
EndEvent
Event OnHit(ObjectReference akAggressor, Form akWeapon, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked)
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)
GetOwningQuest().SetCurrentStageID(150)
endIf
else
GetOwningQuest().SetCurrentStageID(150)
endIf
EndEvent