enderalse/source/scripts/_00e_dgintimidatealiasscript.psc

48 lines
1.5 KiB
Plaintext

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