-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path[proc,chatalerts].cs2
61 lines (61 loc) · 2.04 KB
/
[proc,chatalerts].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
// 192
[proc,chatalerts](int $mesuid0)
def_int $clock1 = %varcint57;
def_boolean $boolean2 = ~on_mobile;
%varcint57 = clientclock;
if (%varcint41 = 0 & ($boolean2 = false | %varcint1220 = 0)) {
return;
}
def_int $int3 = 0;
if (%varcint41 = 1337) {
$int3 = 1;
}
def_int $chattype4 = ^chattype_gamemessage;
def_int $clock5 = -1;
def_string $string0 = "";
def_string $string1 = "";
def_string $string2 = "";
def_int $int6 = 0;
def_string $string3 = "";
def_int $int7 = 0;
while ($mesuid0 ! -1) {
$chattype4, $clock5, $string0, $string1, $string2, $int6, $string3, $int7 = chat_gethistory_byuid($mesuid0);
if ($clock5 <= $clock1) {
return;
}
if (~filtertest($chattype4, $string0, ~affixtimestamp($string3, $string2, "null"), $string2, $clock5, $int3, removetags(chat_playername), $int6) = 1 & ~trade_partner_check($chattype4, $string0, $int6) = 0) {
switch_int ($chattype4) {
case ^chattype_modchat, ^chattype_publicchat :
~chat_alert_enable(2);
case ^chattype_privatechat, ^chattype_privatechatout, ^chattype_modprivatechat :
~chat_alert_enable(3);
case ^chattype_loginlogoutnotification :
if ($boolean2 = false) {
~chat_alert_enable(3);
}
case ^chattype_tradereq, ^chattype_trade, ^chattype_chalreq_trade, 113 :
~chat_alert_enable(6);
case ^chattype_friendschat, ^chattype_friendschatnotification, ^chattype_chalreq_friendschat :
~chat_alert_enable(4);
case ^chattype_clanchat, ^chattype_clanguestchat, ^chattype_clanguestmessage, ^chattype_clancreationinvitation, ^chattype_chalreq_clanchat, 111, 112 :
if (~script5501($string2) = 0) {
~chat_alert_enable(5);
} else {
~chat_alert_enable(6);
}
case ^chattype_clanmessage :
if (~gim_notification_message($string2) = 1) {
~chat_alert_enable(1);
} else if (~pvpa_notification_message($string2) = 1) {
~chat_alert_enable(1);
} else {
~chat_alert_enable(5);
}
case default :
if (enum(int, boolean, enum_892, $chattype4) = true & $chattype4 ! 108) {
~chat_alert_enable(1);
}
}
}
$mesuid0 = chat_getprevuid($mesuid0);
}