-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSSRPG_clock_script
More file actions
169 lines (162 loc) · 2.77 KB
/
SSRPG_clock_script
File metadata and controls
169 lines (162 loc) · 2.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
// true if you want to activate the clock UI
var clockUI = true
// which loop do you want the clock to be activated?
var loopClockStart = 2
// Display the clock in the center of the screen
// Adjust X and Y coordinates as needed to center based on your digit designs
var startX = -25
var posY = -8
// Loop count
var loopCount = 1
?loc.loop
loopCount++
var hour
var min
var hourKensArt
var hourOnesArt
var minTensArt
var minOnesArt
// Colon ASCII art
var colonArt = ascii
#####
#:::#
#:::#
#####
#####
#:::#
#:::#
#####
asciiend
// Calculate positions based on ASCII art dimensions
var colon1X = startX + 23 // After hour digits
var minutesX = colon1X + 6 // After first colon
var clockUIActivated = false
? clockUI & loopCount >= loopClockStart
clockUIActivated = true
// Current time
hour = time.hour
min = time.minute
// Function calls to get ASCII art for each part of the time
hourKensArt = GetDigitArt(hour / 10)
hourOnesArt = GetDigitArt(hour % 10)
minTensArt = GetDigitArt(min / 10)
minOnesArt = GetDigitArt(min % 10)
// Display hour tens and ones
>c@startX@,@posY@,#rainbow,@hourKensArt@
>c@(startX+12)@,@posY@,#rainbow,@hourOnesArt@
// Display first colon
>c@colon1X@,@posY@,#rainbow,@colonArt@
// Display minute tens and ones
>c@minutesX@,@posY@,#rainbow,@minTensArt@
>c@(minutesX+12)@,@posY@,#rainbow,@minOnesArt@
func GetDigitArt(digit)
? digit = 0
return ascii
##000000####
#00####00###
00######00##
00######00##
00######00##
00######00##
#00####00###
##000000####
asciiend
:? digit = 1
return ascii
####11######
###111######
##1#11######
####11######
####11######
####11######
####11######
1111111111##
asciiend
:? digit = 2
return ascii
##222222####
22######22##
22#####22###
#####22#####
###22#######
##22########
22##########
2222222222##
asciiend
:? digit = 3
return ascii
#3333333####
33######33##
########33##
##3333333###
########33##
########33##
33######33##
33333333####
asciiend
:? digit = 4
return ascii
44######44##
44######44##
44######44##
4444444444##
########44##
########44##
########44##
########44##
asciiend
:? digit = 5
return ascii
5555555555##
55##########
55##########
555555555###
########55##
########55##
55######55##
#55555555###
asciiend
:? digit = 6
return ascii
##6666666###
#66#########
66##########
66666666####
66######66##
66######66##
#66####66###
##666666####
asciiend
:? digit = 7
return ascii
7777777777##
#######77###
######77####
#####77#####
####77######
###77#######
##77########
#77#########
asciiend
:? digit = 8
return ascii
#88888888###
88######88##
88######88##
#88888888###
88######88##
88######88##
88######88##
#88888888###
asciiend
:? digit = 9
return ascii
##999999####
99######99##
99######99##
##99999999##
########99##
########99##
99######99##
#9999999####
asciiend