Sign in to follow this  
Followers 0
Aceguy

FFXI Clock.

2 posts in this topic

Yes there are lots out there. and thanks to pyogenes for the code, (in java)

but here it is in Glorious AutoIt.

#include <GUIConstants.au3>
#include <date.au3>

Global $d3
$Form1 = GUICreate("Form1", 300, 100, 200, 200,-1,BitOR($WS_EX_TOOLWINDOW, $WS_EX_WINDOWEDGE,$WS_EX_TOPMOST ) )
$Label1 = GUICtrlCreateLabel("Label1", 10, 50, 400, 60)
GUICtrlSetFont(-1,24)
$Label2 = GUICtrlCreateLabel("label2",150,5,150,30)
GUICtrlSetFont(-1,18)
GUISetState(@SW_SHOW)
$Label3=GUICtrlCreateLabel('',5,5,140,25)

$vanaTime  = (898 * 360 + 30) * 24 * 60 * 60  /25
$d1=  _DateDiff( 's',"1970/01/01 00:0:00", "2002/06/23 15:0:00")
$vanadielOffset=$d1-$vanaTime

do      
$time=floor((_DateDiff( 's',"1970/01/01 00:0:00", @year&"/"&@MON&"/"&@MDAY&" "&@HOUR&":"&@MIN&":"&@SEC)+0.5-$vanadielOffset)*25)

    $day = floor($time / 86400);
    $year = floor($day / 360);
    $month = floor((mod($day , 360) / 30)) + 1;
    $dayMonth = mod($day , 30) + 1;
    $dayWeek = mod($day , 8);
    $hour = floor(mod(($time / 3600),24));
    $minute = floor(mod(($time / 60) , 60));
    $second = floor(mod($time , 60));

if $hour <10 Then
    $hour = '0'& $hour
    EndIf
if $minute < 10 then 
    $minute = '0'& $minute
EndIf

if $dayWeek=0 then 
    $Find='Firesday'
    GUICtrlSetColor($Label2,0xFF0000)
elseif $dayWeek=1 then 
    $Find='Earthsday'
    GUICtrlSetColor($Label2,0xAAAA00)
elseif $dayWeek=2 then 
    $Find='Watersday'
    GUICtrlSetColor($Label2,0x0000DD)
elseif $dayWeek=3 then 
    $Find='Windsday'
    GUICtrlSetColor($Label2,0x00AA22)
elseif $dayWeek=4 then 
    $Find='Iceday'
    GUICtrlSetColor($Label2,0x7799FF)
elseif $dayWeek=5 then 
    $Find='Lightningday'
    GUICtrlSetColor($Label2,0xAA00AA)
elseif $dayWeek=6 then 
    $Find='Lightsday'
    GUICtrlSetColor($Label2,0xAAAAAA)
elseif $dayWeek=7 then 
    $Find='Darksday'
    GUICtrlSetColor($Label2,0x333333)
EndIf

$moonPhase = mod(($day + 26),  84);

$moonPercent = ((42 - $moonPhase) * 100) / 42

$moonPercent=Floor($moonPercent+0.5)

$waxing = false
    if $moonPercent < 0 Then
    $waxing = true
    $moonPercent = abs($moonPercent)
EndIf

 if $moonPhase >= 38 Then
    $basicMoonPhase = floor(($moonPhase - 38) / 7)
   else
    $basicMoonPhase = floor(($moonPhase + 46) / 7)
    EndIf
    
if $basicMoonPhase =0 Then
    $mp='New Moon'
ElseIf $basicMoonPhase =1 Then
    $mp='Waxing Crescent'
ElseIf $basicMoonPhase =2 Then
    $mp='First Quarter'
ElseIf $basicMoonPhase =3 Then
    $mp='Waxing Gibbous'
ElseIf $basicMoonPhase =4 Then
    $mp='Full Moon'
ElseIf $basicMoonPhase =5 Then
    $mp='Wanning Gibbous'
ElseIf $basicMoonPhase =6 Then
    $mp='Last Quarter'
ElseIf $basicMoonPhase =7 Then
    $mp='Wanning Cresent'
ElseIf $basicMoonPhase =8 Then
    $mp='New Moon'
ElseIf $basicMoonPhase =9 Then
    $mp='Waxing Cresent'
ElseIf $basicMoonPhase =10 Then
    $mp='First Quarter'
ElseIf $basicMoonPhase =11 Then
    $mp='Waxing Gibbous'
ElseIf $basicMoonPhase =12 Then
    $mp='Full Moon' 
EndIf

GUICtrlSetData($Label3,$moonPercent&"% "&$mp)

GUICtrlSetData($Label2,$Find)

GUICtrlSetData($Label1,$daymonth&"/"&$month&"/"&$year&" "&$hour&":"&$minute)

sleep(1000)
until 1 = 0

Share this post


Link to post
Share on other sites



I don't play anymore so I didn't try it out, but that would have been ridiculously useful for crafting or I suppose those dreaded campers. I never even considered the times could be converted into real time, awesome script!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0