Apps Home
|
Create an App
MVP PLAYER
Author:
yumimocha
Description
Source Code
Launch App
Current Users
Created by:
Yumimocha
// Title: Tip Goal King (Modified to count unique tippers as players) // Author: NinjaPervs // Version: 1.3 (Updated 05/19/2025) // Description: Counts number of unique tippers and displays "X Players". No room subject updates. // vars var unique_players = {}; var high_tip_username = null; var high_tip_amount = 0; var last_tip_username = null; var last_tip_amount = 0; cb.settings_choices = []; cb.onTip(function(tip) { var username = tip['from_user']; unique_players[username] = true; last_tip_amount = tip['amount']; last_tip_username = username; if (tip['amount'] > high_tip_amount) { high_tip_amount = tip['amount']; high_tip_username = username; } cb.drawPanel(); }); cb.onDrawPanel(function(user) { return { 'template': '3_rows_of_labels', 'row1_label': 'Players', 'row1_value': Object.keys(unique_players).length + ' Players', 'row2_label': 'Mvp -', 'row2_value': format_username(high_tip_username) + ' (' + high_tip_amount + ')', 'row3_label': 'Newest -', 'row3_value': format_username(last_tip_username) + ' (' + last_tip_amount + ')' }; }); cb.onMessage(function (msg) { if (msg['user'] == high_tip_username) { msg['background'] = '#9F9'; } return msg; }); // helper function function format_username(val) { if (val === null) { return "--"; } else { return val.substring(0, 12); } } // init (only draws panel, no subject updates) function init() { cb.drawPanel(); } init();
© Copyright Chaturbate 2011- 2025. All Rights Reserved.