-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathfunctions.tin
239 lines (199 loc) · 6.89 KB
/
functions.tin
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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
#nop functions.tin
#MESSAGE {var} {off}
#nop ---------------------------------------------------------------------------
#nop GLOBAL VARIABLES - DEFAULTS
#nop ---------------------------------------------------------------------------
#var tpa_on 0
#var tpacol <020>;
#var ccccounter -1;
#var skeletime -1;
#var xp_updated 0;
#format {tpastatus} {%cTPA down!} {bold red};
#format {xpin60} {%cXp per Hour: n/a} {light blue};
#format {xpin10} {%cXp in 10 minutes: n/a} {light blue};
#nop ---------------------------------------------------------------------------
#nop AUDIO FUNCTIONS
#nop ---------------------------------------------------------------------------
#nop text-to-speech
#nop ---------------------------------------------------------------------------
#alias {tts}
{
#regex {$tts} {festival}
{
#system {echo "%0" | festival --tts &};
};
#regex {$tts} {osx}
{
#system {say "%0" &};
};
};
#nop mp3 playback
#nop ---------------------------------------------------------------------------
#alias {mp3}
{
#regexp {$mp3} {mpg321}
{
#system {mpg321 -q sounds/%0 &};
};
};
#nop ---------------------------------------------------------------------------
#nop LOAD VARIABLES FROM afterinventory ALIAS INCLUDING alias tintin-settings
#nop ---------------------------------------------------------------------------
#act {^tintin-settings: %1:%2 %3 ccc:%4 !} {
#var tpa_on %1;
#var min_counter %2;
#var hits %3;
#var ccccounter %4;
#if {$tpa_on == 1} {
#var sec_counter 0;
#ticker {tpa_time}
{
#math {sec_counter} {$sec_counter + 1};
#if {$sec_counter == 60}
{
#math {min_counter} {$min_counter + 1};
#math {sec_counter} {0};
}
}{1}
}
};
#gag {^tintin-settings:};
#gag {^Changed alias "tintin-settings" from}
#nop ---------------------------------------------------------------------------
#nop XP TICKERS
#nop ---------------------------------------------------------------------------
#ticker {xp10minutes}
{
#math {oldxp} {$newxp};
#math {newxp} {$xpvalue};
#math {madexp} {$newxp - $oldxp};
#showme {<158> === You made $madexp Xp in the last ten minutes. === <099>};
showtowin <158> === You made $madexp Xp in the last ten minutes. === <099>;
}{600};
#ticker {xp3minutes}
{
#math {oldexp} {$newexp};
#math {newexp} {$xpvalue};
#math {madeexp} {($newexp - $oldexp) * 3};
#math {hourxp} {$madexp * 6};
#format {xpin10} {%cXp in 10 minutes:%+7s}
{light blue} {$madeexp};
#format {xpin60} {%cXp per Hour:%+8s}
{light blue} {$hourxp};
}{200};
#nop ---------------------------------------------------------------------------
#nop TOP BAR FUNCTIONS
#nop ---------------------------------------------------------------------------
#var window {{1}{ } {2}{ } {3}{ } {4}{ } {5}{ } {6}{ }};
#nop formatting of the top separators
#nop ---------------------------------------------------------------------------
#format {topleft} {%c<%c---%c(}
{dim yellow} {reset} {dim yellow};
#format {separator} {%c)%c--%c(}
{dim yellow} {reset} {dim yellow};
#format {topright} {%c)%c---%c>%c}
{dim yellow} {reset} {dim yellow} {reset};
#nop ---------------------------------------------------------------------------
#nop alias used for inserting text into the chat space
#nop ---------------------------------------------------------------------------
#alias {showtowin}
{
#format temp {%w} {%0};
#loop {1} {&temp[]} {cnt}
{
#list window insert -1 {$temp[$cnt]}
};
#loop {6} {&window[]} {cnt}
{
#list window del 1
};
#loop {1} {5} {cnt}
{
#echo {{$window[$cnt]} {-$cnt}}
};
}
#ticker {paint top bar}
{
#if {$tpa_on == 1}
{
#format {tpastatus} {%sTPA:%c %s min/%s Hits}
{$tpacol} {reset} {$min_counter} {$hits};
}{
#format {tpastatus} {%cTPA down!}
{bold red};
};
#if {$ccccounter == -1}
{
#var {cccstatus} {};
}{
#format {cccstatus} {%s %cCCC: %s Hits %s}
{$separator} {white} {$ccccounter};
};
#if {$skeletime == -1}
{
#echo {{%s %s %s %s %s %s %s %s%s} { 6 * -1 } }
{$topleft} {$xpin10} {$separator} {$xpin60} {$separator} {$tpastatus} {$cccstatus} {$topright};
}{
#format {skelestatus} {%sSkel:%c %s min}
{$skelcol} {reset} {$skeletime};
#echo {{%s %s %s %s %s %s %s %s %s %s%s} { 6 * -1 } }
{$topleft} {$xpin10} {$separator} {$xpin60} {$separator} {$tpastatus} {$cccstatus} {$separator} {$skelestatus} {$topright};
};
}{1};
#nop ---------------------------------------------------------------------------
#nop BOTTOM BAR FUNCTIONS
#nop ---------------------------------------------------------------------------
#read groupbar.tin;
#nop for colouring health and mana depending on fullness
#nop ---------------------------------------------------------------------------
#function {colscale}
{
#math {bruch} {(100 * %1 / %2)};
#if { $bruch < 33 }
{
#format {result} {%c} {light red};
}
{
#if { $bruch > 66 }
{
#format {result} {%c} {light green};
}
{
#format {result} {%c} {light yellow};
}
};
};
#nop ---------------------------------------------------------------------------
#nop LOGGING
#nop ---------------------------------------------------------------------------
#alias {log}
{
#if {"%0" == "on"}
{
#if {"$logging" != "on"}
{
#script {date} {date "+%Y-%m-%d"};
#format {logfile} {logs/%s.log.html} {$date[1]};
#log append $logfile;
#var logging on
}
{
#showme You are already logging.
};
};
#if {"%0" == "off"}
{
#if {"$logging" == "on"}
{
#log;
#var logging off
}
{
#showme You are not logging.
};
};
#if {"%0" != "off" && "%0" != "on"}
{
#showme Turn log on or off?
};
};