Scriptname aaUCIngredientStorageScript extends ObjectReference  
{Script for the sorting of ingredients}

FormList Property CreatureList  Auto 
{Points to the formlist of the ingredients to be stored}

FormList Property MushroomList  Auto 
{Points to the formlist of the ingredients to be stored} 

FormList Property PlantList  Auto 
{Points to the formlist of the ingredients to be stored} 

FormList Property MiscList  Auto 
{Points to the formlist of the ingredients to be stored} 

ObjectReference Property PlantContainer Auto  
{Points to the container to store the ingredients}

ObjectReference Property CreatureContainer Auto  
{Points to the container to store the ingredients}

ObjectReference Property MushroomContainer Auto  
{Points to the container to store the ingredients}

ObjectReference Property MiscContainer Auto  
{Points to the container to store the ingredients}

EVENT OnActivate(ObjectReference akActionRef)
	if (akActionRef== Game.GetPlayer()) 
		int Count = akActionRef.GetItemCount(PlantList)
		akActionRef.RemoveItem(PlantList, Count, True, PlantContainer)
	endif

	if (akActionRef== Game.GetPlayer()) 
		int Count = akActionRef.GetItemCount(CreatureList)
		akActionRef.RemoveItem(CreatureList, Count, True, CreatureContainer)
	endif

	if (akActionRef== Game.GetPlayer()) 
		int Count = akActionRef.GetItemCount(MushroomList)
		akActionRef.RemoveItem(MushroomList, Count, True, MushroomContainer)
	endif

	if (akActionRef== Game.GetPlayer()) 
		int Count = akActionRef.GetItemCount(MiscList)
		akActionRef.RemoveItem(MiscList, Count, True, MiscContainer)
	endif
endEVENT