enderalse/scripts/source/_00e_nq29_boss_ashwidowsc.psc

52 lines
1.3 KiB
Plaintext

Scriptname _00E_NQ29_Boss_AshWidowSC extends Actor
Event OnCombatStateChanged(Actor akTarget, Int aeCombatState)
If aeCombatState == 1
FXExplosionFirestormNearM.Play(Self)
_00E_NPCMagicAnomalyScreamM.Play(Self)
NQ29.AshWidowSetWeather()
ElseIf aeCombatState == 0
NQ29.AshWidowReleaseWeather()
EndIf
EndEvent
Event OnDeath(Actor akKiller)
NQ29.AshWidowReleaseWeather()
if !NQ29.IsRunning()
NQ29.SetStage(5)
EndIf
NQ29.SetObjectiveDisplayed(15)
NQ29.SetObjectiveCompleted(15)
NQ29_MythicalCreaturesSlain.SetValue(NQ29_MythicalCreaturesSlain.GetValue() + 1)
NQ29.UpdateCurrentInstanceGlobal(NQ29_MythicalCreaturesSlain)
int CurrentCount = NQ29_MythicalCreaturesSlain.GetValueInt()
if CurrentCount >= NQ29_MythicalCreaturesMax.GetValueInt()
NQ29.SetObjectiveCompleted(0, 1)
NQ29.SetStage(10)
Else
NQ29.SetObjectiveCompleted(0,0)
NQ29.SetObjectiveDisplayed(0, True, True)
EndIf
EndEvent
Event OnUnload()
; Failsafe in case other AshWidowReleaseWeather won't be called for whatever reason
NQ29.AshWidowReleaseWeather()
EndEvent
GlobalVariable Property NQ29_MythicalCreaturesSlain Auto
GlobalVariable Property NQ29_MythicalCreaturesMax Auto
Sound Property _00E_NPCMagicAnomalyScreamM Auto
Sound Property FXExplosionFirestormNearM Auto
_00E_NQ29_Functions Property NQ29 Auto