-
Notifications
You must be signed in to change notification settings - Fork 0
/
[clientscript,script609].cs2
51 lines (51 loc) · 1.54 KB
/
[clientscript,script609].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
// 609
[clientscript,script609](string $string0, int $int0, int $settextalignh1, graphic $graphic2, fontmetrics $fontmetrics3, int $int4, int $int5, component $component6)
if (if_hassub(enum(component, component, ~toplevel_getcomponents, toplevel_osrs_stretch:16)) = false) {
return;
}
def_int $width7 = if_getwidth($component6);
def_int $int8 = 0;
def_int $int9 = 0;
def_int $int10 = 0;
def_int $int11 = 0;
def_int $int12 = 0;
$int10, $int11, $int12 = ~hex_to_rgb($int0);
if ($int10 > 64) {
$int10 = calc($int10 - 32);
} else {
$int10 = calc($int10 / 2);
}
if ($int11 > 64) {
$int11 = calc($int11 - 32);
} else {
$int11 = calc($int11 / 2);
}
if ($int12 > 64) {
$int12 = calc($int12 - 32);
} else {
$int12 = calc($int12 / 2);
}
def_int $colour13 = ~rgb_to_hex($int10, $int11, $int12);
def_string $string1 = "";
$string1, $string0 = ~script632($string0);
while (string_length($string1) > 0) {
$int8 = calc(paraheight($string1, $width7, $fontmetrics3) * $int4 + $int5);
cc_create($component6, ^iftype_text, %varcint43);
%varcint43 = calc(%varcint43 + 1);
cc_setposition(0, %varcint49, ^setpos_abs_left, ^setpos_abs_top);
cc_setsize($width7, $int8, ^setsize_abs, ^setsize_abs);
if (calc($int9 % 2) = 0) {
cc_setcolour($int0);
} else {
cc_setcolour($colour13);
}
cc_settextfont($graphic2);
cc_settextalign($settextalignh1, ^settextalign_top, 0);
cc_settextshadow(true);
cc_settext($string1);
%varcint49, $int9 = calc(%varcint49 + $int8 + 3), calc($int9 + 1);
$string1, $string0 = ~script632($string0);
}
if ($int9 > 0) {
%varcint49 = calc(%varcint49 + 3);
}