Laysus2005-12-13 01:22:41
For all you moon/night users, this might come in handy. When the alias is run (it triggers off the DATE information, and also the turn of the day, to allow it to keep up to date) it gives a one-off echo providing dates of the next new and full moon, as such:
Today is the 4th of Dioni, 135 years after the Coming of Estarra. The phase of
the moon is that of the Waxing Crescent.
In your world it is Tuesday, the 13th of December, in the year 2005.
3058h, 4220m, 4460e, 10p exk-
Next full moon on 18th of Dioni.
Next new moon on 10th of Vestian.
3058h, 4220m, 4460e, 10p exk-
It also provides an output to the status bar showing what phase of the moon it is and how long till the nearest of either full moon or new moon (show in the attachment at the bottom of the post).
Here's the code:
EDIT: Couple of errors in this code, use the version provided in my later posts *points down*
CODE
Today is the 4th of Dioni, 135 years after the Coming of Estarra. The phase of
the moon is that of the Waxing Crescent.
In your world it is Tuesday, the 13th of December, in the year 2005.
3058h, 4220m, 4460e, 10p exk-
Next full moon on 18th of Dioni.
Next new moon on 10th of Vestian.
3058h, 4220m, 4460e, 10p exk-
It also provides an output to the status bar showing what phase of the moon it is and how long till the nearest of either full moon or new moon (show in the attachment at the bottom of the post).
Here's the code:
CODE
EDIT: Couple of errors in this code, use the version provided in my later posts *points down*
Richter2005-12-13 04:44:32
Ooh, fun, I added it.
Edit:
Next full moon on 18th of Estar.
Next new moon on 34th of Estar.
*boggle*
Edit:
Next full moon on 18th of Estar.
Next new moon on 34th of Estar.
*boggle*
Unknown2005-12-13 04:46:33
Hehe, I think the months need to be capped and rolled over.
Sylphas2005-12-13 05:22:15
Ooo, good idea. I'll have to code that into my Chronos date/time tracking system. -loves excuses to fiddle with his system-
Laysus2005-12-13 14:11:32
QUOTE(Richter @ Dec 13 2005, 04:44 AM)
Ooh, fun, I added it.
Edit:
Next full moon on 18th of Estar.
Next new moon on 34th of Estar.
*boggle*
Edit:
Next full moon on 18th of Estar.
Next new moon on 34th of Estar.
*boggle*
235976
Shouldn't have done that O.o
It actually has this:
#if (@fullday>24) {#add fullmonth 1;#math fullday @fullday-24};#var newmonth @monthnumber;#math newday @day+@newin;#if (@newday>24) {#add newmonth 1;#math newday @newday-24};
When I was testing it it gave me the next as in the next month.
Also, it shouldn't have been showing as Estar O.o
First, did you check DATE beforehand?
Secondly, did you copy all of it in?
'cos I just did, into a blank settings file and got the correct results.
Found a slight error, but just to do with where it outputs (originally I had it SHOWing the waxing/waning gibbous thing) - it's still doing that for some of it, I'll update the code. And another to do with where it won't roll over the year if it ends up having the next full/new moon on the 13th month.
Laysus2005-12-13 14:21:22
Ok, with a couple of errors fixed (nothing to do with the problem Richter had - this was a lack of /years/ rolling over, and using #show instead of #st for the output in places), I give you... the updated version.
#CLASS {mooncycle}
#ALIAS mooncycle {#var monthnumber %ismember(@month,@months);#math cyclepos (((@year-135)*12+(@monthnumber-4))*25+(@day-2))-((((@year-135)*12+(@monthnumber-4))*25+(@day-2))/32)*32);#math fullin 16-@cyclepos;#math newin 32-@cyclepos;#var fullmonth @monthnumber;#math fullday @day+@fullin;#if (@fullin < 0) {#math fullin 32+@fullin};#if (@fullday>24) {#add fullmonth 1;#math fullday @fullday-24};#if (@fullmonth>12) {#add fullmonth -12};#var newmonth @monthnumber;#math newday @day+@newin;#if (@newday>24) {#add newmonth 1;#math newday @newday-24};#if (@newmonth>12) {#add newmonth -12};#if (@fullday=1) {#var fullday 1st} {#if (@fullday=2) {#var fullday 2nd} {#if (@fullday=3) {#var fullday 3rd} {#var fullday %concat(@fullday,"th")}}};#if (@newday=1) {#var newday 1st} {#if (@newday=2) {#var newday 2nd} {#if (@newday=3) {#var newday 3rd} {#var newday %concat(@newday,"th")}}};#show Next full moon on @fullday of %item(@months,@fullmonth).;#show Next new moon on @newday of %item(@months,@newmonth).;#send {};#if (@cyclepos=0) {#st NEW MOON} {#if (@cyclepos=8) {#st FIRST QUARTER: 8 DAYS UNTIL FULL MOON} {#if (@cyclepos=16) {#st FULL MOON} {#if (@cyclepos=24) {#st LAST QUARTER: 8 DAYS UNTIL NEW MOON} {#if (0<@cyclepos & @cyclepos<8) {#st WAXING CRESCENT: @fullin DAYS UNTIL FULL MOON} {#if (8<@cyclepos & @cyclepos<16) {#st WAXING GIBBOUS: @fullin DAYS UNTIL FULL MOON} {#if (16<@cyclepos & @cyclepos<24) {#st WANING GIBBOUS: @newin DAYS UNTIL NEW MOON} {#if (24<@cyclepos) {#st WANING CRESCENT: @newin DAYS UNTIL NEW MOON}}}}}}}}}
#VAR months {Estar|Urlachmar|Kiani|Dioni|Vestian|Avechary|Dvarsh|Tzarin|Klangiary|Juliary|Shanthin|Roarkian}
#TRIGGER {It is now the (%d){st|nd|rd|th} of (%w), (%d) years after the Coming of Estarra.} {#var day %1;#var month %2;#var monthnumber %ismember(@month,@months);#var year %3;mooncycle}
#TRIGGER {Today is the (%d){st|nd|rd|th} of (%w), (%d) years after the Coming of Estarra.} {#var day %1;#var month %2;#var monthnumber %ismember(@month,@months);#var year %3;mooncycle}
#CLASS 0
EDIT: And I see you reading this Ethelon. If you copy this and put it in your system that you sell, I WANT ROYALTIES!
CODE
#CLASS {mooncycle}
#ALIAS mooncycle {#var monthnumber %ismember(@month,@months);#math cyclepos (((@year-135)*12+(@monthnumber-4))*25+(@day-2))-((((@year-135)*12+(@monthnumber-4))*25+(@day-2))/32)*32);#math fullin 16-@cyclepos;#math newin 32-@cyclepos;#var fullmonth @monthnumber;#math fullday @day+@fullin;#if (@fullin < 0) {#math fullin 32+@fullin};#if (@fullday>24) {#add fullmonth 1;#math fullday @fullday-24};#if (@fullmonth>12) {#add fullmonth -12};#var newmonth @monthnumber;#math newday @day+@newin;#if (@newday>24) {#add newmonth 1;#math newday @newday-24};#if (@newmonth>12) {#add newmonth -12};#if (@fullday=1) {#var fullday 1st} {#if (@fullday=2) {#var fullday 2nd} {#if (@fullday=3) {#var fullday 3rd} {#var fullday %concat(@fullday,"th")}}};#if (@newday=1) {#var newday 1st} {#if (@newday=2) {#var newday 2nd} {#if (@newday=3) {#var newday 3rd} {#var newday %concat(@newday,"th")}}};#show Next full moon on @fullday of %item(@months,@fullmonth).;#show Next new moon on @newday of %item(@months,@newmonth).;#send {};#if (@cyclepos=0) {#st NEW MOON} {#if (@cyclepos=8) {#st FIRST QUARTER: 8 DAYS UNTIL FULL MOON} {#if (@cyclepos=16) {#st FULL MOON} {#if (@cyclepos=24) {#st LAST QUARTER: 8 DAYS UNTIL NEW MOON} {#if (0<@cyclepos & @cyclepos<8) {#st WAXING CRESCENT: @fullin DAYS UNTIL FULL MOON} {#if (8<@cyclepos & @cyclepos<16) {#st WAXING GIBBOUS: @fullin DAYS UNTIL FULL MOON} {#if (16<@cyclepos & @cyclepos<24) {#st WANING GIBBOUS: @newin DAYS UNTIL NEW MOON} {#if (24<@cyclepos) {#st WANING CRESCENT: @newin DAYS UNTIL NEW MOON}}}}}}}}}
#VAR months {Estar|Urlachmar|Kiani|Dioni|Vestian|Avechary|Dvarsh|Tzarin|Klangiary|Juliary|Shanthin|Roarkian}
#TRIGGER {It is now the (%d){st|nd|rd|th} of (%w), (%d) years after the Coming of Estarra.} {#var day %1;#var month %2;#var monthnumber %ismember(@month,@months);#var year %3;mooncycle}
#TRIGGER {Today is the (%d){st|nd|rd|th} of (%w), (%d) years after the Coming of Estarra.} {#var day %1;#var month %2;#var monthnumber %ismember(@month,@months);#var year %3;mooncycle}
#CLASS 0
EDIT: And I see you reading this Ethelon. If you copy this and put it in your system that you sell, I WANT ROYALTIES!
Laysus2005-12-13 18:13:14
Fixed another small problem (where if you were past the full moon it could show the next full moon as the one that just passed). Can't see any more problems, but if they come up, lemme know
Unknown2005-12-20 21:22:54
Mind posting the code to make it appear in your status bar?, as shown in the picture you clipped on the first post?
Laysus2005-12-23 00:06:31
It's actually in the last copy I posted - the bit where it goes
CODE
#send {};#if (@cyclepos=0) {#st NEW MOON} {#if (@cyclepos=8) {#st FIRST QUARTER: 8 DAYS UNTIL FULL MOON} {#if (@cyclepos=16) {#st FULL MOON} {#if (@cyclepos=24) {#st LAST QUARTER: 8 DAYS UNTIL NEW MOON} {#if (0<@cyclepos & @cyclepos<8) {#st WAXING CRESCENT: @fullin DAYS UNTIL FULL MOON} {#if (8<@cyclepos & @cyclepos<16) {#st WAXING GIBBOUS: @fullin DAYS UNTIL FULL MOON} {#if (16<@cyclepos & @cyclepos<24) {#st WANING GIBBOUS: @newin DAYS UNTIL NEW MOON} {#if (24<@cyclepos) {#st WANING CRESCENT: @newin DAYS UNTIL NEW MOON}}}}}}}}}
#VAR months {Estar|Urlachmar|Kiani|Dioni|Vestian|Avechary|Dvarsh|Tzarin|Klangiary|Juliary|Shanthin|Roarkian}
#TRIGGER {It is now the (%d){st|nd|rd|th} of (%w), (%d) years after the Coming of Estarra.} {#var day %1;#var month %2;#var monthnumber %ismember(@month,@months);#var year %3;datecalc;mooncycle}
#TRIGGER {Today is the (%d){st|nd|rd|th} of (%w), (%d) years after the Coming of Estarra.} {#var day %1;#var month %2;#var monthnumber %ismember(@month,@months);#var year %3;datecalc;mooncycle}
#CLASS 0
#VAR months {Estar|Urlachmar|Kiani|Dioni|Vestian|Avechary|Dvarsh|Tzarin|Klangiary|Juliary|Shanthin|Roarkian}
#TRIGGER {It is now the (%d){st|nd|rd|th} of (%w), (%d) years after the Coming of Estarra.} {#var day %1;#var month %2;#var monthnumber %ismember(@month,@months);#var year %3;datecalc;mooncycle}
#TRIGGER {Today is the (%d){st|nd|rd|th} of (%w), (%d) years after the Coming of Estarra.} {#var day %1;#var month %2;#var monthnumber %ismember(@month,@months);#var year %3;datecalc;mooncycle}
#CLASS 0
Eyod2005-12-23 03:13:24
everytime the date roles over it sends out the command datecalc, which doesn't seem to do anything?
Laysus2005-12-29 11:59:01
Hm, delete that bit. Datecalc has this huge astrology script attached.
Thought I'd taken that out O.o
Edit: I've deleted that from the code in the previous posting, so anyone who wants to use it, it should be worky now.
Thought I'd taken that out O.o
Edit: I've deleted that from the code in the previous posting, so anyone who wants to use it, it should be worky now.
Eyod2005-12-29 17:16:06
excellent, thanks
Laysus2007-05-25 20:34:53
By popular request, a vastly updated and improved system!
The phase and other data can be used with the following if you want it to show on the status bar (and I've left the data in the above code for you to do other stuff with).
CODE
#CLASS {L_Moon_Phases}
#ALIAS mooncycle {#math L_Moon_CyclePos (((@L_Moon_Years-135)*300+@L_Moon_NumDate-102)-(((@L_Moon_Years-135)*300+@L_Moon_NumDate-102)/32)*32);#math L_Moon_FullIn 16-@L_Moon_CyclePos;#math L_Moon_NewIn 32-@L_Moon_CyclePos;#var L_Moon_FullMonth @L_Moon_Month;#var L_Moon_NextFull @L_Moon_FullIn;#var L_Moon_NextNew @L_Moon_Newin;#if (@L_Moon_FullIn < 0) {#add L_Moon_Fullin 32};#add L_Moon_FullIn @L_Moon_Day;#if (@L_Moon_FullIn>24) {#add L_Moon_FullMonth 1;#add L_Moon_FullIn -24};#if (@L_Moon_FullMonth>12) {#add L_Moon_FullMonth -12};#var L_Moon_NewMonth @L_Moon_Month;#add L_Moon_NewIn @L_Moon_Day;#if (@L_Moon_NewIn>24) {#add L_Moon_NewMonth 1;#add L_Moon_NewIn -24};#if (@L_Moon_NewMonth>12) {#add L_Moon_NewMonth -12};#if (%ends( @L_Moon_FullIn, 1) & (@L_Moon_FullIn != 11)) {#var L_Moon_FullIn @{L_Moon_FullIn}st} {#if (%ends( @L_Moon_FullIn, 2)) {#var L_Moon_FullIn @{L_Moon_FullIn}nd} {#if (%ends( @L_Moon_FullIn, 3)) {#var L_Moon_FullIn @{L_Moon_FullIn}rd} {#var L_Moon_FullIn %concat( @L_Moon_FullIn, "th")}}}
#if (%ends( @L_Moon_NewIn, 1)) {#var L_Moon_NewIn @{L_Moon_NewIn}st} {#if (%ends( @L_Moon_NewIn, 2)) {#var L_Moon_NewIn @{L_Moon_NewIn}nd} {#if (%ends( @L_Moon_NewIn, 3)) {#var L_Moon_NewIn @{L_Moon_NewIn}rd} {#var L_Moon_NewIn @{L_Moon_NewIn}th}}};#say Next full moon on @L_Moon_FullIn of %item( {Estar|Urlachmar|Kiani|Dioni|Vestian|Avechary|Dvarsh|Tzarin|Klangiary|Juliary|Shanthin|Roarkian}, @L_Moon_FullMonth).;#say Next new moon on @L_Moon_NewIn of %item( {Estar|Urlachmar|Kiani|Dioni|Vestian|Avechary|Dvarsh|Tzarin|Klangiary|Juliary|Shanthin|Roarkian}, @L_Moon_NewMonth).;#if (@L_Moon_CyclePos=0) {#var L_Moon_Phase {NEW MOON}} {#if (@L_Moon_CyclePos=8) {#var L_Moon_Phase {First Quarter}} {#if (@L_Moon_CyclePos=16) {#var L_Moon_Phase {FULL MOON}} {#if (@L_Moon_CyclePos=24) {#var L_Moon_Phase {Last Quarter}} {#if (0<@L_Moon_CyclePos & @L_Moon_CyclePos<8) {#var L_Moon_Phase {Waxing Crescent}} {#if (8<@L_Moon_CyclePos & @L_Moon_CyclePos<16) {#var L_Moon_Phase {Waxing Gibbous}} {#if (16<@L_Moon_CyclePos & @L_Moon_CyclePos<24) {#var L_Moon_Phase {Waning Gibbous}} {#if (24<@L_Moon_CyclePos) {#var L_Moon_Phase {Waning Crescent}}}}}}}}}}
#CLASS 0
#ALIAS mooncycle {#math L_Moon_CyclePos (((@L_Moon_Years-135)*300+@L_Moon_NumDate-102)-(((@L_Moon_Years-135)*300+@L_Moon_NumDate-102)/32)*32);#math L_Moon_FullIn 16-@L_Moon_CyclePos;#math L_Moon_NewIn 32-@L_Moon_CyclePos;#var L_Moon_FullMonth @L_Moon_Month;#var L_Moon_NextFull @L_Moon_FullIn;#var L_Moon_NextNew @L_Moon_Newin;#if (@L_Moon_FullIn < 0) {#add L_Moon_Fullin 32};#add L_Moon_FullIn @L_Moon_Day;#if (@L_Moon_FullIn>24) {#add L_Moon_FullMonth 1;#add L_Moon_FullIn -24};#if (@L_Moon_FullMonth>12) {#add L_Moon_FullMonth -12};#var L_Moon_NewMonth @L_Moon_Month;#add L_Moon_NewIn @L_Moon_Day;#if (@L_Moon_NewIn>24) {#add L_Moon_NewMonth 1;#add L_Moon_NewIn -24};#if (@L_Moon_NewMonth>12) {#add L_Moon_NewMonth -12};#if (%ends( @L_Moon_FullIn, 1) & (@L_Moon_FullIn != 11)) {#var L_Moon_FullIn @{L_Moon_FullIn}st} {#if (%ends( @L_Moon_FullIn, 2)) {#var L_Moon_FullIn @{L_Moon_FullIn}nd} {#if (%ends( @L_Moon_FullIn, 3)) {#var L_Moon_FullIn @{L_Moon_FullIn}rd} {#var L_Moon_FullIn %concat( @L_Moon_FullIn, "th")}}}
#if (%ends( @L_Moon_NewIn, 1)) {#var L_Moon_NewIn @{L_Moon_NewIn}st} {#if (%ends( @L_Moon_NewIn, 2)) {#var L_Moon_NewIn @{L_Moon_NewIn}nd} {#if (%ends( @L_Moon_NewIn, 3)) {#var L_Moon_NewIn @{L_Moon_NewIn}rd} {#var L_Moon_NewIn @{L_Moon_NewIn}th}}};#say Next full moon on @L_Moon_FullIn of %item( {Estar|Urlachmar|Kiani|Dioni|Vestian|Avechary|Dvarsh|Tzarin|Klangiary|Juliary|Shanthin|Roarkian}, @L_Moon_FullMonth).;#say Next new moon on @L_Moon_NewIn of %item( {Estar|Urlachmar|Kiani|Dioni|Vestian|Avechary|Dvarsh|Tzarin|Klangiary|Juliary|Shanthin|Roarkian}, @L_Moon_NewMonth).;#if (@L_Moon_CyclePos=0) {#var L_Moon_Phase {NEW MOON}} {#if (@L_Moon_CyclePos=8) {#var L_Moon_Phase {First Quarter}} {#if (@L_Moon_CyclePos=16) {#var L_Moon_Phase {FULL MOON}} {#if (@L_Moon_CyclePos=24) {#var L_Moon_Phase {Last Quarter}} {#if (0<@L_Moon_CyclePos & @L_Moon_CyclePos<8) {#var L_Moon_Phase {Waxing Crescent}} {#if (8<@L_Moon_CyclePos & @L_Moon_CyclePos<16) {#var L_Moon_Phase {Waxing Gibbous}} {#if (16<@L_Moon_CyclePos & @L_Moon_CyclePos<24) {#var L_Moon_Phase {Waning Gibbous}} {#if (24<@L_Moon_CyclePos) {#var L_Moon_Phase {Waning Crescent}}}}}}}}}}
#CLASS 0
The phase and other data can be used with the following if you want it to show on the status bar (and I've left the data in the above code for you to do other stuff with).
CODE
#st {@L_Moon_Day%if(%right(@L_Moon_Day,1)=1,st,%if(%right(@L_Moon_Day,1)=2,nd,%if(%right(@L_Moon_Day,1)=3,rd,th))) %item( {Estar|Urlachmar|Kiani|Dioni|Vestian|Avechary|Dvarsh|Tzarin|Klangiary|Juliary|Shanthin|Roarkian}, @L_Moon_Month) @L_Moon_Year - @L_Moon_Phase %if(%ismember(@L_Moon_Phase,{NEW MOON|FULL MOON})=0, "- "Next %if(%ismember(@L_Moon_Phase,{First Quarter|Waxing Crescent|Waxing Gibbous}),Full Moon in @L_Moon_NextFull days, New Moon in @L_Moon_NextNew days))}