Advertisement
Dorex

Can I Rezz

Dec 1st, 2015
297
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. integer CanRez()
  2. {
  3. integer parcelFlags=llGetParcelFlags(llGetPos());
  4.  
  5. list details = llGetParcelDetails(llGetPos(),[PARCEL_DETAILS_GROUP,PARCEL_DETAILS_OWNER]);
  6.  
  7. if (llGetOwner() == llList2Key(details,1))return TRUE; // return true if parcl owner;
  8.  
  9. key parcel_group = llList2Key(details,0);
  10. integer samegroup =llList2Key(llGetObjectDetails(llGetKey(), [ OBJECT_GROUP ] ), 0) == parcel_group;
  11.  
  12.  
  13. return(parcelFlags & PARCEL_FLAG_ALLOW_CREATE_OBJECTS && parcelFlags & PARCEL_FLAG_ALLOW_SCRIPTS ) ||
  14. (parcelFlags & PARCEL_FLAG_ALLOW_CREATE_GROUP_OBJECTS && parcelFlags & PARCEL_FLAG_ALLOW_GROUP_SCRIPTS && samegroup);
  15.  
  16. }
  17.  
  18.  
  19. default
  20. {
  21. touch_start(integer total_number)
  22. {
  23. if(CanRez()){
  24. llOwnerSay("Can Rez");
  25. } else {
  26. llOwnerSay("Can Not Rez");
  27. }
  28.  
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement