// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Split catalog rows by a rule // Not compiled or tested in-world // Setup: Edit ROWS with integer quantities, then touch as owner. // Stop / restore: Remove or disable; it only reports locally to the owner. // Notes: This is configured catalog data, not live sale stock. Negative quantities are reported as invalid instead of classed as empty. // License: see LICENSE in this distribution. // Original Incoprea example. MIT. list ROWS=["Lamp",4,"Cup",0,"Bench",2,"Plant",0]; default { touch_start(integer touches) { if(llDetectedKey(0)!=llGetOwner())return; if(llGetListLength(ROWS)%2) { llOwnerSay("Incomplete pair."); return; } list available=[]; list empty=[]; integer i; for(i=0;i0)available+=llList2List(ROWS,i,i+1); else empty+=llList2List(ROWS,i,i+1); } llOwnerSay("Available rows: "+llList2CSV(available)); llOwnerSay("Empty rows: "+llList2CSV(empty)); } changed(integer flags) { if(flags & CHANGED_OWNER)llResetScript(); } }