Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Quaero's Astrological Prognosticator v1.1
- --Modified by Wolfsteak
- --Type "monitor top moon" to run
- --Type "monitor top clear" to tidy
- local monitor = peripheral.wrap("top")
- monitor.setTextScale(0.5)
- while true do --start looping
- monitor.setCursorPos(1,1)
- print("* Moon Phase *")
- x,y = term.getSize()
- for i = 1,x do term.write('-') end
- print('')
- print('')
- local time = os.time()
- local time2 = textutils.formatTime(time,true)
- local lunationCycle = {'Full', 'Waning gibbous', 'Third quarter', 'Waning crescent', 'New', 'Waxing crescent', 'First quarter', 'Waxing gibbous'}
- local p = ( os.day() - 1) % 8 --deferent
- if os.time() < 6 then --epicycle
- p = p - 1 --adjusted calculation date
- p = p%8 --cyclical position
- end
- print('Time : ' .. time2)
- print('Number : ' .. p)
- print('Moon : ' .. lunationCycle[p+1]) --moon phase
- print('')
- print('Hold Ctrl+T to exit')
- sleep(1)
- end --end of loop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement