// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // This object’s script load // Not compiled or tested in-world // Setup: Put in a rezzed object and touch as owner. // Stop / restore: Remove or disable the script. It does not change the build. // Notes: Queries this object only, never visitors or avatars. CPU time is a simulator-reported average in seconds, converted here to milliseconds. Support and meaning can vary by grid. // License: see LICENSE in this distribution. // Original Incoprea example. MIT. default { touch_start(integer count) { if (llDetectedKey(0) != llGetOwner()) return; list data = llGetObjectDetails(llGetKey(), [OBJECT_RUNNING_SCRIPT_COUNT, OBJECT_TOTAL_SCRIPT_COUNT, OBJECT_SCRIPT_TIME]); if (llGetListLength(data) != 3) { llOwnerSay("Script-load details unavailable."); return; } if (llList2Integer(data, 0) < 0 || llList2Integer(data, 1) < 0) { llOwnerSay("These script-count details are unsupported."); return; } llOwnerSay("Running: " + llList2String(data, 0) + " / total: " + llList2String(data, 1)); llOwnerSay("Reported average CPU time: " + (string)(llList2Float(data, 2) * 1000.0) + " ms."); } changed(integer flags) { if (flags & CHANGED_OWNER) llResetScript(); } }