Scriptname SuH_contS_sacchest extends ObjectReference 

SuH_Fun property _Fun auto
int itempoints

Event OnOpen(ObjectReference akActionRef)
   Debug.MessageBox("'Feed me, for a lust for substance...'")
   itempoints = 0
endEvent

Event OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer)
	;calc item points to add
	itempoints += Math.Floor((akBaseItem.GetWeight() * aiItemCount) * 10)
endEvent

Event OnItemRemoved(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akDestContainer)
	itempoints -= Math.Floor((akBaseItem.GetWeight() * aiItemCount) * 10)
endEvent

Event OnClose(ObjectReference akActionRef)
	_Fun.XPcalc(XPearn=itempoints)
	debug.MessageBox("'Forever hunger for mass...' ("+itempoints+" HeartXP gifted)")
	self.RemoveAllItems()
	itempoints = 0
endEvent