enderalse/scripts/source/_00e_phasmalist_faketrinketsc.psc

20 lines
698 B
Plaintext
Raw Normal View History

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