Jump to content

[RESOLVED] llReturnObjectsbyOwner


Leander Tyles
 Share

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

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

Recommended Posts

i decided to do things differently and wrote this script

i have a few questions tho

 

if im an estate manager, do i have to worry about llReturnObjectsbyOwner returning my neighbours prims?

let me give you a scenario, what if a fellow landowner happens to have a prim on my land

im concerned about my system not only removing the prim on my land but quite possibly all items from his own land.

 

anyway moving on:

no more moving sensors, no more limitations.

 

after i retreive parcel prim owners, i check to ensure they nolonger in the sim before returning thier prims,

even if the tenant is still in the sim if they using over 100 prims i immediatly return them and give em a warning,

if over 500 prims then they banned for 24 hours

 

whats left to do

 

* when i get llGetParcelPrimOwners(llGetPos()); - how do i remove myself from the list

* also if tenants use over 50 prims, how to only warn them once? since this code will be triggered every 30mins or so 
                       

another problem i notice

[10:37]  Object: [THE JANITOR]: 1 prims returned to
[10:37]  Object: [THE JANITOR]: 0 prims returned to
[10:37]  Object: [THE JANITOR]: 515 prims returned to Leander Tyles
[10:37]  Object: [THE JANITOR]: 0 prims returned to

 

its true i have 515 prims on my land, another person has 1 ... but why doesnt it say thier name above ^?

the other two people have 2 and 16 prims on the land, but as you can see above it says 0

 

so i dont know what the problem is? im guessing the names dont show because they aint in the sim perhaps, kinda screws up my notification msg blah

 

// NOTE2SELF use a timer

integer NOTIFYOWNER = TRUE;

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)
    {

                list prim_owners = llGetParcelPrimOwners(llGetPos());
                list prim_interlopers=[];
                integer x=0;

                do {
                    list IsInSim = llGetAgentList(AGENT_LIST_REGION,[]);

                    if (llListFindList(IsInSim,[llList2Key(prim_owners,x)]) == -1)
                    {
                        // not in the sim, so queue for removal
                        prim_interlopers+=llList2Key(prim_owners,x);
                    }
                        
                        // it would be nice to warn people when they go over 50, problem is i dont wanna risk
                        // spamming them with warnings every time this script is triggered
                        
                    if (llListFindList(IsInSim,[llList2Key(prim_owners,x)]) != -1)
                    {
                        // they still in the sim, check to ensure they aint abusing prim limits?
                        
                        if (llList2Integer(prim_owners,x+1) > 100 && llList2Integer(prim_owners,x+1) < 500 ) 
                        // should help prevent greifing attacks
                        {
                        prim_interlopers+=llList2Key(prim_owners,x); // queue for removal
                        llInstantMessage(llList2Key(prim_owners,x),"[ALERT]: Im sorry we dont allow people to rez over 100 prims, your using " +llList2String(prim_owners,x+1)+ " we have to return them.");
                        }
                        // if more than 500 ban them for 24 hours
                        if (llList2Integer(prim_owners,x+1) > 500)
                        {
                        prim_interlopers+=llList2Key(prim_owners,x); // queue for removal
                        llAddToLandBanList(llList2Key(prim_owners,x),24.0); // temp ban for 24 hours
                        llInstantMessage(llList2Key(prim_owners,x),"[ALERT]: you are suspected of being a greifer by abusing prims and have been temporerily banned for 24 hours\nif you think this is a mistake please contact " +llKey2Name(llGetOwner()));
                        llSay(0,"[ALERT]: " + llKey2Name(llList2String(prim_owners,x)) + " has been temporerily banned for 24 hours on suspicion of greifing.");
                        // regardless of notifyowner i want to be sure to recieve this wether im online or not   
                        llInstantMessage(llGetOwner(),"[ALERT]: " + llKey2Name(llList2String(prim_owners,x)) + " has been temporerily banned for 24 hours on suspicion of greifing.");
                        }
                    }
                    x=x+2;            
                }                
                
                while(llGetListLength(prim_owners)>x);
               
                // if we have prims to delete, do it.
                if (prim_interlopers!= [])
                {
                    x=0;
                    do {
                 
               if (NOTIFYOWNER == TRUE)
               {
               // notify owner whos prims are being returned + how many
               // if over 100 i have to presume they have been warned by the system and forcefully removed, not left sim.
               llOwnerSay("[THE JANITOR]: " + (string)llList2Integer(prim_owners,x+1) + " prims returned to " + llKey2Name(llList2String(prim_owners,x)));  
               }
                      
               //   llReturnObjectsbyOwner(llList2Key(prim_interlopers,x),OBJECT_RETURN_PARCEL);
                        x++;
                    }
                    while(llGetListLength(prim_interlopers)>x);
                }
               
            }
}

 

