Apps Home
|
Create an App
Jolie's App V1.0
Author:
gandalfthegrey1
Description
Source Code
Launch App
Current Users
Created by:
Gandalfthegrey1
//JOLIE BOT let tipMenuArray = []; let tipMenuPriceArray = []; let maxItems = 17; let panel_font_size; let panel_row_one_text; let panel_row_two_text; let panel_row_three_text; let panel_row_one_text_color; let panel_row_two_text_color; let panel_row_three_text_color cb.settings_choices = [ {name:'tip_menu_on', type:'choice', label: "Use Tip Menu?", choice1:'Yes', choice2:'No', defaultValue: 'Yes'}, {name:'tip_menu_on_tip_notifier_bg_colour', type: 'str', label: 'Background colour for tip notifications (HTML COLOURS ONLY)'}, {name:'tip_menu_on_tip_notifier_text_colour', type: 'str', label: 'Text colour for tip notifications (HTML COLOURS ONLY)'}, {name:'tip_menu_bg_colour', type: 'str', label: 'Background colour for tip menu (HTML COLOURS ONLY)'}, {name:'tip_menu_text_colour', type: 'str', label: 'Text colour for tip menu (HTML COLOURS ONLY)'}, {name:'tip_menu_item_1', type:'str', label: 'Tip Menu Item 1 Description', required: false}, {name:'tip_menu_item_1_price', type:'int', label: 'Tip Menu Item 1 Price', required: false}, {name:'tip_menu_item_2', type:'str', label: 'Tip Menu Item 2 Description', required: false}, {name:'tip_menu_item_2_price', type:'int', label: 'Tip Menu Item 2 Price', required: false}, {name:'tip_menu_item_3', type:'str', label: 'Tip Menu Item 3 Description', required: false}, {name:'tip_menu_item_3_price', type:'int', label: 'Tip Menu Item 3 Price', required: false}, {name:'tip_menu_item_4', type:'str', label: 'Tip Menu Item 4 Description', required: false}, {name:'tip_menu_item_4_price', type:'int', label: 'Tip Menu Item 4 Price', required: false}, {name:'tip_menu_item_5', type:'str', label: 'Tip Menu Item 5 Description', required: false}, {name:'tip_menu_item_5_price', type:'int', label: 'Tip Menu Item 5 Price', required: false}, {name:'tip_menu_item_6', type:'str', label: 'Tip Menu Item 6 Description', required: false}, {name:'tip_menu_item_6_price', type:'int', label: 'Tip Menu Item 6 Price', required: false}, {name:'tip_menu_item_7', type:'str', label: 'Tip Menu Item 7 Description', required: false}, {name:'tip_menu_item_7_price', type:'int', label: 'Tip Menu Item 7 Price', required: false}, {name:'tip_menu_item_8', type:'str', label: 'Tip Menu Item 8 Description', required: false}, {name:'tip_menu_item_8_price', type:'int', label: 'Tip Menu Item 8 Price', required: false}, {name:'tip_menu_item_9', type:'str', label: 'Tip Menu Item 9 Description', required: false}, {name:'tip_menu_item_9_price', type:'int', label: 'Tip Menu Item 9 Price', required: false}, {name:'tip_menu_item_10', type:'str', label: 'Tip Menu Item 10 Description', required: false}, {name:'tip_menu_item_10_price', type:'int', label: 'Tip Menu Item 10 Price', required: false}, {name:'tip_menu_item_11', type:'str', label: 'Tip Menu Item 11 Description', required: false}, {name:'tip_menu_item_11_price', type:'int', label: 'Tip Menu Item 11 Price', required: false}, {name:'tip_menu_item_12', type:'str', label: 'Tip Menu Item 12 Description', required: false}, {name:'tip_menu_item_12_price', type:'int', label: 'Tip Menu Item 12 Price', required: false}, {name:'tip_menu_item_13', type:'str', label: 'Tip Menu Item 13 Description', required: false}, {name:'tip_menu_item_13_price', type:'int', label: 'Tip Menu Item 13 Price', required: false}, {name:'tip_menu_item_14', type:'str', label: 'Tip Menu Item 14 Description', required: false}, {name:'tip_menu_item_14_price', type:'int', label: 'Tip Menu Item 14 Price', required: false}, {name:'tip_menu_item_15', type:'str', label: 'Tip Menu Item 15 Description', required: false}, {name:'tip_menu_item_15_price', type:'int', label: 'Tip Menu Item 15 Price', required: false}, {name:'tip_menu_item_16', type:'str', label: 'Tip Menu Item 16 Description', required: false}, {name:'tip_menu_item_16_price', type:'int', label: 'Tip Menu Item 16 Price', required: false}, {name:'tip_menu_item_17', type:'str', label: 'Tip Menu Item 17 Description', required: false}, {name:'tip_menu_item_17_price', type:'int', label: 'Tip Menu Item 17 Price', required: false}, {name:'panel_font_size', type:'int', label: 'Panel Font Size', defaultValue: 20}, {name:'panel_row_one_text', type:'str', label: 'Panel Row One Text'}, {name:'panel_row_two_text', type:'str', label: 'Panel Row Two Text'}, {name:'panel_row_three_text', type:'str', label: 'Panel Row Three Text'}, {name:'panel_row_one_text_color', type:'str', label: 'Panel Row One Text Color'}, {name:'panel_row_two_text_color', type:'str', label: 'Panel Row Two Text Color'}, {name:'panel_row_three_text_color', type:'str', label: 'Panel Row Three Text Color'}, ]; function initTipMenu(){ for (let j = 0; j <= maxItems; j++) { if (cb.settings['tip_menu_item_' + j] !== '' && cb.settings['tip_menu_item_' + j + '_price'] > 0) { tipMenuArray.push((cb.settings['tip_menu_item_' + j])); tipMenuPriceArray.push((cb.settings['tip_menu_item_' + j + '_price'])); } } tipMenuNotifier(); } function tipMenuNotifier(){ cb.sendNotice("Tip Menu:", "", cb.settings.tip_menu_bg_colour, cb.settings.tip_menu_text_colour, "bold") for(i = 0; i < tipMenuArray.length; i++){ cb.sendNotice(tipMenuArray[i] + " " + tipMenuPriceArray[i] + " tokens", "", cb.settings.tip_menu_bg_colour, cb.settings.tip_menu_text_colour, "bold"); } cb.setTimeout(tipMenuNotifier, 10000); } cb.onTip(function (tip) { for (let j = 0; j <= maxItems; j++) { if(tip['amount'] == tipMenuPriceArray[j]){ cb.sendNotice(tip['from_user'] + " tipped for " + tipMenuArray[j], "", cb.settings.tip_menu_on_tip_notifier_bg_colour,cb.settings.tip_menu_on_tip_notifier_text_colour,"bold"); } } }); function initPanel(){ panel_font_size = cb.settings.panel_font_size; panel_row_one_text = cb.settings.panel_row_one_text; panel_row_two_text = cb.settings.panel_row_two_text; panel_row_three_text = cb.settings.panel_row_three_text; panel_row_one_text_color = cb.settings.panel_row_one_text_color; } cb.onDrawPanel(function(user) { return { 'template': '3_rows_12_22_31', 'row1_label': 'Tip Received / Goal :', 'row1_value': '0', 'row2_label': 'Highest Tip:', 'row2_value': user['user'], 'row3_value': '0' }; }); cb.drawPanel(); initTipMenu(); initPanel();
© Copyright Chaturbate 2011- 2024. All Rights Reserved.