Jump to content

how to get land rez permission information


dk201
 Share

You are about to reply to a thread that has been inactive for 2791 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hello everyone,

I am looking for a way to check if my avi has rez permission on a random land/parcel. Especially, I want to check whether the avi can rez item on a land/parcel if a right group tag is activated.

So far i tried llGetParcelFlags(). However, this function only give me info about parcel itself. If my avi is in a group that allow to rez on this land, this function will not know my avi is able to rez. And if my avi is the owner of this land, this function fails too.

Is there a good way to check if an avi can rez on a land so that my rez can automatically happen when it is allowed.

Thanks for advice,

 

 

Link to comment
Share on other sites

No, there really isn't.  llSameGroup and llDetectedGroup will only work if they are in objects that are owned by the group that owns the land, and you have discovered that the same is true for the other land functions.  The system is designed to help landowners control who can create objedcts on their land, not for random visitors to find out.  Of course, you can always try rezzing things anywhere.  If you don't have permission, the system will tell you.  If you do, the object will rez.  That's pretty automatic.

Link to comment
Share on other sites

Actually i do have an item that will do rez only when i have rez prem on any random parcel. It is a backpack from melon bunny witch's integredient gacha collection. I donot know how it works, and the author wont reply IM. >.>

I will do more research then, thanks

Link to comment
Share on other sites

compare llGetOwner with parcel owner - owner can always rez

check if parcel allows rezzing

check if parcel group and parcel owner are the same - if yes: group owned

check llGetParcelFlags(llGetPos()) & PARCEL_FLAG_ALLOW_CREATE_GROUP_OBJECTS;
if true compare the group of your hud/object (llGetObjectDetails) with the parcel group

That will cover most cases, but not all.

or

rez an object - if the object_rez event doesnt trigger within a few seconds you can not rez (or you didnt wait long enough for the delayed rez due to the heavy lag)

Link to comment
Share on other sites

I'm on a mobile device, it's not giving me the option to insert code

 

 

/*

By Aryn Gellner

pos - position (in region coordinates) to check against.

* Additional Land Owner Test added by Ruthven Willenov, simplified by Strife

*/

 

integer is_rezzable(vector pos)

{

integer parcel_flags = llGetParcelFlags(pos);

if(parcel_flags & PARCEL_FLAG_ALLOW_CREATE_OBJECTS)

{

return true;//Anyone can rez. No further checks are needed.

}

 

//Ok, not just anyone can rez. Maybe they share an owner or the land allows for group rezzing.

//So lets get the parcel owner_id and group_id

 

list details = llGetParcelDetails(pos, [PARCEL_DETAILS_OWNER, PARCEL_DETAILS_GROUP]);

 

if(llList2Key(details, 0) == llGetOwner())

{

return TRUE;//Owner can always rez.

}

 

//Since what we are going to return is a boolean just return the result of the boolean expression.

return (parcel_flags & PARCEL_FLAG_ALLOW_CREATE_GROUP_OBJECTS) && llSameGroup(llList2Key(details, 1));

}

Link to comment
Share on other sites

If the land is set that way, yes. But the first test checks to see if ANYONE has rez perms, if yes, then it doesn't move on to the other tests. This doesn't take into consideration if they have it set to auto-return after some time, but I assume if you're not in the group, the object being rezzed would just be temporary anyways, either by llSetStatus, or with a timed llDie

Link to comment
Share on other sites

Right, that's what this is for. It checks for various rez abilities before actually trying to rez. First if the land allows rezzing, if not, checks to see if the owner of the rezzed is the same owner of the land. If not, it then checks if the rezzer is set to the same group as the land. If they all fail, it doesn't attempt to rez

Link to comment
Share on other sites

That's why I suggested the bottom line:  If you want you know whetheryou can rez, try it.  If it works, you know you had permission.  If it doesn't,the system will tell you.  There's no need for fancy scripting, none of which can tell you as much as simply trying it..  No script under your control as a visitor will be able to tell you whether you have a group role that allows you to rez things.  The best it can do is to tell you what parcel perms are, not what YOURS are.

Link to comment
Share on other sites

Right, the OP was trying to avoid that. And though the script will shout an error, it won't know it in the case of triggering an event. I like Nova's suggestion above, you'll still get the error shouted if it can't rez, but setting a timer for 5 seconds or something, and then turning that off if the object_rez event does get triggered:

rez an object - if the object_rez event doesnt trigger within a few seconds you can not rez (or you didnt wait long enough for the delayed rez due to the heavy lag)

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 2791 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...