enderalse/source/scripts/_00e_mq01_gourdsscript.psc

28 lines
785 B
Plaintext

Scriptname _00E_MQ01_GourdsScript extends ObjectReference
Event OnActivate(ObjectReference akActionRef)
If doOnce == 0 && !(MQ01_UnchartedLand.IsObjectiveCompleted(10))
_00E_MQ01_GourdsFound.SetValue(_00E_MQ01_GourdsFound.GetValue() + 1)
MQ01_UnchartedLand.UpdateCurrentInstanceGlobal(_00E_MQ01_GourdsFound)
int CurrentCount = _00E_MQ01_GourdsFound.GetValueInt()
If CurrentCount >= 5
MQ01_UnchartedLand.SetObjectiveCompleted(10, 1)
_00E_EPHandler.GiveEP(50)
ElseIf CurrentCount < 5
MQ01_UnchartedLand.SetObjectiveCompleted(10,0)
MQ01_UnchartedLand.SetObjectiveDisplayed(10, True, True)
doOnce = 1
EndIf
ElseIf doOnce == 1
Return
EndIf
EndEvent
Quest Property MQ01_UnchartedLand Auto
GlobalVariable Property _00E_MQ01_GourdsFound Auto
int doOnce