// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Validate a declared workflow history // Not compiled or tested in-world // Setup: Edit the small sample lists and touch as owner. These examples print previews only. // Stop / restore: Remove or disable; no simulator objects or persistent records are changed. // Notes: Reports invalid jumps; it does not enforce permissions or change real workflow state. The first history status has no predecessor. // License: see LICENSE in this distribution. // Original Incoprea example. MIT. list HISTORY=["draft","review","ready","draft"]; list ALLOWED=["draft","review","review","draft","review","ready"]; default { touch_start(integer touches) { if(llDetectedKey(0)!=llGetOwner())return; if(llGetListLength(ALLOWED)%2) { llOwnerSay("Use from/to pairs."); return; } integer i; for(i=1;i "+to); } llOwnerSay("History audit complete."); } changed(integer flags) { if(flags & CHANGED_OWNER)llResetScript(); } }