-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcrosshairgenerator.py
241 lines (229 loc) · 8.36 KB
/
crosshairgenerator.py
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
240
241
import random
# Get crosshair according to msgContent input
def getCrosshair(msgContent):
msg = msgContent.lower()
nWords = len(msgContent.split());
# msgContent = !crosshair
if(nWords == 1):
return _randCrosshair()
# msgContent = !crosshair *nickname*
elif(nWords == 2):
nameFlag = msg.split()[1]
return _specificCrosshair(nameFlag)
# msgContent too long
else:
return "!crosshair följt av ett namn hade ju vart trevligt."
# Generate a random semi-reasonable crosshair
def _randCrosshair():
useDot = _percentChance(30)
# Use smaller gaps if no dot
if(bool(useDot)):
gap = random.randint(-5, 2)
else:
gap = random.randint(-5, -1)
return (
f"""{_crossHairComment()}\n\n"""
f"""`"""
f"""cl_crosshairalpha "{random.randint(128, 255)}"; """
f"""cl_crosshaircolor "{random.randint(0, 4)}"; """
f"""cl_crosshairdot "{useDot}"; """
f"""cl_crosshairsize "{random.randint(1, 5)}"; """
f"""cl_crosshairstyle "4"; """
f"""cl_crosshairusealpha "1"; """
f"""cl_crosshairthickness "{random.randint(1, 4) / 2.0}"; """
f"""cl_crosshairgap "{gap}"; """
f"""cl_fixedcrosshairgap "{gap}"; """
f"""cl_crosshair_outlinethickness "{random.randint(1, 2) / 2.0}"; """
f"""cl_crosshair_drawoutline "{_percentChance(30)}"; """
f"""cl_crosshair_t "{_percentChance(10)}"; """
f"""hud_showtargetid "{_percentChance(10)}"; """
f"""`"""
)
# Try to pick a specific crosshair according to provided name
def _specificCrosshair(name):
if name in crosshairDictionary:
return (
f"""Har hört att {name} blev inspirerad """
f"""av BOT Larry att köra med denna:\n\n`"""
f"""{crosshairDictionary[name]}`"""
)
else:
return(
f"""Vet inte riktigt vem {name} är.. """
f"""Någon avdankad 1.6 spelare eller?"""
)
# Pick a random flair comment for top of message
def _crossHairComment():
comments = [
f'Det här har jag hittat på alldeles själv, genialiskt!',
f'Tror aldrig jag träffat någon med det här... Med andra ord är det perfekt!',
f'Vart ligger !crosshair ?? Oj vänta, hittade det här: ',
f'Färger har aldrig vart min starka sida men det här är ju sjukt snyggt:',
f'Den här kallar jag "Jolles special":',
f'Denna brukar jag köra när jag lirar Negev:',
]
return random.choice(comments)
# Return 1 with a percentage chance, else return 0
def _percentChance(percentage):
return 1 if random.random() < percentage / 100 else 0
crosshairDictionary = {
"dev1ce" :
f"""cl_crosshair_drawoutline 1; """
f"""cl_crosshair_outlinethickness 1; """
f"""cl_crosshaircolor 2; """
f"""cl_crosshairdot 0; """
f"""cl_crosshairgap -1; """
f"""cl_crosshairsize 3; """
f"""cl_crosshairstyle 4; """
f"""cl_crosshairthickness 1 """,
"dupreeh" :
f"""cl_crosshair_drawoutline 1; """
f"""cl_crosshair_outlinethickness 1; """
f"""cl_crosshaircolor 1; """
f"""cl_crosshairdot 0; """
f"""cl_crosshairgap -2; """
f"""cl_crosshairsize 3; """
f"""cl_crosshairstyle 4; """
f"""cl_crosshairthickness 1 """,
"gla1ve":
f"""cl_crosshair_drawoutline 0; """
f"""cl_crosshaircolor 1; """
f"""cl_crosshairdot 0; """
f"""cl_crosshairgap -2; """
f"""cl_crosshairsize 3; """
f"""cl_crosshairstyle 4; """
f"""cl_crosshairthickness 1 """,
"magisk":
f"""cl_crosshair_drawoutline 1; """
f"""cl_crosshaircolor 0; """
f"""cl_crosshairdot 0; """
f"""cl_crosshairgap -1; """
f"""cl_crosshairsize 1; """
f"""cl_crosshairstyle 4; """
f"""cl_crosshairthickness 0 """,
"xyp9x":
f"""cl_crosshair_drawoutline 0; """
f"""cl_crosshaircolor 1; """
f"""cl_crosshairdot 0; """
f"""cl_crosshairgap 0; """
f"""cl_crosshairsize 5; """
f"""cl_crosshairstyle 4; """
f"""cl_crosshairthickness 0.5 """,
"niko":
f"""cl_crosshair_drawoutline 1; """
f"""cl_crosshairalpha 255; """
f"""cl_crosshaircolor 5; """
f"""cl_crosshaircolor_b 255; """
f"""cl_crosshaircolor_g 255; """
f"""cl_crosshaircolor_r 255; """
f"""cl_crosshairdot 1; """
f"""cl_crosshairgap -4; """
f"""cl_crosshairsize 0; """
f"""cl_crosshairstyle 4; """
f"""cl_crosshairthickness 1; """
f"""cl_crosshair_sniper_width 1; """,
"coldzera":
f"""cl_crosshair_drawoutline 0; """
f"""cl_crosshairalpha 255; """
f"""cl_crosshaircolor 2; """
f"""cl_crosshaircolor_b 165; """
f"""cl_crosshaircolor_g 255; """
f"""cl_crosshaircolor_r 0; """
f"""cl_crosshairdot 1; """
f"""cl_crosshairgap -3; """
f"""cl_crosshairsize 2; """
f"""cl_crosshairstyle 4; """
f"""cl_crosshairthickness 1; """
f"""cl_crosshair_sniper_width 1;""",
"s1mple":
f"""cl_crosshair_drawoutline 0; """
f"""cl_crosshairalpha 255; """
f"""cl_crosshaircolor 4; """
f"""cl_crosshaircolor_b 255; """
f"""cl_crosshaircolor_g 0; """
f"""cl_crosshaircolor_r 255; """
f"""cl_crosshairdot 1; """
f"""cl_crosshairgap -2; """
f"""cl_crosshairsize 1; """
f"""cl_crosshairstyle 5; """
f"""cl_crosshairthickness 0; """
f"""cl_crosshair_sniper_width 1; """,
"m0nesy":
f"""cl_crosshair_drawoutline 0; """
f"""cl_crosshairalpha 255; """
f"""cl_crosshaircolor 4; """
f"""cl_crosshaircolor_b 2; """
f"""cl_crosshaircolor_g 255; """
f"""cl_crosshaircolor_r 255; """
f"""cl_crosshairdot 255; """
f"""cl_crosshairgap -3; """
f"""cl_crosshairsize 2; """
f"""cl_crosshairstyle 4; """
f"""cl_crosshairthickness 0; """
f"""cl_crosshair_sniper_width 1; """,
"b1t":
f"""cl_crosshair_drawoutline 0; """
f"""cl_crosshairalpha 255; """
f"""cl_crosshaircolor 4; """
f"""cl_crosshaircolor_b 144; """
f"""cl_crosshaircolor_g 238; """
f"""cl_crosshaircolor_r 0; """
f"""cl_crosshairdot 0; """
f"""cl_crosshairgap -3; """
f"""cl_crosshairsize 2; """
f"""cl_crosshairstyle 4; """
f"""cl_crosshairthickness 0; """
f"""cl_crosshair_sniper_width 1; """,
"xantares":
f"""cl_crosshair_drawoutline 0; """
f"""cl_crosshairalpha 255; """
f"""cl_crosshaircolor 1; """
f"""cl_crosshaircolor_b 50; """
f"""cl_crosshaircolor_g 250; """
f"""cl_crosshaircolor_r 50; """
f"""cl_crosshairdot 0; """
f"""cl_crosshairgap 0; """
f"""cl_crosshairsize 3; """
f"""cl_crosshairstyle 4; """
f"""cl_crosshairthickness 0.5; """
f"""cl_crosshair_sniper_width 1; """,
"zywoo":
f"""cl_crosshair_drawoutline 0; """
f"""cl_crosshairalpha 200; """
f"""cl_crosshaircolor 1; """
f"""cl_crosshaircolor_b 50; """
f"""cl_crosshaircolor_g 250; """
f"""cl_crosshaircolor_r 50; """
f"""cl_crosshairdot 0; """
f"""cl_crosshairgap -3; """
f"""cl_crosshairsize 1; """
f"""cl_crosshairstyle 4; """
f"""cl_crosshairthickness 0; """
f"""cl_crosshair_sniper_width 1; """,
"twistzz":
f"""cl_crosshair_drawoutline 0; """
f"""cl_crosshairalpha 255; """
f"""cl_crosshaircolor 4; """
f"""cl_crosshaircolor_b 255; """
f"""cl_crosshaircolor_g 255; """
f"""cl_crosshaircolor_r 255; """
f"""cl_crosshairdot 0; """
f"""cl_crosshairgap -2; """
f"""cl_crosshairsize 1.5; """
f"""cl_crosshairstyle 4; """
f"""cl_crosshairthickness 0; """
f"""cl_crosshair_sniper_width 1; """,
"ropz":
f"""cl_crosshair_drawoutline 0; """
f"""cl_crosshairalpha 255; """
f"""cl_crosshaircolor 1; """
f"""cl_crosshaircolor_b -1000; """
f"""cl_crosshaircolor_g 0; """
f"""cl_crosshaircolor_r -1000; """
f"""cl_crosshairdot 0; """
f"""cl_crosshairgap -3; """
f"""cl_crosshairsize 2; """
f"""cl_crosshairstyle 4; """
f"""cl_crosshairthickness 0; """
f"""cl_crosshair_sniper_width 1; """,
}