-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path[proc,script4371].cs2
38 lines (38 loc) · 1.05 KB
/
[proc,script4371].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
// 4371
[proc,script4371](string $string0, int $flags0)(string)
def_int $length1 = string_length($string0);
def_int $intarray0($length1);
def_int $int2 = 0;
def_int $int3 = 0;
while ($int3 < $length1) {
if (string_indexof_string("01", substring($string0, $int3, calc($int3 + 1)), 0) = 1 & string_length(enum(int, string, enum_3792, $int3)) > 0) {
$intarray0($int2) = $int3;
$int2 = calc($int2 + 1);
}
$int3 = calc($int3 + 1);
}
def_string $string1 = "";
def_string $string2 = "";
$int3 = 0;
while ($int3 < $int2) {
$string2 = enum(int, string, enum_3792, $intarray0($int3));
if (testbit($flags0, $intarray0($int3)) = ^true) {
$string2 = "<col=ffffff><$string2></col>";
} else {
$string2 = "<col=afafaf><$string2></col>";
}
if ($int3 > 0) {
if ($int3 < calc($int2 - 1)) {
$string1 = append($string1, ", <$string2>");
} else {
$string1 = append($string1, " and <$string2>.");
}
} else {
$string1 = append($string1, $string2);
}
$int3 = calc($int3 + 1);
}
if ($int3 <= 0) {
$string1 = append($string1, "No interests listed.");
}
return($string1);