Link to comment
Share on other sites

OK... Issues in order....

1. You don't need to worry about your script returning things on a neighboring sim.  llReturnObjectsByOwner only works on land that you own.  Also, see the note in the LSL wiki: "Parcel owner, estate owner and estate managers can not have their objects returned by this method."

2. You don't really need to remove yourself from the list (see above), but if you really want to, that just means adding another if test.  No big deal.

3. If you want to notify people only once, you'll have to build a list of people you have notified and then check that list each time you want to notify anyone.  If a person is already on your list, don't notify them again.

4.  llKey2Name only works for agetns who are on the same at the time.  If you want to get names of absent agent, you need to use llRequestAgentData

 EDIT:  Just out of curiosity .... why do you assume that someone with more than 500 prims on the sim is a griefer?  I can think of plenty of good reasons why someone might drop excessive prims on a parcel without meaning any harm. I've done it myself with a runaway rezzer, but a new homeowner could just as easily do it by rezzing a house (skybox, luxury yacht, ...) without checking the prim count first.  Automatic banning by script just seems like overkill.

Link to comment
Share on other sites

i havent made much progress, nothing new except for rewriting it because i couldnt figure out why it stopped functioning properly

i want to remove my name from the list to avoid being told off for being over the prim limit.. since all the houses on the land belong to me it makes sence that im the one using up the most resources.

i tried using llRequestAgentData but i got the same issue as before, its to slow to retreive the name so instead the message is just blank

i also dont think thier was a problem, i probally got the NOTIFYOWNER msg in the wrongplace, but i cnt figure it out

i assume a person with over 500 prims is a greifer because i only have 4096sqm, i dont have many prims so one individual certainly shouldnt be using that many especially when i offer fully furnished homes and use less than that myself.... but yes an innocent person may get harmed which is why the bans only temporery besides they're sent a warning if using more than 100 prims... so they shouldnt be rezzing more, i will make the script wait before taking action and possibly give the tenant 2 minutes to pick thier items up

 

Link to comment
Share on other sites

updated script

 

