This repository was archived by the owner on Feb 4, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy path[clientscript,shared_bank_reorder].cs2
50 lines (50 loc) · 1.96 KB
/
[clientscript,shared_bank_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
// 5274
[clientscript,shared_bank_reorder](component $component0, component $drop1, int $comsubid2, component $drop3, int $dropsubid4, int $comsubid5, int $trans6, component $component7)
if ($drop3 ! $drop1 | $comsubid2 < 0 | $comsubid2 >= $comsubid5 | $dropsubid4 < 0 | $dropsubid4 >= $comsubid5) {
return;
}
def_obj $obj8 = inv_getobj(inv_659, $comsubid2);
if ($obj8 = null) {
return;
}
if (~bankmain_searching = 1) {
if (cc_find($drop1, $comsubid2) = ^true) {
cc_settrans(200);
cc_setontimer("cc_settrans_temporarily_end(event_com, event_comsubid, $trans6, calc(clientclock + 10))");
}
return;
}
def_obj $obj9 = inv_getobj(inv_659, $dropsubid4);
if (%varbit3959 = 0 | $dropsubid4 = calc($comsubid2 + 1) | $dropsubid4 = calc($comsubid2 - 1) | $obj9 = null) {
if (cc_find($drop1, $dropsubid4) = ^true) {
~shared_bank_drawitem($obj8, inv_getnum(inv_659, $comsubid2), $comsubid5, $component0, $drop1, $component7);
}
if (cc_find($drop1, $comsubid2) = ^true) {
~shared_bank_drawitem($obj9, inv_getnum(inv_659, $dropsubid4), $comsubid5, $component0, $drop1, $component7);
}
return;
}
def_int $dropsubid10 = -1;
def_int $slot11 = -1;
if ($dropsubid4 < $comsubid2) {
$dropsubid10 = $comsubid2;
while ($dropsubid10 > $dropsubid4) {
if (cc_find($drop1, $dropsubid10) = ^true) {
$slot11 = calc($dropsubid10 - 1);
~shared_bank_drawitem(inv_getobj(inv_659, $slot11), inv_getnum(inv_659, $slot11), $comsubid5, $component0, $drop1, $component7);
}
$dropsubid10 = calc($dropsubid10 - 1);
}
} else {
$dropsubid10 = $comsubid2;
while ($dropsubid10 < $dropsubid4) {
if (cc_find($drop1, $dropsubid10) = ^true) {
$slot11 = calc($dropsubid10 + 1);
~shared_bank_drawitem(inv_getobj(inv_659, $slot11), inv_getnum(inv_659, $slot11), $comsubid5, $component0, $drop1, $component7);
}
$dropsubid10 = calc($dropsubid10 + 1);
}
}
if (cc_find($drop1, $dropsubid4) = ^true) {
~shared_bank_drawitem($obj8, inv_getnum(inv_659, $comsubid2), $comsubid5, $component0, $drop1, $component7);
}