This repository was archived by the owner on Feb 4, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy path[proc,questdisplay_setup].cs2
66 lines (66 loc) · 1.92 KB
/
[proc,questdisplay_setup].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
// 1412
[proc,questdisplay_setup](string $string0, component $component0, int $int1)(int)
def_int $int2 = 0;
cc_deleteall($component0);
if_setposition(0, $int2, ^setpos_abs_centre, ^setpos_abs_top, $component0);
def_int $length3 = string_length($string0);
if ($length3 < $int1) {
$int1 = $length3;
}
if ($int1 <= 0) {
if_setsize(0, 0, ^setsize_minus, ^setsize_abs, $component0);
return($int2);
}
def_int $int4 = 0;
def_int $intarray0($int1);
def_int $int5 = 1;
def_dbrow $dbrow6 = null;
cc_create($component0, ^iftype_rectangle, 0);
cc_sethide(true);
while ($int5 <= $int1) {
$dbrow6 = ~script6154($int5);
cc_create($component0, ^iftype_text, $int5);
if (~questdisplay_hide_quest($dbrow6) = 1) {
cc_sethide(true);
} else {
cc_setsize(0, 18, ^setsize_minus, ^setsize_abs);
cc_settextfont(p12_full);
cc_settextshadow(true);
cc_settextalign(^settextalign_centre, ^settextalign_centre, 0);
cc_settext(~get_quest_name($dbrow6));
$int4 = string_indexof_string("<tostring(1)><tostring(0)><tostring(2)>", substring($string0, calc($int5 - 1), $int5), 0);
if ($int4 = 0) {
cc_setcolour(^red);
} else if ($int4 = 1) {
cc_setcolour(^yellow);
} else {
cc_setcolour(0x0dc10d);
}
}
$intarray0(calc($int5 - 1)) = $int5;
$int5 = calc($int5 + 1);
}
if ($int1 > 1) {
~quicksort_questlist(intarray0, 0, calc($int1 - 1));
}
def_int $int7 = 0;
def_int $int8 = -10;
def_int $int9 = -10;
$int2 = -10;
while ($int7 < $int1) {
$dbrow6 = ~script6154($intarray0($int7));
if (~questdisplay_hide_quest($dbrow6) = 0) {
$int9 = ~script3236($dbrow6);
if ($int9 ! $int8) {
$int5, $int2 = ~script5998(~script3237($dbrow6), $int5, $int2, $component0);
$int8 = $int9;
}
if (cc_find($component0, $intarray0($int7)) = ^true) {
cc_setposition(0, $int2, ^setpos_abs_centre, ^setpos_abs_top);
}
$int2 = calc($int2 + 18);
}
$int7 = calc($int7 + 1);
}
if_setsize(0, $int2, ^setsize_minus, ^setsize_abs, $component0);
return(calc($int2 + 10));