-
Notifications
You must be signed in to change notification settings - Fork 11
/
[clientscript,bankmain_reorder].cs2
62 lines (62 loc) · 2.37 KB
/
[clientscript,bankmain_reorder].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
// 285
[clientscript,bankmain_reorder](component $drop0, int $comsubid1, component $drop2, int $dropsubid3, int $trans4, component $component5, component $drop6, component $component7, component $component8)
if ($comsubid1 < 0 | $comsubid1 >= 816) {
return;
}
if ($drop2 = $drop6) {
~script1317($comsubid1, $drop0, $drop6, $component7, $component8);
return;
}
def_int $int9 = ~bank_tabforslot($dropsubid3);
if ($drop2 ! $drop0 | $dropsubid3 < 0 | $dropsubid3 >= 816 | ~bank_tabforslot($comsubid1) ! $int9) {
if (cc_find($drop0, $comsubid1) = ^true) {
cc_settrans(200);
cc_setontimer("cc_settrans_temporarily_end(event_com, event_comsubid, $trans4, calc(clientclock + 10))");
}
return;
}
def_obj $obj10 = inv_getobj(bank, $comsubid1);
if ($obj10 = null) {
return;
}
def_obj $obj11 = inv_getobj(bank, $dropsubid3);
if (%varbit3959 = 0 | $dropsubid3 = calc($comsubid1 + 1) | $dropsubid3 = calc($comsubid1 - 1) | $obj11 = null & $int9 = 0) {
if (cc_find($drop0, $dropsubid3) = ^true) {
~bankmain_drawitem($obj10, inv_getnum(bank, $comsubid1), $drop0, $component5, $drop6, $component7, $component8);
}
if (cc_find($drop0, $comsubid1) = ^true) {
~bankmain_drawitem($obj11, inv_getnum(bank, $dropsubid3), $drop0, $component5, $drop6, $component7, $component8);
}
return;
}
if ($obj11 = null | ~bankmain_searching = 1) {
if (cc_find($drop0, $comsubid1) = ^true) {
cc_settrans(200);
cc_setontimer("cc_settrans_temporarily_end(event_com, event_comsubid, $trans4, calc(clientclock + 10))");
}
return;
}
def_int $dropsubid12 = -1;
def_int $slot13 = -1;
if ($dropsubid3 < $comsubid1) {
$dropsubid12 = $comsubid1;
while ($dropsubid12 > $dropsubid3) {
if (cc_find($drop0, $dropsubid12) = ^true) {
$slot13 = calc($dropsubid12 - 1);
~bankmain_drawitem(inv_getobj(bank, $slot13), inv_getnum(bank, $slot13), $drop0, $component5, $drop6, $component7, $component8);
}
$dropsubid12 = calc($dropsubid12 - 1);
}
} else {
$dropsubid12 = $comsubid1;
while ($dropsubid12 < $dropsubid3) {
if (cc_find($drop0, $dropsubid12) = ^true) {
$slot13 = calc($dropsubid12 + 1);
~bankmain_drawitem(inv_getobj(bank, $slot13), inv_getnum(bank, $slot13), $drop0, $component5, $drop6, $component7, $component8);
}
$dropsubid12 = calc($dropsubid12 + 1);
}
}
if (cc_find($drop0, $dropsubid3) = ^true) {
~bankmain_drawitem($obj10, inv_getnum(bank, $comsubid1), $drop0, $component5, $drop6, $component7, $component8);
}