enderalse/source/scripts/_00e_phasmalist_trinketsc.psc

40 lines
1.3 KiB
Plaintext
Raw Normal View History

Scriptname _00E_Phasmalist_TrinketSC extends ObjectReference
; script on all phasmalist trinkets
_00E_Phasmalist_ApparationSC Property connectedApparation auto
2021-10-05 22:59:59 +00:00
_FS_Phasmalist_ControlQuest Property ControlQuest auto
int Property type auto ; what kind of apparition this one is, used to control arcane fever
{0 = Warrior, 1 = Archer, 2 = Mage, 3 = Hybrid}
Message Property chooseCombatStyle auto
FormList Property combatStyles auto
2021-10-05 22:59:59 +00:00
Bool hasAskedForCustomization = false
Int usedCombatStyle
Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer)
2021-10-05 22:59:59 +00:00
ControlQuest.forceInventoryContainerLoad(connectedApparation.inventoryContainer)
If akNewContainer == Game.GetPlayer() && hasAskedForCustomization == False
hasAskedForCustomization = True
ControlQuest.OnPlayerTrinketCreated()
ChooseApparitionCombatStyle()
EndIf
2021-10-05 22:59:59 +00:00
EndEvent
Event OnEquipped(Actor akActor)
2021-10-05 22:59:59 +00:00
ControlQuest.OnTrinketEquipped(Self)
EndEvent
Event OnUnequipped(Actor akActor)
2021-10-05 22:59:59 +00:00
ControlQuest.OnTrinketUnequipped(Self)
EndEvent
2021-10-05 22:59:59 +00:00
Function ChooseApparitionCombatStyle()
usedCombatStyle = chooseCombatStyle.show()
2021-10-05 22:59:59 +00:00
ControlQuest.SetApparitionCombatStyle(GetUsedCombatStyle())
EndFunction
2021-10-05 22:59:59 +00:00
CombatStyle Function GetUsedCombatStyle()
Return combatStyles.GetAt(usedCombatStyle) as CombatStyle
Endfunction