// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Fictional weather chain // Not compiled or tested in-world // Setup: Enter step or ten. This creates fictional weather, not a forecast. Owner-touch initializes; enter reset to restart. Text input closes after90seconds. // Stop / restore: Close or ignore the text box, or remove the script. It changes no world objects, avatar state or inventory. // Notes: Original bounded, manually stepped educational toy. Not a calibrated simulator, real-world control system, or live scientific measurement. Probabilities are invented. Shows the difference between independent random selection and a process with state memory. // License: see LICENSE in this distribution. // Original Incoprea. MIT. Not compiled or tested in-world. integer channel; integer handle; integer weatherState; list history; close() { if(handle)llListenRemove(handle); handle=0; llSetTimerEvent(0.0); } start() { weatherState=0; history=["clear"]; } string view() { return "Recent fictional states: "+llDumpList2String(history," > "); } show() { llOwnerSay(view()); if(!handle) { channel=-1000-(integer)llFrand(1000000.0); handle=llListen(channel,"",llGetOwner(),""); } llTextBox(llGetOwner(),"Enter step or ten. This creates fictional weather, not a forecast. Type reset to restart.",channel); llSetTimerEvent(90.0); } default { touch_start(integer n) { if(llDetectedKey(0)!=llGetOwner())return; close(); start(); show(); } listen(integer incomingChannel,string name,key id,string s) { if(!handle||incomingChannel!=channel||id!=llGetOwner())return; s=llToLower(llStringTrim(s,STRING_TRIM)); if(s=="reset")start(); else { integer count=0; if(s=="step")count=1; else if(s=="ten")count=10; integer i; for(i=0;i12)history=llDeleteSubList(history,0,0); } } show(); } timer() { close(); } }