Apps Home
|
Create an App
RainLee Tip GOAL
Author:
kinkycouple4you
Description
Source Code
Launch App
Current Users
Created by:
Kinkycouple4you
var next_tip_amount = null; var last_username = null; var max_tip_sequence = null; var goal_reached = false; var mini_goal_count = null; var total_goal_tokens = null; var show_goal_reached_msg = null; var minigoaldescr = null; var maingoaldescr = null; // Limit goal description as we add some text cb.settings_choices = [ { name: 'goal_descr', type: 'str', minLength: 1, maxLength: 190, label:"Goal Description (Fuck Till The CumShot or CreamPie Highest bidders choice etc...)" }, { name: 'mini_goal_descr', type: 'str', minLength: 1, maxLength: 190, label:"Mini Goal Description (Eat Pussy/Blow Jobet/Play with Pussy c...)" }, { name: 'goal_sequence', type:'choice', choice1: '1 - 325 tokens', choice2: '2 - 650 tokens', choice3: '3 - 975 tokens', choice4: '4 - 1300 tokens', choice5: '5 - 1625 tokens', choice6: '6 - 1950 tokens', choice7: '7 - 2275 tokens', choice8: '8 - 2600 tokens', choice9: '9 - 2925 tokens', choice10: '10 - 3250 tokens', choice11: '11 - 3575 tokens', choice12: '12 - 3900 tokens', choice13: '13 - 4225 tokens', choice14: '14 - 4550 tokens', choice15: '15 - 4875 tokens', choice16: '16 - 5200 tokens', choice17: '17 - 5525 tokens', choice18: '18 - 5850 tokens', choice19: '19 - 6175 tokens', choice20: '20 - 6500 tokens', defaultValue:'16 - 5200 tokens', label: "# Mini Goals - Total Goal Tokens" } ]; cb.onTip( function (tip) { // don't spam room with notice after goal has been reached. if (!goal_reached) { // show last tipper var tipAmt = tip['amount']; last_username = tip['from_user']; total_goal_tokens -= tipAmt; if (total_goal_tokens <= 0) { total_goal_tokens = 0; goal_reached = true; } while (tipAmt > 0 && !goal_reached) { if (tipAmt >= next_tip_amount) { next_tip_amount++; } // subtract last tip amount from TipAmt tipAmt -= (next_tip_amount - 1); if (next_tip_amount > 25) { mini_goal_count++; // broadcast to room and performer mini goal cb.chatNotice("Mini Goal was reached for " + minigoaldescr + ". Full Screen Mode Suggested, Enjoy the Show!!"); cb.chatNotice("Mini Goal was reached " + mini_goal_count + " times out of " + max_tip_sequence + " times.", cb.room_slug); // Goal Reached? if ((mini_goal_count >= max_tip_sequence) || (total_goal_tokens <= 0)) { goal_reached = true; break; } // reset the sequence next_tip_amount = 1; } } } change_room_subject(); cb.drawPanel(); } ); cb.onDrawPanel( function (user) { if (goal_reached) { show_goal_reached_msg = false; return { 'template': '3_rows_11_21_31', 'row1_value': '*** GOAL ***', 'row2_value': 'THANK YOU TIPPERS HOPE YOU ENJOY THE FUCK I KNOW WE WILL!!!', 'row3_value': 'FULL Screen Mode Suggested' }; } return { 'template': '3_rows_of_labels', 'row1_label': 'Next Tip Needed:', 'row1_value': next_tip_amount, 'row2_label': 'Last Tip From:', 'row2_value': last_username, 'row3_label': 'Tip In Order:', 'row3_value': 'From 1 to 25' }; } ); function change_room_subject() { var subject = ""; if (goal_reached) { subject = maingoaldescr + " [Goal reached! Thank you all Tippers.]"; // broadcast to room and performer goal! if (show_goal_reached_msg == true) cb.chatNotice("Goal was reached for " + maingoaldescr); } else { subject = minigoaldescr + " [Tip In Order From 1 to 25]. [Next Tip Amount: " + next_tip_amount + "]" + " Goal: " + maingoaldescr + " Tokens To Goal:[" + total_goal_tokens + "]"; cb.chatNotice("Next Tip Amount: " + next_tip_amount + "\nRemaining Goal Tokens: " + total_goal_tokens); } cb.changeRoomSubject(subject); } cb.onMessage(function (msg) { // only parse cb.room_slug or is_mod messages if ((msg['user'] == cb.room_slug) || (msg['is_mod'] == true) || (msg['user'] == 'sexxylorry')) { if (msg['m'] == '/help') { msg['X-Spam'] = true; cb.chatNotice('***** Commands ******\n** Broadcastors **\n** /restart - used to restart the application.\n** /setmain - used to change the main goal.\n** Broadcastor **\n** /setmini - used to change the mini goal.', msg['user']); return msg; } // only slug can restart application if ((msg['m'] == '/restart') && (msg['user'] == cb.room_slug)) { msg['X-Spam'] = true; cb.chatNotice("-----------------------\nRestarting Application\n-----------------------"); init(); cb.drawPanel(); return msg; } // change the mini goal if (msg['m'].indexOf("/setmini") >= 0) { msg['X-Spam'] = true; minigoaldescr = msg['m'].replace("/setmini",""); change_room_subject(); return msg; } // change the main goal if (msg['m'].indexOf("/setmain") >= 0) { msg['X-Spam'] = true; maingoaldescr = msg['m'].replace("/setmain",""); change_room_subject(); return msg; } } return msg; }); // Initialize Application function init() { cb.chatNotice("---------------------------------EDITED BY LEE OF KINKYCOUPLE4YOU!!\n-----------------------------------------"); next_tip_amount = 1; // Calculate the Tip Sequence and set Ascending Order // I know bad code/assumption. split() throws an error //var grp = cb.settings.goal_sequence.split('-'); max_tip_sequence = parseInt(cb.settings.goal_sequence); minigoaldescr = cb.settings.mini_goal_descr; maingoaldescr = cb.settings.goal_descr; goal_reached = false; mini_goal_count = 0; last_username = "--"; show_goal_reached_msg = true; total_goal_tokens = max_tip_sequence * 325; // Update the Subject with tip and goal cb.setTimeout(change_room_subject, 3600); } init();
© Copyright Chaturbate 2011- 2026. All Rights Reserved.