So I have a script set up:
Scriptname IQ02PlayerAliasScript extends ReferenceAlias{Governs all the functions and actions related to the player in Disrupted Service.}Message Property PackageAddedMes AutoMessage Property OpenConfirmationMes AutoReferenceAlias Property CourierNote AutoWeapon Property Cutlass AutoArmor Property Buckler AutoReferenceAlias Property PackageAlias AutoReferenceAlias Property FNVEasterEgg AutoReferenceAlias Property ForgedPapers AutoReferenceAlias Property DeadCourier AutoSpell Property ReanimateSpell AutoActor kRefActor dRefObjectReference cRefObjectReference pRefObjectReference fRefObjectReference fpRefEvent OnInit() RegisterForSingleUpdate(0.5)EndEventEvent OnUpdate() kRef = Self.GetActorReference() dRef = DeadCourier.GetActorReference() cRef = CourierNote.GetReference() pRef = PackageAlias.GetReference() fRef = FNVEasterEgg.GetReference() fpRef = ForgedPapers.GetReference() AddInventoryEventFilter(pRef.GetBaseObject()) AddInventoryEventFilter(fRef.GetBaseObject()) AddInventoryEventFilter(fpRef.GetBaseObject()) AddInventoryEventFilter(cRef.GetBaseObject())EndEventEvent OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer) If akItemReference == pRef GetOwningQuest().SetStage(10) Utility.Wait(0.1) Int iButton = PackageAddedMes.Show() While iButton If iButton == 1 If kRef.GetItemCount(cRef) == 0 kRef.AddItem(cRef, 1) EndIf cRef.Activate(kRef) iButton = 0 ElseIf iButton == 2 iButton = OpenConfirmationMes.Show() While iButton If iButton == 1 kRef.RemoveItem(pRef, 1) GetOwningQuest().SetStage(200) kRef.AddItem(Cutlass, 1) kRef.AddItem(Buckler, 1) iButton = 0 ElseIf iButton == 2 If kRef.GetItemCount(cRef) == 0 kRef.AddItem(cRef, 1) EndIf cRef.Activate(kRef) iButton = 0 EndIf EndWhile EndIf EndWhile ElseIf akItemReference == fRef ReanimateSpell.Cast(dRef, dRef) dRef.StartCombat(kRef) ElseIf akItemReference == fpRef GetOwningQuest().SetStage(70) ElseIf akItemReference == cRef If kRef.GetItemCount(cRef) > 1 kRef.RemoveItem(cRef, 1, true) EndIf EndIfEndEvent Function CheckForPapers() If kRef.GetItemCount(fpRef) >= 1 GetOwningQuest().SetStage(70) EndIfEndFunction
However, every time I start a new game, or load a save (EVEN WHEN I DO NOT HAVE OR HAVE PICKED UP pRef (package), the messagebox dialogue for the package taking (OnItemAdded for pRef) shows up. Is there something wrong with my script or should I just use OnContainerChanged?