// llGetRegionFlags() and llGetParcelFlags() test lsl script
testFlag(integer flags, integer flag, string flag_name)
{
if (flags & flag)
{
llOwnerSay(flag_name + " is set to TRUE");
}
else
{
llOwnerSay(flag_name + " is set to FALSE");
}
}
default
{
touch_start(integer total_number)
{
integer rf = llGetRegionFlags();
integer pf = llGetParcelFlags(llGetPos());
llOwnerSay("Parcel flags: (" + (string)pf + ")");
testFlag(pf,PARCEL_FLAG_ALLOW_CREATE_OBJECTS,"PARCEL_FLAG_ALLOW_CREATE_OBJECTS");
testFlag(pf,PARCEL_FLAG_ALLOW_DAMAGE,"PARCEL_FLAG_ALLOW_DAMAGE");
testFlag(pf,PARCEL_FLAG_ALLOW_FLY,"PARCEL_FLAG_ALLOW_FLY");
testFlag(pf,PARCEL_FLAG_ALLOW_LANDMARK,"PARCEL_FLAG_ALLOW_LANDMARK");
testFlag(pf,PARCEL_FLAG_ALLOW_SCRIPTS,"PARCEL_FLAG_ALLOW_SCRIPTS");
testFlag(pf,PARCEL_FLAG_ALLOW_TERRAFORM,"PARCEL_FLAG_ALLOW_TERRAFORM");
testFlag(pf,PARCEL_FLAG_LOCAL_SOUND_ONLY,"PARCEL_FLAG_LOCAL_SOUND_ONLY");
testFlag(pf,PARCEL_FLAG_USE_ACCESS_GROUP,"PARCEL_FLAG_USE_ACCESS_GROUP");
testFlag(pf,PARCEL_FLAG_USE_ACCESS_LIST,"PARCEL_FLAG_USE_ACCESS_LIST");
testFlag(pf,PARCEL_FLAG_USE_BAN_LIST,"PARCEL_FLAG_USE_BAN_LIST");
testFlag(pf,PARCEL_FLAG_USE_LAND_PASS_LIST,"PARCEL_FLAG_USE_LAND_PASS_LIST");
llOwnerSay("Region flags: (" + (string)rf + ")");
testFlag(rf,REGION_FLAG_ALLOW_DAMAGE,"REGION_FLAG_ALLOW_DAMAGE");
testFlag(rf,REGION_FLAG_ALLOW_DIRECT_TELEPORT,"REGION_FLAG_ALLOW_DIRECT_TELEPORT");
testFlag(rf,REGION_FLAG_BLOCK_FLY,"REGION_FLAG_BLOCK_FLY");
testFlag(rf,REGION_FLAG_BLOCK_TERRAFORM,"REGION_FLAG_BLOCK_TERRAFORM");
testFlag(rf,REGION_FLAG_DISABLE_COLLISIONS,"REGION_FLAG_DISABLE_COLLISIONS");
testFlag(rf,REGION_FLAG_DISABLE_PHYSICS,"REGION_FLAG_DISABLE_PHYSICS");
testFlag(rf,REGION_FLAG_FIXED_SUN,"REGION_FLAG_FIXED_SUN");
testFlag(rf,REGION_FLAG_SANDBOX,"REGION_FLAG_SANDBOX");
}
}