Could you be more specific about this part?Add some custom logic to the onMoveItem Player event that returns false if item id (or action id attribute) is whatever you want to get fixed in the bag.
And then spawn the items directly where they should be using a function like Game.createItem, Container:addItem or Player:addItem.
He wrote the version in the title... 8.6
There is no onMoveItem function. The best way is to add it to sources.