-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path[proc,ge_offer_side_draw].cs2
53 lines (53 loc) · 1.38 KB
/
[proc,ge_offer_side_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
// 783
[proc,ge_offer_side_draw](component $component0, component $component1)
def_int $int2 = calc(%varbit4439 - 1);
def_int $int3 = 0;
if (enum(int, inv, enum_150, $int2) = null) {
$int3 = 1;
} else if (stockmarket_isofferempty($int2) = true) {
if (%varbit4397 = 1) {
$int3 = 1;
}
} else {
$int3 = 1;
}
def_int $int4 = 0;
while ($int4 < 4) {
if (cc_find($component1, $int4) = ^true) {
if ($int3 = 1) {
cc_settrans(240);
cc_setontimer("script811(event_com, event_comsubid, calc(clientclock + 3 - $int4 * 2), 240, 250)");
cc_sethide(false);
} else {
cc_sethide(true);
}
}
$int4 = calc($int4 + 1);
}
def_int $int5 = calc((42 - 36) * 3 - 2);
def_int $int6 = calc((36 - 32) * 2);
def_obj $obj7 = null;
$int4 = inv_size(inv);
while ($int4 > 0) {
$int4 = calc($int4 - 1);
if (cc_find($component0, $int4) = ^true) {
cc_clearops;
cc_setposition(calc($int5 + $int4 % 4 * 42), calc($int6 + $int4 / 4 * 36), ^setpos_abs_left, ^setpos_abs_top);
$obj7 = inv_getobj(inv, $int4);
if ($obj7 ! null) {
cc_sethide(false);
cc_setobject($obj7, inv_getnum(inv, $int4));
if ($int3 = 1) {
cc_setop(1, "Offer");
cc_setonop("cc_settrans_temporarily(event_com, event_comsubid, 100, 0)");
} else {
cc_setonop(null);
}
cc_setop(10, "Examine");
cc_setopbase("<col=ff9040><oc_name($obj7)></col>");
} else {
cc_sethide(true);
cc_setobject(obj_6512, 1);
}
}
}