Rolig Loon Posted July 17, 2012 Share Posted July 17, 2012 Here's another handy scripted tool for sim owners (or anyone who cares about such things). If you want to know how many prims are on your sim and which parcels they're on, it's not as easy as it ought to be. You have to open About Land for each parcel and keep a running total of parcel prim counts on a sheet of paper. Now, this simple script does it for you. Drop it in a prim and touch it.//Sim Prim Scanner -- Rolig Loon -- July 2012 // I find that a 0.5m white sphere makes a nice container for this scanner script, // but anything will do. It's just that the particle glow looks nice on that // sphere. Your choice. list gPrclID; // List of unique parcel UUIDs integer gTotPrims; // Total prims detected float gX; // X coordinate of curren scan target float gY; // Y coordinate of current scan target string gObjName; // This scanner's name integer gNUM; // Sequence number of unique parcels scans default { state_entry() { llSetColor(<1.0,1.0,1.0>,ALL_SIDES); gPrclID = []; gTotPrims = 0; // Start scan in the SW corner of the sim gX = 4.0; gY = 4.0; } on_rez(integer start) { llSetPos(llGetPos() + <0.0,0.0,0.5>); llSetText("Touch to start scan",<1.0,1.0,0.0>,1.0); } touch_start(integer total_number) { llSetText("Scanning ....",<1.0,1.0,0.0>,1.0); // Cheesy visiual effects ........ llSetColor(<1.0,1.0,0.0>,ALL_SIDES); llParticleSystem([ PSYS_SRC_TEXTURE, llGetInventoryName(INVENTORY_TEXTURE, 0), PSYS_PART_START_SCALE, <0.02, 0.02, FALSE>, PSYS_PART_END_SCALE, <3.0, 3.0, FALSE>, PSYS_PART_START_COLOR, <1.00,1.00,0.00>, PSYS_PART_END_COLOR, <1.00,1.00,0.00>, PSYS_PART_START_ALPHA, (float) .5, PSYS_PART_END_ALPHA, (float) 0.0, PSYS_SRC_BURST_PART_COUNT, (integer) 1, PSYS_SRC_BURST_RATE, (float) 0.05, PSYS_PART_MAX_AGE, (float) 0.75, PSYS_SRC_PATTERN, (integer) 1, PSYS_PART_FLAGS, (integer) ( 0 | PSYS_PART_INTERP_COLOR_MASK | PSYS_PART_INTERP_SCALE_MASK | PSYS_PART_EMISSIVE_MASK | PSYS_PART_FOLLOW_SRC_MASK | PSYS_PART_TARGET_POS_MASK )]); gObjName = llGetObjectName(); gNUM = 0; llRegionSayTo(llGetOwner(),0,"Scan started on " + llGetRegionName()); llSetTimerEvent(0.1); } timer() { list parcel = llGetParcelDetails(<gX,gY,100.0>,[PARCEL_DETAILS_ID,PARCEL_DETAILS_NAME]); key temp = llList2Key(parcel,0); // The parcel's UUID string parcel_name = llList2String(parcel,1); // The parcel's name if (parcel_name == "") { parcel_name = "(no name)"; } if (!~llListFindList(gPrclID,[temp])) // Have we scanned this parcel before? If not ... { ++gNUM; llSetObjectName((string)gNUM); integer Count = llGetParcelPrimCount(<gX,gY,100>,PARCEL_COUNT_TOTAL,FALSE); gTotPrims += Count; llRegionSayTo(llGetOwner(),0, "/me "+ parcel_name + " @ <"+(string)gX+","+(string)gY+",Z> = " + (string)Count); gPrclID += [temp]; } if (gX < 256.0) // Increment X but don't let X go outside the sim borders { gX +=8.0; } if (gX > 256.0) // If it does, reset X and increment Y { gY += 8.0; gX = 4.0; } if (gY > 256.0) // Don't let Y go outside the sim boders. If it does, wrap up the scan .... { llSetObjectName(gObjName); llRegionSayTo(llGetOwner(),0,"Scan finished. Total Prims = " + (string)gTotPrims + " in " + (string)llGetListLength(gPrclID) + " parcels (not counting temp rez prims)."); llParticleSystem([]); llSetText("Touch to start scan",<1.0,1.0,0.0>,1.0); llResetScript(); } } } 4 Link to comment Share on other sites More sharing options...
Ana Beckett Posted August 1, 2012 Share Posted August 1, 2012 Nice. How do you "drop a script into a prim"? And btw, I need to buy land that support 600 prims. How do find out what size land I must buy for that many prims? Link to comment Share on other sites More sharing options...
Rolig Loon Posted August 1, 2012 Author Share Posted August 1, 2012 Either: 1. Open the Contents tab in Edit, click New Script, and cut&paste this script in place of the one that's generated automatically, or 2. Open you inventory, click the "+" button at the bottom and select "New Script". Then open it and paste this script in. Drag & drop the compiled script into the Contents tab of your prim. It takes 4.38 sq m to support 1 prim, so 4.38 x 600 = 2628 Sq m. That's more than the 2048 tier, so if you're buying, anything up to 4096 sq m will cost you the same as 2628 sq m will. Go for 4096 @ $25/month. If you're renting on a private sim, you may be able to rent something less than 1/16 of a sim for a lower rate. Link to comment Share on other sites More sharing options...
Perrie Juran Posted September 13, 2012 Share Posted September 13, 2012 Very Nice! TYVM! One question just to be sure, when it says "not counting temp rez prims," does that mean prims that are temporarily rezzed or prims that rez temps? Again, Thanks! Link to comment Share on other sites More sharing options...
Rolig Loon Posted September 13, 2012 Author Share Posted September 13, 2012 Temp rezzed prims. The PARCEL_COUNT_TOTAL parameter sees only permanently rezzed prims. I could have counted PARCEL_COUNT_TEMP as well, but that would give you a momentary count that's confusing at best. Link to comment Share on other sites More sharing options...
Chic Aeon Posted October 19, 2012 Share Posted October 19, 2012 Works great! No need for it at the present but ya never know. TY. Link to comment Share on other sites More sharing options...
ArchTx Edo Posted March 3, 2013 Share Posted March 3, 2013 That is pretty cool! It works on the mainland too where I do not own all of the land, gives a prim count for every parcel. Link to comment Share on other sites More sharing options...
Qwalyphi Korpov Posted April 3, 2013 Share Posted April 3, 2013 Thanks Roliig. Really nice tool. I made some small changes to get a list of parcels and their areas. A tiny issue. The region where I live has some 4 meter wide parcels. Some people abandoned a 4 meter strip a land on the edge of the region for instance. I changed the starting location to of gX and gY to 3.0 to catch those. Also changed the increments to 4.0 rather than 8.0. Of course it's 4 times the churning so I'm not sure who would want to bother. edit: I really don't know if the first square meter is 0,0 or 1,1 ... me runs off to take a look. Link to comment Share on other sites More sharing options...
Rolig Loon Posted April 3, 2013 Author Share Posted April 3, 2013 Yeah, I have made a few minor enhancements to the one I use myself too. Everyone has a different set of "special" conditions. I figured that the generic version didn't need to churn quite as much as 4m at a pop. If you're patient and don't mind a lot of dead time while it plods along, though, go for it. I'm glad it works for you, Qwalyphi. Link to comment Share on other sites More sharing options...
DeniseHoorn Slade Posted April 16, 2013 Share Posted April 16, 2013 Hi Mrs Loon, thanks a lot for this script! I enhanced it for my needs, so I transfer the results to the website of our sim (http://www.ndlsim.de/index.php?page=1348778712&f=1&i=1939917561&s=1348778712) Now I think about I can count all scripts running on a sim... Greeeeetz DeniseHoorn Link to comment Share on other sites More sharing options...
Recommended Posts
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