SHOW:
|
|
- or go back to the newest paste.
| 1 | API.addEventListener(API.DJ_UPDATE, pointcheck); | |
| 2 | var peoplewhoscored = new Array(); | |
| 3 | ||
| 4 | function pointcheck(user) {
| |
| 5 | ||
| 6 | var userlist=API.getUsers(); | |
| 7 | var peopleinroom=userlist.length; | |
| 8 | ||
| 9 | - | for(var i=0; i<length;i++) |
| 9 | + | for(var i=0; i<peopleinroom;i++) |
| 10 | {
| |
| 11 | ||
| 12 | var totalPoints = userlist[i].curatorPoints+userlist[i].listenerPoints+userlist[i].djPoints; | |
| 13 | var name = userlist[i].username; | |
| 14 | ||
| 15 | if ($.inArray(name, peoplewhoscored) == -1) {
| |
| 16 | ||
| 17 | if((totalPoints == 100) || (totalPoints == 300) || (totalPoints == 700) || (totalPoints == 1500) || (totalPoints == 3000) || (totalPoints == 10000)) {
| |
| 18 | API.sendChat("Grats on " + totalPoints + " points, @" + name + "!");
| |
| 19 | peoplewhoscored.push(name); | |
| 20 | } | |
| 21 | } | |
| 22 | } | |
| 23 | } |