105 lines
3.2 KiB
Plaintext
105 lines
3.2 KiB
Plaintext
Scriptname _00E_KontorworkerKillMercenary extends ReferenceAlias
|
|
|
|
Import _00E_QuestFunctions
|
|
Import Utility
|
|
;=====================================================================================
|
|
; EVENTS
|
|
;=====================================================================================
|
|
Event OnInit()
|
|
|
|
akSelf = Self.GetActorReference()
|
|
|
|
EndEvent
|
|
|
|
Event OnUpdate()
|
|
|
|
if _00E_NQ_G_07Dijaam_Mercenary01REF.IsDead() == false
|
|
|
|
if !(akSelf.GetCombatTarget() == _00E_NQ_G_07Dijaam_Mercenary01REF) || !(akSelf.IsInCombat())
|
|
akSelf.StartCombat(_00E_NQ_G_07Dijaam_Mercenary01REF)
|
|
ElseIf (akSelf.GetDistance(_00E_NQ_G_07Dijaam_Mercenary01REF) <= 100)
|
|
akSelf.PlayIdleWithTarget(pa_1HMKillMoveShortB, _00E_NQ_G_07Dijaam_Mercenary01REF)
|
|
|
|
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_Mercenary01REF.IsDead() == false
|
|
|
|
; if !(akSelf.GetCombatTarget() == _00E_NQ_G_07Dijaam_Mercenary01REF) || !(akSelf.IsInCombat())
|
|
; akSelf.StartCombat(_00E_NQ_G_07Dijaam_Mercenary01REF)
|
|
; ElseIf (akSelf.GetDistance(_00E_NQ_G_07Dijaam_Mercenary01REF) <= 100)
|
|
; akSelf.PlayIdleWithTarget(pa_1HMKillMoveShortB, _00E_NQ_G_07Dijaam_Mercenary01REF)
|
|
|
|
; 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_Mercenary01REF.IsDead() == false
|
|
if akSelf.GetCombatTarget() == _00E_NQ_G_07Dijaam_Mercenary01REF && akSelf.GetDistance(_00E_NQ_G_07Dijaam_Mercenary01REF) <= 100
|
|
akSelf.PlayIdleWithTarget(pa_1HMKillMoveShortB, _00E_NQ_G_07Dijaam_Mercenary01REF)
|
|
|
|
Wait(2)
|
|
|
|
akSelf.GetActorBase().SetEssential(false)
|
|
akSelf.SetActorValue("Aggression", 2)
|
|
Else
|
|
akSelf.StartCombat(_00E_NQ_G_07Dijaam_Mercenary01REF)
|
|
_00E_NQ_G_07Dijaam_Mercenary01REF.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_1HMKillMoveShortB Auto
|
|
|
|
;actors
|
|
Actor Property _00E_NQ_G_07Dijaam_Mercenary01REF Auto
|
|
Actor Property _00E_SC_DijaamOnelys Auto |