Skip to content

llGetParcelFlags

function
Function syntax
integer llGetParcelFlags(
  1. vector pos// Position vector in region coordinates (the Z component is ignored)
);
Returns
integer
Energy
10

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

Returns an integer of parcel flags (PARCEL_FLAG_*) for the parcel that includes the point pos.

How to use
integer result = llGetParcelFlags(ZERO_VECTOR);
FlagValueDescription
PARCEL_FLAG_ALLOW_FLY0x00000001find if a parcel allows flying
PARCEL_FLAG_ALLOW_SCRIPTS0x00000002find if a parcel allows outside scripts
PARCEL_FLAG_ALLOW_LANDMARK0x00000008find if a parcel allows landmarks to be created
PARCEL_FLAG_ALLOW_TERRAFORM0x00000010find if a parcel allows anyone to terraform the land
PARCEL_FLAG_ALLOW_DAMAGE0x00000020find if a parcel allows damage
PARCEL_FLAG_ALLOW_CREATE_OBJECTS0x00000040find if a parcel allows anyone to create objects
PARCEL_FLAG_USE_ACCESS_GROUP0x00000100find if a parcel limits access to a group
PARCEL_FLAG_USE_ACCESS_LIST0x00000200find if a parcel limits access to a list of residents
PARCEL_FLAG_USE_BAN_LIST0x00000400find if a parcel uses a ban list, including restricting access based on payment info
PARCEL_FLAG_USE_LAND_PASS_LIST0x00000800find if a parcel allows passes to be purchased
PARCEL_FLAG_LOCAL_SOUND_ONLY0x00008000find if a parcel restricts spatialized sound to the parcel
PARCEL_FLAG_RESTRICT_PUSHOBJECT0x00200000find if a parcel restricts llPushObject
PARCEL_FLAG_ALLOW_GROUP_SCRIPTS0x02000000find if a parcel allows scripts owned by group
PARCEL_FLAG_ALLOW_CREATE_GROUP_OBJECTS0x04000000find if a parcel allows object creation by group members or objects
PARCEL_FLAG_ALLOW_ALL_OBJECT_ENTRY0x08000000find if a parcel allows all objects to enter a parcel
PARCEL_FLAG_ALLOW_GROUP_OBJECT_ENTRY0x10000000find if a parcel only allows group (and owner) objects to enter the parcel
PF_FOR_SALE†0x00000004The parcel is for sale1
PF_FOR_SALE_OBJECTS†0x00000080Objects on the parcel are sold with it1
PF_SHOW_DIRECTORY†0x00001000Shown in search1
PF_ALLOW_DEED_TO_GROUP†0x00002000Can be deeded to the group1
PF_CONTRIBUTE_WITH_DEED†0x00004000Contribute with deed (no description in the viewer source)1
PF_SELL_PARCEL_OBJECTS†0x00010000Objects on the land are included when the land is sold1
PF_ALLOW_PUBLISH†0x00020000Parcel information may be published on the web1
PF_MATURE_PUBLISH†0x00040000The published information is mature1
PF_URL_WEB_PAGE†0x00080000The media URL is a web page1
PF_URL_RAW_HTML†0x00100000The media URL is a raw HTML string1
PF_DENY_ANONYMOUS†0x00400000Deny accounts that are neither identified nor transacted1
PF_ALLOW_VOICE_CHAT†0x20000000Voice chat is allowed1
PF_USE_ESTATE_VOICE_CHAN†0x40000000Uses the estate’s voice channel1
PF_DENY_AGEUNVERIFIED†0x80000000Deny accounts that aren’t age-verified1

† The viewer’s names for parcel flags that have no LSL constant. They are not exposed to the compiler, so write the value. Whether llGetParcelFlags reports them is not documented. 0x80000000 is the sign bit of an LSL integer.

Example 1
if (!(llGetParcelFlags(llGetPos()) & PARCEL_FLAG_ALLOW_FLY))
llSay(0,"You are not allowed to fly here!, Sorry!.");
// Answers TRUE if rezzing is permitted, FALSE if not.
// Rezzing can fail even if this returns TRUE due to parcel full or server errors.
// Rezzing will always fail if this returns FALSE
integer canRezAt(vector pos) {
integer parcelFlags = llGetParcelFlags(pos);
list parcelDetails = llGetParcelDetails(pos, [PARCEL_DETAILS_OWNER, PARCEL_DETAILS_GROUP]);
key parcelOwner = llList2Key(parcelDetails, 0);
9 collapsed lines
key parcelGroup = llList2Key(parcelDetails, 1);
if (parcelFlags & PARCEL_FLAG_ALLOW_CREATE_OBJECTS) return TRUE;
if (parcelOwner == llGetOwner()) return TRUE;
if (!llSameGroup(parcelGroup)) return FALSE;
if (parcelFlags & PARCEL_FLAG_ALLOW_CREATE_GROUP_OBJECTS) return TRUE;
return FALSE;
}
// Answers TRUE if running scripts is permitted, FALSE if not
integer canRunScriptsAt(vector pos) {
integer parcelFlags = llGetParcelFlags(pos);
list parcelDetails = llGetParcelDetails(pos, [PARCEL_DETAILS_OWNER, PARCEL_DETAILS_GROUP]);
key parcelOwner = llList2Key(parcelDetails, 0);
8 collapsed lines
key parcelGroup = llList2Key(parcelDetails, 1);
if (parcelFlags & PARCEL_FLAG_ALLOW_SCRIPTS) return TRUE;
if (parcelOwner == llGetOwner()) return TRUE;
if (!llSameGroup(parcelGroup)) return FALSE;
if (parcelFlags & PARCEL_FLAG_ALLOW_GROUP_SCRIPTS) return TRUE;
return FALSE;
}
Original wiki source

Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.

  1. Viewer 746d768339: llinventory/llparcelflags.h:32-64 ↩ ↩2 ↩3 ↩4 ↩5 ↩6 ↩7 ↩8 ↩9 ↩10 ↩11 ↩12 ↩13 ↩14