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

From Second Life Wiki
Jump to navigation Jump to search
Line 16: Line 16:
   time = (time - ((8 - PDT) * 3600));
   time = (time - ((8 - PDT) * 3600));
   integer t = (time % 14400);
   integer t = (time % 14400);
  meeroos += (string)t+"\n";
   integer m = 0;
   integer m = 0;
   if (t < 7200) {  
   if (t < 7200) {  

Revision as of 17:44, 30 March 2015

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.

YouTube video: [1]

Meeroo Sleep Schedules:

//-------------------------------------------------------------------------------------------------------
// Meeroo's Sleep Cycle v1.3
//-------------------------------------------------------------------------------------------------------
integer PDT = TRUE; // PDT will be observed in Los Angeles until Nov 1, 2015 at 2:00 AM
//-------------------------------------------------------------------------------------------------------
simtime() {
  string meeroos = "";    
  integer time = llGetUnixTime();
  time = (time - ((8 - PDT) * 3600));
  integer t = (time % 14400);
  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 {
  on_rez(integer p) { llResetScript(); }
  state_entry() { simtime(); llSetTimerEvent(1); }
  changed(integer c){
    if (c & (CHANGED_OWNER | CHANGED_REGION_START)) { llResetScript(); }
  }
  timer() { simtime(); }
}
//-------------------------------------------------------------------------------------------------------
// EOF

Meeroo SL Time Schedules:

-------------------------------------------
Nocturnals / Dirunals - Schedules
-------------------------------------------
00:00 nocturnals - Midnight
00:30 nocturnals - Sunrise
01:00 nocturnals
01:30 nocturnals
02:00 dirunals - Midday
02:30 dirunals
03:00 dirunals
03:30 dirunals - Sunset
-------------------------------------------
04:00 nocturnals - Midnight
04:30 nocturnals - Sunrise
05:00 nocturnals
05:30 nocturnals
06:00 dirunals - Midday
06:30 dirunals
07:00 dirunals
07:30 dirunals - Sunset
-------------------------------------------
08:00 nocturnals - Midnight
08:30 nocturnals - Sunrise
09:00 nocturnals
09:30 nocturnals
10:00 dirunals
10:30 dirunals
11:00 dirunals
11:30 dirunals - Sunset
-------------------------------------------
12:00 nocturnals - Midnight
12:30 nocturnals - Sunrise
13:00 nocturnals
13:30 nocturnals
14:00 dirunals - Midday
14:30 dirunals
15:00 dirunals
15:30 dirunals - Sunset
-------------------------------------------
16:00 nocturnals - Midnight
16:30 nocturnals - Sunrise
17:00 nocturnals
17:30 nocturnals
18:00 dirunals - Midday
18:30 dirunals
19:00 dirunals
19:30 dirunals
-------------------------------------------
20:00 nocturnals - Midnight
20:30 nocturnals - Sunrise
21:00 nocturnals * Meeroo Season Change
21:30 nocturnals
22:00 dirunals - Midday
22:30 dirunals
23:00 dirunals
23:30 dirunals - Sunset
-------------------------------------------