Igrik, I know almost nothing about multiplayer, if you want to finalize you are welcome. I can't even play online. If you can test it, modify what you need then paste here so I can update, ok?
Reworked a bit the thing and uploaded here:
Improved_backpack
Changes:
*updated with igrik last backpack bag
*added mop code
*optimized switch artifacts
The problems remaining (in single player at least) are related to switch artifacts. The biggest problem I faced is due to the fact that, when you erm-remove one equipped artifact, you must remove ALL that artifacts ID the hero owns, with A-$. If you don't do so, the stats bonuses do not change.
The second problem are the combos, the combo ID location returns fine, but the locked slots return -1, as it was empty. So far, I am unable to exchange properly combos, without having their locked slots get other artifacts in.
The third problem are the misc.slots 1-5, I don't know how to do them properly. Again, we must remove all artifacts on switching, so if one hero has for example 5 purses of gold in slots 9-12/18, when you process 9, it will delete all purses and give back 4 in backpack. So the script will not find anymore purses in slot 10-12/18. You will not have error in artifacts counter, but the ones you had equipped will be now in backpack, so have to equip again manually, annoying. I disabled misc slots from script, waiting for someone to have a genius idea.
One solution would be to store ALL artifacts one hero has equipped in global vars but we would need 28 then and I want to avoid that, to keep compatibility with everything. But still with that, the combos thing will not be solved.
Here is the code for exchanging artifacts, if someone wants to finalize, would be great.