// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Immediate action with a cooldown // Not compiled or tested in-world // Setup: Put in a spare prim you own. Touch repeatedly to see accepted and rejected requests. Edit COOLDOWN to suit a local tool. // 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: The deadline is kept in script memory; reset clears it. No timer is needed because the deadline is tested when a request arrives. // License: see LICENSE in this distribution. // Original Incoprea example. MIT. Owner-only calculation; no scene changes. float COOLDOWN = 5.0; float nextAllowed; default { touch_start(integer detectedCount) { if (llDetectedKey(0) != llGetOwner()) return; float now = llGetTime(); if (now < nextAllowed) { llOwnerSay("Wait " + (string)(nextAllowed-now) + " seconds."); return; } nextAllowed = now + COOLDOWN; llOwnerSay("Accepted: cooldown started."); } changed(integer change) { if (change & CHANGED_OWNER) llResetScript(); } }