-
Notifications
You must be signed in to change notification settings - Fork 11
/
[proc,grouping_rebuild].cs2
246 lines (246 loc) · 8.78 KB
/
[proc,grouping_rebuild].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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
// 435
[proc,grouping_rebuild]
def_string $text0 = "";
if (%varcint64 > 0 & %varcint64 <= 22) {
$text0 = enum(int, string, enum_848, %varcint64);
if_settext($text0, interface_76:8);
} else {
%varcint64 = 0;
if_settext("Select an activity...", interface_76:8);
}
def_int $world0 = enum(int, int, enum_850, %varcint64);
if ($world0 = -1) {
if_settext("---", interface_76:22);
if_setcolour(0xff981f, interface_76:22);
} else {
if (%varcint64 = 4 & %varcint103 = 0) {
$world0 = 383;
}
if_settext(tostring($world0), interface_76:22);
if (map_world = $world0) {
if_setcolour(0x0dc10d, interface_76:22);
} else {
if_setcolour(^yellow, interface_76:22);
}
}
cc_deleteall(interface_76:26);
def_int $int1 = 0;
while ($int1 < %varcint64) {
cc_create(interface_76:26, ^iftype_rectangle, $int1);
cc_sethide(true);
$int1 = calc($int1 + 1);
}
cc_create(interface_76:26, ^iftype_rectangle, %varcint64);
cc_setposition(0, 0, ^setpos_abs_left, ^setpos_abs_top);
cc_setsize(if_getwidth(interface_76:26), if_getheight(interface_76:26), ^setsize_abs, ^setsize_abs);
cc_setfill(true);
cc_settrans(255);
if (%varcint64 = 0) {
cc_setop(1, "Teleport");
} else {
cc_setop(1, "Teleport to <col=ff8040><$text0></col>");
}
def_int $int2 = 0;
def_string $string1 = lowercase(clan_getchatownername);
def_int $int3 = 1;
def_string $string2 = enum(int, string, enum_849, $int3);
while (string_length($string2) > 0) {
if (compare($string1, $string2) = 0) {
$int2 = $int3;
}
$int3 = calc($int3 + 1);
$string2 = enum(int, string, enum_849, $int3);
}
if (%varcint64 = 0) {
if_settext("---", interface_76:25);
if_clearops(interface_76:23);
if_setonop(null, interface_76:23);
} else if ($int2 ! %varcint64) {
if_settext("Join", interface_76:25);
if_setop(1, "Join <col=ff8040><$text0></col> channel", interface_76:23);
if_setonop("grouping_joinchannel(%varcint64)", interface_76:23);
} else {
if_settext("Leave", interface_76:25);
if_setop(1, "Leave <col=ff8040><$text0></col> channel", interface_76:23);
if_setonop("grouping_joinchannel(0)", interface_76:23);
}
def_int $int4 = 0;
def_int $int5 = 0;
cc_deleteall(interface_76:18);
cc_deleteall(interface_76:12);
$int1 = 0;
def_string $string3 = "";
def_int $rank6 = -1;
def_int $rank7 = 0;
def_int $rank8 = 0;
def_int $int9 = 0;
def_int $int10 = 1;
def_int $int11 = 13;
if (~on_mobile = true) {
$int11 = scale(8, 5, $int11);
}
if (if_gethide(interface_76:14) = true) {
if_setgraphic("scrollbar_v2,1", interface_76:20);
if_sethide(false, interface_76:5);
if_setonclick("grouping_dropdown(true)", interface_76:5);
if_setonclick(null, interface_76:2);
$int5 = if_getwidth(interface_76:12);
if_sethide(false, interface_76:9);
if ($int2 = 0 | %varcint64 ! $int2) {
if_setscrollsize(0, 0, interface_76:12);
~scrollbar_resize(interface_76:13, interface_76:12, 0);
cc_create(interface_76:12, ^iftype_text, $int1);
$int1 = calc($int1 + 1);
cc_settextfont(p12_full);
cc_setcolour(0xff981f);
cc_settextalign(^settextalign_centre, ^settextalign_centre, 0);
cc_settextshadow(true);
if ($int2 = 0) {
cc_settext("You are not currently in a grouping chat-channel.");
cc_setsize($int5, if_getheight(interface_76:12), ^setsize_abs, ^setsize_abs);
cc_setposition(0, 0, ^setpos_abs_left, ^setpos_abs_top);
return;
}
$string1 = "You are currently talking in the <col=ffffff><enum(int, string, enum_848, $int2)></col> channel.";
$int10 = calc(paraheight($string1, $int5, p12_full) * 12 + 5);
cc_setsize($int5, $int10, ^setsize_abs, ^setsize_abs);
cc_setposition(0, calc((if_getheight(interface_76:12) - $int10) / 2), ^setpos_abs_left, ^setpos_abs_top);
cc_settext($string1);
cc_setonmouserepeat("cc_colour_swapper(event_com, event_comsubid, 0xffb82f)");
cc_setonmouseleave("cc_colour_swapper(event_com, event_comsubid, 0xff981f)");
cc_setop(1, "View Channel");
cc_setonop("grouping_viewchannel($int2)");
return;
}
$rank7, $rank8 = clan_getchatminkick, clan_getchatrank;
$int9 = clan_getchatcount;
while ($int9 > 0) {
$int9 = calc($int9 - 1);
$string3, $world0, $rank6 = clan_getchatusername($int9), clan_getchatuserworld($int9), clan_getchatuserrank($int9);
cc_create(interface_76:12, ^iftype_text, $int1);
$int1 = calc($int1 + 1);
.cc_create(interface_76:12, ^iftype_text, $int1);
$int1 = calc($int1 + 1);
cc_setsize(calc($int5 - 10), $int11, ^setsize_abs, ^setsize_abs);
.cc_setsize($int5, $int11, ^setsize_abs, ^setsize_abs);
cc_setposition(10, $int10, ^setpos_abs_left, ^setpos_abs_top);
.cc_setposition(0, $int10, ^setpos_abs_left, ^setpos_abs_top);
cc_settextfont(p11_full);
.cc_settextfont(p11_full);
cc_setcolour(^white);
if ($world0 = map_world) {
.cc_setcolour(0x0dc10d);
} else {
.cc_setcolour(^yellow);
}
cc_settextalign(^settextalign_left, ^settextalign_centre, 0);
.cc_settextalign(^settextalign_right, ^settextalign_centre, 0);
cc_settextshadow(true);
.cc_settextshadow(true);
cc_settext($string3);
.cc_settext("World <tostring($world0)>");
cc_create(interface_76:12, ^iftype_graphic, $int1);
$int1 = calc($int1 + 1);
cc_setsize(9, 9, ^setsize_abs, ^setsize_abs);
cc_setposition(0, calc($int10 + 1), ^setpos_abs_left, ^setpos_abs_top);
cc_setgraphic(enum(int, graphic, enum_1543, $rank6));
cc_create(interface_76:12, ^iftype_rectangle, $int1);
$int1 = calc($int1 + 1);
cc_setsize($int5, $int11, ^setsize_abs, ^setsize_abs);
cc_setposition(0, $int10, ^setpos_abs_left, ^setpos_abs_top);
cc_setfill(true);
cc_settrans(255);
cc_setonop("friendschat_op($string3, event_opindex)");
if (clan_isself($int9) = false) {
if (clan_isfriend($int9) = true) {
cc_setop(9, "Remove friend <$string3>");
} else if (clan_isignore($int9) = true) {
cc_setop(10, "Remove ignore <$string3>");
} else {
cc_setop(7, "Add friend <$string3>");
cc_setop(8, "Add ignore <$string3>");
}
}
if ($rank8 >= $rank7 & $rank8 > $rank6) {
cc_setop(6, "Kick user <$string3>");
}
$int10 = calc($int10 + $int11);
}
if ($int10 > 0) {
$int4 = if_getscrolly(interface_76:12);
if_setscrollsize(0, $int10, interface_76:12);
~scrollbar_resize(interface_76:13, interface_76:12, $int4);
} else {
if_setscrollsize(0, 0, interface_76:12);
~scrollbar_resize(interface_76:13, interface_76:12, 0);
cc_create(interface_76:12, ^iftype_text, $int1);
$int1 = calc($int1 + 1);
cc_setsize($int5, if_getheight(interface_76:12), ^setsize_abs, ^setsize_abs);
cc_setposition(0, 0, ^setpos_abs_left, ^setpos_abs_top);
cc_settextfont(p12_full);
cc_setcolour(0xff981f);
cc_settextalign(^settextalign_centre, ^settextalign_centre, 0);
cc_settextshadow(true);
cc_settext("The channel is empty.");
}
return;
}
if_setgraphic("scrollbar_v2,0", interface_76:20);
if_sethide(true, interface_76:5);
if_setonclick(null, interface_76:5);
if_setonclick("grouping_dropdown(false)", interface_76:2);
if_sethide(true, interface_76:9);
$int5 = calc(if_getwidth(interface_76:18) - 12);
$int10 = 3;
$int11 = 12;
if (~on_mobile = true) {
$int11 = scale(8, 5, $int11);
}
cc_create(interface_76:18, ^iftype_rectangle, $int1);
$int1 = calc($int1 + 1);
cc_setsize($int5, $int11, ^setsize_abs, ^setsize_abs);
cc_setposition(0, 0, ^setpos_abs_left, ^setpos_abs_top);
cc_setcolour(^white);
cc_setfill(true);
cc_settrans(230);
cc_sethide(true);
$int3 = 1;
$string2 = enum(int, string, enum_849, $int3);
while (string_length($string2) > 0) {
if (%varcint64 ! $int3) {
.cc_create(interface_76:18, ^iftype_text, $int1);
$int1 = calc($int1 + 1);
.cc_setsize($int5, $int11, ^setsize_abs, ^setsize_abs);
.cc_setposition(6, $int10, ^setpos_abs_left, ^setpos_abs_top);
.cc_setcolour(0xff981f);
.cc_settextfont(p11_full);
.cc_settextalign(^settextalign_left, ^settextalign_centre, 0);
.cc_settextshadow(true);
.cc_settext(enum(int, string, enum_848, $int3));
.cc_setonmouseover("grouping_mouseover(event_com, event_comsubid, cc_getid, true)");
.cc_setonmouseleave("grouping_mouseover(event_com, event_comsubid, cc_getid, false)");
.cc_setop(1, "Select");
.cc_setonop("grouping_viewchannel($int3)");
$int10 = calc($int10 + $int11);
}
$int3 = calc($int3 + 1);
$string2 = enum(int, string, enum_849, $int3);
}
if (%varcint64 ! 0) {
.cc_create(interface_76:18, ^iftype_text, $int1);
$int1 = calc($int1 + 1);
.cc_setsize($int5, $int11, ^setsize_abs, ^setsize_abs);
.cc_setposition(6, $int10, ^setpos_abs_left, ^setpos_abs_top);
.cc_setcolour(0xff981f);
.cc_settextfont(p11_full);
.cc_settextalign(^settextalign_left, ^settextalign_centre, 0);
.cc_settextshadow(true);
.cc_settext("(none)");
.cc_setonmouseover("grouping_mouseover(event_com, event_comsubid, cc_getid, true)");
.cc_setonmouseleave("grouping_mouseover(event_com, event_comsubid, cc_getid, false)");
.cc_setop(1, "Select");
.cc_setonop("grouping_viewchannel(0)");
$int10 = calc($int10 + $int11);
}
if_setscrollsize(0, $int10, interface_76:18);
~scrollbar_resize(interface_76:19, interface_76:18, if_getscrolly(interface_76:18));