integer NOTIFYOWNER = TRUE;string prim_owner_name;integer KEEPPRIMSFREE = 100; // try to ensure thiers always prims free so a house can rezinteger PRIMABUSELIMIT = 500; // temporery ban people using over this amount of primsinteger PRIMLIMIT = 100; // prim allowance - return prims if tenant is using over this amountfloat   HOURS = 24.00; // float - ban duration if tenant abuses primskey mykey;integer primcheck() {    integer maxprims = llGetParcelMaxPrims(llGetPos(), FALSE);    integer totalprimsused = llGetParcelPrimCount(llGetPos(), PARCEL_COUNT_TOTAL, FALSE);        integer primcount = (maxprims - totalprimsused);    integer primshortage = (KEEPPRIMSFREE - primcount);        if (primcount >= KEEPPRIMSFREE) {        return TRUE;    }    return FALSE;}default{        dataserver(key queryid, string data)    {            prim_owner_name = data;         }        state_entry()    {        mykey = llGetOwner();        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);                       // get list of prim owners on parcel            list prim_owners = llGetParcelPrimOwners(llGetPos());            list prim_interlopers=[];            integer x=0;                        do {                                 list IsInSim = llGetAgentList(AGENT_LIST_REGION,[]);                                // check thiers atleast 100 prims spare at all times to ensure thiers no house rezzing problems                if (primcheck() != TRUE)                 { // free up resources by returning everybodys with an explanation                    prim_interlopers+=llList2Key(prim_owners,x);                                         if (llListFindList(IsInSim,[llList2Key(prim_owners,x)]) != -1) // still in the sim                    {                    // notify any tenants in the sim about the situation                    llInstantMessage(llList2Key(prim_owners,x),"[bROADCAST]: thiers not many prims available at the moment so we are returning everybodys to free up resources.");                    }                }                                // AGENTS NOT IN THE SIM                if (llListFindList(IsInSim,[llList2Key(prim_owners,x)]) == -1)                {                    // not in the sim, so queue for removal                    prim_interlopers+=llList2Key(prim_owners,x);                }                                 // AGENTS STILL IN THE SIM                if (llListFindList(IsInSim,[llList2Key(prim_owners,x)]) != -1)                    {                        // check to ensure they aint abusing prim limits?                                       if (llList2Integer(prim_owners,x+1) > PRIMLIMIT && llList2Integer(prim_owners,x+1) < PRIMABUSELIMIT )                         // should help prevent greifing attacks                        {                        prim_interlopers+=llList2Key(prim_owners,x); // queue for removal                        llInstantMessage(llList2Key(prim_owners,x),"[ALERT]: Im sorry we dont allow people to rez over 100 prims, your using " +llList2String(prim_owners,x+1)+ " you have 2 minutes to pick them up before they returned.");                        llSleep(120);                        }                    }                                        // if USING more than 500 prims ban them instantly for x hours                        if (llList2Integer(prim_owners,x+1) > PRIMABUSELIMIT)                         {                        prim_interlopers+=llList2Key(prim_owners,x); // queue for removal                        llAddToLandBanList(llList2Key(prim_owners,x),HOURS*3600);                                                llRequestAgentData(mykey, DATA_NAME);                                                llInstantMessage(llList2Key(prim_owners,x),"[ALERT]: you are suspected of being a greifer by abusing prims and have been temporerily banned for " +(string)llRound(HOURS)+ " hours\nif you think this is a mistake please contact " +(string)prim_owner_name);                        llRequestAgentData(llList2Key(prim_owners,x), DATA_NAME);                                                llSay(0,"[ALERT]: " + (string)prim_owner_name + " has been temporerily banned for " +(string)llRound(HOURS)+ " hours on suspicion of greifing.");                        // regardless of notifyowner i want to be sure to recieve this wether im online or not                           llInstantMessage(llGetOwner(),"[ATTENTION]: " + (string)prim_owner_name + " has been temporerily banned for " +(string)llRound(HOURS)+ " hours on suspicion of greifing."); // state time of action                        }                                        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);            }                    }    }// TODO LIST:// make notify owner work// remove owner from list// llRequestAgentData too slow to work// unable to warn owner once if thier was a primlimit situation - not important tho i suppose

 

Link to comment
Share on other sites

You need to study event handlers and understand that they are not functions that you call as needed nor are events interrupts that will pause code execution, be dealt with and afterwards have program execution pick up again at that point to carry on. Best way to learn is go through the 37 entries at http://wiki.secondlife.com/wiki/Category:LSL_Events and study all the example code until you see how this works.

 

But what you're attempting to do with dataserver will never work.

 

