SHOW:
|
|
- or go back to the newest paste.
1 | -- Under: Optional chatbox | |
2 | -- Above: Optional monitor | |
3 | local f_reboot = false | |
4 | ||
5 | while not f_reboot do | |
6 | -- Day on which horologium last showed up | |
7 | local horologium = 751 | |
8 | ||
9 | local day = os.day() | |
10 | local ellipsis = 36 | |
11 | ||
12 | local daysLeft = ellipsis - ((day-horologium) % ellipsis) | |
13 | ||
14 | local mon = peripheral.wrap("top") | |
15 | if mon then | |
16 | term.redirect(mon) | |
17 | end | |
18 | ||
19 | if daysLeft > 3 then | |
20 | term.setBackgroundColor(colors.red) | |
21 | else | |
22 | term.setBackgroundColor(colors.green) | |
23 | end | |
24 | ||
25 | local width, height = term.getSize() | |
26 | ||
27 | term.clear() | |
28 | term.setCursorPos(1, 1) | |
29 | print("Astrology: ") | |
30 | local fortune = { | |
31 | "The stars have aligned today. You should take advantage of this and buy more butter.", | |
32 | "You'll take part in an argument. In favor or against greasy hair ? Try to stay calm.", | |
33 | "You'll have an argument with your significant other. But you'll stutter and lose like a lil bitch.", | |
34 | "You'll try to give yourself a cool nickname but everyone still calls you 'retardboi'", | |
35 | "There's another strike in France today. This doesn't mean much though.", | |
36 | "You're going to eat lobster. You'll want to make a pun, but it won't translate well in english.", | |
37 | "You'll spend a significant part of the day drawing dicks in a gas station bathroom", | |
38 | "Your colleagues are talking shit about you. And rightfully so, cuz you're a lil bitch", | |
39 | "You're going to be impregnated by aliens. Don't let them call the child Wyatt. They'll insist.", | |
40 | "You'll steal a baguette and be sent to jail for 8 years. You'll share a cell with Bill Cosby.", | |
41 | "It's funny, after 35 years of marriage, you'd think it'd be easy identifying your wife's corpse.", | |
42 | "Next week, you and 3,244 other Eagles fans will assume someone else will bring the beach ball.", | |
43 | "The people at the local animal shelter wouldn't think so highly of you if they knew about your taxidermy hobby.", | |
44 | "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.", | |
45 | "Travel and adventure are in your future this week as your captors continue crossing state lines to stay one step ahead of the law.", | |
46 | "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.", | |
47 | "Just when all hope is gone, you will find a secret stash of Oreos that actually makes up for quite a lot.", | |
48 | "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.", | |
49 | "Earth and Water magics are very strong in your sign this week, indicating that this is a good time to do mud-related activities.", | |
50 | "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.", | |
51 | } | |
52 | ||
53 | fortune = fortune[day%#fortune + 1] | |
54 | print(fortune) | |
55 | print("") | |
56 | ||
57 | if daysLeft > 1 then | |
58 | print("Horologium will be up in " .. daysLeft .. (daysLeft<=1 and " day" or " days")) | |
59 | else | |
60 | print("Horologium will be up TONIGHT !!!") | |
61 | end | |
62 | ||
63 | if mon then | |
64 | term.redirect(term.native()) | |
65 | end | |
66 | ||
67 | local cb = peripheral.wrap("bottom") | |
68 | if cb then | |
69 | cb.setName("Fortune Teller") | |
70 | cb.say("Here is for today's fortune: " .. fortune) | |
71 | end | |
72 | ||
73 | local alarm = os.setAlarm(0) | |
74 | while not f_reboot do | |
75 | event, param = os.pullEvent() | |
76 | print(event, param) | |
77 | if event == "alarm" and param == alarm then | |
78 | break | |
79 | end | |
80 | end | |
81 | end |