ScriptName VCA_Affinity_Holotape_Init extends ReferenceAlias

;-- Properties --------------------------------------
Form Property Affinity_Holotape_Item Auto
Quest Property MQ102 Auto Const

;-- Variables ---------------------------------------

;-- Functions ---------------------------------------

Event OnInit()
    If (MQ102.IsStageDone(6))
		Game.GetPlayer().AddItem(Affinity_Holotape_Item, 1, False)
		Self.Clear()
    Else
        RegisterForRemoteEvent(MQ102, "OnStageSet")
    EndIf
EndEvent

Event Quest.OnStageSet(Quest akSender, int auiStageID, int auiItemID)
    If (akSender == MQ102 && auiStageID == 6)
        Game.GetPlayer().AddItem(Affinity_Holotape_Item, 1, False)
        UnregisterForRemoteEvent(MQ102, "OnStageSet")
		Self.Clear()
    EndIf
EndEvent