-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path[proc,worldmap_search_update].cs2
52 lines (52 loc) · 1.67 KB
/
[proc,worldmap_search_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
// 1738
[proc,worldmap_search_update](string $string0, component $component0)
def_mapelement $mapelement1 = null;
def_coord $coord2 = null;
def_int $int3 = 0;
def_int $index4 = 0;
def_string $string1 = "";
def_int $int5 = 0;
def_string $string2 = "";
def_coord $coord6 = null;
if (string_length($string0) > 0) {
.cc_settext($string0);
cc_setonkey(null);
%varcint190, %varcint187 = 0, calc(clientclock + 2);
} else {
$int3 = string_length(%varcstring363);
if ($int3 > 0) {
if ($int3 > 1) {
$mapelement1, $coord2 = worldmap_listelement_start;
while ($coord6 = null & $mapelement1 ! null) {
$string1 = mec_text($mapelement1);
$index4 = string_length($string1);
if ($index4 > 0) {
$string1 = ~script1299($string1, "<br>", " ");
$index4 = string_length($string1);
$int5 = string_indexof_string(lowercase($string1), lowercase(%varcstring363), 0);
if ($int5 ! -1) {
if ($int5 > 0) {
$string2 = "<col=ff0000><substring($string1, 0, $int5)>";
}
$string2 = append($string2, "<col=ffffff><substring($string1, $int5, calc($int5 + $int3))>");
if (calc($int5 + $int3) < $index4) {
$string2 = append($string2, "<col=ff0000><substring($string1, calc($int5 + $int3), $index4)>");
}
$coord6 = $coord2;
}
}
$mapelement1, $coord2 = worldmap_listelement_next;
}
}
if ($coord6 ! null) {
.cc_settext($string2);
} else {
.cc_settext("<col=ffffff><%varcstring363><col=ff0000>*</col>");
}
} else {
.cc_settext("<col=ff0000>*</col>");
}
cc_setonkey("worldmap_search_input(event_key, event_keychar, $component0, cc_getid, .cc_getid, $coord6)");
%varcint190 = 1;
}
~script1739(if_getwidth($component0));