Difference between revisions of "LlGetParcelDetails"

From Second Life Wiki
Jump to navigation Jump to search
 
(38 intermediate revisions by 14 users not shown)
Line 1: Line 1:
{{LSL_Function
{{LSL_Function
|inject-2={{Issues/SVC-4413}}
|func_id=327|func_sleep=0.0|func_energy=10.0
|func_id=327|func_sleep=0.0|func_energy=10.0
|func=llGetParcelDetails|return_type=list|p1_type=vector|p1_name=pos|p2_type=list|p2_name=params
|func=llGetParcelDetails|return_type=list
|func_footnote
|p1_type=vector|p1_name=pos|p1_desc=only x and y are important and to be given in [[Viewer coordinate frames#Region|region coordinates]]
|p2_type=list|p2_name=params|p2_desc=a list of PARCEL_DETAILS_* flags.
|func_footnote=Both {{LSLP|x}} and {{LSLP|y}} components of {{LSLP|pos}} are clamped to the range {{Interval|gte=0.0|lte=256.0|center=component}}, the {{LSLP|z}} component is ignored.
|func_desc
|func_desc
|return_text=that is the parcel details specified in '''params''' for the parcel at '''pos'''.
|return_text=that is the parcel details specified in {{LSLP|params}} (in the same order) for the parcel at {{LSLP|pos}}.
|spec
|spec
|caveats
|caveats=
|constants=<div id="box">
*This cannot be used to get the parcel details of parcels in neighboring regions.
==Constants==
|constants=
<div style="padding: 0.5em;">
{{LSL Constants/Parcel Details}}
{{{!}}{{Prettytable}}
|examples=
!Detail!!Value!!Meaning!!Max Length!!Return Type
A very simple example to return the parcel name and description for the current parcel.
{{!}}-
 
{{!}}PARCEL_DETAILS_NAME{{!}}{{!}}0{{!}}{{!}}The name of the parcel.{{!}}{{!}}63 Characters{{!}}{{!}}{{LSLG|string}}
<source lang="lsl2">default
{{!}}-
{
{{!}}PARCEL_DETAILS_DESC{{!}}{{!}}1{{!}}{{!}}The description of the parcel.{{!}}{{!}}127 Characters{{!}}{{!}}{{LSLG|string}}
    touch_start(integer total_number)
{{!}}-
    {
{{!}}PARCEL_DETAILS_OWNER{{!}}{{!}}2{{!}}{{!}}The parcel owner's key.{{!}}{{!}}(36 Characters){{!}}{{!}}{{LSLG|key}}
        list details = llGetParcelDetails(llGetPos(), [PARCEL_DETAILS_NAME, PARCEL_DETAILS_DESC]);
{{!}}-
       
{{!}}PARCEL_DETAILS_GROUP{{!}}{{!}}3{{!}}{{!}}The parcel group's key.{{!}}{{!}}(36 Characters){{!}}{{!}}{{LSLG|key}}
        llSay(0, "Local Parcel Name:" + llList2String(details ,0));
{{!}}-
        llSay(0, "Local Parcel Desc:" + llList2String(details ,1));
{{!}}PARCEL_DETAILS_AREA{{!}}{{!}}4{{!}}{{!}}The parcel's area, in sqm.{{!}}{{!}}(5 Characters){{!}}{{!}}{{LSLG|integer}}
    }
{{!}}}
}</source>
Max Lengths in parentheses represent how many characters required when it is {{LSLG|typecast}} to a string.
</div></div>
|examples
|helpers
|helpers
|also_functions
|also_functions=
{{LSL DefineRow||[[llGetParcelFlags]]}}
{{LSL DefineRow||[[llGetRegionFlags]]}}
{{LSL DefineRow||[[llGetRegionName]]}}
{{LSL DefineRow||[[llRequestSimulatorData]]}}
{{LSL DefineRow||[[llGetObjectDetails]]}}
|also_events
|also_events
|also_tests
|also_tests
|also_articles
|also_articles
|notes
|notes
|permission
|negative_index
|sort=GetParcelDetails
|cat1=Parcel
|cat1=Parcel
|cat2
|cat2=Owner
|cat3
|cat3=Group
|cat4
|cat4=Parcel/Details
|issues
}}
}}

Latest revision as of 10:43, 14 April 2022

Summary

Function: list llGetParcelDetails( vector pos, list params );
0.0 Forced Delay
10.0 Energy

Returns a list that is the parcel details specified in params (in the same order) for the parcel at pos.

• vector pos only x and y are important and to be given in region coordinates
• list params a list of PARCEL_DETAILS_* flags.

Both x and y components of pos are clamped to the range [0.0, 256.0], the z component is ignored.

Flag Meaning Max Length Return
PARCEL_DETAILS_NAME 0 The name of the parcel. 63 Characters string
PARCEL_DETAILS_DESC 1 The description of the parcel. 127 Characters string
PARCEL_DETAILS_OWNER 2 The parcel owner's key. (36 Characters) key
PARCEL_DETAILS_GROUP 3 The parcel group's key. (36 Characters) key
PARCEL_DETAILS_AREA 4 The parcel's area, in sqm. (5 Characters) integer
PARCEL_DETAILS_ID 5 The parcel's key. (36 Characters) key
PARCEL_DETAILS_SEE_AVATARS 6 The parcel's avatar visibility setting[2] (1 character) integer - boolean
PARCEL_DETAILS_PRIM_CAPACITY 7 This parcel's prim capacity. integer
PARCEL_DETAILS_PRIM_USED 8 The prim usage on this parcel. integer
PARCEL_DETAILS_LANDING_POINT 9 Landing point set for this parcel, if any. vector
PARCEL_DETAILS_LANDING_LOOKAT 10 Look at vector set for the landing point on this parcel, if any. vector
PARCEL_DETAILS_TP_ROUTING 11 Teleport routing for this parcel.
  • 0 = TP_ROUTING_BLOCKED
  • 1 = TP_ROUTING_LANDINGP
  • 2 = TP_ROUTING_FREE

Note that routing rules are only enforced if the landing point is set.

integer
PARCEL_DETAILS_FLAGS 12 Parcel flags set for this parcel.

See llGetParcelFlags for a listing of the flags and their meaning.

integer
PARCEL_DETAILS_SCRIPT_DANGER 13 Is the script in danger in the indicated parcel.

See llScriptDanger for a discussion of script danger.

integer - boolean
Max Lengths in parentheses represent how many characters required when it is typecast to a string.

Caveats

  • This cannot be used to get the parcel details of parcels in neighboring regions.

Examples

A very simple example to return the parcel name and description for the current parcel.

default
{
    touch_start(integer total_number)
    {
        list details = llGetParcelDetails(llGetPos(), [PARCEL_DETAILS_NAME, PARCEL_DETAILS_DESC]);
        
        llSay(0, "Local Parcel Name:" + llList2String(details ,0));
        llSay(0, "Local Parcel Desc:" + llList2String(details ,1));
    }
}

Deep Notes

Footnotes

  1. ^ The ranges in this article are written in Interval Notation.
  2. ^ The parcel avatar visibility setting is used to hide avatars, their chat, and objects they sit on when they are in other parcels.

Signature

function list llGetParcelDetails( vector pos, list params );