View difference between Paste ID: M4n2D6Sh and PC6VsCSh
SHOW: | | - or go back to the newest paste.
1
var userlist=API.getUsers();
2
length=userlist.length;
3
4
API.addEventListener(API.DJ_UPDATE, pointcheck);
5
6
function pointcheck(user) {
7
var userlist=API.getUsers();
8
length=userlist.length;
9
10
11
for(var i=0; i<length;i++)
12
{
13
if((userlist[i].curatorPoints+userlist[i].listenerPoints+userlist[i].djPoints) == 100) {
14-
API.sendChat("Grats on 100 points, " + userlist[i].username + "!");
14+
API.sendChat("Grats on 100 points, @" + userlist[i].username + "!");
15
}
16
}
17
18
for(var i=0; i<length;i++)
19
{
20
if((userlist[i].curatorPoints+userlist[i].listenerPoints+userlist[i].djPoints) == 300) {
21-
API.sendChat("Grats on 300 points, " + userlist[i].username + "!");
21+
API.sendChat("Grats on 300 points, @" + userlist[i].username + "!");
22
}
23
}
24
25
for(var i=0; i<length;i++) {
26
if((userlist[i].curatorPoints+userlist[i].listenerPoints+userlist[i].djPoints) == 700) {
27-
API.sendChat("Grats on 700 points, " + userlist[i].username + "!");
27+
API.sendChat("Grats on 700 points, @" + userlist[i].username + "!");
28
}
29
}
30
31
for(var i=0; i<length;i++) {
32
if((userlist[i].curatorPoints+userlist[i].listenerPoints+userlist[i].djPoints) == 1500) {
33-
API.sendChat("Grats on 1500 points, " + userlist[i].username + "!");
33+
API.sendChat("Grats on 1500 points, @" + userlist[i].username + "!");
34
}
35
}
36
37
for(var i=0; i<length;i++) {
38
if((userlist[i].curatorPoints+userlist[i].listenerPoints+userlist[i].djPoints) == 3000) {
39-
API.sendChat("Grats on 3000 points, " + userlist[i].username + "!");
39+
API.sendChat("Grats on 3000 points, @" + userlist[i].username + "!");
40
}
41
}
42
43
for(var i=0; i<length;i++) {
44
if((userlist[i].curatorPoints+userlist[i].listenerPoints+userlist[i].djPoints) == 10000) {
45-
API.sendChat("Grats on 10000 points, " + userlist[i].username + "!");
45+
API.sendChat("Grats on 10000 points, @" + userlist[i].username + "!");
46
}
47
}
48
49
}