-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path[proc,ge_pricelist_draw].cs2
149 lines (149 loc) · 5.06 KB
/
[proc,ge_pricelist_draw].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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
// 802
[proc,ge_pricelist_draw](inv $inv0, int $size1, int $comsubid2)
cc_deleteall(interface_237:2);
def_int $size3 = 0;
while ($size3 < $size1) {
cc_create(interface_237:2, ^iftype_graphic, $size3);
$size3 = calc($size3 + 1);
}
def_int $width4 = if_getwidth(interface_237:2);
def_int $int5 = 0;
def_int $int6 = $size1;
def_obj $obj7 = null;
def_int $int8 = 0;
def_int $int9 = 0;
def_int $int10 = 0;
def_int $int11 = 0;
def_int $int12 = 0;
def_int $int13 = 0;
def_int $int14 = 0;
def_int $int15 = -1;
def_int $int16 = -1;
$size3 = 0;
if (%varbit4440 = 1) {
if (cc_find(interface_237:4, $comsubid2) = ^true) {
cc_setgraphic("options_radio_buttons,0");
}
$int9, $int10 = calc(36 + 10), calc(32 + 10);
$int11, $int12 = calc(($width4 - 5 * $int9) / 6), calc($int10 + 35);
$int13 = calc($int11 + $int9);
while ($size3 < $size1) {
$obj7 = inv_getobj($inv0, $size3);
if ($obj7 ! null) {
$int14, $int15 = calc($int11 + $size3 % 5 * $int13), calc($size3 / 5 * $int12 + 20);
if (cc_find(interface_237:2, $size3) = ^true) {
cc_sethide(false);
cc_setsize(36, 32, ^setsize_abs, ^setsize_abs);
cc_setposition(calc($int14 + 5), calc($int15 + 5), ^setpos_abs_left, ^setpos_abs_top);
cc_setobject_nonum($obj7, 1);
cc_setop(10, "Examine");
cc_setopbase("<col=ff9040><oc_name($obj7)></col>");
}
$int6 = ~script771(interface_237:2, $int6, $int14, $int15, $int9, $int10);
cc_create(interface_237:2, ^iftype_graphic, $int6);
$int6 = calc($int6 + 1);
cc_setsize(36, 32, ^setsize_abs, ^setsize_abs);
cc_setposition(calc($int14 + 5), calc($int15 + 5), ^setpos_abs_left, ^setpos_abs_top);
cc_setgraphicshadow(0x333333);
cc_setoutline(1);
cc_setobject_nonum($obj7, 1);
$int8 = inv_getnum($inv0, $size3);
cc_create(interface_237:2, ^iftype_text, $int6);
$int6 = calc($int6 + 1);
cc_setsize($int13, 22, ^setsize_abs, ^setsize_abs);
cc_setposition(calc($int14 - $int11 / 2), calc($int15 + $int10 + 2), ^setpos_abs_left, ^setpos_abs_top);
cc_setcolour(0xff981f);
cc_settextfont(p11_full);
cc_settextshadow(true);
cc_settextalign(^settextalign_centre, ^settextalign_centre, 0);
if ($int8 = 1) {
cc_settext("1 coin");
} else {
cc_settext("<~tostring_spacer($int8, ",")> coins");
}
} else if (cc_find(interface_237:2, $size3) = ^true) {
cc_sethide(true);
}
$size3 = calc($size3 + 1);
}
} else {
if (cc_find(interface_237:4, $comsubid2) = ^true) {
cc_setgraphic("options_radio_buttons,2");
}
$int5 = calc($width4 / 2);
$int13 = calc($int5 - 36);
$int12 = calc(32 + 4);
while ($size3 < $size1) {
$obj7 = inv_getobj($inv0, $size3);
if ($obj7 ! null) {
$int15 = calc($size3 / 2 * $int12);
if (calc($size3 % 2) = 0) {
$int14 = 0;
cc_create(interface_237:2, ^iftype_graphic, $int6);
$int6 = calc($int6 + 1);
cc_setsize($width4, $int12, ^setsize_abs, ^setsize_abs);
cc_setgraphic("tradebacking_light");
cc_settiling(true);
if (calc($size3 % 4) < 2) {
cc_settrans(0);
} else {
cc_settrans(125);
}
cc_setposition($int14, $int15, ^setpos_abs_left, ^setpos_abs_top);
} else {
$int14 = $int5;
}
$int16 = calc($int15 + 2);
if (cc_find(interface_237:2, $size3) = ^true) {
cc_sethide(false);
cc_setsize(36, 32, ^setsize_abs, ^setsize_abs);
cc_setposition($int14, $int16, ^setpos_abs_left, ^setpos_abs_top);
cc_setobject_nonum($obj7, 1);
cc_setop(10, "Examine");
cc_setopbase("<col=ff9040><oc_name($obj7)></col>");
}
cc_create(interface_237:2, ^iftype_graphic, $int6);
$int6 = calc($int6 + 1);
cc_setsize(36, 32, ^setsize_abs, ^setsize_abs);
cc_setposition($int14, $int16, ^setpos_abs_left, ^setpos_abs_top);
cc_setgraphicshadow(0x333333);
cc_setoutline(1);
cc_setobject_nonum($obj7, 1);
cc_create(interface_237:2, ^iftype_text, $int6);
$int6 = calc($int6 + 1);
cc_setsize($int13, calc(32 - 2), ^setsize_abs, ^setsize_abs);
cc_setposition(calc($int14 + 36), calc($int16 + 1), ^setpos_abs_left, ^setpos_abs_top);
cc_setcolour(0xff981f);
cc_settextfont(p11_full);
cc_settextshadow(true);
cc_settextalign(^settextalign_left, ^settextalign_top, 0);
cc_settext(oc_name($obj7));
$int8 = inv_getnum($inv0, $size3);
cc_create(interface_237:2, ^iftype_text, $int6);
$int6 = calc($int6 + 1);
cc_setsize($int13, calc(32 - 2), ^setsize_abs, ^setsize_abs);
cc_setposition(calc($int14 + 36), calc($int16 + 1), ^setpos_abs_left, ^setpos_abs_top);
cc_setcolour(0xff981f);
cc_settextfont(p12_full);
cc_settextshadow(true);
cc_settextalign(^settextalign_left, ^settextalign_bottom, 0);
if ($int8 = 1) {
cc_settext("<col=ffffff>1 coin</col>");
} else {
cc_settext("<col=ffffff><~tostring_spacer($int8, ",")> coins</col>");
}
} else if (cc_find(interface_237:2, $size3) = ^true) {
cc_sethide(true);
}
$size3 = calc($size3 + 1);
}
}
if ($int15 >= 0) {
$int15 = calc($int15 + $int12);
}
if ($int15 > if_getheight(interface_237:2)) {
if_setscrollsize(0, $int15, interface_237:2);
} else {
if_setscrollsize(0, 0, interface_237:2);
}
~scrollbar_resize(interface_237:3, interface_237:2, if_getscrolly(interface_237:2));