Difference between revisions of "User:Mystagic Resident/Meeroos/Sleep Script"

From Second Life Wiki
Jump to navigation Jump to search
Line 7: Line 7:


Video: [http://www.youtube.com/watch?v=RGU5B-MYBJU]
Video: [http://www.youtube.com/watch?v=RGU5B-MYBJU]
== Meeroo Sleep Schedules: ==
Meeroo Sleep Schedules:
<lsl>
<lsl>
simtime() {
simtime() {

Revision as of 00:34, 3 October 2013

Sleepscript.png

Shows which meeroos are awake with a heart and counting up how long they been awake,also then shows which are sleeping with a X counting down till they awake. Sleepscript.png

Shows which meeroos are awake with a heart and counting up how long they been awake,also then shows which are sleeping with a X counting down till they awake.

Video: [1] Meeroo Sleep Schedules: <lsl> simtime() {

 integer t = (integer)llGetTimeOfDay();
 string meeroos = "";
 integer m = 0;
 if (t < 7200) { 
   m = (7200 - t) / 60; t = t / 60;
   meeroos += "♥ Nocturnals : Awake "+(string)t+" minutes.\n";
   meeroos += "✖ Diurnals   : Sleep "+(string)m+" minutes.\n";
 } else {
   m = (14800 - t) / 60; t = (t - 7200) / 60;
   meeroos += "♥ Diurnals   : Awake "+(string)t+" minutes.\n";
   meeroos += "✖ Nocturnals : Sleep "+(string)m+" minutes.\n";
 }
 llSetText(meeroos,<1,1,1>,1.0);

} default {

 state_entry() { simtime(); llSetTimerEvent(60.0); }
 timer() { simtime(); }

} </lsl>