[ETA: the entry at http://lslwiki.net/lslwiki/wakka.php?wakka=Events may help as well in your studies.]

Link to comment
Share on other sites

I would add to what Rolig said at the bottom of her post. Any tenant close to their limit can go over unintentionally just by rezzing something with an LI higher than they realize while it is in their inventory. They might have to experiment a little bit to decide which things to keep rezzed. If they get all of their objects returned automatically, that easily, (and risk a ban too), they will probably look for a new home.

I can see having limits and enforcing them but I'm not sure if automatic bans and quick auto-returns should be used against rent-paying tenants.

Link to comment
Share on other sites

I can think of many ways some one could accidentally rez out 500 or more prims, especially to newbs.  They could easily pull out a coalesced object that spreads prims all over the place far and wide.   Even an experienced user may take longer than two minutes to locate them all and pick them up.  A newb wouldn't have a chance. They could buy a mesh object and make it bigger resulting in a huge increase in LI, without realizing it in time before the autoban kicks in. Just two common ways off the top of my head.

You really think someone is going to continue to rent from you after being banned for an accidental mistake? It isn't just a 24 hour ban, its losing a days rent for a place they can't use, and keeping them from their property unless you return it all to them.  Pretty draconian punishment IMO.  You don't think that people aren't going to tell others about it and tell them not to rent from you.

Sure, give them a warning, and a reasonable time limit, but don't autoban them.  There is no reason not to find out what is going on and help your tenant if needed.  You can always ban them yourself if you find out they are griefing, or it is a constant problem.  Even if you are offline at the time the world won't come to an end if you can't deal with it immediately.  This is all part of being a good landlord.

Lastly it is your land and you can do what you want, but be sure to be honest and fair make it clear to prospective tenants that this is what is going to happen, without exception and with no reprieve due to mitigating circumstances. BEFORE they pay you any rent.  My guess is they will pass your rental by  I would.

  • Like 1
Link to comment
Share on other sites

understood,


maybe i should have mentioned i aint offering luxury homes here, my skyboxes are free.

they dont come with prims.... the ability to rez items and change outfits is a privilege.

 

if one person abuses the primlimit, everybody else is effected & i dont mean they cant rez items,

i mean they have no home to goto in that case, because thiers no prims free to rez a home.

 

1 single person can ruin it for everybody - if i wasnt around to watch over them all these years

 

also these numbers are just variables,  i do moniter aboutland and see the average prims people tend to use.

 

the whole point of this script is so my buissness is automated and i dont have to play constantly anymore.

 

why did i have to play constantly?

 

sure i could have disabled all residents can create objects -but whats the point of a home where you cant rez items.. it doesnt realy feel like your own then.

 

and thiers always tenants which dont follow the rules and will try to get around the autoreturn timer by setting prims to the group - the land aint deeded so i am the only one who can clean up several times a day everyday

 

from my experience its actually old players not newbs which try to use up all the prims...

not because they dont know any better but because they want to take advantage i see it all the time and not just at my own rentals/dressing rooms - thier are some places which charge as low as 10L per week for 0 prims and people still help themselfs to hundreds of prims which is the equivalent of renting an expensive 512sqm of land

 

also greifers aint always smart enough to wear the grouptag when rezzing a item which spreads like a virus - so after  along period of time thier is a small chance it can clears itself up but very unlikely

 

but now thanks to llReturnObjectsbyOwner


* i can allow all residents to use scripts not just the group

* i dont need to use the lands autoreturn atall, instead of 40minute return time.... i only return if they nolonger in the sim

 

i think its all for the best

 

btw i figured out how to remove my name from the list which seems to work, but i still have issues

                integer idx;                if (~(idx = llListFindList(prim_owners,[llGetOwner()])))                 {                   prim_owners = llDeleteSubList(prim_owners,idx,idx);                 }

 

ive played around with it to ensure it does remove my name from the list, and i can confirm it does with the code below

 

// AGENTS STILL IN THE SIM                if (llListFindList(IsInSim,[llList2Key(prim_owners,x)]) != -1)                    {                        llRegionSayTo(toucher,0,llList2String(prim_owners,x)+": "+llList2String(prim_owners,x+1)+" objects.");

 

but heres my problem, if i use llownersay down below

then it still reports my prims? but i dont understand why if i removed my name from the list at the very start.

 

if im the only person with prims on the land it will say PARCEL IS CLEAR so the list is surely empty?

but if another person has prims on my land.... im included in the list again for some reason

 

   while(llGetListLength(prim_owners)>x);                        // list empty, thiers no tasks to do so announce it to the world            if (llGetListLength(prim_interlopers) == 0)             {                llSay(0,"[THE JANITOR]: nothing to do, parcel is clear.");            }                        // if we have prims to delete, do it.            if (prim_interlopers!= [])            {                x=0;                do {                                        // llReturnObjectsbyOwner(llList2Key(prim_interlopers,x),OBJECT_RETURN_PARCEL);                    llOwnerSay("[THE JANITOR]: " + llList2String(prim_owners,x)+": "+llList2String(prim_owners,x+1)+" objects.");                    x++;                }                while(llGetListLength(prim_interlopers)>x);            }        }    }

 

it says

[THE JANITOR]: 931e6dc3-5a81-4bde-acaf-28abdd6ead45: 15 objects.
[THE JANITOR]: 15: 371 objects.

^bit weird 15 is on the second line, also it still knows how many prims i have it shouldnt be saying 371 atall so i must be doing summit wrong with deleting the sublist

 

when i figure this out, i would just like to report total amount of prims returned, not each individual persons amount

Link to comment
Share on other sites


Leander Tyles wrote:

...

 
   while(llGetListLength(prim_owners)>x);                        // list empty, thiers no tasks to do so announce it to the world            if (llGetListLength(prim_interlopers) == 0)             {                llSay(0,"[THE JANITOR]: nothing to do, parcel is clear.");            }                        // if we have prims to delete, do it.            if (prim_interlopers!= [])            {                x=0;                do {                                        // llReturnObjectsbyOwner(llList2Key(prim_interlopers,x),OBJECT_RETURN_PARCEL);                    llOwnerSay("[THE JANITOR]: " + llList2String(prim_owners,x)+": "+llList2String(prim_owners,x+1)+" objects.");                    x++;                }                while(llGetListLength(prim_interlopers)>x);            }        }    }

 

it says

[THE JANITOR]: 931e6dc3-5a81-4bde-acaf-28abdd6ead45: 15 objects.

[THE JANITOR]: 15: 371 objects.

^bit weird 15 is on the second line, also it still knows how many prims i have it shouldnt be saying 371 atall so i must be doing summit wrong with deleting the sublist

 

when i figure this out, i would just like to report total amount of prims returned, not each individual persons amount

You also need to go study what a strided list is and how to work with them. http://wiki.secondlife.com/wiki/Category:LSL_List#Strided_lists

Link to comment
Share on other sites

ok thanks i beleive i got it now, i delete the prims first then the key or i can just remove idx twice, same thing

 

prim_owners = llDeleteSubList(prim_owners,idx+1,idx+1);prim_owners = llDeleteSubList(prim_owners,idx,idx); 

 

i also done the reporting to public

 

                 primcountreturned = primcountreturned + llList2Integer(prim_owners,x+1);              llReturnObjectsbyOwner(llList2Key(prim_interlopers,x),OBJECT_RETURN_PARCEL);                    x++;                }                while(llGetListLength(prim_interlopers)>x);            }            llOwnerSay("[THE JANITOR]: total prims cleared up " +(string)primcountreturned+ " objects.");

 

