enderalse/source/scripts/_00e_fs_waldoldtemple_crystalscr.psc

36 lines
1.3 KiB
Plaintext

Scriptname _00E_FS_WaldOldTemple_CrystalScr extends ObjectReference
Import Utility
Event OnActivate(ObjectReference akActionRef)
if(akActionRef == PlayerREF && PlayerREF.GetItemCount(_00E_FS_WaldOldTemple_Crystal) >= 1 && _00E_FS_WaldOldTemple_CrystalVar.GetValue() < 2)
PlayerREF.RemoveItem(_00E_FS_WaldOldTemple_Crystal, 1)
_00E_MagicalSymbolSound.Play(PlayerREF)
_00E_FS_WaldOldTemple_CrystalVar.SetValue(_00E_FS_WaldOldTemple_CrystalVar.GetValue()+1)
self.disable()
elseif(akActionRef == PlayerREF && PlayerREF.GetItemCount(_00E_FS_WaldOldTemple_Crystal) >= 1 && _00E_FS_WaldOldTemple_CrystalVar.GetValue() == 2)
PlayerREF.RemoveItem(_00E_FS_WaldOldTemple_Crystal, 1)
_00E_MagicalSymbolSound.Play(PlayerREF)
self.disable()
wait(1)
DRSDwemerLarge01Open.Play(PlayerREF)
wait(1)
_00E_FS_CrystalRiddleDoor.SetOpen()
_00E_FS_CrystalRiddleDoor.lock(false)
else
_00E_FS_WaldOldTemple_CrystalMessage.Show()
Endif
EndEvent
MiscObject Property _00E_FS_WaldOldTemple_Crystal Auto
Message Property _00E_FS_WaldOldTemple_CrystalMessage Auto
GlobalVariable Property _00E_FS_WaldOldTemple_CrystalVar Auto
ObjectReference Property _00E_FS_CrystalRiddleDoor Auto
Actor Property PlayerREF Auto
Sound Property _00E_MagicalSymbolSound Auto
Sound Property DRSDwemerLarge01Open Auto