-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path[proc,clan_permissions_buttonresynch].cs2
205 lines (205 loc) · 6.27 KB
/
[proc,clan_permissions_buttonresynch].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
// 4465
[proc,clan_permissions_buttonresynch](component $component0, int $int1, int $comsubid2, int $comsubid3, int $comsubid4, struct $struct5)
def_int $int6 = 126;
def_int $clanslot7 = null;
def_int $int8 = 0;
def_string $text0 = "...";
def_graphic $graphic9 = null;
def_int $int10 = 0;
def_int $int11 = -1;
if (%varbit12165 = 1 & %varbit12164 = 3 & activeclansettings_find_listened = true | %varbit12165 = 0 & %varbit933 = 3 & activeclansettings_find_affined(^clantype_clan) = true) {
$clanslot7 = activeclansettings_getaffinedslot(removetags(chat_playername));
if (struct_param($struct5, param_1255) = true) {
$int6 = -1;
switch_struct ($struct5) {
case guests_may_listen_in_chat_2957 :
if (activeclansettings_getallowunaffined = true) {
$text0 = "Permitted";
} else {
$text0 = "Blocked";
}
case guest_minimum_combat_2958 :
if (activeclansettings_getallowunaffined = true) {
$int8 = getbit_range(%varclansetting26, 0, 6);
if ($int8 > 0 & %varclansetting26 ! -1) {
$text0 = tostring($int8);
} else {
$text0 = "None";
}
} else {
$text0 = "<col=9f9f9f>N/A</col>";
}
case guest_minimum_skill_total_2959 :
if (activeclansettings_getallowunaffined = true) {
$int8 = getbit_range(%varclansetting26, 7, 18);
if ($int8 > 0 & %varclansetting26 ! -1) {
$text0 = ~tostring_spacer($int8, ",");
} else {
$text0 = "None";
}
} else {
$text0 = "<col=9f9f9f>N/A</col>";
}
case guest_minimum_qp_2960 :
if (activeclansettings_getallowunaffined = true) {
$int8 = getbit_range(%varclansetting26, 19, 29);
if ($int8 > 0 & %varclansetting26 ! -1) {
$text0 = tostring($int8);
} else {
$text0 = "None";
}
} else {
$text0 = "<col=9f9f9f>N/A</col>";
}
case guest_iron_status_2961 :
if (activeclansettings_getallowunaffined = true) {
if (%varclansetting26 ! -1) {
$text0 = enum(int, string, enum_3828, getbit_range(%varclansetting26, 30, 31));
} else {
$text0 = enum(int, string, enum_3828, 0);
}
} else {
$text0 = "<col=9f9f9f>N/A</col>";
}
case loot_broadcast_value_3109 :
if (~clan_permission_get(loot_broadcasts_4243) ! 128) {
if (%varclansetting31 > 1) {
$text0 = "<~tostring_spacer(%varclansetting31, ",")> coins";
} else if (%varclansetting31 = 1) {
$text0 = "1 coin";
} else {
$text0 = "No minimum";
}
} else {
$text0 = "<col=9f9f9f>N/A</col>";
}
case combat_achievement_task_threshold_854 :
if (~clan_permission_get(combat_achievement_task_broadcasts_853) ! 128) {
if (%varclansetting101 = -1) {
$text0 = "All";
} else {
$text0 = enum(int, string, enum_3967, %varclansetting101);
}
} else {
$text0 = "<col=9f9f9f>N/A</col>";
}
case pk_broadcast_value_4247 :
if (~clan_permission_get(pk_broadcasts_4246) ! 128) {
if (%varclansetting65 > 1) {
$text0 = "<~tostring_spacer(%varclansetting65, ",")> coins";
} else if (%varclansetting65 = 1) {
$text0 = "1 coin";
} else {
$text0 = "No minimum";
}
} else {
$text0 = "<col=9f9f9f>N/A</col>";
}
case loot_key_broadcast_value_4678 :
if (~clan_permission_get(loot_key_broadcasts_4677) ! 128) {
if (%varclansetting98 > 1) {
$text0 = "<~tostring_spacer(%varclansetting98, ",")> coins";
} else if (%varclansetting98 = 1) {
$text0 = "1 coin";
} else {
$text0 = "No minimum";
}
} else {
$text0 = "<col=9f9f9f>N/A</col>";
}
case level_up_increments_of_10_4239 :
if (~clan_permission_get(level_up_broadcasts_4236) ! 128) {
if (%varclansetting66 > 0) {
$text0 = "Level <tostring(%varclansetting66)>";
} else {
$text0 = "No minimum";
}
} else {
$text0 = "<col=9f9f9f>N/A</col>";
}
case level_up_increments_of_5_4240 :
if (~clan_permission_get(level_up_broadcasts_4236) ! 128) {
if (%varclansetting67 > 0) {
$text0 = "Level <tostring(%varclansetting67)>";
} else {
$text0 = "No minimum";
}
} else {
$text0 = "<col=9f9f9f>N/A</col>";
}
case level_up_increments_of_1_4241 :
if (~clan_permission_get(level_up_broadcasts_4236) ! 128) {
if (%varclansetting68 > 0) {
$text0 = "Level <tostring(%varclansetting68)>";
} else {
$text0 = "No minimum";
}
} else {
$text0 = "<col=9f9f9f>N/A</col>";
}
case post_99_xp_broadcast_intervals_4238 :
if (~clan_permission_get(post_99_xp_broadcasts_4237) ! 128) {
if (%varclansetting69 > 0) {
$text0 = "<tostring(%varclansetting69)> million XP";
} else {
$text0 = "No interval set";
}
} else {
$text0 = "<col=9f9f9f>N/A</col>";
}
}
} else {
$int6 = ~clan_permission_get($struct5);
$text0, $graphic9 = ~script4302($int6);
}
if ($clanslot7 ! null) {
$int11 = activeclansettings_getaffinedrank($clanslot7);
if ($int6 = 128) {
$text0 = "<col=9f9f9f><$text0></col>";
if ($int11 >= ~clan_permission_get(permission_access_2943)) {
$int10 = 1;
}
} else if ($int11 < $int6) {
$text0 = "<col=ff0000><$text0></col>";
} else if ($int11 >= ~clan_permission_get(permission_access_2943)) {
$int10 = 1;
}
}
if (cc_find($component0, $comsubid3) = ^true) {
cc_settext($text0);
}
if (cc_find($component0, $comsubid4) = ^true) {
cc_setgraphic($graphic9);
}
if ($int10 = 1) {
if (cc_find($component0, $comsubid2) = ^true) {
cc_setgraphic(tradebacking);
}
if (cc_find($component0, $int1) = ^true) {
cc_settrans(245);
}
if (~on_mobile = false) {
.cc_setonmouserepeat("clan_permissions_buttonhover(true, event_com, event_comsubid, $int1, 245, 225)");
}
.cc_setonmouseleave("clan_permissions_buttonhover(false, event_com, event_comsubid, $int1, 245, 225)");
.cc_setontimer(null);
.cc_setonop("clan_permissions_buttonop(event_op, event_com, event_comsubid, $int1, 200, 245, 225)");
return;
}
}
if (cc_find($component0, $comsubid3) = ^true) {
cc_settext($text0);
}
if (cc_find($component0, $comsubid4) = ^true) {
cc_setgraphic($graphic9);
}
if (cc_find($component0, $comsubid2) = ^true) {
cc_setgraphic(tradebacking_dark);
}
if (cc_find($component0, $int1) = ^true) {
cc_settrans(255);
}
.cc_setonmouserepeat(null);
.cc_setonmouseleave(null);
.cc_setontimer(null);
.cc_setonop(null);