Page 1 of 1

Prim Counter Script needed

Posted: Mon Oct 28, 2019 7:02 am
by Alexina Proctor
Has anyone found a prim counter that I can give to residents?

I tried one from Outworldz free scripts, but it didn't work on my 16-region world. We are getting more residents on Wellspring and I don't know of a rental system that will also allow me to set specific prim levels per person. The parcels are small and the prims levels I give are a bit more than the parcel allows.

Thanks,
--Alex

Re: Prim Counter Script needed

Posted: Fri Oct 02, 2020 12:44 am
by Krull Kitty
This may be useful if you are handy with snipping and reformulating code...

Code: Select all

//  gives prim usage information when touched

string primCountThisParcel(integer flag)
{
    vector currentPosition = llGetPos();

    return
        (string)llGetParcelPrimCount(currentPosition, flag, FALSE);
}

default
{
    touch_start(integer total_number)
    {
        llSay(PUBLIC_CHANNEL,
            "The total land impact of objects on this parcel is " + primCountThisParcel(PARCEL_COUNT_TOTAL) + ".");

        llSay(PUBLIC_CHANNEL,
            primCountThisParcel(PARCEL_COUNT_OWNER) + " objects owned by the parcel owner.");

        llSay(PUBLIC_CHANNEL,
            primCountThisParcel(PARCEL_COUNT_GROUP) + " objects set to or owned by the parcel's group.");

        llSay(PUBLIC_CHANNEL,
            primCountThisParcel(PARCEL_COUNT_OTHER) + " objects not set to the parcel group or owned by the parcel owner.");

        llSay(PUBLIC_CHANNEL,
            primCountThisParcel(PARCEL_COUNT_SELECTED) + " selected objects.");

        llSay(PUBLIC_CHANNEL,
            primCountThisParcel(PARCEL_COUNT_TEMP) + " temp-on-rez objects.");
    }
}