OsGetInventoryLastOwner

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(Created page with "{{osslfunc |threat_level=ignored |permissions=true |delay=0 |function_syntax=string osGetInventoryLastOwner(string itemName_or_itemId) |ossl_example=<source lang="lsl"> defaul...")
 
(2 intermediate revisions by one user not shown)
Line 3: Line 3:
 
|permissions=true
 
|permissions=true
 
|delay=0
 
|delay=0
|function_syntax=string osGetInventoryLastOwner(string itemName_or_itemId)
+
|function_syntax=key osGetInventoryLastOwner(string itemName_or_itemId)
 
|ossl_example=<source lang="lsl">
 
|ossl_example=<source lang="lsl">
 
default
 
default
Line 18: Line 18:
 
                 llSay(0,"got inventory dropped item "+(string)id);
 
                 llSay(0,"got inventory dropped item "+(string)id);
 
                 llSay(0,"name " + osGetInventoryName(id));
 
                 llSay(0,"name " + osGetInventoryName(id));
                 llSay(0,"desc " + osGetInventoryDescription(id));
+
                 llSay(0,"desc " + osGetInventoryDesc(id));
 
                 key who = osGetInventoryLastOwner(id);
 
                 key who = osGetInventoryLastOwner(id);
 
                 llSay(0,"dropped by " + llKey2Name(who) +" ("+(string)who +")");  
 
                 llSay(0,"dropped by " + llKey2Name(who) +" ("+(string)who +")");  
Line 27: Line 27:
 
</source>
 
</source>
 
|description=Returns the id(key) of the last owner of inventory item with id "itemName_or_itemId" if that parameter is a valid key or with that name if not.
 
|description=Returns the id(key) of the last owner of inventory item with id "itemName_or_itemId" if that parameter is a valid key or with that name if not.
|additional_info=This function was added in 0.9.1.0 Dev
+
|additional_info=This function was added in 0.9.0.1 Dev
 
Implemented February, 22 2019 in GIT# bd27573130d4a40d678c81c687591708ab4e4f34
 
Implemented February, 22 2019 in GIT# bd27573130d4a40d678c81c687591708ab4e4f34
 
}}
 
}}

Revision as of 19:41, 23 February 2019

key osGetInventoryLastOwner(string itemName_or_itemId)
Returns the id(key) of the last owner of inventory item with id "itemName_or_itemId" if that parameter is a valid key or with that name if not.
Threat Level This function does not do a threat level check
Permissions Use of this function is always allowed by default
Extra Delay 0 seconds
Example(s)
default
{
 
...
    changed(integer ch)
    {
        if (ch & CHANGED_ALLOWED_DROP)
        {
            key id = osGetLastChangedEventKey();
            if(id != "")
            {
                llSay(0,"got inventory dropped item "+(string)id);
                llSay(0,"name " + osGetInventoryName(id));
                llSay(0,"desc " + osGetInventoryDesc(id));
                key who = osGetInventoryLastOwner(id);
                llSay(0,"dropped by " + llKey2Name(who) +" ("+(string)who +")"); 
            }
        }
...
}
Notes
This function was added in 0.9.0.1 Dev

Implemented February, 22 2019 in GIT# bd27573130d4a40d678c81c687591708ab4e4f34


Personal tools
General
About This Wiki