forked from RuneStar/cs2-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path[proc,script1201].cs2
23 lines (23 loc) · 1.01 KB
/
[proc,script1201].cs2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// 1201
[proc,script1201](component $component0, component $component1, component $component2, component $component3, obj $obj4)
def_int $int5 = inv_total(inv_173, $obj4);
if ($int5 > 1000) {
$int5 = 1000;
}
.cc_setsize(calc($int5 * 16384 / 1000), 0, ^setsize_2, ^setsize_minus);
def_int $int6 = 0;
def_int $int7 = 0;
if ($int5 <= 500) {
$int6, $int7 = 255, interpolate(0, $int5, 0, 500, 255);
} else {
$int6, $int7 = interpolate(0, calc(1000 - $int5), 0, 500, 255), 255;
}
def_int $colour8 = ~rgb_to_hex($int6, $int7, 0);
cc_setcolour($colour8);
.cc_setcolour($colour8);
def_string $string0 = "<oc_name($obj4)>: <tostring(calc($int5 / 10))>.<tostring(calc($int5 % 10))>% appreciation";
if_setonmouserepeat("tooltip_mouserepeat(event_com, -1, $component3, $string0, 25, 512)", $component0);
if_setonmouserepeat("tooltip_mouserepeat(event_com, -1, $component3, $string0, 25, 512)", $component1);
if_setonmouseleave("deltooltip($component3)", $component0);
if_setonmouseleave("deltooltip($component3)", $component1);
%varcint2 = 0;