Apps Home
|
Create an App
luxxeTip
Author:
luxxecam
Description
Source Code
Launch App
Current Users
Created by:
Luxxecam
var total_tips = 0; var goal_tips = 0; var last_tipper = null; var last_tip = 0; var ht_username = null; var ht_amount = 0; var goal = 0; var my_menu = [ [" Kiss me ", 15], [" Like me ", 22], [" PM ", 33], [" Feet ", 44], [" Flash Boobs ", 88], [" Flash Ass ", 99], [" Flash Pussy ", 111], [" Finger in Pussy ", 149], [" 2 Fingers in Pussy ", 199] ] var lushControl = { '5' : 500, '10': 1000, '15': 1500 } // Settings cb.settings_choices = [{ name: 'goal', type: 'int', minValue: 0, defaultValue: 500, label: "Goal Amount (Set to 0 to Disable)" }, { name: 'reset', type: 'choice', choice1: 'Yes', choice2: 'No', label: "Reset the Goal when it is Met?" }, { name: 'goalAd', type: 'str', minLength: 0, MaxLength: 300, defaultValue: "Goal reached! Thank You So Much!", label: "Goal Description. Will automatically post in chat when Goal is reached (Optional)", required: false }, { name: 'chat_ad', type: 'int', minValue: 0, defaultValue: 15, label: "Display my menu in chat every x minutes" } ]; var show_choices = [ {name: 'min_start_tokens', type: 'int', minValue: 1, maxValue: 1000, defaultValue: 100, label: "Cost to Join Before Show Starts"}, {name: 'min_join_tokens', type: 'int', minValue: 0, maxValue: 1000, defaultValue: 100, label: "Cost to Join During Show. Set to 0 to Disable Joining During Show."}, {name: 'hide_message', label: 'Cam Message', type: 'str', minLength: 1, maxLength: 256, defaultValue: 'Secret Show in progress! Tip at least 100 tokens to join in on the fun!' }, ]; my_menu.map(function(item, idx){ menu_item = { name: item[0], type: 'int', minValue: 0, defaultValue: item[1], label: item[0] }; cb.settings_choices.push(menu_item); }) Object.keys(lushControl).map(function(key){ menu_item = { name: 'Control my lush for ' + key + ' minutes', type: 'int', minValue: 0, defaultValue: lushControl[key], label: key + ' minutes' }; cb.settings_choices.push(menu_item); }) show_choices.map(function(item){ cb.settings_choices.push(item) }) // Handlers // say hello to high tippers var goodguys = [ 'tipped_alot_recently', 'tipped_tons_recently' ] cb.onEnter(function(user) { var greet = false; goodguys.map(function(key) { if (user[key]) { greet = true; } }) if (greet) { cb.chatNotice('Welcome ' + user['user'] + '!', user['user']); } }); // Display Panels function ht_msg(ht_username) { if (ht_username) { return ht_username + ' (' + ht_amount + ')'; } return ''; } function lt_msg (last_tipper, last_tip){ if (last_tipper){ return last_tipper + ' (' + last_tip + ')'; } return ''; } cb.onDrawPanel(function(user) { return { 'template': '3_rows_of_labels', 'row1_label': 'Goal:', 'row1_value': goal_tips + '/' + cb.settings.goal + '(' + total_tips + ')', 'row2_label': 'Highest Tip:', 'row2_value': ht_msg(ht_username, ht_amount), 'row3_label': 'Last Tip:', 'row3_value': lt_msg(last_tipper, last_tip), }; }); // Makings of the Menu var listMenu = [] my_menu.map(function(item){ cb.settings_choices.find(function(option){ if (option.name === item[0]){ var _name = item[0]; cb.log(cb.settings_choices[_name]) // listMenu.push('' + option[_name].name + ' (' + option[_name] + ') ' + String.fromCodePoint(0x1F496)) } }) }) // Function Junction function update_app() { if (cb.settings.goal === 0) {} else if (goal_tips >= cb.settings.goal) { goal_reached(); } } function goal_reached() { if (tips_remaining() === 0) { if (cb.settings.reset === "Yes") { reset_goal(); } else; goal += 1; { if (goal <= 1) { cb.chatNotice("Goal Reached! " + cb.settings.goalAd); } } } } function reset_goal() { goal_tips -= cb.settings.goal; goal -= 1; } function tips_remaining() { var r = cb.settings.goal - goal_tips; if (r <= 0) { return 0; } else { return r; } } function nullCheck(str) { if (str === null) { return "---"; } else return str.substring(0, 15); } function lushAd() { var msg = {'background': '#FFD700', 'weight': 'bold'}; var menuLine = [] cb.sendNotice('Control My Lush', '', msg['background'], msg['weight']); lushNotice = [] Object.keys(lushControl).map(function(key){ lushNotice.push(' ' + key + ' minutes ('+lushControl[key]+')') }) var notice = lushNotice.join( String.fromCodePoint(0x1F49E)) cb.sendNotice(notice, '', msg['background'],'', msg['weight']); cb.setTimeout(lushAd, 60000 * 35); } function domiAd() { var msg = {'background': '#FFD700', 'weight': 'bold'}; var menuLine = [] cb.sendNotice('Control my Domi 2 ', '', '', msg['background'], msg['weight']); lushNotice = [] Object.keys(lushControl).map(function(key){ lushNotice.push(' ' + key + ' minutes ('+lushControl[key]+')') }) var notice = lushNotice.join( String.fromCodePoint(0x1F49E)) cb.sendNotice(notice, '', '', msg['background'], msg['weight']); cb.setTimeout(lushAd, 60000 * 45); } function snapchat() { var msg = {'background': '#6FA8DC', 'weight': 'bold'}; var icon = String.fromCodePoint('0x1F47B'); cb.sendNotice('Ask me about my snapchat ' + icon, '', '', msg['background'], msg['weight']); cb.setTimeout(lushAd, 60000 * 45); } function insta() { var msg = {'background': '#FFC0CB', 'weight': 'bold'}; var icon = String.fromCodePoint('0x1F4F7'); cb.sendNotice('Sext with me plus private nudes, ask me about my instagram ' + icon, '', '',msg['background'], msg['weight']); cb.setTimeout(lushAd, 60000 * 25); } function chatAd() { msg = {'color': '#CCFF99 ', 'background': '#6d736d', 'weight': 'bold'}; var menuLine = [] cb.chatNotice('-----' + cb.room_slug + 's Tip Menu -----', '',msg['background'], msg['color'], msg['weight']); listMenu.map( function(notice){ cb.sendNotice(notice, '', msg['background'], msg['color'], msg['weight']); }) cb.setTimeout(chatAd, 60000 * cb.settings.chat_ad); } // Chat Commands cb.onMessage(function(msg) { if (msg['user'] == ht_username) { msg['background'] = '#CCFF99 '; } if (msg['m'] == '/menu') { chatAd() } if (msg['m'] == '/showmenu' && msg['user'] == cb.room_slug) { chatAd() } return msg; }); function init() { update_app(); } var admins = ['luxxecam', 'fr33w1ll'] admins.map(function(admin){ cb.limitCam_addUsers(admin); }) cb.onTip(function(tip) { if (!cbjs.arrayContains(cb.limitCam_allUsersWithAccess(), tip['from_user'])) { if(!cb.limitCam_isRunning() && parseInt(tip['amount']) >= cb.settings.min_start_tokens) { output('Added '+ tip['from_user'] + ' to secret show!'); cb.limitCam_addUsers([tip['from_user']]); } if(cb.limitCam_isRunning() && parseInt(tip['amount']) >= cb.settings.min_join_tokens && cb.settings.min_join_tokens > 0) { output('Added '+ tip['from_user'] + ' to secret show!'); cb.limitCam_addUsers([tip['from_user']]); } } total_tips += tip['amount']; goal_tips += tip['amount']; update_app(); last_tip = tip['amount']; last_tipper = tip['from_user']; if (tip['amount'] > ht_amount) { ht_amount = tip['amount']; ht_username = tip['from_user']; } cb.drawPanel(); }); cb.onMessage(function (msg) { var message = msg['m']; var user = msg['user']; var username = ""; if (cb.room_slug === user && message == '/start' && !cb.limitCam_isRunning()) { output(cb.room_slug + ' has started the show!'); cb.limitCam_start(cb.settings.hide_message); } if (cb.room_slug === user && message == '/stop' && cb.limitCam_isRunning()) { output(cb.room_slug + ' has stopped the show!'); cb.limitCam_stop(); } if (cb.room_slug === user && message.substring(0, 7) == '/remove' && cb.limitCam_allUsersWithAccess().length > 0 && cb.limitCam_isRunning()) { username = message.substring(8, message.length); if (cbjs.arrayContains(cb.limitCam_allUsersWithAccess(), username)) { cb.limitCam_removeUsers([username]); output(cb.room_slug + ' has removed ' + username + ' from the show!'); } } if (cb.room_slug === user && message.substring(0, 6) == '/check') { username = message.substring(7, message.length); if (cb.limitCam_userHasAccess(username)) { output(username + " is in the show!"); } else { output(username + " is not in the show!"); } } if (msg['m'] == '/menu') { chatAd() } if (msg['m'] == '/showmenu' && msg['user'] == cb.room_slug) { chatAd() } if (cb.room_slug === user && message === '/list') { var userlist = cb.limitCam_allUsersWithAccess(); if (userlist.length > 0) { output("" + userlist.length + (userlist.length > 1 ? " users" : " user") + " in show: " + cbjs.arrayJoin(userlist, ", ")); } else { output("No users in show."); } } if (message[0] == '/') { msg['X-Spam'] = true; } return msg; }); function output(message) { cb.chatNotice(message); } cb.setTimeout(lushAd, 60000 * 50); cb.setTimeout(snapchat, 60000 * 60); cb.setTimeout(insta, 60000 * 30); cb.setTimeout(domiAd, 60000 * 3); if (cb.settings.chat_ad > 0) { cb.setTimeout(chatAd, 60000 * cb.settings.chat_ad); } init();
© Copyright Chaturbate 2011- 2024. All Rights Reserved.