-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path[clientscript,chatdefault_onkey].cs2
170 lines (170 loc) · 5.24 KB
/
[clientscript,chatdefault_onkey].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
// 73
[clientscript,chatdefault_onkey](int $key0, char $keychar1)
if (if_gethide(interface_162:53) = true | if_gethide(interface_162:54) = true) {
return;
}
if (%varbit8119 = 0 | ~keypress_permit(-1, 162) = 0) {
return;
}
def_int $length2 = string_length(%varcstring335);
def_int $int3 = 0;
if (staffmodlevel > 0) {
$int3 = 1;
if (string_indexof_char("`", $keychar1) ! -1 & $length2 = 0) {
return;
} else if (string_indexof_char(":", $keychar1) ! -1 & string_indexof_string(%varcstring335, "::", 0) = 0 & $length2 = 2) {
return;
}
}
def_int $int4 = 0;
def_int $int5 = -1;
def_int $index6 = 0;
def_int $int7 = -1;
if ($key0 = ^key_return) {
~keyboard_hide;
if ($length2 > 0) {
if ($int3 = 1) {
if (~script4481("give", $length2) = 1) {
$length2 = string_length(%varcstring335);
} else if (~script4481("set", $length2) = 1) {
$length2 = string_length(%varcstring335);
} else if (~script4481("get", $length2) = 1) {
$length2 = string_length(%varcstring335);
} else if (~script4481("tele", $length2) = 1) {
$length2 = string_length(%varcstring335);
} else if (~script4481("~", $length2) = 1) {
$length2 = string_length(%varcstring335);
} else {
$int7 = string_indexof_string(%varcstring335, "::", 0);
if ($int7 > 0) {
%varcstring335 = substring(%varcstring335, $int7, $length2);
$length2 = string_length(%varcstring335);
}
}
}
if (string_indexof_string(%varcstring335, "::", 0) = 0) {
$int4 = 1;
} else if (%varcint41 = 5) {
$int5 = 41;
} else if (%varcint41 = 4) {
$int5 = 9;
}
if (string_indexof_string(%varcstring335, "///", 0) = 0 | string_indexof_string(lowercase(%varcstring335), "/g ", 0) = 0) {
$index6, $int5 = 3, 44;
} else if (string_indexof_string(%varcstring335, "//", 0) = 0) {
$index6, $int5 = 2, 41;
} else if (string_indexof_string(lowercase(%varcstring335), "/c ", 0) = 0) {
$index6, $int5 = 3, 41;
} else if (string_indexof_string(%varcstring335, "/", 0) = 0) {
$index6, $int5 = 1, 9;
}
if ($int5 = 44) {
if (activeclansettings_find_listened = true & activeclanchannel_find_listened = true) {
if ($length2 <= $index6) {
return;
}
if (activeclansettings_getallowunaffined = true) {
~chat_sendpublic(substring(%varcstring335, $index6, $length2), 4);
} else {
mes("Guests are not invited to speak in this clan's channel.");
}
} else {
mes("You are not chatting as a guest in a clan channel at the moment.");
}
} else if ($int5 = 41) {
if (activeclanchannel_find_affined(0) = true) {
if (%varbit931 = 0) {
if ($length2 <= $index6) {
return;
}
$int7 = activeclanchannel_getuserslot(removetags(chat_playername));
if ($int7 ! -1 & activeclanchannel_getuserrank($int7) >= activeclanchannel_getranktalk) {
~chat_sendpublic(substring(%varcstring335, $index6, $length2), 3);
} else {
mes("You do not have the required rank to talk in the clan's channel.");
}
} else {
mes("You have muted your clan's channel. Unmute it if you wish to talk in it.");
}
} else {
mes("You are not chatting in the channel of your own clan at the moment.");
}
} else if ($int5 = 9) {
if (clan_getchatcount > 0) {
if ($length2 <= $index6) {
return;
}
if (%varbit4394 = 1) {
clan_leavechat;
} else {
if ($index6 < 1) {
%varcstring335 = append("/", %varcstring335);
}
~chat_sendpublic(%varcstring335, 2);
}
} else {
~chat_sendpublic(%varcstring335, 0);
}
} else if ($int4 = 1) {
if ($length2 > 2) {
if (string_indexof_string(%varcstring335, "::toggleroof", 0) = 0) {
if (getremoveroofs = true) {
setremoveroofs(false);
mes("Roofs will only be removed selectively.");
} else {
setremoveroofs(true);
mes("Roofs are now all hidden.");
}
} else if (string_indexof_string(%varcstring335, "::wiki ", 0) = 0 | compare(%varcstring335, "::wiki") = 0) {
~wiki_chat_search(%varcstring335);
} else if (string_indexof_string(%varcstring335, "::bank", 0) = 0) {
~chat_sendpublic("Hey, everyone, I just tried to do something very silly!", 0);
} else {
%varcstring335 = ~inputstring_handlecheat(%varcstring335);
$length2 = string_length(%varcstring335);
docheat(substring(%varcstring335, 2, $length2));
}
} else {
~chat_sendpublic(%varcstring335, 0);
}
} else {
~chat_sendpublic(%varcstring335, 0);
}
~chatout_add(%varcstring335);
%varcstring335 = "";
}
} else if ($key0 = ^key_page_up) {
if ($int3 = 1) {
~chatout_scrollup;
}
} else if ($key0 = ^key_page_down) {
if ($int3 = 1) {
~chatout_scrolldown;
}
} else {
if ($key0 = ^key_tab) {
if (cc_find(interface_621:80, 1) = ^true) {
return;
}
if (string_length(%varcstring356) > 0) {
if (friend_test(%varcstring356) = true) {
~meslayer_mode6(%varcstring356);
return;
}
if (%varcint60 > clientclock) {
return;
}
%varcint60 = calc(clientclock + 50);
mes("That player was not found on your Friends list.");
return;
}
if (%varcint60 > clientclock) {
return;
}
%varcint60 = calc(clientclock + 50);
mes("You haven't received any messages to which you can reply.");
return;
}
%varcstring335 = ~add_to_inputstring(%varcstring335, 0, $key0, $keychar1);
}
~script223;