enderalse/source/scripts/_00e_fs_nqr03_pagecountersc.psc

46 lines
1.3 KiB
Plaintext

Scriptname _00E_FS_NQR03_PageCounterSC extends ObjectReference
;=====================================================================================
; EVENTS
;=====================================================================================
Event OnCellAttach()
If Self.Is3DLoaded()
Self.SetMotionType(4)
EndIf
EndEvent
Event OnRead()
if !Done && !(FS_NQR03.IsObjectiveCompleted(35))
FS_NQR03_NessahPageCounter.SetValue(FS_NQR03_NessahPageCounter.GetValue() + 1)
FS_NQR03.UpdateCurrentInstanceGlobal(FS_NQR03_NessahPageCounter)
int CurrentCount = FS_NQR03_NessahPageCounter.GetValueInt()
if CurrentCount >= 3
FS_NQR03.SetObjectiveCompleted(35)
Levelsystem.GiveEP(FS_NQR03.iPagesRewardEXP)
ElseIf CurrentCount < 3
FS_NQR03.SetObjectiveCompleted(35,0)
FS_NQR03.SetObjectiveDisplayed(35, True, True)
Done = 1
EndIf
ElseIf Done
Return
EndIf
EndEvent
;=====================================================================================
; PROPERTIES
;=====================================================================================
bool Done
_00E_QuestFunctions Property Levelsystem Auto
_00E_FS_NQR03_Functions Property FS_NQR03 Auto
GlobalVariable Property FS_NQR03_NessahPageCounter Auto