smooshie

plug.dj points checker

Jun 30th, 2012
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. {
  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. if((userlist[i].curatorPoints+userlist[i].listenerPoints+userlist[i].djPoints) == 700) {
  16. API.sendChat("Grats on 700 points, " + userlist[i].username + "!");
  17. }
  18. }
  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. }
Advertisement
Add Comment
Please, Sign In to add comment