enderalse/scripts/source/_00e_smoking_absmokingsittingsc.psc

88 lines
2.6 KiB
Plaintext

Scriptname _00E_Smoking_AbSmokingSittingSC extends activemagiceffect
Import Debug
Import Utility
;=====================================================================================
; EVENTS
;=====================================================================================
Event OnEffectStart(Actor akTarget, Actor akCaster)
akSelfActor = akTarget as Actor
If (akSelfActor.HasSpell(_00E_Smoking_abSmokingSitting))
; _00E_QuestFunctions.PrintDebugMessage("Start smoking.")
EndIf
StartSmokingAnimationSitting()
while !(akSelfActor.IsInCombat()) && (akSelfActor.HasSpell(_00E_Smoking_abSmokingSitting))
; _00E_QuestFunctions.PrintDebugMessage("Loop smoking.")
SmokingLoopSitting()
endwhile
Self.Dispel()
EndEvent
Event OnEffectFinish(Actor akTarget, Actor akCaster)
StopSmokingAnimationSitting()
EndEvent
;=====================================================================================
; FUNCTIONS
;=====================================================================================
Function StartSmokingAnimationSitting()
SendAnimationEvent(akSelfActor, "pipesmokingcrossleggedenter")
Wait(1.50000)
_00E_Smoking_PipeSmokingFlameEffect.Play(akSelfActor, -1 as Float, none)
Wait(1.50000)
SendAnimationEvent(akSelfActor, "pipesmokingcrossleggedstartblaze")
SendAnimationEvent(akSelfActor, "pipesmokingcrossleggedblazed")
_00E_Smoking_PipeSmokingSmokeExhaleEffect.Play(akSelfActor, -1 as Float, none)
_00E_Smoking_PipeSmokingFlameEffect.Stop(akSelfActor)
Wait(2.00000)
_00E_Smoking_PipeSmokingSmokeExhaleEffect.Stop(akSelfActor)
Wait(2.00000)
EndFunction
Function SmokingLoopSitting()
SendAnimationEvent(akSelfActor, "pipesmokingcrosslegged")
Wait(6.00000)
_00E_Smoking_PipeSmokingSmokeExhaleEffect.Play(akSelfActor, -1 as Float, none)
Wait(3.00000)
_00E_Smoking_PipeSmokingSmokeExhaleEffect.Stop(akSelfActor)
EndFunction
Function StopSmokingAnimationSitting()
_00E_Smoking_PipeSmokingSmokeExhaleEffect.Stop(akSelfActor)
SendAnimationEvent(akSelfActor, "pipesmokingcrossleggedexit")
Wait(3.00000)
akSelfActor.PlayIdle(IdleStop_Loose)
akSelfActor.SetDontMove(false)
EndFunction
;=====================================================================================
; PROPERTIES
;=====================================================================================
Actor akSelfActor
Idle Property IdleStop_Loose Auto
visualeffect property _00E_Smoking_PipeSmokingFlameEffect auto
visualeffect property _00E_Smoking_PipeSmokingSmokeExhaleEffect auto
Spell Property _00E_Smoking_abSmokingSitting Auto