Advertisement
Wyvern67

Astral Sorcery fortune teller

Aug 13th, 2021
1,449
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.69 KB | None | 0 0
  1. -- Day on which horologium last showed up
  2. local horologium = 751
  3.  
  4.  
  5. local f_reboot = false
  6.  
  7. print("Today is the day " .. os.day())
  8.  
  9. while not f_reboot do
  10.    
  11.     local day = os.day()
  12.     local ellipsis = 36
  13.  
  14.     local daysLeft = ellipsis - ((day-horologium) % ellipsis)
  15.  
  16.     local mon = peripheral.wrap("top")
  17.     if mon then
  18.         term.redirect(mon)
  19.     end
  20.  
  21.     if daysLeft > 3 then
  22.         term.setBackgroundColor(colors.red)
  23.     else
  24.         term.setBackgroundColor(colors.green)
  25.     end
  26.  
  27.     local width, height = term.getSize()
  28.  
  29.     term.clear()
  30.     term.setCursorPos(1, 1)
  31.     print("Astrology: ")
  32.     local fortune = {
  33.         "The stars have aligned today. You should take advantage of this and buy more butter.",
  34.         "You'll take part in an argument. In favor or against greasy hair ? Try to stay calm.",
  35.         "You'll have an argument with your significant other. But you'll stutter and lose like a lil bitch.",
  36.         "You'll try to give yourself a cool nickname but everyone still calls you 'retardboi'",
  37.         "There's another strike in France today. This doesn't mean much though.",
  38.         "You're going to eat lobster. You'll want to make a pun, but it won't translate well in english.",
  39.         "You'll spend a significant part of the day drawing dicks in a gas station bathroom",
  40.         "Your colleagues are talking shit about you. And rightfully so, cuz you're a lil bitch",
  41.         "You're going to be impregnated by aliens. Don't let them call the child Wyatt. They'll insist.",
  42.         "You'll steal a baguette and be sent to jail for 8 years. You'll share a cell with Bill Cosby.",
  43.         "It's funny, after 35 years of marriage, you'd think it'd be easy identifying your wife's corpse.",
  44.         "Next week, you and 3,244 other Eagles fans will assume someone else will bring the beach ball.",
  45.         "The people at the local animal shelter wouldn't think so highly of you if they knew about your taxidermy hobby.",
  46.         "You can't remember how you first got in trouble with the Japanese Mafia, but constantly mistaking them for the Chinese Mafia sure hasn't helped matters.",
  47.         "Travel and adventure are in your future this week as your captors continue crossing state lines to stay one step ahead of the law.",
  48.         "It comes down to whether or not you can play an instrument or drive a stick, but no, you won’t get the girl this time, either.",
  49.         "Just when all hope is gone, you will find a secret stash of Oreos that actually makes up for quite a lot.",
  50.         "Although you feel as if you are all alone in a cold, brutal, and uncaring world, there are in fact 7 billion other people there.",
  51.         "Earth and Water magics are very strong in your sign this week, indicating that this is a good time to do mud-related activities.",
  52.         "It’s actually not true that doctors would simply allow you to die in order to harvest your organs. You’ll be dead, all right.",
  53.     }
  54.  
  55.     fortune = fortune[day%#fortune + 1]
  56.     print(fortune)
  57.     print("")
  58.    
  59.     if daysLeft > 1 then
  60.         print("Horologium will be up in " .. daysLeft .. (daysLeft<=1 and " day" or " days"))
  61.     else
  62.         print("Horologium will be up TONIGHT !!!")
  63.     end
  64.  
  65.     if mon then
  66.         term.redirect(term.native())
  67.     end
  68.  
  69.     local cb = peripheral.wrap("bottom")
  70.     if cb then
  71.         cb.setName("Fortune Teller")
  72.         cb.say("Here is for today's fortune: " .. fortune)
  73.     end
  74.  
  75.     local alarm = os.setAlarm(0)
  76.     while not f_reboot do
  77.         event, param = os.pullEvent()
  78.         print(event, param)
  79.         if event == "alarm" and param == alarm then
  80.             break
  81.         end
  82.     end
  83. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement