-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path[proc,smithing_item].cs2
58 lines (58 loc) · 1.94 KB
/
[proc,smithing_item].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
// 431
[proc,smithing_item](component $component0, string $text0, namedobj $namedobj1, int $int2, obj $obj3)
cc_deleteall($component0);
if ($namedobj1 = null) {
if_sethide(true, $component0);
return;
}
if_sethide(false, $component0);
if (~inzone(0_48_148_0_0, 0_48_148_63_63, coord) = 1 & $namedobj1 ! bronze_dagger_1205) {
$int2 = 1;
}
def_int $width4 = if_getwidth($component0);
cc_create($component0, ^iftype_text, 0);
cc_setsize($width4, 13, ^setsize_abs, ^setsize_abs);
cc_setposition(0, calc(32 - 1), ^setpos_abs_left, ^setpos_abs_top);
cc_settextfont(p11_full);
cc_settextalign(^settextalign_left, ^settextalign_top, 0);
if ($int2 = 1 | stat(smithing) < enum(obj, int, enum_846, $namedobj1)) {
cc_setcolour(^black);
cc_settextshadow(false);
} else {
cc_setcolour(^white);
cc_settextshadow(true);
}
cc_settext($text0);
def_int $int5 = enum(obj, int, enum_845, $namedobj1);
cc_create($component0, ^iftype_text, 1);
cc_setsize($width4, 13, ^setsize_abs, ^setsize_abs);
cc_setposition(0, calc(32 + 11), ^setpos_abs_left, ^setpos_abs_top);
cc_settextfont(p11_full);
cc_settextalign(^settextalign_left, ^settextalign_top, 0);
cc_settextshadow(true);
if (inv_total(inv, $obj3) < $int5) {
cc_setcolour(0xff981f);
} else {
cc_setcolour(^green);
}
if ($int5 = 1) {
cc_settext("1 bar");
} else {
cc_settext("<tostring($int5)> bars");
}
cc_create($component0, ^iftype_graphic, 2);
cc_setsize(36, 32, ^setsize_abs, ^setsize_abs);
cc_setposition(6, 0, ^setpos_abs_left, ^setpos_abs_top);
cc_setgraphicshadow(0x333333);
cc_setoutline(1);
if (~inzone(0_26_195_0_0, 0_26_195_63_63, coord) = 1 & $namedobj1 = bronze_dagger_1205 & %var2686 < 350) {
cc_setontimer("cc_flash_component_timer(event_com, event_comsubid, 0, 1)");
}
def_int $num6 = enum(obj, int, enum_844, $namedobj1);
cc_setobject($namedobj1, $num6);
if ($num6 > 1) {
if_setop(1, "Smith set", $component0);
} else {
if_setop(1, "Smith", $component0);
}
if_setopbase("<col=ff9040><oc_name($namedobj1)></col>", $component0);