Apps Home
|
Create an App
Bearchaser14 Tip Counter
Author:
bearchaser14test
Description
Source Code
Launch App
Current Users
Created by:
Bearchaser14test
// vars var total_tipped = 0; var high_tip_username = null; var high_tip_amount = 0; var last_tip_username = null; var last_tip_amount = 0; // added vars var goals = ['Cum on cam!', 'Shower Show after cum']; var goal_amt = [300, 750]; var current_goal = 0; cb.settings_choices = [ ]; // handlers cb.onTip(function(tip) { total_tipped += tip['amount'] last_tip_amount = tip['amount'] last_tip_username = tip['from_user'] if (tip['amount'] > high_tip_amount) { high_tip_amount = tip['amount'] high_tip_username = tip['from_user'] } if (total_tipped >= goal_amt[current_goal] && current_goal < goals.length - 1) { current_goal++ } cb.drawPanel(); }); cb.onDrawPanel(function(user) { return { 'template': '3_rows_of_labels', 'row1_label': 'Current Goal :', 'row1_value': goals[current_goal] + ' (' + total_tipped + '/' + goal_amt[current_goal] + ')', 'row2_label': 'Highest Tip:', 'row2_value': format_username(high_tip_username) + ' (' + high_tip_amount + ')', 'row3_label': 'Latest Tip Received:', 'row3_value': format_username(last_tip_username) + ' (' + last_tip_amount + ')' }; }); function format_username(val) { if (val === null) { return "--"; } else { return val.substring(0, 12); } }
© Copyright Chaturbate 2011- 2025. All Rights Reserved.