-
Notifications
You must be signed in to change notification settings - Fork 11
/
[proc,clanwars_hud_info_update].cs2
184 lines (184 loc) · 5.41 KB
/
[proc,clanwars_hud_info_update].cs2
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
// 595
[proc,clanwars_hud_info_update](component $component0, component $component1, int $int2)
if (%varbit4287 <= 0 & %varbit4288 <= 0) {
if_sethide(true, $component1);
return;
}
if_sethide(false, $component1);
def_int $int3 = 0;
def_string $string0 = "";
def_string $string1 = "";
def_string $string2 = "";
if (%varbit4285 = 1) {
$int3 = 1;
$string0 = " ";
if (%varbit12230 = 1) {
if (activeclansettings_find_affined(0) = true) {
$string1 = activeclansettings_getclanname;
} else {
$string1 = "Your clan";
}
} else {
$string1 = clan_getchatdisplayname;
}
$string2 = "Opponents";
}
def_string $string3 = ",";
def_string $string4 = "";
def_int $int4 = 0;
def_int $int5 = 0;
$int3 = calc($int3 + 1);
$string4 = "Fighters:";
if (string_length($string0) > 0) {
$string0 = append($string0, "<br>");
}
$string0 = append($string0, $string4);
if (%varbit4289 = 2) {
$string4 = ~tostring_spacer(%varbit4288, $string3);
} else {
$string4 = ~tostring_spacer(%varbit4287, $string3);
}
if (string_length($string1) > 0) {
$string1 = append($string1, "<br>");
}
$string1 = append($string1, $string4);
$int4 = parawidth($string4, 512, p11_full);
if ($int5 < $int4) {
$int5 = $int4;
}
if (%varbit4289 = 2) {
$string4 = ~tostring_spacer(%varbit4287, $string3);
} else {
$string4 = ~tostring_spacer(%varbit4288, $string3);
}
if (string_length($string2) > 0) {
$string2 = append($string2, "<br>");
}
$string2 = append($string2, $string4);
def_string $string5 = "";
def_int $int6 = 0;
def_int $int7 = enum(int, int, enum_376, %varbit4270);
def_int $int8 = enum(int, int, enum_377, %varbit4270);
def_int $int9 = enum(int, int, enum_1120, %varbit4270);
def_int $int10 = enum(int, int, enum_1119, %varbit4270);
if ($int7 > 0 | $int8 > 0 | $int9 > 0 | $int10 > 0) {
$int3 = calc($int3 + 1);
$string4 = "Kills:";
$string0 = append($string0, append("<br>", $string4));
if (%varbit4289 = 2) {
if (%varbit4291 >= 65535) {
$string4 = "Lots!";
} else {
$string4 = ~tostring_spacer(%varbit4291, $string3);
}
} else if (%varbit4290 >= 65535) {
$string4 = "Lots!";
} else {
$string4 = ~tostring_spacer(%varbit4290, $string3);
}
$string1 = append($string1, append("<br>", $string4));
$int4 = parawidth($string4, 512, p11_full);
if ($int5 < $int4) {
$int5 = $int4;
}
if (%varbit4289 = 2) {
if (%varbit4290 >= 65535) {
$string4 = "Lots!";
} else {
$string4 = ~tostring_spacer(%varbit4290, $string3);
}
} else if (%varbit4291 >= 65535) {
$string4 = "Lots!";
} else {
$string4 = ~tostring_spacer(%varbit4291, $string3);
}
$string2 = append($string2, append("<br>", $string4));
if ($int8 > 0 | $int9 > 0) {
$int3 = calc($int3 + 1);
if ($int8 > 0) {
$string4 = "Hill points:";
} else if ($int9 > 0) {
$string4 = "Skull points:";
} else {
$string4 = "Points:";
}
$string0 = append($string0, append("<br>", $string4));
if (%varbit4289 = 2) {
$string4 = ~tostring_spacer(%varbit4576, $string3);
} else {
$string4 = ~tostring_spacer(%varbit4575, $string3);
}
$string1 = append($string1, append("<br>", $string4));
$int4 = parawidth($string4, 512, p11_full);
if ($int5 < $int4) {
$int5 = $int4;
}
if (%varbit4289 = 2) {
$string4 = ~tostring_spacer(%varbit4575, $string3);
} else {
$string4 = ~tostring_spacer(%varbit4576, $string3);
}
$string2 = append($string2, append("<br>", $string4));
}
if ($int8 > 0) {
$string5 = "Victory: <~tostring_spacer($int8, $string3)> points";
} else if ($int9 > 0) {
$string5 = "Victory: <~tostring_spacer($int9, $string3)> points";
} else if ($int7 > 0) {
$string5 = "Victory: <~tostring_spacer($int7, $string3)> kills";
} else if ($int10 > 0 & cc_find($component1, calc($int2 + 3)) = ^true) {
$string5 = ~clanwars_hud_timeremaining_resynch;
}
$int6 = parawidth($string5, 512, p11_full);
}
def_int $int11 = parawidth($string0, 512, p11_full);
def_int $width12 = parawidth($string1, 512, p11_full);
def_int $width13 = parawidth($string2, 512, p11_full);
$int4 = calc($int11 + 4 + $width12 + 4 + $width13);
if ($int6 > $int4) {
$int11 = calc($int11 + ($int6 - $int4));
$int5 = $width12;
}
$int3 = calc($int3 * 10 + 2);
def_int $int14 = 4;
if (cc_find($component1, $int2) = ^true) {
cc_setsize($int11, $int3, ^setsize_abs, ^setsize_abs);
cc_setposition($int14, 4, ^setpos_abs_left, ^setpos_abs_top);
cc_settext($string0);
$int14 = calc($int14 + $int11);
}
if (cc_find($component1, calc($int2 + 1)) = ^true) {
$int4 = calc(($width12 - $int5) / 2);
$int4 = calc($int4 - 4);
$int14 = calc($int14 - $int4);
if ($int14 < 4) {
$int14 = 4;
}
cc_setsize($width12, $int3, ^setsize_abs, ^setsize_abs);
cc_setposition($int14, 4, ^setpos_abs_left, ^setpos_abs_top);
cc_settext($string1);
$int14 = calc($int14 + $width12 + 4);
}
if (cc_find($component1, calc($int2 + 2)) = ^true) {
cc_setsize($width13, $int3, ^setsize_abs, ^setsize_abs);
cc_setposition($int14, 4, ^setpos_abs_left, ^setpos_abs_top);
cc_settext($string2);
$int14 = calc($int14 + $width13);
}
if (cc_find($component1, calc($int2 + 3)) = ^true) {
cc_setsize(calc($int14 - 4), 11, ^setsize_abs, ^setsize_abs);
cc_setposition(4, calc(4 + $int3), ^setpos_abs_left, ^setpos_abs_top);
cc_settext($string5);
}
$int4 = calc($int14 + 4);
$int3 = calc(4 + $int3 + 4);
if ($int6 > 0) {
$int3 = calc($int3 + 11);
}
if_setsize($int4, $int3, ^setsize_abs, ^setsize_abs, $component1);
while ($int2 > 0) {
$int2 = calc($int2 - 1);
if (cc_find($component1, $int2) = ^true) {
cc_setsize($int4, $int3, ^setsize_abs, ^setsize_abs);
}
}