Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Determine region type from LSL

Laurie Stilman
Registered User
Join date: 11 Apr 2006
Posts: 45
01-13-2010 18:58
Is there any way to determine the type of a region (full/homestead/openspace) from LSL? I don't see anything in llGetRegionFlags() and there doesn't seem to be a llGetRegionDetails(); is there something else I'm missing, or is this not possible directly?

If all else fails, I'll rely on llGetParcelMaxPrims() together with some domain-specific knowledge (i.e. the assumption nobody's messed with Objcet Bonus ;-)
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
01-13-2010 19:19
I don't see any obvious flags that could be used to weed out anything but mainland, get host name MIGHT have some potential, but it'd require a lot of testing to compile a list...

I'm not sure if the search pages for different regions might provide some help, as their keys may have something in common, but I doubt it.

you can rule out HSS/OSS if there are more av's on the region than supported by those two type via llGetRegionAgentCount, but it's obviously not reliable.
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
01-13-2010 20:31
OSSims cannot have classified, rentals, or "habitation" so they SHOU.LD have differences in flags for
0x20000000 (block parcel search),
0x00000080 (block sell/release/transfer),
0x00000400 (hard allow resell),
0x00000800 (hard allow classifieds)

and maybe
0x00000002 (allow landmark),
0x00000004 (allow set home),
0x00000008 (reset home on teleport),
0x00008000 (externally visible),
0x04000000 (allow parcel changes),
0x20000000 (block search)

for primcount numbers this is about the best I've got...

integer vIntMax = llGetParcelMaxPrims();
integer vIntSiz = (integer)((string)llGetParcelDetails( vPosPcl, [PARCEL_DETAILS_AREA] ) );
string vStrRtn;
if (vIntMax < vIntSiz * (750.0 / 256)){
return "OSS";
}else if (vIntMax < vIntSiz * (3750.0 / 256)){
return "HSS (or less)";
}else if (vIntMax < vIntSiz * (15000.0 / 256)){
return "FRS (or less)";
}

and maybe incorporate some of the flag/av info if it does show being different.
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Johan Laurasia
Fully Rezzed
Join date: 31 Oct 2006
Posts: 1,394
01-13-2010 22:44
I smell a new function ( integer llGetSimType() ) or something along those lines...

although, while I'm not against a function of that type, I'm not quite sure of what use it would be (in other words, why the OP wants to be able do determine this information).
Laurie Stilman
Registered User
Join date: 11 Apr 2006
Posts: 45
01-14-2010 00:13
Void, thanks for considering the question so carefully. I went with the prims / parcel size ratio approach, since that should be reliable enough as long as the parcel doesn't have a prim bonus.

And to answer why I want the information: the answer is to calculate tier on land for sale using a formula selected according to region type :-)