Scriptname ka_DoorExplSCRIPT extends ObjectReference  

actor property playerRef Auto
bool property isOpened Auto
armor property Robes Auto
armor property RobesA Auto
objectreference property Resonance Auto
objectreference property wallWhisper Auto
objectreference property door02 Auto
objectreference property door03 Auto
keyword property MagicShout auto

bool isOpened = FALSE

EVENT onLoad()
if isOpened == FALSE
	PlayAnimation("Take")
	door02.PlayAnimation("Take")
	door03.PlayAnimation("Take")
endIf
endEVENT

Event OnMagicEffectApply(ObjectReference AkCaster, MagicEffect AkEffect)	
if isOpened == FALSE && AkCaster == playerRef && (playerRef.IsEquipped(robes) || playerRef.IsEquipped(robesA)) && akEffect.HasKeyword(MagicShout)
			isOpened = TRUE
			Resonance.disable()
			wallWhisper.disable()
			PlayAnimation("open")
			utility.wait(0.25)
			door02.PlayAnimation("open")
			utility.wait(0.25)
			door03.PlayAnimation("open")	
endif
endEVENT