updated a little

 

            integer maxprims = (llGetParcelMaxPrims(llGetPos(), FALSE));            integer totalprimsused = (llGetParcelPrimCount(llGetPos(), PARCEL_COUNT_TOTAL, FALSE));            integer primsavailable = (maxprims - totalprimsused);                        llOwnerSay("[THE JANITOR]: cleared up " +(string)primcountreturned+ " prims, thier are now " +(primsavailable)+ " available.");

 

Link to comment
Share on other sites

yes

 

another problem i got is, i tried running the script every 60 seconds and i get

 

 Object: returned -3 prims owned by 00000000-0000-0000-0000-000000000000
[15:15]  Object: [THE JANITOR]: cleared up 0 prims, thier are now 660 available.


^ it shouldnt say that atall since the list is empty,

it should be saying "[THE JANITOR]: nothing to do, parcel is clear.""

 

i have no idea why it says thiers negative prims, i modified another script from google to test if it had the same issue

 

// list of people's prims to keep (owner UUIDs)list do_not_return =[    "6a5aef83-93a6-42e1-9d76-bd03b4f5e8aa",  // Darien Caldwell    "c3861ff5-b4a1-43e0-b76d-ed3189472577",  // Elizabeth Ivory    "e32c9042-57e2-4f19-b430-73494d11ceb8"   // Kat Fetisov];// list of people who can trigger a cleanup (return)// doesn't have to be the same as above, but probably will belist allowed_to_trigger_return =[    "6a5aef83-93a6-42e1-9d76-bd03b4f5e8aa",  // Darien Caldwell    "b91d12f1-4e0f-4752-8199-73d71fdeeee5"   // Lucia Nightfire];default{    state_entry()    {        llSetTimerEvent(60);        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!");        }    }        timer()    {            // get list of prim owners on parcel            list prim_owners = llGetParcelPrimOwners(llGetPos());            list prim_interlopers=[];            integer x=0;                          do {                if (llListFindList(do_not_return,[llList2String(prim_owners,x)]) == -1)                {                    llOwnerSay(llList2String(prim_owners,x)+" was not found so adding to delete list");                    // 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!= [])            {                integer c;                x=0;                do {                    c=llReturnObjectsByOwner(llList2Key(prim_interlopers,x),OBJECT_RETURN_PARCEL);                    llOwnerSay("returned "+(string)c+" prims owned by "+llList2String(prim_interlopers,x));                    x++;                }                while(llGetListLength(prim_interlopers)>x);            }                    }    }

 this one does it too however it claims i got -4 prims

[15:18]  Object: returned -4 prims owned by 931e6dc3-5a81-4bde-acaf-28abdd6ead45

 

i dont understand what the issue is, or why it would report different infomation when im running them at the sametime.

the script works fine and none of this would be an issue if i didnt want it to talk on public chat.. but i do hmm

 

ofcourse i could check its not a negative number before talking in public-chat but thats kinda cheating

 

Link to comment
Share on other sites

From the LSL Wiki:

Return all objects on the same parcel as the script which are owned by owner.
The script must be owned by an estate manager or over a parcel owned by the owner of the script.

If the return value is negative, it represents an error flag.

