-
Notifications
You must be signed in to change notification settings - Fork 11
/
[proc,clan_permissions_buttonresynch].cs2
131 lines (131 loc) · 4.03 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
// 4465
[proc,clan_permissions_buttonresynch](component $component0, int $int1, int $comsubid2, int $comsubid3, int $comsubid4, struct $struct5)
def_int $int6 = 126;
def_int $clanslot7 = -1;
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(0) = 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_3108) ! 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>";
}
}
} else {
$int6 = ~clan_permission_get($struct5);
$text0, $graphic9 = ~script4302($int6);
}
if ($clanslot7 ! -1) {
$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_opindex, 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);