Apps Home
|
Create an App
Sillyfidget33 Big Multi-Day Goal
Author:
sillyfidget33test
Description
Source Code
Launch App
Current Users
Created by:
Sillyfidget33test
// 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; var subject_is_set_with_0 = false; cb.settings_choices = [ {name: 'starting_amount', type: 'int', minValue: 1, default: 0}, {name: 'goal_amount', type: 'int', minValue: 1, default: 100}, {name: 'goal_description', type: 'str', minLength: 1, maxLength: 255} ]; // handlers cb.onTip(function(tip) { total_tipped = tip['amount'] + cb.settings.starting_amount cb.settings.starting_amount = total_tipped 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'] } cb.drawPanel(); }); cb.onDrawPanel(function(user) { return { 'template': '3_rows_of_labels', 'row1_label': 'Vibrations Received / Big Multi-Day Goal:', 'row1_value': '' + total_tipped + ' / ' + cb.settings.goal_amount, 'row2_label': 'Most Generous Lover:', '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.