smooshie

point/fan check

Jun 30th, 2012
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  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) {
  9. API.sendChat("Grats on 100 fans, "); //not sure how to get userid here
  10. }
  11. }
  12.  
  13. for(var i=0; i<length;i++) {
  14. if((userlist[i].curatorPoints+userlist[i].listenerPoints+userlist[i].djPoints) == 10000) {
  15. API.sendChat("Grats on 10000 points, "); //not sure how to get userid here
  16. }
  17.  
  18. if((userlist[i].curatorPoints+userlist[i].listenerPoints+userlist[i].djPoints) == 5000) {
  19. API.sendChat("Grats on 5000 points, ");
  20. }
  21. }
  22.  
  23. }
Advertisement
Add Comment
Please, Sign In to add comment