enderalse/source/scripts/_00e_classmenuitemhandleraliasscript.psc

18 lines
571 B
Plaintext

Scriptname _00E_ClassMenuItemHandlerAliasScript extends ReferenceAlias
Actor Property PlayerREF Auto
Event OnItemRemoved(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akDestContainer)
If akItemReference != None && akDestContainer == None
if akItemReference.GetBaseObject() as Armor || akItemReference.GetBaseObject() as Weapon
PlayerREF.AddItem(akItemReference, aiItemCount, true)
else
akItemReference.Disable()
akItemReference.Delete()
PlayerREF.AddItem(akBaseItem, aiItemCount, true)
endif
EndIf
EndEvent