Enderal SE https://mod.pub/enderal-se/38-enderal-se
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
698 B
20 lines
698 B
Scriptname _00E_Phasmalist_FakeTrinketSC extends ObjectReference
|
|
; script on all fake phasmalist trinkets that adds the real trinket to the player
|
|
; fixes issue 382 which was a report about making the trinkets quest items
|
|
|
|
ObjectReference Property Phasmalist_TrinketChestREF Auto
|
|
Armor Property TrinketToAdd Auto
|
|
Armor Property FakeTrinketToRemove Auto
|
|
Actor Property PlayerREF Auto
|
|
|
|
bool bDone = false
|
|
|
|
Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer)
|
|
|
|
If (akNewContainer == PlayerREF && !bDone)
|
|
Phasmalist_TrinketChestREF.RemoveItem(TrinketToAdd, 1, true, PlayerREF)
|
|
bDone = true
|
|
PlayerREF.RemoveItem(FakeTrinketToRemove, 1, true)
|
|
EndIf
|
|
|
|
Endevent |