Scriptname aaAlliriaMaterialPlayerAliasScript extends ReferenceAlias

Perk Property aaAlliriaRCRwaPlayerPerk auto
Spell Property aaARCRWeapArmMatSpecBase auto
Spell Property aaARCRabilityWeapArmMatSpecDrag auto
Spell Property aaARCRabilityDraugr auto
Spell Property aaARCRabilityDragon auto
Alias Property AlliriaRCRplayerAliasA Auto
    
Event OnInit()
    Utility.Wait(3.0) 
    Actor ARCRplayerRef = AlliriaRCRplayerAliasA.GetActorReference()
    if ARCRplayerRef.HasPerk(aaAlliriaRCRwaPlayerPerk)
        ARCRplayerRef.RemovePerk(aaAlliriaRCRwaPlayerPerk)
        ARCRplayerRef.RemoveSpell(aaARCRWeapArmMatSpecBase)
        ARCRplayerRef.RemoveSpell(aaARCRabilityDraugr)
        ARCRplayerRef.RemoveSpell(aaARCRabilityDragon)
        ARCRplayerRef.RemoveSpell(aaARCRabilityWeapArmMatSpecDrag)
        ARCRplayerRef.addperk(aaAlliriaRCRwaPlayerPerk)
        Utility.Wait(2.0) 
    else
        ARCRplayerRef.AddPerk(aaAlliriaRCRwaPlayerPerk)
    endif
    ARCRplayerRef = none
EndEvent