Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //define variables
- var woots = API.getScore().positive;
- var mehs = API.getScore().negative;
- var grabs = API.getScore().grabs;
- //this gets the score
- function getScore() {
- woots = API.getScore().positive;
- mehs = API.getScore().negative;
- grabs = API.getScore().grabs;
- }
- //this updates the score every 10 seconds
- setInterval(function(){ getScore(); }, 10000);
- //this sends the score
- function sendScore() {
- API.sendChat("Woots: " + woots + " | Mehs: " + mehs + " | Grabs: " + grabs);
- }
- //this sends the score on the song advance for the previous song
- API.on(API.ADVANCE, function(data) {
- sendScore();
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement