// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Search this prim’s Contents // Not compiled or tested in-world // Setup: Place in your own object and touch. Enter a search term. Use at most 200 inventory items in this prim. // Stop / restore: Remove or reset to erase session data. Input listeners close after one reply or after 45 seconds. // Notes: Data lives only in script memory and is lost on reset. No visitors are logged and no external requests are sent. No assets are read, played, or transferred. Reports only names and type numbers to the owner. // License: see LICENSE in this distribution. // Original Incoprea example. MIT. integer handle; integer channel; closeInput() { if(handle)llListenRemove(handle); handle=0; llSetTimerEvent(0); } respond(string input) { input=llStringTrim(input,STRING_TRIM); if(llStringLength(input)>200) { llOwnerSay("Use at most 200 characters."); return; } if(input=="") { llOwnerSay("Enter a nonempty term."); return; } integer total=llGetInventoryNumber(INVENTORY_ALL); if(total>200) { llOwnerSay("Use a prim with at most 200 items."); return; } integer i; integer matches; string needle=llToLower(input); for(i=0;i