Apps Home
|
Create an App
bluedtest
Author:
blued0ug
Description
Source Code
Launch App
Current Users
Created by:
Blued0ug
/* * Title: Preciosa's Lovers Bot * Author: noiett * Email: noiett.cb@gmail.com * Twitter: @biosandapps * Version: 1.1.0 Feb 14, 2017 * Description: Bot for PreciosaX's room * * This bot uses modified code and ideas from these apps, so some credit to the authors: * - Tip Menu - Single Line (badbadbubba) * - Mell's Family Bot (tablesalt) * * Main features: * * 1. Leaderboard 'Preciosa's Top Lovers' with improved features: * - Full lovers list available with command /lovers * - Top 3 lovers get a heart in their messages showing their position * - The bot makes an announcement when a user reaches the 1st position * * 2. Rotating notifier (up to 4 messages) * * 3. Tip Menu Single Line enhanced * - Full tip menu available with command /tipmenu * - Up to 10 items announced in the room * - Customizable appearance * - Items are now set in bot code and can be hidden (not announced) * This feature allows for a tip menu longer than 10 items if needed. * * What's new in version v1.1: * - Greeting messages for non-grey users joining the room * - /bot options to set custom colors on chat (text & background) * - /tipmenu : Everyone can check the full tip menu * - /help : Information about all commands * - New warning message to keep other models from using the bot * - Changes in code structure * - Bug fixes * */ // CONSTANTS var COLORS = [ {name: 'Black', code: '#000000'}, {name: 'Blue', code: '#0000FF'}, {name: 'DarkBlue', code: '#00008B'}, {name: 'Brown', code: '#8B0000'}, {name: 'DarkViolet', code: '#9400D3'}, {name: 'Green', code: '#008000'}, {name: 'IndianRed', code: '#CD5C5C'}, {name: 'Orange', code: '#FFA500'}, {name: 'Pink', code: '#FF00BA'}, {name: 'Purple', code: '#800080'}, {name: 'Red', code: '#FF0000'}, {name: 'SlateGray', code: '#708090'}, {name: 'SteelBlue', code: '#4682B4'}, ]; // Some useful characters var HEART = '\u2665'; // ♥ BDIAMOND = '\u2666'; // ♦ BSTAR = '\u2605'; // ★ WSTAR = '\u2606'; // ☆ POINT = '\u00B7'; // · ARROW = '\u2192'; // → // Number of Top Lovers to show var ITEMS_LB = 3; // Number of notifiers available var NOTIFIERS_MAX = 4; // Variables for Settings // TipMenu : (hide = don't show in settings or room announcement, only tip response) var menuItems = [ {name: 'PM', tokens: 11, field: 'pm', hide: false}, {name: 'blued0ug\'s nipple slip', tokens: 14, field: 'nipp', hide: true}, {name: 'Feet', tokens: 20, field: 'feet', hide: true}, {name: 'Song request', tokens: 25, field: 'song', hide: true}, // {name: '1 raffle ticket', tokens: 33, field: '1tick', hide: true}, {name: 'Show boobs', tokens: 36, field: 'boobs', hide: false}, {name: 'Show ass', tokens: 45, field: 'ass', hide: false}, {name: 'Show pussy', tokens: 50, field: 'pussy', hide: false}, {name: 'C2C', tokens: 55, field: 'c2c', hide: false}, {name: 'Oil on boobs', tokens: 60, field: 'oily', hide: false}, {name: 'Dildo blowjob', tokens: 69, field: 'bj', hide: false}, {name: 'Naked', tokens: 100, field: 'naked', hide: false}, {name: 'Pussy play', tokens: 125, field: 'play', hide: false}, {name: 'Hitachi play', tokens: 140, field: 'hita', hide: false}, // {name: '5 raffle tickets', tokens: 145, field: '5tick', hide: true}, {name: 'Dildo pussy', tokens: 160, field: 'dildo', hide: false}, // {name: '10 raffle tickets', tokens: 250, field: '10tick',hide: true}, {name: 'Kik messenger', tokens: 500, field: 'kik', hide: true} ]; //var loversListColor = ''; var loversListTimer = 0; var loversHearts = true; var loversAnnounce = true; var useNotifiers = false; var notifiers = []; var notifierColor = ''; var notifierTimer = 0; var useTipMenu = false; var tipMenuStyle = ''; var sepChar = ''; var tipMenuColor = ''; var tipMenuTimer = 0; // Special design for headers in a separate notice (buggy due to cb problems) var niceHeaders = true; // VARIABLES var botVersion = "1.1.0"; var botDate = "Feb 14, 2017"; var botTextColor = '#800080'; var botBgColor = '#FFFFFF'; var botTextWeight = 'normal'; var botWarnColor = '#ff0000'; var noticeDelay = 400; var nextNotifier = 1; var lastNotifier = 1; var loversList = []; var userData = []; var modelName = cb.room_slug; // TEXTS var botCommand = '/bot'; var theHeader = '\u2665 Preciosa\'s Lovers Bot v' + botVersion + ' \u2665'; var loadText = 'Build by noiett (' + botDate + ')'; var welcomeText = 'Welcome! Type /tipmenu to see all prices and /help to see all commands!'; var modelWarning = 'IMPORTANT WARNING: This is a custom bot created for PreciosaX\'s room ONLY!\n' + 'If you want a bot with the same or similar features contact the builder at\n' + 'noiett.cb@gmail.com or @biosandapps on twitter. Thank you.'; var publicHelp = '--( Public Commands )----------------\n' + '/lovers ' + ARROW + ' Show a list with all tippers\n' + '/tipmenu ' + ARROW + ' Show a complete tip menu\n' + '/help ' + ARROW + ' Show a list with all commands'; var fanHelp = '--( Fan Club Commands )--------------------\n' + botCommand + ' color [#fgcolor] ' + ARROW + ' Set custom text color\n' + botCommand + ' color remove ' + ARROW + ' Remove custom text color\n' + botCommand + ' bgcolor [#bgcolor] ' + ARROW + ' Set custom background color\n' + botCommand + ' bgcolor remove ' + ARROW + ' Remove custom background color'; var modHelp = '--( Broadcaster & Mod Commands )-----------------------\n' + botCommand + ' setcolor [username] [#fgcolor] ' + ARROW + ' Set user text color\n' + botCommand + ' setcolor [username] remove ' + ARROW + ' Remove user text color\n' + botCommand + ' setbgcolor [username] [#bgcolor] ' + ARROW + ' Set user background color\n' + botCommand + ' setbgcolor [username] remove ' + ARROW + ' Remove user background color'; // SETTINGS cb.settings_choices = [ /* { name: 'color_lb', type:'choice', label:'Lovers List color', choice1: 'Black', choice2: 'Blue', choice3: 'DarkBlue', choice4: 'Brown', choice5: 'DarkViolet', choice6: 'Green', choice7: 'IndianRed', choice8: 'Orange', choice9: 'Pink', choice10: 'Purple', choice11: 'Red', choice12: 'SlateGray', choice13: 'SteelBlue', defaultValue: 'Purple' },*/ { name: 'greet_bot', type: 'choice', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes', label: "Announce bot to users joining the room" }, { name: 'hearts_lb', type: 'choice', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes', label: "Heart in Top Lover's messages" }, { name: 'announce_lb', type: 'choice', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes', label: "Announce new Top Lover" }, { name: 'timer_lb', type: 'choice', choice1: 1, choice2: 2, choice3: 3, choice4: 4, choice5: 5, choice6: 6, choice7: 8, choice8: 10, choice9: 12, choice10: 15, choice11: 20, choice11: 30, defaultValue: 8, label: 'Top Lovers Display frequency (mins)' }, { name: 'show_ad', type: 'choice', choice1: 'Yes', choice2: 'No', defaultValue: 'No', label: '------------------------------ [ Enable notifiers ]' }, { name: 'text_ad1', type: 'str', required: false, label: 'Notifier text 1' }, { name: 'text_ad2', type: 'str', required: false, label: 'Notifier text 2' }, { name: 'text_ad3', type: 'str', required: false, label: 'Notifier text 3' }, { name: 'text_ad4', type: 'str', required: false, label: 'Notifier text 4' }, { name: 'color_ad', type:'choice', label:'Notifier color', choice1: 'Black', choice2: 'Blue', choice3: 'DarkBlue', choice4: 'Brown', choice5: 'DarkViolet', choice6: 'Green', choice7: 'IndianRed', choice8: 'Orange', choice9: 'Pink', choice10: 'Purple', choice11: 'Red', choice12: 'SlateGray', choice13: 'SteelBlue', defaultValue: 'DarkBlue' }, { name: 'timer_ad', type: 'choice', choice1: 1, choice2: 2, choice3: 3, choice4: 4, choice5: 5, choice6: 6, choice7: 8, choice8: 10, choice9: 12, choice10: 15, choice11: 20, choice11: 30, defaultValue: 8, label: 'Display frequency (mins)' }, { name: 'show_tm', type: 'choice', choice1: 'Yes', choice2: 'No', defaultValue: 'No', label: '----------------------------- [ Enable Tip Menu ]' }, { name: 'style', type: 'choice', choice1: 'Brackets', choice2: 'Tokens', defaultValue: 'Brackets', label: 'Tip Menu style' }, { name: 'sepchar', type: 'choice', choice1: 'Comas', choice2: 'Hearts', choice3: 'Vertical Bar', defaultValue: 'Hearts', label: 'Separator character' }, { name: 'color_tm', type:'choice', label:'Tip Menu color', choice1: 'Black', choice2: 'Blue', choice3: 'DarkBlue', choice4: 'Brown', choice5: 'DarkViolet', choice6: 'Green', choice7: 'IndianRed', choice8: 'Orange', choice9: 'Pink', choice10: 'Purple', choice11: 'Red', choice12: 'SlateGray', choice13: 'SteelBlue', defaultValue: 'Pink' }, { name: 'timer_tm', type: 'choice', choice1: 1, choice2: 2, choice3: 3, choice4: 4, choice5: 5, choice6: 6, choice7: 8, choice8: 10, choice9: 12, choice10: 15, choice11: 20, choice11: 30, defaultValue: 5, label: 'Display frequency (mins)' }, ]; /* FUNCTIONS */ cb.onMessage(function (msg) { // Some variables var name = msg['user']; var isModel = (name == cb.room_slug); var isMod = msg['is_mod']; var isFan = msg['in_fanclub']; var isCreator = (name == 'noiett'); var hasTokens = msg['has_tokens']; var hasTipped = msg['tipped_recently']; var isGrey = !(hasTokens || isMod || isModel || isFan); // If command then process if (msg.m.indexOf('/') == 0 || msg.m.indexOf('!') == 0) { // Handling commands var userParam = getParam(msg['m'],0); switch (userParam) { case '/bot': case '!bot': if (isModel || isCreator || isMod || isFan) { // Hide all bot commands from chat msg['X-Spam'] = true; // Set variables var userParam1 = getParam(msg['m'],1); var userParam2 = getParam(msg['m'],2); var userParam3 = getParam(msg['m'],3); var userMsg = ''; //Handling bot commands switch (userParam1) { case 'fgcolor': case 'color': // Check color format if ( /^#[0-9A-F]{6}$/i.test(userParam2) || userParam2 == 'remove') { // Init user in array if needed if (!userData[name]) { userData[name] = {username: name, fgColor: '#494949', bgColor: '#ffffff' }; } if (userParam2 == 'remove') { userData[name].fgColor = ''; userMsg = 'Your text color has been removed.'; } else { userData[name].fgColor = userParam2; userMsg = 'Your text color has been set to ' + userParam2 + '.'; } } else { userMsg = 'You need to pass a valid hex color code (ex: /bot ' + userParam1 + ' #FF1122).'; } break; case 'bgcolor': case 'background': // Check color format if ( /^#[0-9A-F]{6}$/i.test(userParam2) || userParam2 == 'remove') { // Init user in array if needed if (!userData[name]) { userData[name] = {username: name, fgColor: '#494949', bgColor: '#ffffff' }; } if (userParam2 == 'remove') { userData[name].bgColor = ''; userMsg = 'Your background color has been removed.'; } else { userData[name].bgColor = userParam2; userMsg = 'Your background color has been set to ' + userParam2 + '.'; } } else { userMsg = 'You need to pass a valid hex color code (ex: /bot ' + userParam1 + ' #FF1122).'; } break; case 'setcolor': case 'setbgcolor': if (isCreator || isModel || isMod) { if (userParam2) { if ( /^#[0-9A-F]{6}$/i.test(userParam3) || userParam3 == 'remove') { // Init user in array if needed if (!userData[userParam2]) { userData[userParam2] = {username: userParam2, fgColor: '#333333', bgColor: '#ffffff' }; } if (userParam3 == 'remove') { if (userParam1 == 'setcolor') { userData[userParam2].fgColor = ''; userMsg = userParam2 + '\'s text color has been removed.'; } if (userParam1 == 'setbgcolor') { userData[userParam2].bgColor = ''; userMsg = userParam2 + '\'s background color has been removed.'; } } else { if (userParam1 == 'setcolor') { userData[userParam2].fgColor = userParam3; userMsg = userParam2 + '\'s text color has been set to ' + userParam3 + '.'; } if (userParam1 == 'setbgcolor') { userData[userParam2].bgColor = userParam3; userMsg = userParam2 + '\'s background color has been set to ' + userParam3 + '.'; } } } else { userMsg = 'You need to pass a valid hex color code (ex: /bot ' + userParam1 + ' username #FF1122).'; } } else { userMsg = 'You need to pass a valid username and hex color code (ex: /bot ' + userParam1 + ' username #FF1122).'; } } else { userMsg = 'Only broadcaster and mods can use this command.'; } break; case 'setbgcolor': break; default: if (!userMsg) { userMsg = 'You need to pass a valid argument. Type /help for more info.'; } else { userMsg = 'Argument \'' + userParam1 + '\' is not valid.'; } break; } } else { userMsg = 'Only broadcaster, mods and fans can use this command.'; } // Workaround for CB bug: this delay prevents message from being broken by command text in the room setTimeout(function(){ cb.sendNotice(userMsg, name, botBgColor, botTextColor, botTextWeight); }, noticeDelay); break; case '/help': case '!help': msg['m'] = msg['m'] + " (bot help sent to " + msg['user'] + ")"; if (isModel || isCreator || isMod) { // Show full help sendCommandUser(name, 'fullhelp'); } else if (isFan) { // Show fan member help sendCommandUser(name, 'fanhelp'); } else { // Show basic help sendCommandUser(name, 'help'); } break; case '/lovers': case '!lovers': msg['m'] = msg['m'] + " (lovers list sent to " + msg['user'] + ")"; sendCommandUser(name, 'lovers'); break; case '/tipmenu': case '!tipmenu': if (useTipMenu) { msg['m'] = msg['m'] + " (tip menu sent to " + msg['user'] + ")"; sendCommandUser(name, 'tipmenu'); } else { userMsg = 'Tip menu is disabled at the moment. Try later.'; cb.sendNotice(userMsg, name, botBgColor, botTextColor, botTextWeight); } break; default: if (userParam.length > 1) { userMsg = 'This is not a valid command. Type /help for more info.'; cb.sendNotice(userMsg, name, botBgColor, botTextColor, botTextWeight); } break; } } // Top Tipper? Let's add a heart to the msg if (loversHearts) { var pos = getTopLover(msg['user']); if (pos > 0) { msg['m'] = '' + ':001h' + pos + ' ' + msg['m']; } } // Apply colors to message if (userData[name]) { if (userData[name].fgColor) msg['c'] = userData[name].fgColor; if (userData[name].bgColor) msg['background'] = userData[name].bgColor; } return msg; }); /* * Handle new tip */ cb.onTip(function (tip) { var username = tip.from_user; var amount = tip.amount; var found = false; var isMVP = false; // Handle Tip Menu if (useTipMenu) { var tokensTip = parseInt(tip['amount']); for (i = 0; i < menuItems.length; i++) { if (tokensTip == menuItems[i].tokens) { cb.sendNotice(tip['from_user'] + ' tipped for ' + menuItems[i].name + '!','','',tipMenuColor,'bold'); } } } // Handle Lovers List if (loversList.length > 0) { isMVP = (username == loversList[0].name); } /* Update tipper */ for (var i = 0; i < loversList.length; i++) { if (loversList[i].name == username) { loversList[i].tokens += amount; found = true; break; } } /* Add a new one */ if (!found) loversList.push({ name: username, tokens: amount }); /* Sort the array */ loversList.sort(function(a, b) { return b.tokens - a.tokens; }); /* Is new Top Lover? Let's announce it! */ if (!isMVP && loversList[0].name == username && loversAnnounce) { var msg = BSTAR + ' ' + loversList[0].name + ' ' + BSTAR + ' is the new Top Lover with ' + loversList[0].tokens + ' tokens!'; cb.sendNotice(msg,'',botTextColor,'#FFFFFF','bold'); } }); /* * handle user entrance messages */ cb.onEnter(function(user) { var name = user['user']; var isMod = user['is_mod']; var isFan = user['in_fanclub']; var isCreator = (name == 'noiett'); var isReal = (cb.room_slug == 'preciosax'); var isModel = (name == cb.room_slug); var hasTokens = user['has_tokens']; var hasTipped = user['tipped_recently']; var isGrey = !(hasTokens || isMod || isModel || isFan); if (!isGrey && botAnnounce) { setTimeout(function(){ // Welcome message cb.sendNotice(theHeader,name,botTextColor,"#FFFFFF",'bolder'); cb.sendNotice(welcomeText,name,botBgColor,botTextColor,botTextWeight); }, noticeDelay); } }); /* * Returns the number of notifiers defined (!= '') in the settings */ function getMaxNotifiers() { for (var i=0; i<NOTIFIERS_MAX; i++) { if (cb.settings['text_ad' + (i + 1)] == 0) { return i; } } return i; } /* * Returns the name of the lover with more tokens */ function getTopLover(name) { if (loversList.length > 0) { for (var i=0; i<Math.min(loversList.length, 3); i++) { if (loversList[i].name == name) { return i+1; } } } cb.log('User not in the top 3 lovers.'); return 0; } /* * Returns the code of a requested color name */ function getColorCode(name) { for (var i=0; i<=COLORS.length; i++) { if (COLORS[i].name == name) { return COLORS[i].code; } } return "#FFFFFF"; cb.log('Error: Could not find the code for this color: ' + name); } /* * Return parameter in a certain position in a string */ function getParam(msg, position) { var tmp = msg.split(' '); return tmp[position]; } /* * Sends info from this commands to the user: * /tipmenu * /help * /lovers */ function sendCommandUser(name, command) { var model = cb.room_slug; var head = ''; var userMsg = ''; model = model.charAt(0).toUpperCase() + model.slice(1); switch (command) { case 'help': head = HEART + ' Preciosa\'s Lovers Bot Help ' + HEART; userMsg = publicHelp; break; case 'fanhelp': head = HEART + ' Preciosa\'s Lovers Bot Help ' + HEART; userMsg = publicHelp + '\n' + fanHelp; break; case 'fullhelp': head = HEART + ' Preciosa\'s Lovers Bot Help ' + HEART; userMsg = publicHelp + '\n' + fanHelp + '\n' + modHelp; break; case 'lovers': if (loversList.length > 0) { head = HEART + ' ' + model + '\'s Lovers list ' + HEART; for (var i = 0; i < loversList.length; i++){ /* Add \n before starting a new line */ if (i > 0) { userMsg += '\n'; } /* Add a new tipper if available */ if (i < loversList.length) { userMsg += '' + (i + 1) + '. ' + loversList[i].name + ' (' + loversList[i].tokens + ' tks)'; } else { userMsg += '' + (i + 1) + '. ---------------------'; } } } else { userMsg = 'No lovers yet! Tip now and become the top lover!'; } break; case 'tipmenu': head = HEART + ' ' + model + '\'s Tip Menu ' + HEART; for (i=0; i<menuItems.length; i++) { userMsg += '(' + menuItems[i].tokens + ')' + ' ' + menuItems[i].name; if (i < (menuItems.length - 1)) { userMsg += '\n'; } } break; } if (!niceHeaders) { userMsg = head + '\n' + userMsg; head = ''; } // Workaround for CB bug: this delay prevents message from being broken by command text in the room setTimeout(function(){ // Send Command response to user if (head) cb.sendNotice(head,name,botTextColor,'#FFFFFF','bold'); cb.sendNotice(userMsg,name,botBgColor,botTextColor,botTextWeight); }, noticeDelay); } /* * Sends the lovers list to the room */ function announceLoversList() { var target = ''; var msgHead = ''; var msgRoom = ''; var msgBg = '#FFFFFF'; var msgWg = 'normal'; /* Build the lovers list */ if (loversList.length > 0) { /* Add header */ var name = cb.room_slug; name = name.charAt(0).toUpperCase() + name.slice(1); msgHead = HEART + ' ' + name + '\'s Top Lovers ' + HEART; for (var i = 0; i < ITEMS_LB; i++){ /* Add \n before starting a new line */ if (i > 0) { msgRoom += '\n'; } /* Add a new tipper if exists */ if (i < loversList.length) { msgRoom += '' + (i + 1) + '. ' + loversList[i].name + ' (' + loversList[i].tokens + ' tks)'; } else { msgRoom += '' + (i + 1) + '. ---------------------'; } } /* More lovers? Invite viewers to see full list! */ if (loversList.length > ITEMS_LB) { msgRoom += '\nType /lovers to see the full list!'; } } else { msgRoom = 'No lovers yet! Tip now and become the top lover!'; } if (msgHead) cb.sendNotice(msgHead,target,botTextColor,'#FFFFFF','bold'); cb.sendNotice(msgRoom,target,msgBg,botTextColor,msgWg); cb.setTimeout(announceLoversList, (loversListTimer * 60000)); } /* * Sends the next notifier to the room */ function announceNotifier() { var msg = notifiers[nextNotifier - 1]; nextNotifier = (nextNotifier == lastNotifier) ? 1 : nextNotifier + 1; cb.sendNotice(msg,'','',notifierColor,'bold'); cb.setTimeout(announceNotifier, (notifierTimer * 60000)); } /* * Sends the tip menu to the room */ function announceTipMenu() { var name = cb.room_slug; name = name.charAt(0).toUpperCase() + name.slice(1); var msg = WSTAR + name + '\'s Menu' + WSTAR + ' '; for (i=0; i<menuItems.length; i++) { if (menuItems[i].tokens > 0 && !menuItems[i].hide) { if (i >= 1) { msg += sepChar; } if (tipMenuStyle == 'Brackets') { msg += menuItems[i].name + '(' + menuItems[i].tokens + ')'; } else { msg += menuItems[i].name + ' ' + menuItems[i].tokens + 'tk'; } if (sepChar != 'Comas') { msg += ' '; } } } cb.sendNotice(msg,'','',tipMenuColor,'bold'); cb.setTimeout(announceTipMenu, (tipMenuTimer * 60000)); } /* * Builds user vars and arrays based on settings */ function loadSettings() { /* if (cb.settings.color_lb) { loversListColor = getColorCode(cb.settings.color_lb); } */ botAnnounce = (cb.settings.greet_bot == 'Yes') ? 1 : 0; loversListTimer = cb.settings.timer_lb; loversHearts = (cb.settings.hearts_lb == 'Yes') ? 1 : 0; loversAnnounce = (cb.settings.announce_lb == 'Yes') ? 1 : 0; useNotifiers = (cb.settings.show_ad == 'Yes') ? 1 : 0; // Load notifiers lastNotifier = getMaxNotifiers(); if (useNotifiers && lastNotifier > 0) { for (i=0; i<lastNotifier; i++) { notifiers.push(cb.settings['text_ad'+(i+1)]); } } if (cb.settings.color_ad) { notifierColor = getColorCode(cb.settings.color_ad); } notifierTimer = cb.settings.timer_ad; // TipMenu settings useTipMenu = (cb.settings.show_tm == 'Yes') ? 1 : 0; if (useTipMenu) { // Save values to menuItems Array for (i=0; i<menuItems.length; i++) { if (!menuItems[i].hide) { menuItems[i].tokens = parseInt(cb.settings['price_' + menuItems[i].field]); //cb.sendNotice('Save price '+(i+1)+' with value '+ cb.settings['price'+ (i+1)],'','#800080',"#FFFFFF",'normal'); } } tipMenuStyle = cb.settings.style; // set separator char if (cb.settings.sepchar == 'Hearts') { sepChar = HEART + ' '; } else if (cb.settings.sepchar == 'Comas') { sepChar = ", "; } tipMenuTimer = cb.settings.timer_tm; if (cb.settings.color_tm) { tipMenuColor = getColorCode(cb.settings.color_tm); } } } /* * Setting up the bot at start */ function init() { // Load Tip Menu Items into Settings for (i=0; i<menuItems.length; i++) { if (!menuItems[i].hide) { cb.settings_choices.push({ name: 'price_' + menuItems[i].field, type:'int', minValue: 1, maxValue: 999, defaultValue: menuItems[i].tokens, label: 'Price for ' + menuItems[i].name + ':' }); } } //Load values in settings to global variables loadSettings(); // Start TipMenu if (useTipMenu) cb.setTimeout(announceTipMenu, (10000)); // Start notifier if (useNotifiers) { if (lastNotifier > 0) cb.setTimeout(announceNotifier, (notifierTimer * 40000)); } // Start Lovers list cb.setTimeout(announceLoversList, (loversListTimer * 70000)); // Bot loaded message cb.sendNotice(theHeader,'',botTextColor,"#FFFFFF",'bolder'); cb.sendNotice(loadText,'',botBgColor,botTextColor,'bold'); // Warning for other models if (modelName != 'preciosax') { // Workaround for CB bug: this delay prevents message from being broken by command text in the room setTimeout(function(){ cb.sendNotice(modelWarning,modelName,'',botWarnColor,'bold'); }, 500); } } init();
© Copyright Chaturbate 2011- 2025. All Rights Reserved.