smooshie

plug.dj point checker

Jul 6th, 2012
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. API.addEventListener(API.DJ_UPDATE, pointcheck);
  3.  
  4. function pointcheck(user) {
  5. var userlist=API.getUsers();
  6. var peopleinroom=userlist.length;
  7. var peoplewhoscored = new Array();
  8.  
  9. for(var i=0; i<length;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. }
Advertisement
Add Comment
Please, Sign In to add comment