// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Checksum a short ASCII message // Not compiled or tested in-world // Setup: Put in a spare prim you own. Edit MESSAGE, keeping it ASCII and at most two hundred characters, then touch. // Stop / restore: Disable or remove the script. It only reports to its owner and does not change prim properties. Reset clears its temporary state. // Notes: Rejects non-ASCII text to avoid confusing Unicode characters with bytes. This detects some accidental changes; it is not a secure signature or password hash. // License: see LICENSE in this distribution. // Original Incoprea example. MIT. Owner-only calculation; no scene changes. string MESSAGE="panel=west;revision=7"; default { touch_start(integer detectedCount) { if (llDetectedKey(0) != llGetOwner()) return; integer length=llStringLength(MESSAGE); if (length>200) { llOwnerSay("Keep the demonstration under 201 characters."); return; } integer first=0; integer second=0; integer i; for (i=0; i127 || code<0) { llOwnerSay("ASCII only for this byte-checksum example."); return; } first=(first+code)%255; second=(second+first)%255; } llOwnerSay("Fletcher-16 decimal checksum: "+(string)((second<<8)|first)); } changed(integer change) { if (change & CHANGED_OWNER) llResetScript(); } }