Thanks for your replys. I tried some of your solutions. The ObjectReference Property works, now the script can compile, the "Ingredient Filter" works and the BlockActivation too. But now, if I place Items in that Chest, they will not duplicate. Before in my Script above the Item that was added to the Chest was Duplicated as many times as it was added (For example, i've added 2 Wheat and after 24 hours the Chest had 4 Wheat) And the second problem is, that the Chest will not stop to Block but i've told it to stop blocking after the 24 hours. Scriptname duplicateItem extends ObjectReference
{Duplicates an Item in a chest.}
;Propertys
ObjectReference Property Chest Auto
;Functions
Function AddItem(Form akItemToAdd, int aiCount = 1, bool abSilent = false) native
Function WaitGameTime(float afHours) native global
;Events, If the player adds an Item to the chest, it will be duplicated after 24 hours and you can do this again after 168 hours (one week)
Event OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer)
if akBaseItem as Ingredient
BlockActivation()
Utility.WaitGameTime(24)
Chest.AddItem(akBaseItem, aiItemCount, true)
BlockActivation(false)
Else
RemoveItem(akBaseItem, aiItemCount, true, akSourceContainer) ; if it is not an ingredient, return it to the player
EndIf
EndEvent