// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Normalize a compact UUID spelling // Not compiled or tested in-world // Setup: Edit the sample inputs, then touch as owner. // Stop / restore: Remove or disable. All transformations are previews in owner chat. // Notes: This reformats text only and does not verify that the identifier exists. It rejects already hyphenated input rather than stripping arbitrary punctuation. // License: see LICENSE in this distribution. // Original Incoprea example. MIT. string INPUT="12345678123412341234123456789abc"; default { touch_start(integer touches) { if(llDetectedKey(0)!=llGetOwner())return; string value=llToLower(INPUT); if(llStringLength(value)!=32) { llOwnerSay("Expected 32 hex characters without hyphens."); return; } integer i; string result=""; for(i=0;i<32;++i) { string c=llGetSubString(value,i,i); if(llSubStringIndex("0123456789abcdef",c)==-1) { llOwnerSay("Invalid hex character."); return; } if(i==8 || i==12 || i==16 || i==20)result+="-"; result+=c; } llOwnerSay(result); } changed(integer flags) { if(flags & CHANGED_OWNER)llResetScript(); } }