diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index d8ad914576..57a579a31f 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs @@ -2242,8 +2242,21 @@ namespace OpenSim.Region.ScriptEngine.Common public string llGetInventoryKey(string name) { m_host.AddScriptLPS(1); - NotImplemented("llGetInventoryKey"); - return String.Empty; + foreach (KeyValuePair inv in m_host.TaskInventory) + { + if(inv.Value.Name == name) + { + if((inv.Value.OwnerMask & (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify)) == (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify)) + { + return inv.Value.AssetID.ToString(); + } + else + { + return LLUUID.Zero.ToString(); + } + } + } + return LLUUID.Zero.ToString(); } public void llAllowInventoryDrop(int add)