// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Collect an attribution in three guided steps // Not compiled or tested in-world // Setup: Touch and complete the three text prompts within each 45-second window. // Stop / restore: Remove, disable, or reset to stop timers and discard session state. Temporary input listeners expire after 45 seconds. // Notes: Only the current owner can control this example. Timing is approximate and can be delayed by simulator load. A structured writing aid, not proof of rights or license verification. Nothing is stored after reset or sent to anyone else. // License: see LICENSE in this distribution. // Original Incoprea example. MIT. integer active; integer handle; integer channel; integer expires; integer step; string title; string creator; closeInput() { if(handle)llListenRemove(handle); handle=0; } schedule() { if(active || handle)llSetTimerEvent(1.0); else llSetTimerEvent(0.0); } beginInput() { closeInput(); channel=-10000-(integer)llFrand(1000000000); handle=llListen(channel,"",llGetOwner(),""); expires=llGetUnixTime()+45; schedule(); } ask(string prompt) { beginInput(); llTextBox(llGetOwner(),prompt,channel); } default { touch_start(integer touches) { if(llDetectedKey(0)!=llGetOwner())return; step=1; title=""; creator=""; ask("Asset title?"); schedule(); } listen(integer c,string name,key speaker,string input) { if(c!=channel || speaker!=llGetOwner() || !handle)return; closeInput(); if(llStringLength(input)>200) { llOwnerSay("Reply is too long."); schedule(); return; } input=llStringTrim(input,STRING_TRIM); if(input=="") { step=0; llOwnerSay("Empty answer; form cancelled."); } else if(step==1) { title=input; step=2; ask("Creator name?"); } else if(step==2) { creator=input; step=3; ask("License and source reference?"); } else if(step==3) { llOwnerSay("Credit draft: "+title+" — "+creator+"; "+input); step=0; } schedule(); } timer() { if(handle && llGetUnixTime()>=expires) { closeInput(); llOwnerSay("Input expired."); } schedule(); } changed(integer flags) { if(flags & CHANGED_OWNER)llResetScript(); } }