Difference between revisions of "LlGetLandOwnerAt"

From Second Life Wiki
Jump to navigation Jump to search
m (Removed incorrect " (but this isn't usable for anything <snip>". Quick example, using this function to compare owner to a list of owners including groups. Added comment to example.)
 
(9 intermediate revisions by 6 users not shown)
Line 2: Line 2:
|func_id=216|func_sleep=0.0|func_energy=10.0
|func_id=216|func_sleep=0.0|func_energy=10.0
|func=llGetLandOwnerAt
|func=llGetLandOwnerAt
|return_type=key|p1_type=vector|p1_name=pos
|return_type=key
|p1_type=vector|p1_name=pos|p1_desc=[[Viewer coordinate frames#Region|region coordinate]]
|func_footnote
|func_footnote
|func_desc
|func_desc
|return_text=of the land owner.
|return_text=that is the land owner at '''pos'''.
|spec=If the land is in public domain [[NULL_KEY]] is returned. This land can be claimed by anyone with available tier. Land on the Preview grid is divvied out this way. Land on the main grid never enters public domain and is instead auctioned off by LL.
|spec=If the land is in public domain {{LSL Const|NULL_KEY|key|&quot;00000000-0000-0000-0000-000000000000&quot;|c=Evaluates to false in conditionals just like invalid keys.}} is returned. This land can be claimed by anyone with available tier. Land on the Preview grid is divvied out this way. Land on the main grid never enters public domain and is instead auctioned off by LL.


If the land is [[group]]-owned, the group key is returned (but this isn't usable for anything, since group keys cannot be used by other functions in LSL).
If the land is [[group]]-owned, the group key is returned.
|caveats
|caveats
|constants
|constants
|examples
|examples=
<source lang="lsl2">
default {
    state_entry() {
        //llKey2Name does not work for groups, and it requires avatars to be on sim (owner is not known when absent tested 2019-06-10).
        //Actually printing the owner name (also for groups) is somewhat tricky - if you feel otherwise, please update this example.
        llOwnerSay("The land owner under this object is " + llKey2Name(llGetLandOwnerAt(llGetPos())) + ".");
    }
}
</source>
|helpers
|helpers
|also_functions
|also_functions=
{{LSL DefineRow||[[llGetParcelDetails]]}}
|also_tests
|also_tests
|also_events
|also_events
Line 23: Line 34:
|cat3
|cat3
|cat4
|cat4
|history={{LSL Added|0.6.0|remote=http://secondlife.wikia.com/wiki/Version_0.6.0}}
}}
}}

Latest revision as of 01:10, 10 June 2019

Summary

Function: key llGetLandOwnerAt( vector pos );
0.0 Forced Delay
10.0 Energy

Returns a key that is the land owner at pos.

• vector pos region coordinate

Specification

If the land is in public domain NULL_KEY is returned. This land can be claimed by anyone with available tier. Land on the Preview grid is divvied out this way. Land on the main grid never enters public domain and is instead auctioned off by LL.

If the land is group-owned, the group key is returned.

Examples

default {
    state_entry() {
        //llKey2Name does not work for groups, and it requires avatars to be on sim (owner is not known when absent tested 2019-06-10).
        //Actually printing the owner name (also for groups) is somewhat tricky - if you feel otherwise, please update this example.
        llOwnerSay("The land owner under this object is " + llKey2Name(llGetLandOwnerAt(llGetPos())) + ".");
    }
}

See Also

Functions

•  llGetParcelDetails

Deep Notes

History

Footnotes

  1. ^ Early release notes were not very accurate or thorough, they sometimes included information about features added in previous releases or failed to include information about features added in that release.

Signature

function key llGetLandOwnerAt( vector pos );