Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // list of people's prims to keep (owner UUIDs)
- list do_not_return =
- [
- "6a5aef83-93a6-42e1-9d76-bd03b4f5e8aa", // Darien Caldwell
- "b91d12f1-4e0f-4752-8199-73d71fdeeee5" // Lucia Nightfire
- ];
- // list of people who can trigger a cleanup (return)
- // doesn't have to be the same as above, but probably will be
- list allowed_to_trigger_return =
- [
- "6a5aef83-93a6-42e1-9d76-bd03b4f5e8aa", // Darien Caldwell
- "b91d12f1-4e0f-4752-8199-73d71fdeeee5" // Lucia Nightfire
- ];
- default
- {
- state_entry()
- {
- llRequestPermissions(llGetOwner(),PERMISSION_RETURN_OBJECTS);
- }
- on_rez(integer param)
- {
- llRequestPermissions(llGetOwner(),PERMISSION_RETURN_OBJECTS);
- }
- run_time_permissions(integer perm)
- {
- if (perm & PERMISSION_RETURN_OBJECTS)
- {
- llOwnerSay("Permission Granted, ready to return stuff!");
- }
- }
- touch_start(integer total_number)
- {
- string toucher = llDetectedKey(0);
- if (llListFindList(allowed_to_trigger_return,[toucher]) != -1 || toucher == llGetOwner())
- {
- // get list of prim owners on parcel
- list prim_owners = llGetParcelPrimOwners(llGetPos());
- list prim_interlopers=[];
- integer x=0;
- llRegionSayTo(toucher,0,"Prim Owners Detected");
- llRegionSayTo(toucher,0,"\n--------------------");
- do {
- llRegionSayTo(toucher,0,llList2String(prim_owners,x)+": "+llList2String(prim_owners,x+1)+" objects.");
- if (llListFindList(do_not_return,[llList2Key(prim_owners,x)]) == -1)
- {
- // not on the keep list, so queue for removal
- prim_interlopers+=llList2Key(prim_owners,x);
- }
- x=x+2;
- }
- while(llGetListLength(prim_owners)>x);
- // if we have prims to delete, do it.
- if (prim_interlopers!= [])
- {
- x=0;
- do {
- llReturnObjectsByOwner(llList2Key(prim_interlopers,x),OBJECT_RETURN_PARCEL);
- x++;
- }
- while(llGetListLength(prim_interlopers)>x);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement