I just posted a thing that uses this script on a chest:
GlobalVariable Property PilferGlobal autoEvent OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer)int skip = 0float Weight = akBaseItem.GetWeight()int Value = http://forums.bethsoft.com/topic/1381970-heeeeeeeeelp-just-released-prematurely/akBaseItem.GetGoldValue()if (Weight==0.0 && Value> 0) self.RemoveItem(akBaseItem, aiItemCount, true, Game.GetPlayer()) skip = 1 endIffloat PilferVal = (Value/Weight)if (PilferVal >= (PilferGlobal.GetValue() as float) && skip==0) self.RemoveItem(akBaseItem, aiItemCount, true, Game.GetPlayer())elseif (PilferVal < (PilferGlobal.GetValue() as float) && skip==0) self.RemoveItem(akBaseItem, aiItemCount, true, akSourceContainer)endIfendEvent
that is supposed to give things above a given gold/weight ratio to the player, and otherwise give it back to the thing it came from.
Whats happening is its giving EVERYTHING to me and I don't know why! I released this thing, and its completely non-functional and I feel like a moron. Please advise!