Error Flags   ↓   ↓ Description
ERR_GENERIC -1 A nebulous and inexplicable error, nothing is known about it.
ERR_PARCEL_PERMISSIONS -2 Permission lacked to perform task on specified parcel.
ERR_MALFORMED_PARAMS -3 Parameters are malformed.
ERR_RUNTIME_PERMISSIONS -4 Script lacks the runtime permission to perform the requested task.
ERR_THROTTLED -5 Task has been throttled. Try again later.
Link to comment
Share on other sites

i see,

the -4 makes sence because i wasnt granting it permission on purpose.

 

the -3 however was from my script,

considering it checks prim_interlopers!= [ ] before triggering the autoreturn, i dont see why it would suffer an invalid number problem

 

which leads one to beleive my name aint realy removed from the list.

 

     timer()    {        // string toucher = llDetectedKey(0);                       // get list of prim owners on parcel            list prim_owners = llGetParcelPrimOwners(llGetPos());            list prim_interlopers=[];            integer x=0;                            // llReturnObjectsbyOwner wont return parcel owners prims but i remove my name from list for safety                integer idx;                if (~(idx = llListFindList(prim_owners,[llGetOwner()])))                 {  // strided lists                   prim_owners = llDeleteSubList(prim_owners,idx+1,idx+1); // remove primcount                    prim_owners = llDeleteSubList(prim_owners,idx,idx); // remove agent key                }             do {                                 list IsInSim = llGetAgentList(AGENT_LIST_REGION,[]);                                // AGENTS NOT IN THE SIM                if (llListFindList(IsInSim,[llList2Key(prim_owners,x)]) == -1)                {                        // not in the sim, so queue for removal                    prim_interlopers+=llList2Key(prim_owners,x);                }                                 // AGENTS STILL IN THE SIM                if (llListFindList(IsInSim,[llList2Key(prim_owners,x)]) != -1)                    {                        //llRegionSayTo(toucher,0,llList2String(prim_owners,x)+": "+llList2String(prim_owners,x+1)+" objects.");                                                // check to ensure they aint abusing prim limits?                                       if (llList2Integer(prim_owners,x+1) > PRIMLIMIT && llList2Integer(prim_owners,x+1) < PRIMABUSELIMIT )                         // should help prevent greifing attacks                        {                        prim_interlopers+=llList2Key(prim_owners,x); // queue for removal                        llInstantMessage(llList2Key(prim_owners,x),"[ALERT]: Im sorry we dont allow people to rez over 100 prims, your using " +llList2String(prim_owners,x+1)+ " you have 2 minutes to pick them up before they returned.");                        llSleep(120);                        }                    }                                        // if USING more than 500 prims ban them instantly for x hours                        if (llList2Integer(prim_owners,x+1) > PRIMABUSELIMIT)                         {                        prim_interlopers+=llList2Key(prim_owners,x); // queue for removal                        llAddToLandBanList(llList2Key(prim_owners,x),HOURS);                                                llRequestAgentData(mykey, DATA_NAME);                                                llInstantMessage(llList2Key(prim_owners,x),"[ALERT]: you are suspected of being a greifer by abusing prims and have been temporerily banned for " +(string)llRound(HOURS)+ " hours\nif you think this is a mistake please contact " +(string)prim_owner_name);                        llRequestAgentData(llList2Key(prim_owners,x), DATA_NAME);                                                llSay(0,"[ALERT]: " + (string)prim_owner_name + " has been temporerily banned for " +(string)llRound(HOURS)+ " hours on suspicion of greifing.");                        // regardless of notifyowner i want to be sure to recieve this wether im online or not                           llInstantMessage(llGetOwner(),"[ATTENTION]: " + (string)prim_owner_name + " has been temporerily banned for " +(string)llRound(HOURS)+ " hours on suspicion of greifing."); // state time of action                        }                                        x=x+2;               }            while(llGetListLength(prim_owners)>x);

// ### IF I MOVE THE DELSUBLIST CODE TO HERE IT WORKS FINE ### // list empty, thiers no tasks to do so announce it to the world if (llGetListLength(prim_interlopers) == 0) { llSay(0,"[THE JANITOR]: nothing to do, parcel is clear."); } integer primcountreturned; // if we have prims to delete, do it. if (prim_interlopers!= []) { integer c; x=0; do { primcountreturned = primcountreturned + llList2Integer(prim_owners,x+1); c=llReturnObjectsByOwner(llList2Key(prim_interlopers,x),OBJECT_RETURN_PARCEL); if (NOTIFYOWNER == TRUE && prim_interlopers!= []) { // tells me the complete list of names and how many prims returned llInstantMessage(llGetOwner(),"returned "+(string)c+" prims owned by "+llList2String(prim_interlopers,x)); } x++; } while(llGetListLength(prim_interlopers)>x); } integer maxprims = (llGetParcelMaxPrims(llGetPos(), FALSE)); integer totalprimsused = (llGetParcelPrimCount(llGetPos(), PARCEL_COUNT_TOTAL, FALSE)); integer primsavailable = (maxprims - totalprimsused); if (llGetListLength(prim_interlopers) != 0) { // hopefully im not in lobby when this happens or i recieve multiple notifications llSay(0,"[THE JANITOR]: cleared up " +(string)primcountreturned+ " prims, thier are now " +(string)primsavailable+ " available."); } } }

 

above i marked the area

"// ### IF I MOVE THE DELETESUBLIST CODE TO HERE IT WORKS FINE ###"

the only problem ofcourse is i need to remove my name at the beginning of the code not towards the end...

because if im over the primlimit i get sent a warning message before we even reach that point.

 

ive tried a few things to try and fix it

                if (llListFindList(prim_owners,[llGetOwner()]) == -1)
                {


also

 

if (prim_owners,x != llGetOwner())

{

//carry on with all the rest of the code

 

but i cant get it to work the way i want so i think im gonna go ahead and do it the easy way because its getting on my nerves now

 

 if (llList2Integer(prim_owners,x+1) > PRIMABUSELIMIT && llList2Integer(prim_owners,x != llGetOwner())) 

 

 

 

 

 

 

 

 

Link to comment
Share on other sites

Try if ( llGetListLength(prim_interlopers) )  . I think that's more likely to succeed than if (prim_interlopers != [])

Also, you can clean up your code a bit with

    integer idx = llListFindList(prim_owners,[llGetOwner()]);    if (~idx )     {          prim_owners = llDeleteSubList(prim_owners,idx,idx+1);     }

 

Link to comment
Share on other sites

unfortunatly made no difference, i almost gave up but i just made a discovery
i know exactly what the problem is now... but i dont know what to do about it

 

if (prim_interlopers!= []) // BOTH OF THESE LINES NEVER WORK
if (llGetListLength(prim_interlopers) == 0) // BECAUSE THE LISTS NEVER BLANK IF DELETESUBLIST IS USED

 

the problem is, if you use DELETESUBLIST, it replaces the entry with a null_key like

00000000-0000-0000-0000-000000000000

 

if i dont try to remove my name from the list and instead check prim_owner,x dont equal me in several places then

it says "[THE JANITOR]: nothing to do, parcel is clear." as it should do

 

it explains why the origional code didnt suffer from this problem since they didnt try to remove names from a list,

if you do it still counts as 1 entry.... so im positive this is the issue here

 

Link to comment
Share on other sites

Wrong.  If you use llDeleteSubList it deletes the entries you have identified.  It does not replace them with something else.  Not blanks, not zeroes, not NULL_KEY, not anything.  The entires are removed and the total number of list elements is decreased.

I don't have the time of energy to troubleshoot your script, but if I did, I would pepper it with diagnostic llOwnerSay statements at key spots to see exactly what values are being recorded for every major variable.  One of your bits of code that you believe can't possibly be wrong, is.

Link to comment
Share on other sites

i dont understand everyones issue, i have 937 prims, i temporery ban people if they use over 500??? thats more than half..we cant all afford our own plot of land us newbs must band together and all share a single plot to keep things affordable therefore thier must be rules.

 

anyway the good news is i solved the puzzle.

  // AGENTS NOT IN THE SIM                          if (llListFindList(IsInSim,[llList2Key(prim_owners,x)]) == -1)                {                        // not in the sim, so queue for removal                    prim_interlopers+=llList2Key(prim_owners,x);                } 

 

### THIS IS WHAT I FOUND OUT ###

basically lets say prim_owners is a list of all the parcelprimowners,

then we remove my name from the list, then we run the code above,

what if thier are no other names in the prim_owners list.....

its checking/comparing the IsInSim list with BLANK ENTRYS from the prim_owners list,

and its checking to ensure they not thier not in the sim so its bound to be true..

ofcourse the blank entry isnt in the sim so it proceeds to update prim_interlopers

and thats when it assigns a blank agentkey below.

00000000-0000-0000-0000-000000000000

 

so whats the fix? simples

 

                if (prim_owners != [] && llListFindList(IsInSim,[llList2Key(prim_owners,x)]) == -1)

 

 

 

 

 

Link to comment
Share on other sites

As I suggested before, try adding a few diagnostic llOwnerSay statements to watch key variables.  In partucular, put one right after your do ... while loop to see what's in the prim_interlopers list.  You'll find that the very last entry is NULL_KEY.  You're running the loop too far.  Take a look.

As for "everyone's issue", banning a paying resident for going over a prim limit seems overly harsh, especially if he's being banned by a script instead of by the landlord himself.  A stern reminder or a warning is much more humane.  The first rule of good personnel management is "Always assume first that a mistake was due to ignorance or bad luck, even if you are fairly sure that it isn't.  Give the person a chance to correct the mistake gracefully."  If I knew that my landlord had an automated system like this one, I'd leave in a blink.  It sounds like that's everyone else's "issue" too. 

Link to comment
Share on other sites

i aint bothered to get into an arguement

and i certainly dont know why you would agree with them, ive made every effort to solve the issues and shown examples along the way.

i even said i figured out the problem and fixed it myself in the previous post,

i even went so far to explain why it was occuring so other people could learn from it...

but it looks like everyone overlooked that, ill go back and color it for you to make it easier to read.

 

and yes i did come here for help origionally, i wrote quite alot of the script before i even approached the forums which suprisingly turned out better than expected because i didnt think i was upto the task so its not asif i expected people to do it for me.

 

yes i have an old account surely my last name gave it away, infact i have much older ones than this but i still have no money at the end of the day doesnt matter how long ive been playing. thiere are people like me who still live in sandboxes

 

you have an issue with me because i own a buisiness and i reach out for a little free help before resorting to hiring a scriptor..... well what can i say your correct yes im not a scriptor myself so i do need help from time to time... and i just needed to fix a few tiny bugs not create a project from scratch. infact scriptors usually shy away when it comes to modifying scripts even if you already done most of the work so these forums are usefull.

Link to comment
Share on other sites

I have many issues over this.

1)  Banning paying tenants for 24 hours over a minor infringement. New people have no idea about prim counts and as such could easily exceed the limit by lack of experience and poof they are denied access to a place they have paid for.

2)  Automated policing, which frankly does not give a hoot for the paying tenants SL enjoyment factor.

3) Your happy to get the rent and spend with no care for the paying tenants rights.

