View difference between Paste ID: JmL6QH5d and CU3HNc7E
SHOW: | | - or go back to the newest paste.
1
API.addEventListener(API.DJ_UPDATE, pointcheck);
2
3
function pointcheck(user) {
4
var userlist=API.getUsers();
5
length=userlist.length;
6
7
for(var i=0; i<length;i++)
8-
if(userlist[i].fans == 100) {
8+
{
9-
API.sendChat("Grats on 100 fans, "); //not sure how to get userid here
9+
if((userlist[i].curatorPoints+userlist[i].listenerPoints+userlist[i].djPoints) == 300) {
10
API.sendChat("Grats on 300 points, " + userlist[i].username + "!");
11
}
12
}
13
14
for(var i=0; i<length;i++) {
15-
API.sendChat("Grats on 10000 points, "); //not sure how to get userid here
15+
if((userlist[i].curatorPoints+userlist[i].listenerPoints+userlist[i].djPoints) == 700) {
16
API.sendChat("Grats on 700 points, " + userlist[i].username + "!");
17
}
18-
if((userlist[i].curatorPoints+userlist[i].listenerPoints+userlist[i].djPoints) == 5000) {
18+
19-
API.sendChat("Grats on 5000 points, ");
19+
20
for(var i=0; i<length;i++) {
21
if((userlist[i].curatorPoints+userlist[i].listenerPoints+userlist[i].djPoints) == 1500) {
22
API.sendChat("Grats on 1500 points, " + userlist[i].username + "!");
23
}
24
}
25
26
for(var i=0; i<length;i++) {
27
if((userlist[i].curatorPoints+userlist[i].listenerPoints+userlist[i].djPoints) == 3000) {
28
API.sendChat("Grats on 3000 points, " + userlist[i].username + "!");
29
}
30
}
31
32
for(var i=0; i<length;i++) {
33
if((userlist[i].curatorPoints+userlist[i].listenerPoints+userlist[i].djPoints) == 10000) {
34
API.sendChat("Grats on 10000 points, " + userlist[i].username + "!");
35
}
36
}
37
38
}