Advertisement
ferrisfox

Astral Sourcery CC Script

Apr 10th, 2021 (edited)
1,466
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.69 KB | None | 0 0
  1. local moon_phase = { }
  2. moon_phase[0] = "full moon"
  3. moon_phase[1] = "waning gibbous"
  4. moon_phase[2] = "Third quarter"
  5. moon_phase[3] = "Waning crescent"
  6. moon_phase[4] = "New moon"
  7. moon_phase[5] = "Waxing crescent"
  8. moon_phase[6] = "First quarter"
  9. moon_phase[7] = "Waxing gibbous"
  10.  
  11. while true do
  12.     term.clear()
  13.     term.setCursorPos(1,1)
  14.  
  15.     local nTime = os.time()
  16.     local nDay = os.day() - 1
  17.  
  18.     if nTime < 6 then
  19.         nDay = nDay - 1
  20.     end
  21.  
  22.     print( "The time is "..textutils.formatTime( nTime, false ).." on day "..nDay )
  23.  
  24.     print( "The phase of the moon is "..moon_phase[nDay%8] )
  25.  
  26.     print( "The eclipse index for today is "..nDay%36 )
  27.  
  28.     os.sleep(0.1)
  29.  
  30. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement