// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Pack three bounded fields into an integer // Not compiled or tested in-world // Setup: Place in a spare owned prim. Edit GROUP, MODE and VALUE within their documented ranges. Owner touch runs the local demonstration. // Stop / restore: Disable/remove. No external requests or scene changes occur; reset clears memory. // Notes: Thirty-one bits avoid the signed high bit. This defines a compact wire format, not encryption. // License: see LICENSE in this distribution. // Original Incoprea. MIT. Local owner-only protocol laboratory. integer GROUP=12; integer MODE=7; integer VALUE=2048; default { touch_start(integer detectedCount) { if(llDetectedKey(0)!=llGetOwner())return; if(GROUP<0||GROUP>255||MODE<0||MODE>255||VALUE<0||VALUE>32767) { llOwnerSay("Field out of range."); return; } integer packed=(GROUP<<23)|(MODE<<15)|VALUE; llOwnerSay("Packed="+(string)packed+"; group="+(string)((packed>>23)&255)+"; mode="+(string)((packed>>15)&255)+"; value="+(string)(packed&32767)); } }