Difference between revisions of "LlReturnObjectsByOwner"

From Second Life Wiki
Jump to navigation Jump to search
m (Created page with "{{LSL_Function |inject-2= {{Issues/SVC-6281}} {{LSL_Function/permission|PERMISSION_RETURN_OBJECTS}} {{LSL_Function/avatar|owner|group=*}} |func_id=|func_sleep=0.0|func_energy= |f…")
 
 
(9 intermediate revisions by 4 users not shown)
Line 7: Line 7:
|func=llReturnObjectsByOwner|sort=ReturnObjectsByOwner
|func=llReturnObjectsByOwner|sort=ReturnObjectsByOwner
|p1_type=key|p1_name=owner
|p1_type=key|p1_name=owner
|p2_type=integer|p2_name=scope
|p2_type=integer|p2_name=scope|p2_desc=OBJECT_RETURN_* flag
|return_type=integer
|return_type=integer
|func_footnote=If the return value is negative, it represents an [[#{{anchorencode:Error Flags}}|error]] flag.
|func_footnote=If the return value is negative, it represents an [[#{{anchorencode:Error Flags}}|error]] flag.
|func_desc
|func_desc=If the script is owned by an agent, [[PERMISSION_RETURN_OBJECTS]] may be granted by the owner.  If the script is owned by a group, this permission may be granted by an agent belonging to the group's "Owners" role.
|return_text=that is the number of objects successfully returned to their owners or an [[#{{anchorencode:Error Flags}}|ERR_*]] flag.
|return_text=that is the number of objects successfully returned to their owners or an [[#{{anchorencode:Error Flags}}|ERR_*]] flag.
|spec=
|spec=
==== Script Owner and Scope ====
If the script is owned by an estate owner or manager then any object in the region can be returned. Otherwise the script can return any object over land owned by the owner of the script.
==== Throttle ====
==== Throttle ====
Throttled at max parcel land impact capacity region-wide per hour.
Throttled at max parcel land impact capacity region-wide per hour.
|caveats=*Objects that are deeded to a group are deleted, not returned. <!-- verify please, might cause ERR_GENERIC instead -->
|caveats=
|constants={{{!}}
* Parcel owner, estate owner and estate managers can not have their objects returned by this method.
{{!}}
* Objects which are owned by the group the land is set to will not be returned by this method.
{{{!}}
** Objects owned by other groups will be returned to their previous owner if the object is transferable. If not transferable they are deleted.
|constants=
<div style="display:inline-block; vertical-align: top;">
{{{!}} class="sortable" {{prettytable|style=margin: 0px 10px 10px 0pt;}}
{{!}}- {{hl2}}
! class="sortable" {{!}} {{LSLPT|scope}} Flag
! title="Value" class="sortable" {{!}}
!{{!}} Description
{{!}}-
{{LSL ConstTB|OBJECT_RETURN_PARCEL|integer||c=return all objects on the same parcel as the script which are owned by 'owner'}}
{{!}} Return all objects on the same parcel as the script which are owned by {{LSLPT|owner}}. <br/> The script must be owned by an estate manager or over a parcel owned by the owner of the script.
{{!}}-
{{LSL ConstTB|OBJECT_RETURN_PARCEL_OWNER|integer||c=return all objects owned by 'owner' which are over parcels owned by the owner of the script.}}
{{!}} Return all objects owned by {{LSLPT|owner}} which are over parcels owned by the owner of the script.
{{!}}-
{{LSL ConstTB|OBJECT_RETURN_REGION|integer||c=return all objects in the region owned by 'owner'}}
{{!}} Return all objects in the region owned by {{LSLPT|owner}}. <br/> The script must be owned by the estate owner or an estate manager.
{{!}}}
{{!}}}
{{!}}
</div><div style="display:inline-block; vertical-align: top;">
{{LSL_Constants/ReturnError|table=*|sortable=*}}
{{LSL_Constants/ReturnError|table=*|sortable=*}}
{{!}}}
</div>
|examples
|examples
|helpers
|helpers
|also_functions=
|also_functions=
{{LSL DefineRow||[[llReturnObjectsByOwner]]|}}
{{LSL DefineRow||[[llReturnObjectsByID]]|}}
{{LSL DefineRow||[[llGetParcelPrimOwners]]|}}
{{LSL DefineRow||[[llGetParcelPrimOwners]]|}}
{{LSL DefineRow||[[llDie]]|}}
|also_tests
|also_tests
|also_events
|also_events
|also_articles
|also_articles
|notes
|notes=For group-owned land you may want to explicitly code a group owner's key into the script as there is no way to determine if a user is a group owner.
|cat1=Parcel
|cat1=Parcel
|cat2=Region
|cat2=Region
|cat3
|cat3=Owner
|cat4
|cat4=Security<!--not really security but I think it's useful to have it in that category-->
|cat5=Cleanup
|history = Date of Release  [[ Release_Notes/Second_Life_Server/13#13.06.18.277494 | 18/06/2013 ]]
}}
}}

Latest revision as of 18:08, 11 May 2016

Summary

Function: integer llReturnObjectsByOwner( key owner, integer scope );

If the script is owned by an agent, PERMISSION_RETURN_OBJECTS may be granted by the owner. If the script is owned by a group, this permission may be granted by an agent belonging to the group's "Owners" role.
Returns an integer that is the number of objects successfully returned to their owners or an ERR_* flag.

• key owner avatar or group UUID
• integer scope OBJECT_RETURN_* flag

To run this function the script must request the PERMISSION_RETURN_OBJECTS permission with llRequestPermissions. If the return value is negative, it represents an error flag.

Specification

Throttle

Throttled at max parcel land impact capacity region-wide per hour.

scope Flag Description
OBJECT_RETURN_PARCEL Return all objects on the same parcel as the script which are owned by owner.
The script must be owned by an estate manager or over a parcel owned by the owner of the script.
OBJECT_RETURN_PARCEL_OWNER Return all objects owned by owner which are over parcels owned by the owner of the script.
OBJECT_RETURN_REGION Return all objects in the region owned by owner.
The script must be owned by the estate owner or an estate manager.
Error Flags Description
ERR_GENERIC -1 A nebulous and inexplicable error, nothing is known about it.
ERR_PARCEL_PERMISSIONS -2 Permission lacked to perform task on specified parcel.
ERR_MALFORMED_PARAMS -3 Parameters are malformed.
ERR_RUNTIME_PERMISSIONS -4 Script lacks the runtime permission to perform the requested task.
ERR_THROTTLED -5 Task has been throttled. Try again later.

Caveats

Permissions
  • Once the PERMISSION_RETURN_OBJECTS permission is granted there is no way to revoke it except from inside the script (for example, with a new llRequestPermissions call) or the script is reset or deleted.
  • While anyone may grant PERMISSION_RETURN_OBJECTS this function will only work properly if one of the following is true:
    • The land is owned by the prim owner and this permission has been granted by the land owner.
    • The land is group owned and this permission has been granted by a group member filling the group "Owners" role.
  • Parcel owner, estate owner and estate managers can not have their objects returned by this method.
  • Objects which are owned by the group the land is set to will not be returned by this method.
    • Objects owned by other groups will be returned to their previous owner if the object is transferable. If not transferable they are deleted.

Examples

Notes

For group-owned land you may want to explicitly code a group owner's key into the script as there is no way to determine if a user is a group owner.

See Also

Events

•  run_time_permissions Permission receiving event

Functions

•  llGetPermissions Get the permissions granted
•  llGetPermissionsKey Get the agent who granted permissions
•  llRequestPermissions Request permissions
•  llReturnObjectsByID
•  llGetParcelPrimOwners
•  llDie

Articles

•  Script permissions

Deep Notes

History

Date of Release 18/06/2013

Signature

function integer llReturnObjectsByOwner( key owner, integer scope );