Thanks go to
someguy as well for this one, for doing the research into the SK Calendar.
Potentially, you just might wet your pants at this one. I did. It doesn't really serve any functional benefit, other than displaying a Calendar of the previous, current and next month, along with days and months highlighted dependant upon the current time.
It puts a simple, small button (20x20 pixels) which, when clicked, get's the SK time and date, and parses it to create.....the display of the SK Calendar.
I've put it into it's own group MyfanwyCode in case you use some of the variables I have.
Code:
#CLASS {myfanwycode|time}
#VAR currentTime {17:00}
#VAR currentDay {the Moon}
#VAR currentDayNum {6}
#VAR timeVal {17}
#VAR timeAMPM {pm}
#VAR descTime {this is a test}
#VAR currentDate {28}
#VAR currentYear {711}
#VAR lstDays {the Bull|Deception|Thunder|Freedom|the Great Gods|the Sun|the Moon }
#VAR lstMonths {Winter Wolf|Frost Giant|Old Forces|Grand Struggle|Spring|Nature|Sun|Heat|Dark Shades|Long Shadows|Ancient Darkness|Great Evil}
#VAR currentMonth {Old Forces}
#VAR currentMonthNum {3}
#VAR tmpDateNum {4}
#VAR tmpDateText {Moon}
#TRIGGER {} {#tset (70)
#timer (1) {#gag 5;time} (False)} "" {manual}
#TRIGGER "timeTrap" {It is &timeVal o'clock &timeAMPM, Day of ¤tDay, ¤tMonth (%d)*, (%d) *.} {currentTime = "";currentDate = %5;currentYear = %6;#loop 1,%numitems( @lstDays) {#if @currentDay=%item( @lstDays, %i) {currentDayNum=%i}};#loop 1,%numitems( @lstMonths) {#if @currentMonth=%item( @lstMonths, %i) {currentMonthNum=%i}};#if (@timeVal=12) {#if (@timeAMPM="am") {timeVal = 0}} {#if @timeAMPM="pm" {#math timeVal ( %number( @timeVal)+12)}};#if @timeVal<10 {currentTime = %concat( "0", @timeVal, ":00")} {currentTime = %concat( @timeVal, ":00")};#t- TimeTrap} "" {disable}
#BUTTON 74 {} {#t+ TimeTrap;#gag 4;time;#wait;tmpDateText = %replace( @currentDay, "the ", "");#echo "";#echo "";#echo %ansi( white)Calendar:;#echo "";#if (@currentMonthNum=1) {tmpDateNum=12} {#math tmpDateNum @currentMonthNum-1)};#echo %ansi( yellow)%item( @lstMonths, @tmpDateNum);#echo "B D T F G S M";#loop 1,7 {#echoprompt %ansi( cyan)%i;#echoprompt %repeat( " ", 3-%len( %i))};#echo " "%ansi( cyan, hi)"B - "%if( @tmpDateText="Bull", %ansi( white, red), %ansi( cyan))"Bull "%ansi( cyan, hi)"D - "%if( @tmpDateText="Deception", %ansi( white, red), %ansi( cyan))"Deception "%ansi( cyan, hi)"T - "%if( @tmpDateText="Thunder", %ansi( white, red), %ansi( cyan))"Thunder ";#loop 8,14 {#echoprompt %ansi( cyan)%i;#echoprompt %repeat( " ", 3-%len( %i))};#echo " "%ansi( cyan, hi)"F - "%if( @tmpDateText="Freedom", %ansi( white, red), %ansi( cyan))"Freedom "%ansi( cyan, hi)"G - "%if( @tmpDateText="Great Gods", %ansi( white, red), %ansi( cyan))"Great Gods "%ansi( cyan, hi)"S - "%if( @tmpDateText="Sun", %ansi( white, red), %ansi( cyan))"Sun ";#loop 15,21 {#echoprompt %ansi( cyan)%i;#echoprompt %repeat( " ", 3-%len( %i))};#echo " "%ansi( cyan, hi)"M - "%if( @tmpDateText="Moon", %ansi( white, red), %ansi( cyan))"Moon ";#loop 22,28 {#echoprompt %ansi( cyan)%i;#echoprompt %repeat( " ", 3-%len( %i))};#echo "";#echo " "%if( @currentMonth="Winter Wolf", %ansi( white, red), %ansi( cyan))"Winter Wolf (1) "%if( @currentMonth="Sun", %ansi( white, red), %ansi( cyan))"Sun (7)";#echoprompt %ansi( yellow)%item( @lstMonths, @currentMonthNum);#echo %repeat( " ", 26-%len( %item( @lstMonths, @currentMonthNum)))""%if( @currentMonth="Frost Giant", %ansi( white, red), %ansi( cyan))"Frost Giant (2) "%if( @currentMonth="Heat", %ansi( white, red), %ansi( cyan))"Heat (8)";#echo "B D T F G S M "%if( @currentMonth="Old Forces", %ansi( white, red), %ansi( cyan))"Old Forces (3) "%if( @currentMonth="Dark Shades", %ansi( white, red), %ansi( cyan))"Dark Shades (9)";#loop 1,7 {#echoprompt %if( %i=@currentDate, %ansi( white, red)%i, %ansi( cyan)%i);#echoprompt %repeat( " ", 3-%len( %i))};#echo " "%if( @currentMonth="Grand Struggle", %ansi( white, red), %ansi( cyan))"Grand Struggle (4) "%if( @currentMonth="Long Shadows", %ansi( white, red), %ansi( cyan))"Long Shadows (10)";#loop 8,14 {#echoprompt %if( %i=@currentDate, %ansi( white, red)%i, %ansi( cyan)%i);#echoprompt %repeat( " ", 3-%len( %i))};#echo " "%if( @currentMonth="Spring", %ansi( white, red), %ansi( cyan))"Spring (5) "%if( @currentMonth="Ancient Darkness", %ansi( white, red), %ansi( cyan))"Ancient Darkness (11)";#loop 22,28 {#echoprompt %if( %i=@currentDate, %ansi( white, red)%i, %ansi( cyan)%i);#echoprompt %repeat( " ", 3-%len( %i))};#echo " "%if( @currentMonth="Nature", %ansi( white, red), %ansi( cyan))"Nature (6) "%if( @currentMonth="Great Evil", %ansi( white, red), %ansi( cyan))"Great Evil (12)";#echo "";#if (@currentMonthNum=12) {tmpDateNum=1} {#math tmpDateNum @currentMonthNum+1)};#echoprompt %ansi( yellow)%item( @lstMonths, @tmpDateNum);#echo "";#echo "B D T F G S M "%ansi( white)"Current Date and Time:";#loop 1,7 {#echoprompt %ansi( cyan)%i;#echoprompt %repeat( " ", 3-%len( %i))};#echo "";#loop 8,14 {#echoprompt %ansi( cyan)%i;#echoprompt %repeat( " ", 3-%len( %i))};#echo " "%ansi( white)"Time: "%ansi( yellow)@currentTime" "%ansi( white)"Day: "%ansi( yellow)Day of @currentDay;#loop 15,21 {#echoprompt %ansi( cyan)%i;#echoprompt %repeat( " ", 3-%len( %i))};#echo " "%ansi( white)Date: %ansi( yellow)@currentDate %ansi( white) Month: %ansi( yellow)@currentMonth %ansi( white) Year: %ansi( yellow)@currentYear;#loop 22,28 {#echoprompt %ansi( cyan)%i;#echoprompt %repeat( " ", 3-%len( %i))};#echo "";#send %crlf} {} {} {} {} {CLOCK} {Size} {20} {20} {Pos} {1} {122} {} {31} {} {} "" {} {} {} {2}
#CLASS 0
Normal caveats apply...
Have fun