Bots Home
|
Create an App
CHARY AND ASHLEY TIP MENU
Author:
alelovescleavage
Description
Source Code
Launch Bot
Current Users
Created by:
Alelovescleavage
// Tip Menu App by LoveYourBear v1.2 // 11-16-16 // Variables 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; // 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: 'item1', type: 'str', minLength: 1, maxLength: 30, label: "Menu Item 1 (required)" }, { name: 'price1', type: 'int', minValue: 0, defaultValue: 10, label: "Item 1 Price (required)" }, { name: 'item2', type: 'str', minLength: 1, maxLength: 50, label: "Menu Item 2 (required)" }, { name: 'price2', type: 'int', minValue: 0, defaultValue: 20, label: "Item 2 Price (required)" }, { name: 'item3', type: 'str', minLength: 1, maxLength: 50, label: "Menu Item 3", required: false }, { name: 'price3', type: 'int', minValue: 0, label: "Item 3 Price", required: false }, { name: 'item4', type: 'str', minLength: 1, maxLength: 50, label: "Menu Item 4", required: false }, { name: 'price4', type: 'int', minValue: 0, label: "Item 4 Price", required: false }, { name: 'item5', type: 'str', minLength: 1, maxLength: 50, label: "Menu Item 5", required: false }, { name: 'price5', type: 'int', minValue: 0, label: "Item 5 Price", required: false }, { name: 'item6', type: 'str', minLength: 1, maxLength: 50, label: "Menu Item 6", required: false }, { name: 'price6', type: 'int', minValue: 0, label: "Item 6 Price", required: false }, { name: 'item7', type: 'str', minLength: 1, maxLength: 50, label: "Menu Item 7", required: false }, { name: 'price7', type: 'int', minValue: 0, label: "Item 7 Price", required: false }, { name: 'item8', type: 'str', minLength: 1, maxLength: 50, label: "Menu Item 8", required: false }, { name: 'price8', type: 'int', minValue: 0, label: "Item 8 Price", required: false }, { name: 'item9', type: 'str', minLength: 1, maxLength: 50, label: "Menu Item 9", required: false }, { name: 'price9', type: 'int', minValue: 0, label: "Item 9 Price", required: false }, { name: 'item10', type: 'str', minLength: 1, maxLength: 50, label: "Menu Item 10", required: false }, { name: 'price10', type: 'int', minValue: 0, label: "Item 10 Price", required: false }, { name: 'item11', type: 'str', minLength: 1, maxLength: 30, label: "Menu Item 11", required: false }, { name: 'price11', type: 'int', minValue: 0, label: "Item 11 Price", required: false }, { name: 'item12', type: 'str', minLength: 1, maxLength: 50, label: "Menu Item 12", required: false }, { name: 'price12', type: 'int', minValue: 0, label: "Item 12 Price", required: false }, { name: 'item13', type: 'str', minLength: 1, maxLength: 50, label: "Menu Item 13", required: false }, { name: 'price13', type: 'int', minValue: 0, label: "Item 13 Price", required: false }, { name: 'item14', type: 'str', minLength: 1, maxLength: 50, label: "Menu Item 14", required: false }, { name: 'price14', type: 'int', minValue: 0, label: "Item 14 Price", required: false }, { name: 'item15', type: 'str', minLength: 1, maxLength: 50, label: "Menu Item 15", required: false }, { name: 'price15', type: 'int', minValue: 0, label: "Item 15 Price", required: false }, { name: 'item16', type: 'str', minLength: 1, maxLength: 50, label: "Menu Item 16", required: false }, { name: 'price16', type: 'int', minValue: 0, label: "Item 16 Price", required: false }, { name: 'item17', type: 'str', minLength: 1, maxLength: 50, label: "Menu Item 17", required: false }, { name: 'price17', type: 'int', minValue: 0, label: "Item 17 Price", required: false }, { name: 'item18', type: 'str', minLength: 1, maxLength: 50, label: "Menu Item 18", required: false }, { name: 'price18', type: 'int', minValue: 0, label: "Item 18 Price", required: false }, { name: 'item19', type: 'str', minLength: 1, maxLength: 50, label: "Menu Item 19", required: false }, { name: 'price19', type: 'int', minValue: 0, label: "Item 19 Price", required: false }, { name: 'item20', type: 'str', minLength: 1, maxLength: 50, label: "Menu Item 20", required: false }, { name: 'price20', type: 'int', minValue: 0, label: "Item 20 Price", required: false }, { name: 'item21', type: 'str', minLength: 1, maxLength: 50, label: "Menu Item 21", required: false }, { name: 'price21', type: 'int', minValue: 0, label: "Item 21 Price", required: false }, { name: 'item22', type: 'str', minLength: 1, maxLength: 50, label: "Menu Item 22", required: false }, { name: 'price22', type: 'int', minValue: 0, label: "Item 22 Price", required: false }, { name: 'item23', type: 'str', minLength: 1, maxLength: 50, label: "Menu Item 23", required: false }, { name: 'price23', type: 'int', minValue: 0, label: "Item 23 Price", required: false }, { name: 'item24', type: 'str', minLength: 1, maxLength: 50, label: "Menu Item 24", required: false }, { name: 'price24', type: 'int', minValue: 0, label: "Item 24 Price", required: false }, { name: 'item25', type: 'str', minLength: 1, maxLength: 50, label: "Menu Item 25", required: false }, { name: 'price25', type: 'int', minValue: 0, label: "Item 25 Price", required: false }, { name: 'item26', type: 'str', minLength: 1, maxLength: 50, label: "Menu Item 26", required: false }, { name: 'price26', type: 'int', minValue: 0, label: "Item 26 Price", required: false }, { name: 'item27', type: 'str', minLength: 1, maxLength: 50, label: "Menu Item 27", required: false }, { name: 'price27', type: 'int', minValue: 0, label: "Item 27 Price", required: false }, { name: 'item28', type: 'str', minLength: 1, maxLength: 50, label: "Menu Item 28", required: false }, { name: 'price28', type: 'int', minValue: 0, label: "Item 28 Price", required: false }, { name: 'item29', type: 'str', minLength: 1, maxLength: 50, label: "Menu Item 29", required: false }, { name: 'price29', type: 'int', minValue: 0, label: "Item 29 Price", required: false }, { name: 'item30', type: 'str', minLength: 1, maxLength: 50, label: "Menu Item 30", required: false }, { name: 'price30', type: 'int', minValue: 0, label: "Item 30 Price", required: false }, { name: 'item31', type: 'str', minLength: 1, maxLength: 50, label: "Menu Item 31", required: false }, { name: 'price31', type: 'int', minValue: 0, label: "Item 31 Price", required: false }, { name: 'item32', type: 'str', minLength: 1, maxLength: 50, label: "Menu Item 32", required: false }, { name: 'price32', type: 'int', minValue: 0, label: "Item 32 Price", required: false }, { name: 'item33', type: 'str', minLength: 1, maxLength: 50, label: "Menu Item 33", required: false }, { name: 'price33', type: 'int', minValue: 0, label: "Item 33 Price", required: false }, { name: 'item34', type: 'str', minLength: 1, maxLength: 50, label: "Menu Item 34", required: false }, { name: 'price34', type: 'int', minValue: 0, label: "Item 34 Price", required: false }, { name: 'item35', type: 'str', minLength: 1, maxLength: 50, label: "Menu Item 35", required: false }, { name: 'price35', type: 'int', minValue: 0, label: "Item 35 Price", required: false }, { name: 'item36', type: 'str', minLength: 1, maxLength: 50, label: "Menu Item 36", required: false }, { name: 'price36', type: 'int', minValue: 0, label: "Item 36 Price", required: false }, { name: 'chat_ad', type: 'int', minValue: 0, maxValue: 999, defaultValue: 10, label: 'Advertise Menu in Chat Every _____ Mins (Set 0 to Disable)' } ]; // Handlers cb.onTip(function(tip) { total_tips += tip['amount']; goal_tips += tip['amount']; if (tip['amount'] === cb.settings.price1) { cb.chatNotice(cb.settings.item1); } if (tip['amount'] === cb.settings.price2) { cb.chatNotice(cb.settings.item2); } if (tip['amount'] === cb.settings.price3) { cb.chatNotice(cb.settings.item3); } if (tip['amount'] === cb.settings.price4) { cb.chatNotice(cb.settings.item4); } if (tip['amount'] === cb.settings.price5) { cb.chatNotice(cb.settings.item5); } if (tip['amount'] === cb.settings.price6) { cb.chatNotice(cb.settings.item6); } if (tip['amount'] === cb.settings.price7) { cb.chatNotice(cb.settings.item7); } if (tip['amount'] === cb.settings.price8) { cb.chatNotice(cb.settings.item8); } if (tip['amount'] === cb.settings.price9) { cb.chatNotice(cb.settings.item9); } if (tip['amount'] === cb.settings.price10) { cb.chatNotice(cb.settings.item10); } if (tip['amount'] === cb.settings.price11) { cb.chatNotice(cb.settings.item11); } if (tip['amount'] === cb.settings.price12) { cb.chatNotice(cb.settings.item12); } if (tip['amount'] === cb.settings.price13) { cb.chatNotice(cb.settings.item13); } if (tip['amount'] === cb.settings.price14) { cb.chatNotice(cb.settings.item14); } if (tip['amount'] === cb.settings.price15) { cb.chatNotice(cb.settings.item15); } if (tip['amount'] === cb.settings.price16) { cb.chatNotice(cb.settings.item16); } if (tip['amount'] === cb.settings.price17) { cb.chatNotice(cb.settings.item17); } if (tip['amount'] === cb.settings.price18) { cb.chatNotice(cb.settings.item18); } if (tip['amount'] === cb.settings.price19) { cb.chatNotice(cb.settings.item19); } if (tip['amount'] === cb.settings.price20) { cb.chatNotice(cb.settings.item20); } if (tip['amount'] === cb.settings.price21) { cb.chatNotice(cb.settings.item21); } if (tip['amount'] === cb.settings.price22) { cb.chatNotice(cb.settings.item22); } if (tip['amount'] === cb.settings.price23) { cb.chatNotice(cb.settings.item23); } if (tip['amount'] === cb.settings.price24) { cb.chatNotice(cb.settings.item24); } if (tip['amount'] === cb.settings.price25) { cb.chatNotice(cb.settings.item25); } if (tip['amount'] === cb.settings.price26) { cb.chatNotice(cb.settings.item26); } if (tip['amount'] === cb.settings.price27) { cb.chatNotice(cb.settings.item27); } if (tip['amount'] === cb.settings.price28) { cb.chatNotice(cb.settings.item28); } if (tip['amount'] === cb.settings.price29) { cb.chatNotice(cb.settings.item29); } if (tip['amount'] === cb.settings.price30) { cb.chatNotice(cb.settings.item30); } if (tip['amount'] === cb.settings.price31) { cb.chatNotice(cb.settings.item31); } if (tip['amount'] === cb.settings.price32) { cb.chatNotice(cb.settings.item32); } if (tip['amount'] === cb.settings.price33) { cb.chatNotice(cb.settings.item33); } if (tip['amount'] === cb.settings.price34) { cb.chatNotice(cb.settings.item34); } if (tip['amount'] === cb.settings.price35) { cb.chatNotice(cb.settings.item35); } if (tip['amount'] === cb.settings.price36) { cb.chatNotice(cb.settings.item36); } 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; }); // Display Panels cb.onDrawPanel(function(user) { if (cb.settings.goal === 0) { return { 'template': '3_rows_12_22_31', 'row1_label': 'Tip Menu Active!', 'row1_value': 'See Bio for Details!', 'row2_label': 'Highest Tip:', 'row2_value': nullCheck(ht_username) + '(' + ht_amount + ')', 'row3_value': 'Tip ' + cb.settings.price5 + 'tks For "' + cb.settings.item5 + '"' }; } if (cb.settings.reset === "Yes") { return { 'template': '3_rows_12_22_31', 'row1_label': 'Goal:', 'row1_value': goal_tips + '/' + cb.settings.goal + '(' + total_tips + ')', 'row2_label': 'Tip Menu is Active!', 'row2_value': 'See Bio for Details!', 'row3_value': 'Tip ' + cb.settings.price5 + 'tks For "' + cb.settings.item5 + '"' }; } else { return { 'template': '3_rows_12_22_31', 'row1_label': 'Goal:', 'row1_value': goal_tips + '/' + cb.settings.goal, 'row2_label': 'Tip Menu is Active!', 'row2_value': 'See Bio for Details!', 'row3_value': 'Tip ' + cb.settings.price5 + 'tks For "' + cb.settings.item5 + '"' }; } }); // Makings of the Menu var menu1 = '' + cb.settings.item1 + ' For ' + cb.settings.price1 + 'tks '; var menu2 = '' + cb.settings.item2 + ' For ' + cb.settings.price2 + 'tks '; var menu3 = '' + cb.settings.item3 + ' For ' + cb.settings.price3 + 'tks '; var menu4 = '' + cb.settings.item4 + ' For ' + cb.settings.price4 + 'tks '; var menu5 = '' + cb.settings.item5 + ' For ' + cb.settings.price5 + 'tks '; var menu6 = '' + cb.settings.item6 + ' For ' + cb.settings.price6 + 'tks '; var menu7 = '' + cb.settings.item7 + ' For ' + cb.settings.price7 + 'tks '; var menu8 = '' + cb.settings.item8 + ' For ' + cb.settings.price8 + 'tks '; var menu9 = '' + cb.settings.item9 + ' For ' + cb.settings.price9 + 'tks '; var menu10 = '' + cb.settings.item10 + ' For ' + cb.settings.price10 + 'tks '; var menu11 = '' + cb.settings.item11 + ' For ' + cb.settings.price11 + 'tks '; var menu12 = '' + cb.settings.item12 + ' For ' + cb.settings.price12 + 'tks '; var menu13 = '' + cb.settings.item13 + ' For ' + cb.settings.price13 + 'tks '; var menu14 = '' + cb.settings.item14 + ' For ' + cb.settings.price14 + 'tks '; var menu15 = '' + cb.settings.item15 + ' For ' + cb.settings.price15 + 'tks '; var menu16 = '' + cb.settings.item16 + ' For ' + cb.settings.price16 + 'tks '; var menu17 = '' + cb.settings.item17 + ' For ' + cb.settings.price17 + 'tks '; var menu18 = '' + cb.settings.item18 + ' For ' + cb.settings.price18 + 'tks '; var menu19 = '' + cb.settings.item19 + ' For ' + cb.settings.price19 + 'tks '; var menu20 = '' + cb.settings.item20 + ' For ' + cb.settings.price20 + 'tks '; var menu21 = '' + cb.settings.item21 + ' For ' + cb.settings.price21 + 'tks '; var menu22 = '' + cb.settings.item22 + ' For ' + cb.settings.price22 + 'tks '; var menu23 = '' + cb.settings.item23 + ' For ' + cb.settings.price23 + 'tks '; var menu24 = '' + cb.settings.item24 + ' For ' + cb.settings.price24 + 'tks '; var menu25 = '' + cb.settings.item25 + ' For ' + cb.settings.price25 + 'tks '; var menu26 = '' + cb.settings.item26 + ' For ' + cb.settings.price26 + 'tks '; var menu27 = '' + cb.settings.item27 + ' For ' + cb.settings.price27 + 'tks '; var menu28 = '' + cb.settings.item28 + ' For ' + cb.settings.price28 + 'tks '; var menu29 = '' + cb.settings.item29 + ' For ' + cb.settings.price29 + 'tks '; var menu30 = '' + cb.settings.item30 + ' For ' + cb.settings.price30 + 'tks '; var menu31 = '' + cb.settings.item31 + ' For ' + cb.settings.price31 + 'tks '; var menu32 = '' + cb.settings.item32 + ' For ' + cb.settings.price32 + 'tks '; var menu33 = '' + cb.settings.item33 + ' For ' + cb.settings.price33 + 'tks '; var menu34 = '' + cb.settings.item34 + ' For ' + cb.settings.price34 + 'tks '; var menu35 = '' + cb.settings.item35 + ' For ' + cb.settings.price35 + 'tks '; var menu36 = '' + cb.settings.item36 + ' For ' + cb.settings.price36 + 'tks '; if (cb.settings.price3 !== undefined) { menu3 = '' + cb.settings.item3 + ' For ' + cb.settings.price3 + 'tks '; } if (cb.settings.price4 !== undefined) { menu4 = '' + cb.settings.item4 + ' For ' + cb.settings.price4 + 'tks '; } if (cb.settings.price5 !== undefined) { menu5 = '' + cb.settings.item5 + ' For ' + cb.settings.price5 + 'tks '; } if (cb.settings.price6 !== undefined) { menu6 = '' + cb.settings.item6 + ' For ' + cb.settings.price6 + 'tks '; } if (cb.settings.price7 !== undefined) { menu7 = '' + cb.settings.item7 + ' For ' + cb.settings.price7 + 'tks '; } if (cb.settings.price8 !== undefined) { menu8 = '' + cb.settings.item8 + ' For ' + cb.settings.price8 + 'tks '; } if (cb.settings.price9 !== undefined) { menu9 = '' + cb.settings.item9 + ' For ' + cb.settings.price9 + 'tks '; } if (cb.settings.price10 !== undefined) { menu10 = '' + cb.settings.item10 + ' For ' + cb.settings.price10 + 'tks '; } if (cb.settings.price11 !== undefined) { menu11 = '' + cb.settings.item11 + ' For ' + cb.settings.price11 + 'tks '; } if (cb.settings.price12 !== undefined) { menu12 = '' + cb.settings.item12 + ' For ' + cb.settings.price12 + 'tks '; } if (cb.settings.price13 !== undefined) { menu13 = '' + cb.settings.item13 + ' For ' + cb.settings.price13 + 'tks '; } if (cb.settings.price14 !== undefined) { menu14 = '' + cb.settings.item14 + ' For ' + cb.settings.price14 + 'tks '; } if (cb.settings.price15 !== undefined) { menu15 = '' + cb.settings.item15 + ' For ' + cb.settings.price15 + 'tks '; } if (cb.settings.price16 !== undefined) { menu16 = '' + cb.settings.item16 + ' For ' + cb.settings.price16 + 'tks '; } if (cb.settings.price17 !== undefined) { menu17 = '' + cb.settings.item17 + ' For ' + cb.settings.price17 + 'tks '; } if (cb.settings.price18 !== undefined) { menu18 = '' + cb.settings.item18 + ' For ' + cb.settings.price18 + 'tks '; } if (cb.settings.price19 !== undefined) { menu19 = '' + cb.settings.item19 + ' For ' + cb.settings.price19 + 'tks '; } if (cb.settings.price20 !== undefined) { menu20 = '' + cb.settings.item20 + ' For ' + cb.settings.price20 + 'tks '; } if (cb.settings.price21 !== undefined) { menu21 = '' + cb.settings.item21 + ' For ' + cb.settings.price21 + 'tks '; } if (cb.settings.price22 !== undefined) { menu22 = '' + cb.settings.item22 + ' For ' + cb.settings.price22 + 'tks '; } if (cb.settings.price23 !== undefined) { menu23 = '' + cb.settings.item23 + ' For ' + cb.settings.price23 + 'tks '; } if (cb.settings.price24 !== undefined) { menu24 = '' + cb.settings.item24 + ' For ' + cb.settings.price24 + 'tks '; } if (cb.settings.price25 !== undefined) { menu25 = '' + cb.settings.item25 + ' For ' + cb.settings.price25 + 'tks '; } if (cb.settings.price26 !== undefined) { menu26 = '' + cb.settings.item26 + ' For ' + cb.settings.price26 + 'tks '; } if (cb.settings.price27 !== undefined) { menu27 = '' + cb.settings.item27 + ' For ' + cb.settings.price27 + 'tks '; } if (cb.settings.price28 !== undefined) { menu28 = '' + cb.settings.item28 + ' For ' + cb.settings.price28 + 'tks '; } if (cb.settings.price29 !== undefined) { menu29 = '' + cb.settings.item29 + ' For ' + cb.settings.price29 + 'tks '; } if (cb.settings.price30 !== undefined) { menu30 = '' + cb.settings.item30 + ' For ' + cb.settings.price30 + 'tks '; } if (cb.settings.price31 !== undefined) { menu31 = '' + cb.settings.item31 + ' For ' + cb.settings.price31 + 'tks '; } if (cb.settings.price32 !== undefined) { menu32 = '' + cb.settings.item32 + ' For ' + cb.settings.price32 + 'tks '; } if (cb.settings.price33 !== undefined) { menu33 = '' + cb.settings.item33 + ' For ' + cb.settings.price33 + 'tks '; } if (cb.settings.price34 !== undefined) { menu34 = '' + cb.settings.item34 + ' For ' + cb.settings.price34 + 'tks '; } if (cb.settings.price35 !== undefined) { menu35 = '' + cb.settings.item35 + ' For ' + cb.settings.price35 + 'tks '; } if (cb.settings.price36 !== undefined) { menu36 = '' + cb.settings.item36 + ' For ' + cb.settings.price36 + 'tks '; } var listMenu = [menu1, menu2, menu3, menu4, menu5, menu6, menu7, menu8, menu9, menu10, menu11, menu12, menu13, menu14, menu15, menu16, menu17, menu18, menu19, menu20, menu21, menu22, menu23, menu24, menu25, menu26, menu27, menu28, menu29, menu30, menu31, menu32, menu33, menu34, menu35, menu36]; // 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() { cb.chatNotice('/// Tip Menu Is Active! Tip ' + cb.settings.price1 + 'tks for "' + cb.settings.item1 + '" Or, Type /menu to see the full menu.'); cb.setTimeout(chatAd, (cb.settings.chat_ad * 60000)); } if (cb.settings.chat_ad > 0) { cb.setTimeout(chatAd, (cb.settings.chat_ad * 60000)); } function init() { update_app(); } init(); // Now go forth and profit!
© Copyright Chaturbate 2011- 2026. All Rights Reserved.