Bots Home
|
Create an App
Game Choose Even Odd
Author:
ytreza39
Description
Source Code
Launch Bot
Current Users
Created by:
Ytreza39
// 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: 'tokens', type: 'int', minValue: 1, default: 100}, {name: 'goal_tag', type: 'str', minLength: 1, maxLength: 255} ]; // handlers cb.onTip(function(tip) { total_tipped += tip['amount'] update_subject(); 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': 'You choosen that I ' + getEnd()+" Tokens:", 'row1_value': tips_total(), '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 getEnd(){ return (tips_total() % 2 == 0) ? "Cum at the End" : "Denial at the End"; } // helper functions function update_subject() { var new_subject ="You choose: "+ tips_total() + " tokens-->Even=Cum / Odd=Denial" + cb.settings.goal_tag; cb.log("Changing subject to: " + new_subject); cb.changeRoomSubject(new_subject); } function tips_total() { var r = cb.settings.tokens + total_tipped; if (r < 0) { return 0; } else { return r; } } function format_username(val) { if (val === null) { return "--"; } else { return val.substring(0, 12); } } function init() { update_subject(); } init();
© Copyright Chaturbate 2011- 2026. All Rights Reserved.