enderalse/source/scripts/_00e_fs_mysticalsymbolsc.psc

63 lines
1.8 KiB
Plaintext

Scriptname _00E_FS_MysticalSymbolSC extends ObjectReference
import math
;=====================================================================================
; EVENTS
;=====================================================================================
Event OnActivate(ObjectReference akActionRef)
if DoOnce == False
objLight.Delete()
Self.Disable()
DoOnce = True
EndIf
if akActionRef == Game.GetPlayer()
_00E_FS_MysticalSymbolsGlobalCollected.SetValue(_00E_FS_MysticalSymbolsGlobalCollected.GetValueInt() + 1)
_00E_FS_Levelsystem_MysticalSymbolCollected.Show(_00E_FS_MysticalSymbolsGlobalCollected.GetValueInt(), _00E_FS_MysticalSymbolsGlobalTotal.GetValueInt())
_00E_MagicalSymbolSound.Play(Game.GetPlayer())
objLight.Delete()
self.disable()
int EXPBonus = (_00E_FS_MysticalSymbolsGlobalCollected.GetValueInt() * 2)
_00E_EPHandler.GiveEp(RewardExp+EXPBonus)
If _00E_FS_MysticalSymbolsGlobalCollected.GetValueInt() == 15
Steam.UnlockAchievement("END_FETCHQUEST_02")
EndIf
endIf
endEvent
event OnLoad()
objLight = Self.PlaceAtMe(_00E_FS_MysticalSymbolLight)
endEvent
event OnUnload()
objLight.Delete()
endEvent
;=====================================================================================
; PROPERTIES
;=====================================================================================
ObjectReference Property objLight Auto Hidden
Int Property RewardExp auto
Bool DoOnce = false
GlobalVariable Property _00E_FS_MysticalSymbolsGlobalCollected Auto
GlobalVariable Property _00E_FS_MysticalSymbolsGlobalTotal Auto
Light Property _00E_FS_MysticalSymbolLight Auto
Sound Property _00E_MagicalSymbolSound Auto
message Property _00E_FS_Levelsystem_MysticalSymbolCollected Auto