4) If your tenants over pay, you only refund a partial amount. (I read your other posts)

5) Your running a business and want others to use their own time for free.

6) A few bugs and minor changes, its almost a complete re_write.

7) Giving a false impression that your a newbie and live in a sandbox.

8) " a little free help before resorting to hiring a scriptor." I think 3+ years is long enough.

The employ section is fully available and for a few US$ fully commercial packages are on the marketplace. 

Link to comment
Share on other sites

1)

nobody needs 500 prims in an apartment which is already fully furnished.
my tenants dont even reach that amount anyway this is just a safety precuation because i do get greifers sometimes.
it is also more than 50% of the total prims i have available to me which is more then fair.
the ban is only 24 hours, which is the equivalent to 2L per day if you cant go without a home for that long you need to reevaluate your life.
most of my tenants live in my free homes so they dont pay nothing atall.

2) this script is just more advance than everything else that is out thier, yes it does some policing but its main purpose it to keep the land clean

3) i make barely any money atall im so cheap, as for going on a shopping spree and spending it thats a laugh i barely cover my tier

4) i give the tenants the ability to refund themselfs if they decide to moveout, thats a good thing most people wouldnt

5) i want others to use thier own time for free??? im sorry i guess i dont understand the purpose of the forum scripting section

6) its almost a complete rewrite - your absolutly right... BY ME i take it you did read all the posts and didnt just glance at them

7) i mentioned i have estate owner rights, im obviusly not new to the game, i said people still live in sandboxes

8) thiers a age/time limit? before i must pay for advice thats obserd,
im sure nobody else here is using these scripts to create products to resell on xstreet.. aint they running a buisiness too

9) employment section, no thanks ill pass i wasted enough time camping back in the day, its time to enjoy myself

 

a big thankyou 2 rolig, suggesting to use llownersay all over the place helped narrow down the problem area then i had to use my nogin to figure out why it was happening

 

topic marked resolved

goodbye

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3866 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...