-
Notifications
You must be signed in to change notification settings - Fork 0
/
[proc,tob_partydetails_setsort].cs2
154 lines (154 loc) · 6.68 KB
/
[proc,tob_partydetails_setsort].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
150
151
152
153
154
// 2333
[proc,tob_partydetails_setsort](int $int0, int $int1)
~tob_partydetails_sortbutton_draw(interface_50:32, 0, 1, "Sort by name", $int0, $int1);
~tob_partydetails_sortbutton_draw(interface_50:33, 2, 3, "Sort by combat level", $int0, $int1);
~tob_partydetails_sortbutton_draw(interface_50:34, 8, 9, "Sort by Attack level", $int0, $int1);
~tob_partydetails_sortbutton_draw(interface_50:35, 10, 11, "Sort by Strength level", $int0, $int1);
~tob_partydetails_sortbutton_draw(interface_50:36, 12, 13, "Sort by Ranged level", $int0, $int1);
~tob_partydetails_sortbutton_draw(interface_50:37, 14, 15, "Sort by Magic level", $int0, $int1);
~tob_partydetails_sortbutton_draw(interface_50:38, 16, 17, "Sort by Defence level", $int0, $int1);
~tob_partydetails_sortbutton_draw(interface_50:39, 18, 19, "Sort by Hitpoints level", $int0, $int1);
~tob_partydetails_sortbutton_draw(interface_50:40, 20, 21, "Sort by Prayer level", $int0, $int1);
~tob_partydetails_sortbutton_draw(interface_50:41, 6, 7, "Sort by performance counter", $int0, $int1);
def_int $intarray0($int1);
def_int $int2 = 0;
def_int $int3 = 0;
while ($int3 = 0 & $int2 < $int1) {
if (cc_find(interface_50:42, calc($int2 * 20)) = ^true) {
$intarray0($int2) = $int2;
$int2 = calc($int2 + 1);
} else {
$int3 = 1;
}
}
def_string $string0 = "";
if ($int2 >= 2) {
switch_int (%varcint181) {
case default :
~tob_partydetails_sort(intarray0, 0, calc($int2 - 1), 1);
case 2, 3 :
~tob_partydetails_sort(intarray0, 0, calc($int2 - 1), 3);
case 8, 9 :
~tob_partydetails_sort(intarray0, 0, calc($int2 - 1), 5);
case 10, 11 :
~tob_partydetails_sort(intarray0, 0, calc($int2 - 1), 7);
case 12, 13 :
~tob_partydetails_sort(intarray0, 0, calc($int2 - 1), 9);
case 14, 15 :
~tob_partydetails_sort(intarray0, 0, calc($int2 - 1), 11);
case 16, 17 :
~tob_partydetails_sort(intarray0, 0, calc($int2 - 1), 13);
case 18, 19 :
~tob_partydetails_sort(intarray0, 0, calc($int2 - 1), 15);
case 20, 21 :
~tob_partydetails_sort(intarray0, 0, calc($int2 - 1), 17);
case 6, 7 :
~tob_partydetails_sort(intarray0, 0, calc($int2 - 1), 19);
}
}
def_int $int4 = 0;
def_int $int5 = 0;
def_int $int6 = 255;
switch_int (%varcint181) {
case 1, 3, 9, 11, 13, 15, 17, 19, 21, 7 :
$int4 = $int2;
while ($int4 > 0) {
$int4 = calc($int4 - 1);
if (cc_find(interface_50:42, calc($intarray0($int4) * 20)) = ^true & .cc_find(interface_50:42, calc($intarray0($int4) * 20 + 1)) = ^true) {
if (calc($int4 % 2) = 0) {
$int6 = 235;
} else {
$int6 = 255;
}
cc_setposition(cc_getx, $int5, ^setpos_abs_left, ^setpos_abs_top);
.cc_setposition(.cc_getx, $int5, ^setpos_abs_left, ^setpos_abs_top);
cc_settrans($int6);
if ($int0 = 2) {
cc_setonmouserepeat("cc_settrans(event_com, event_comsubid, 220, null)");
cc_setonmouseleave("cc_settrans(event_com, event_comsubid, $int6, null)");
cc_setop(1, "Accept");
cc_setop(10, "Reject");
cc_setopbase("<col=ff9040><.cc_gettext></col>");
cc_setonop("script2330(event_op, $intarray0($int4), event_com, event_comsubid, .cc_gettext, $int6)");
}
}
if (cc_find(interface_50:42, calc($intarray0($int4) * 20 + 2)) = ^true) {
cc_setposition(cc_getx, $int5, ^setpos_abs_left, ^setpos_abs_top);
}
if (cc_find(interface_50:42, calc($intarray0($int4) * 20 + 4)) = ^true) {
cc_setposition(cc_getx, $int5, ^setpos_abs_left, ^setpos_abs_top);
}
if (cc_find(interface_50:42, calc($intarray0($int4) * 20 + 6)) = ^true) {
cc_setposition(cc_getx, $int5, ^setpos_abs_left, ^setpos_abs_top);
}
if (cc_find(interface_50:42, calc($intarray0($int4) * 20 + 8)) = ^true) {
cc_setposition(cc_getx, $int5, ^setpos_abs_left, ^setpos_abs_top);
}
if (cc_find(interface_50:42, calc($intarray0($int4) * 20 + 10)) = ^true) {
cc_setposition(cc_getx, $int5, ^setpos_abs_left, ^setpos_abs_top);
}
if (cc_find(interface_50:42, calc($intarray0($int4) * 20 + 12)) = ^true) {
cc_setposition(cc_getx, $int5, ^setpos_abs_left, ^setpos_abs_top);
}
if (cc_find(interface_50:42, calc($intarray0($int4) * 20 + 14)) = ^true) {
cc_setposition(cc_getx, $int5, ^setpos_abs_left, ^setpos_abs_top);
}
if (cc_find(interface_50:42, calc($intarray0($int4) * 20 + 16)) = ^true) {
cc_setposition(cc_getx, $int5, ^setpos_abs_left, ^setpos_abs_top);
}
if (cc_find(interface_50:42, calc($intarray0($int4) * 20 + 18)) = ^true) {
cc_setposition(cc_getx, $int5, ^setpos_abs_left, ^setpos_abs_top);
}
$int5 = calc($int5 + 13);
}
case default :
while ($int4 < $int2) {
if (cc_find(interface_50:42, calc($intarray0($int4) * 20)) = ^true & .cc_find(interface_50:42, calc($intarray0($int4) * 20 + 1)) = ^true) {
if (calc($int4 % 2) = 0) {
$int6 = 235;
} else {
$int6 = 255;
}
cc_setposition(cc_getx, $int5, ^setpos_abs_left, ^setpos_abs_top);
.cc_setposition(.cc_getx, $int5, ^setpos_abs_left, ^setpos_abs_top);
cc_settrans($int6);
if ($int0 = 2) {
cc_setonmouserepeat("cc_settrans(event_com, event_comsubid, 220, null)");
cc_setonmouseleave("cc_settrans(event_com, event_comsubid, $int6, null)");
cc_setop(1, "Accept");
cc_setop(10, "Reject");
cc_setopbase("<col=ff9040><.cc_gettext></col>");
cc_setonop("script2330(event_op, $intarray0($int4), event_com, event_comsubid, .cc_gettext, $int6)");
}
}
if (cc_find(interface_50:42, calc($intarray0($int4) * 20 + 2)) = ^true) {
cc_setposition(cc_getx, $int5, ^setpos_abs_left, ^setpos_abs_top);
}
if (cc_find(interface_50:42, calc($intarray0($int4) * 20 + 4)) = ^true) {
cc_setposition(cc_getx, $int5, ^setpos_abs_left, ^setpos_abs_top);
}
if (cc_find(interface_50:42, calc($intarray0($int4) * 20 + 6)) = ^true) {
cc_setposition(cc_getx, $int5, ^setpos_abs_left, ^setpos_abs_top);
}
if (cc_find(interface_50:42, calc($intarray0($int4) * 20 + 8)) = ^true) {
cc_setposition(cc_getx, $int5, ^setpos_abs_left, ^setpos_abs_top);
}
if (cc_find(interface_50:42, calc($intarray0($int4) * 20 + 10)) = ^true) {
cc_setposition(cc_getx, $int5, ^setpos_abs_left, ^setpos_abs_top);
}
if (cc_find(interface_50:42, calc($intarray0($int4) * 20 + 12)) = ^true) {
cc_setposition(cc_getx, $int5, ^setpos_abs_left, ^setpos_abs_top);
}
if (cc_find(interface_50:42, calc($intarray0($int4) * 20 + 14)) = ^true) {
cc_setposition(cc_getx, $int5, ^setpos_abs_left, ^setpos_abs_top);
}
if (cc_find(interface_50:42, calc($intarray0($int4) * 20 + 16)) = ^true) {
cc_setposition(cc_getx, $int5, ^setpos_abs_left, ^setpos_abs_top);
}
if (cc_find(interface_50:42, calc($intarray0($int4) * 20 + 18)) = ^true) {
cc_setposition(cc_getx, $int5, ^setpos_abs_left, ^setpos_abs_top);
}
$int5 = calc($int5 + 13);
$int4 = calc($int4 + 1);
}
}