105 lines
3.2 KiB
Plaintext
105 lines
3.2 KiB
Plaintext
|
Scriptname _00E_Kontorworker2KillMercenary extends ReferenceAlias
|
||
|
|
||
|
Import _00E_QuestFunctions
|
||
|
Import Utility
|
||
|
;=====================================================================================
|
||
|
; EVENTS
|
||
|
;=====================================================================================
|
||
|
Event OnInit()
|
||
|
|
||
|
akSelf = Self.GetActorReference()
|
||
|
|
||
|
EndEvent
|
||
|
|
||
|
Event OnUpdate()
|
||
|
|
||
|
if _00E_NQ_G_07Dijaam_Mercenary02REF.IsDead() == false
|
||
|
|
||
|
if !(akSelf.GetCombatTarget() == _00E_NQ_G_07Dijaam_Mercenary02REF) || !(akSelf.IsInCombat())
|
||
|
akSelf.StartCombat(_00E_NQ_G_07Dijaam_Mercenary02REF)
|
||
|
ElseIf (akSelf.GetDistance(_00E_NQ_G_07Dijaam_Mercenary02REF) <= 100)
|
||
|
akSelf.PlayIdleWithTarget(pa_1HMKillMoveShortA, _00E_NQ_G_07Dijaam_Mercenary02REF)
|
||
|
|
||
|
Wait(2)
|
||
|
|
||
|
akSelf.GetActorBase().SetEssential(false)
|
||
|
akSelf.StartCombat(_00E_SC_DijaamOnelys)
|
||
|
EndIf
|
||
|
|
||
|
Else
|
||
|
|
||
|
akSelf.GetActorBase().SetEssential(false)
|
||
|
|
||
|
If !(akSelf.GetCombatTarget() == _00E_SC_DijaamOnelys) || !(akSelf.IsInCombat())
|
||
|
akSelf.StartCombat(_00E_SC_DijaamOnelys)
|
||
|
EndIf
|
||
|
|
||
|
EndIf
|
||
|
|
||
|
if !(akSelf.IsDead())
|
||
|
RegisterForSingleUpdate(0.5)
|
||
|
EndIf
|
||
|
|
||
|
EndEvent
|
||
|
;=====================================================================================
|
||
|
; FUNCTIONS
|
||
|
;=====================================================================================
|
||
|
Function KillMercenary()
|
||
|
|
||
|
; if _00E_NQ_G_07Dijaam_Mercenary02REF.IsDead() == false
|
||
|
|
||
|
; if !(akSelf.GetCombatTarget() == _00E_NQ_G_07Dijaam_Mercenary02REF) || !(akSelf.IsInCombat())
|
||
|
; akSelf.StartCombat(_00E_NQ_G_07Dijaam_Mercenary02REF)
|
||
|
; ElseIf (akSelf.GetDistance(_00E_NQ_G_07Dijaam_Mercenary02REF) <= 100)
|
||
|
; akSelf.PlayIdleWithTarget(pa_1HMKillMoveShortA, _00E_NQ_G_07Dijaam_Mercenary02REF)
|
||
|
|
||
|
; Wait(2)
|
||
|
|
||
|
; akSelf.GetActorBase().SetEssential(false)
|
||
|
; akSelf.StartCombat(_00E_SC_DijaamOnelys)
|
||
|
; EndIf
|
||
|
|
||
|
; Else
|
||
|
|
||
|
; akSelf.GetActorBase().SetEssential(false)
|
||
|
|
||
|
; If !(akSelf.GetCombatTarget() == _00E_SC_DijaamOnelys) || !(akSelf.IsInCombat())
|
||
|
; akSelf.StartCombat(_00E_SC_DijaamOnelys)
|
||
|
; EndIf
|
||
|
|
||
|
; EndIf
|
||
|
|
||
|
; RegisterForSingleUpdate(0.5)
|
||
|
|
||
|
If _00E_NQ_G_07Dijaam_Mercenary02REF.IsDead() == false
|
||
|
if akSelf.GetCombatTarget() == _00E_NQ_G_07Dijaam_Mercenary02REF && akSelf.GetDistance(_00E_NQ_G_07Dijaam_Mercenary02REF) <= 100
|
||
|
akSelf.PlayIdleWithTarget(pa_1HMKillMoveShortA, _00E_NQ_G_07Dijaam_Mercenary02REF)
|
||
|
|
||
|
Wait(2)
|
||
|
|
||
|
akSelf.GetActorBase().SetEssential(false)
|
||
|
akSelf.SetActorValue("Aggression", 2)
|
||
|
Else
|
||
|
akSelf.StartCombat(_00E_NQ_G_07Dijaam_Mercenary02REF)
|
||
|
_00E_NQ_G_07Dijaam_Mercenary02REF.StartCombat(akSelf)
|
||
|
Wait(5)
|
||
|
KillMercenary()
|
||
|
EndIf
|
||
|
Else
|
||
|
akSelf.SetActorValue("Aggression", 2)
|
||
|
akSelf.GetActorBase().SetEssential(false)
|
||
|
EndIf
|
||
|
|
||
|
EndFunction
|
||
|
|
||
|
;=====================================================================================
|
||
|
; PROPERTIES
|
||
|
;=====================================================================================
|
||
|
Actor akSelf
|
||
|
|
||
|
;animation for killmove
|
||
|
Idle Property pa_1HMKillMoveShortA Auto
|
||
|
|
||
|
;actors
|
||
|
Actor Property _00E_NQ_G_07Dijaam_Mercenary02REF Auto
|
||
|
Actor Property _00E_SC_DijaamOnelys Auto
|