Bots Home
|
Create an App
another
Author:
luxxetest
Description
Source Code
Launch Bot
Current Users
Created by:
Luxxetest
// Tip Menu App by FayNight V.1.0 Modified 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 = [ ["Like me", 11], ["Kiss me", 15], ["Feet", 20], ["PM", 22], ["Flash Boobs", 77], ["Flash Ass", 80], ["Flash Pussy", 99], ["Finger in Pussy", 120], ["2 Fingers in Pussy", 130], ] // Settings cb.settings_choices = [{ name: 'goal', type: 'int', minValue: 0, defaultValue: 100, 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, label: "Goal Description. Will automatically post in chat when Goal is reached (Optional)", required: false }, { name: 'chat_ad', type: 'int', minValue: 0, defaultValue: 1, label: "Display my menu in chat every x minutes" } ]; 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); return }) // Handlers cb.onTip(function(tip) { 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(); }); // Chat Commands cb.onMessage(function(msg) { if (msg['user'] == ht_username) { msg['background'] = '#CCFF99 '; } if (msg['m'] == '/menu') { cb.chatNotice('-----' + cb.room_slug + 's Tip Menu -----', msg['user']); for (var i = 0; i < listMenu.length; i++) { cb.chatNotice(listMenu[i], msg['user']); } } if (msg['m'] == '/showmenu' && msg['user'] == cb.room_slug) { cb.chatNotice('-----' + cb.room_slug + 's Tip Menu -----'); for (var i = 0; i < listMenu.length; i++) { cb.chatNotice(listMenu[i]); } } return msg; }); // 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'] + '!'); } }); // Display Panels cb.onDrawPanel(function(user) { return { 'template': '3_rows_12_22_31', 'row1_label': 'Goal:', 'row1_value': goal_tips + '/' + cb.settings.goal + '(' + total_tips + ')', 'row2_label': 'Highest Tip:', 'row2_value': nullCheck(ht_username) + '(' + ht_amount + ')', 'row3_value': '/menu active, PM 22 tk. ' }; }); // Makings of the Menu var listMenu = [] my_menu.map(function(item){ listMenu.push('' + item[0] + ' For ' + item[1] + ' tks. ') }) // 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 chatAd() { msg = {'background': '#CCFF99 ', 'weight': 'bold'}; var menuLine = [] cb.chatNotice('-----' + cb.room_slug + 's Tip Menu -----', '', msg['background'], msg['weight']); for (var i = 0; i < listMenu.length; i++) { cb.chatNotice(listMenu[i], '', msg['background'], msg['weight']); } cb.setTimeout(chatAd, 60000 * cb.settings.chat_ad); } if (cb.settings.chat_ad > 0) { cb.setTimeout(chatAd, 60000 * cb.settings.chat_ad); } function init() { update_app(); } init(); // Thanks for checking out my code!
© Copyright Chaturbate 2011- 2025. All Rights Reserved.