-
Notifications
You must be signed in to change notification settings - Fork 11
/
[proc,script3249].cs2
51 lines (51 loc) · 1.96 KB
/
[proc,script3249].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
// 3249
[proc,script3249](int $int0, component $component1, int $int2, int $int3, int $int4, int $int5, namedobj $namedobj6, int $int7, graphic $graphic8, string $text0, int $int9)(int)
if ($graphic8 ! null) {
cc_create($component1, ^iftype_graphic, $int0);
cc_setgraphic($graphic8);
cc_setsize(50, 50, ^setsize_abs, ^setsize_abs);
cc_setposition(calc($int3 + 5), calc($int2 + ($int5 / 2 - 25)), ^setpos_abs_left, ^setpos_abs_top);
$int0 = calc($int0 + 1);
}
cc_create($component1, ^iftype_text, $int0);
cc_setsize(calc($int4 - 52), calc($int5 - 30), ^setsize_abs, ^setsize_abs);
cc_setposition(calc($int3 + 52), calc($int2 + 5), ^setpos_abs_left, ^setpos_abs_top);
cc_settextalign(^settextalign_centre, ^settextalign_centre, 0);
cc_settextfont(p11_full);
cc_setcolour(0xff981f);
cc_settextshadow(true);
cc_settext($text0);
$int0 = calc($int0 + 1);
def_int $int10 = 0;
$int10 = inv_total(inv, $namedobj6);
$int10 = calc($int10 + inv_total(inv, oc_cert($namedobj6)));
cc_create($component1, ^iftype_text, $int0);
cc_setsize(calc($int4 - 52), 30, ^setsize_abs, ^setsize_abs);
cc_setposition(calc($int3 + 52), calc($int2 + 30), ^setpos_abs_left, ^setpos_abs_top);
cc_settextalign(^settextalign_centre, ^settextalign_centre, 0);
cc_settextfont(p11_full);
if ($int10 >= $int7) {
cc_setcolour(^green);
} else {
cc_setcolour(^red);
}
cc_settextshadow(true);
def_string $string1 = ",";
if ($int10 <= 9999) {
cc_settext("<~tostring_spacer($int10, $string1)>/<tostring($int7)>");
} else {
cc_settext("<~tostring_spacer(9999, $string1)>+/<tostring($int7)>");
}
$int0 = calc($int0 + 1);
if ($int9 = 1) {
cc_create($component1, ^iftype_text, $int0);
cc_setsize(15, 15, ^setsize_abs, ^setsize_abs);
cc_setposition(calc($int3 + ($int4 - 8)), calc($int2 + ($int5 / 2 - 7)), ^setpos_abs_left, ^setpos_abs_top);
cc_settextalign(^settextalign_centre, ^settextalign_centre, 0);
cc_settextfont(p12_full);
cc_setcolour(0xff981f);
cc_settextshadow(true);
cc_settext("+");
$int0 = calc($int0 + 1);
}
return($int0);