So I have a few aliases set up, and then a script on my player alias. My Player alias is a specific reference, PlayerRef, and my other alias, "Package" is a Create Reference At Object alias, and is created inside my Dead Courier, which is a Specific Reference and properly set to my dead courier. I have a script on the player, and I've checked that all of the properties and aliases are set correctly. It uses the OnItemAdded event. I could use OnContainerChanged, in this case, but I'd just like to know if there's anything explicitly wrong with my script (which compiles correctly) that is causing it not to work, or if it's just OnItemAdded being finicky.
My Script:
Scriptname IQ02PlayerAliasScript extends ReferenceAlias {Governs all the functions and actions related to the player in Disrupted Service.}Message Property PackageAddedMes Auto Message Property OpenConfirmationMes Auto ReferenceAlias Property CourierNote AutoWeapon Property Cutlass Auto Armor Property Buckler Auto ReferenceAlias Property PackageAlias AutoReferenceAlias Property FNVEasterEgg Auto ReferenceAlias Property DeadCourier Auto Event OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer) If akBaseItem == PackageAlias.GetReference() Utility.Wait(0.1) Int iButton = PackageAddedMes.Show() While iButton If iButton == 1 CourierNote.GetReference().Activate(Self.GetReference()) If Self.GetReference().GetItemCount(CourierNote.GetReference()) Self.GetReference().AddItem(CourierNote.GetReference(), 1) EndIf ElseIf iButton == 2 iButton = OpenConfirmationMes.Show() While iButton If iButton == 1 Self.GetReference().RemoveItem(PackageAlias.GetReference(), 1) GetOwningQuest().SetStage(200) Self.GetReference().AddItem(Cutlass, 1) Self.GetReference().AddItem(Buckler, 1) ElseIf iButton == 2 CourierNote.GetReference().Activate(Self.GetReference()) If Self.GetReference().GetItemCount(CourierNote.GetReference()) Self.GetReference().AddItem(CourierNote.GetReference(), 1) EndIf EndIf EndWhile EndIf EndWhile ElseIf akBaseItem == FNVEasterEgg.GetReference() Debug.Notification("Would have resurrected courier here.") EndIfEndEvent