Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- API.addEventListener(API.CURATE_UPDATE, seecurates);
- function seecurates(obj)
- {
- var media = API.getMedia();
- console.log(obj.user.username + " added " + media.author + " - " + media.title);
- }
- API.addEventListener(API.DJ_UPDATE, pointcheck);
- var peoplewhoscored = new Array();
- function pointcheck(user) {
- var userlist=API.getUsers();
- var peopleinroom=userlist.length;
- for(var i=0; i<peopleinroom;i++)
- {
- var totalPoints = userlist[i].curatorPoints+userlist[i].listenerPoints+userlist[i].djPoints;
- var name = userlist[i].username;
- if ($.inArray(name, peoplewhoscored) == -1) {
- if ((totalPoints > 99 && totalPoints < 105) || (totalPoints > 299 && totalPoints < 310) || (totalPoints > 699 && totalPoints < 715) || (totalPoints > 999 && totalPoints < 1015) || (totalPoints > 2999 && totalPoints < 3015) || (totalPoints > 9999 && totalPoints < 10015)) {
- alert("Grats on " + totalPoints + " points, @" + name + "!");
- peoplewhoscored.push(name);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment