(or llGetInventoryAddedBy, or - ... But I'll stick to the semantics of "last owner" for presentation's sake)
Scripts can act on object inventory and objects can be configured to accept inventory from any source (llAllowInventoryDrop), as well as from agents with permission to modify the owner's objects. Being able to interrogate object inventory entries for their last owner would be good addition to scripting - it would make CHANGED_INVENTORY and CHANGED_ALLOWED_DROP events more able to richly react to the users causing them, as well as allowing for (slightly) better behavior security.
Objects have a property OBJECT_LAST_OWNER_ID but this can only be interrogated (in script land) with llGetObjectDetails, while the object exists in the world.
It would be nice if this property was:
  • available on all kinds of asset,
  • for inventory, set when it is added to an object's inventory,
  • accessible via a
    key llGetInventoryLastOwner(string item)
    function; the same theme as llGetInventoryCreator.
----
Snipped from a followup- I think this additional surface would help put inventory metadata stuff to bed. They're less important since the information can be determined by holding state and introspection, but I feel reasonable in assuming keeping this stuff transiently in the event queue versus many disparate user implementations and in memory + serializations would be cheaper for everyone.
If inventory changed event triggers don't batch the count + index stuff is unecessary, but I haven't checked and I feel like dropping a folder into an object will be counted as as single event. These would be meaningful only within CHANGED_INVENTORY and CHANGED_ALLOWED_DROP events in the same vein as llDetected*.
integer llGetInventoryRemoveCount()
-- 0..N, the number of removed inventory entries.
string llGetInventoryRemoveName(integer index)
-- "" or when llGIRC is nz and 0 <= i < N, the name of removed entry i. At this point the entry is no longer present in the object.
integer llGetInventoryRemoveType(integer index)
-- INVENTORY_NONE or when llGIRC is nz and 0 <= i < N, the INVENTORY_TYPE of the removed entry i. At this point the entry is no longer present in the object.
integer llGetInventoryAddCount()
-- 0..N, the number of added inventory entries.
string llGetInventoryAddName(integer index)
-- "" or when llGIAC is nz and 0 <= i < N, the name of added entry i.
integer llGetInventoryAddType(integer index)
-- INVENTORY_NONE or when llGIAC is nz and 0 <= i < N, the INVENTORY_TYPE of the added entry i.