The mod I'm working on is http://www.nexusmods.com/fallout3/mods/21920?, right now I've limited it to items that don't have a health condition, but it'd be much better if I could make it unload weapons and armors too, so that's what I was looking for. A CPU-intensive solution wouldn't be a problem I think, because the scripts are attached to containers and are self-terminating, my current scripts run without much apparent effort on my PC, anyway I added "DisablePlayerControls" checks just to be safe.
Other than being a bit awkward scripting-wise, I wouldn't want it to play weird animations (like equipping and unequipping stuff), also there's the problem that if an item has 0% health can't be equipped, and when I move it in a container via script it would regain 100% health. Unless 1. the game unequips automatically the item in the following frame and 2. in the same frame that it processes the "equipitem" script, the "GetEquippedCurrentHealth" returns that weapon.
Basically conditions for it to work as I'd like are:
1. no weird animations of quickly equipping/unequipping stuff
2. no equipping sounds
3. and that it also works for items with 0% health.
Right now I can't try it because I'm on a different PC, also I had another priority (an option menu) for that same mod, but if there is a solution for weapons/armor I'll add it to the update when it's ready.
Yes your example is right but it's only applicable to equipped items so this forces me to adopt the same workaround.. thanks anyway.