64 lines
2.0 KiB
Plaintext
64 lines
2.0 KiB
Plaintext
Scriptname _00E_ArmorSetScript extends ObjectReference
|
|
|
|
;=====================================================================================
|
|
; EVENTS
|
|
;=====================================================================================
|
|
|
|
Event OnEquipped(Actor akActor)
|
|
;this event won't be sent by SKSE / SkyUI when using he Equip Mode of SkyUI to directly equip an item from another container.
|
|
;the same goes for the OnObjectEquipped event, hence we need the work around in OnContainerChanged
|
|
if akActor == PlayerREF
|
|
ChangeSet(0)
|
|
EndIf
|
|
|
|
EndEvent
|
|
|
|
Event OnUnequipped(Actor akActor)
|
|
|
|
if akActor == PlayerREF
|
|
ChangeSet(1)
|
|
EndIf
|
|
|
|
EndEvent
|
|
|
|
Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer)
|
|
|
|
utility.WaitMenuMode(0.5)
|
|
If akNewContainer == PlayerREF
|
|
ChangeSet(2)
|
|
EndIf
|
|
|
|
EndEvent
|
|
|
|
;=====================================================================================
|
|
; FUNCTIONS
|
|
;=====================================================================================
|
|
|
|
Function ChangeSet(int iAction)
|
|
|
|
If Levelsystem == None
|
|
Levelsystem = Game.GetFormFromFile(0x00010AA2, "Skyrim.esm") As _00E_Questfunctions
|
|
EndIf
|
|
Levelsystem.OnSetChanged(__Config_SetGlobal, __Config_SetBonusesList, __Config_SetList, __Config_5Pieces, iAction)
|
|
|
|
EndFunction
|
|
|
|
;=====================================================================================
|
|
; PROPERTIES
|
|
;=====================================================================================
|
|
|
|
Bool Property __Config_5Pieces Auto
|
|
{Does this set have five pieces? Default: False}
|
|
|
|
_00E_Questfunctions Property Levelsystem Auto
|
|
|
|
GlobalVariable Property __Config_SetGlobal Auto
|
|
{The global associated with this set. Example _25E_HSet_FallenOneGlobal.}
|
|
|
|
Formlist Property __Config_SetBonusesList Auto
|
|
{The formlist containing the spell bonuses of the set.}
|
|
|
|
Formlist Property __Config_SetList Auto
|
|
{The formlist containing the set pieces.}
|
|
|
|
Actor Property PlayerREF Auto |