Bots Home
|
Create an App
Ashleyvex - Unicornland
Author:
roydz
Description
Source Code
Launch Bot
Current Users
Created by:
Roydz
// Ashleyvex bot // CB app settings cb.settings_choices = [ { name: 'doColoring', type: 'choice', label: 'Change text and background coloring for Unicorns & Unicornland (choose colours below)?', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes' }, { name: 'doText', type: 'choice', label: 'Add text labels in front of Unicorns & Unicornland messages (choose text below)?', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes' }, { name: 'ulText', label: 'Text to put in front of Unicornland members messages (e.g. Unicornland), the text will be put inside square brackets [ ]', type: 'str', minLength: 0, maxLength: 15, required: false, defaultValue: 'Unicornland' }, { name: 'ulMinTip', label: 'Minimum tip to become Unicornland member', type: 'int', minValue: 1, defaultValue: 999 }, { name: 'ulAnnounce', label: 'Text to show when someone tips to become a Unicornland member, the text MEMBERNAME will be replaced with the username of the new (Note: graphics don\'t work in this text)', type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue: 'MEMBERNAME just joined Unicornland <3 <3' }, { name: 'ulRainText', label: 'Text to use for Unicornland rain lines', type: 'str', minLength: 0, maxLength: 80, required: false, defaultValue: '<3 <3 999 <3 <3 UNICORNLAND <3 <3 999 <3 <3' }, { name: 'ulRainCount', label: 'Number of lines of Unicornland rain', type: 'int', minValue: 1, maxValue: 15, defaultValue: 10 }, { name: 'ulTextColor', label: 'Unicornland members text color - HTML colour code without starting \'#\' e.g. (FFFFFF is white)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: '000000' }, { name: 'ulBGColor', label: 'Unicornland members background color - HTML colour code without starting \'#\' e.g. (000000 is black)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: 'CCCCFF' }, { name: 'ulMemberList', label: 'List of current Unicornland members, separated by commas (and they need to be the CB username exactly)', type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue: 'accelerant69,sinner8,nightcourt,iamthor,grumpy_0,johnnysmithington,jonnobanks100,mickeydt,roadslider,atcfan2020,rudes,bongo,balls,bailey7,kenbeeswanger,luncai88,not_known,xoutek,baby_bear,alexmuc84,kayleithasd,oldguy3519,main900,eli_skye,bigdog01' }, { name: 'avText', label: 'Text to put in front of Queen Unicorns messages (e.g. QU), the text will be put inside square brackets [ ]', type: 'str', minLength: 0, maxLength: 15, required: false, defaultValue: 'Queen Unicorn' }, { name: 'avTextColor', label: 'Queen Unicorns text color - HTML colour code without starting \'#\' e.g. (FFFFFF is white)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: '000000' }, { name: 'avBGColor', label: 'Queen Unicorns background color - HTML colour code without starting \'#\' e.g. (000000 is black)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: 'fbccff' }, { name: 'avMemberList', label: 'List of current Queen Unicorns users, separated by commas (and they need to be the CB username exactly)', type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue: 'ashleyvex' }, { name: 'wgText', label: 'Text to put in front of Golden Unicorns messages (e.g. GU), the text will be put inside square brackets []', type: 'str', minLength: 0, maxLength: 15, required: false, defaultValue: 'Golden Unicorn' }, { name: 'wgTextColor', label: 'Golden Unicorns text color - HTML colour code without starting \'#\' e.g. (FFFFFF is white)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: '000000' }, { name: 'wgBGColor', label: 'Golden Unicorns background color - HTML colour code without starting \'#\' e.g. (000000 is black)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: 'ffefcc' }, { name: 'wgMemberList', label: 'List of current Golden Unicorns users, separated by commas (and they need to be the CB username exactly)', type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue: 'wowguy1165' }, { name: 'afText', label: 'Text to put in front of Ashley Fans messages (e.g. GU), the text will be put inside square brackets []', type: 'str', minLength: 0, maxLength: 15, required: false, defaultValue: 'Unicorn' }, { name: 'afTextColor', label: 'Ashley Fans text color - HTML colour code without starting \'#\' e.g. (FFFFFF is white)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: '000000' }, { name: 'afBGColor', label: 'Ashley Fans background color - HTML colour code without starting \'#\' e.g. (000000 is black)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: 'ffcccc' }, { name: 'afMemberList', label: 'List of current Ashley Fans, separated by commas (and they need to be the CB username exactly)', type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue: 'ronnoc19,nightcourt,cohibasmoker76,damosouthern,runehammer91,jamminlv89,xoutek,kev,bipolabear,steelcrumpet,xian781,frostydukes,misspurr,socoj,mnmlzm,strawscock4u,jjammster,dutybeauty,mave,currybox,makrain,bigdog01,kayleitha,christopher57' }, { name: 'bothTextColor', label: 'Unicorns & Unicornland text color - HTML colour code without starting \'#\' e.g. (FFFFFF is white)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: '041C05' }, { name: 'bothBGColor', label: 'Unicorns & Unicornland background color - HTML colour code without starting \'#\' e.g. (000000 is black)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: '36BA38' } ]; var ulMembers = {}; var avMembers = {}; var wgMembers = {}; var afMembers = {}; // For auto-silencing at least some of token_wh*re_c*nts usernames var twcRegex = /t.?k.?n.?wh.?r.?_c.?nt.?/i; cb.onMessage(function (msg) { // vars for ease of use var u = msg['user']; if ( isUL(u) && isAF(u) ) { msg['background'] = '#' + cb.settings.bothBGColor; msg['c'] = '#' + cb.settings.bothTextColor; msg['m'] = "[" +cb.settings.ulText+" / "+ cb.settings.afText + "] " + msg['m']; } else if ( isUL(u) ) { msg['background'] = '#' + cb.settings.ulBGColor; msg['c'] = '#' + cb.settings.ulTextColor; msg['m'] = "[" + cb.settings.ulText + "] " + msg['m']; } else if ( isAV(u) ) { msg['background'] = '#' + cb.settings.avBGColor; msg['c'] = '#' + cb.settings.avTextColor; msg['m'] = "[" + cb.settings.avText + "] " + msg['m']; } else if ( isWG(u) ) { msg['background'] = '#' + cb.settings.wgBGColor; msg['c'] = '#' + cb.settings.wgTextColor; msg['m'] = "[" + cb.settings.wgText + "] " + msg['m']; } else if ( isAF(u) ) { msg['background'] = '#' + cb.settings.afBGColor; msg['c'] = '#' + cb.settings.afTextColor; msg['m'] = "[" + cb.settings.afText + "] " + msg['m']; } if (twcRegex.test(u)){ // Auto-silencing at least some of token_wh*re_c*nts usernames msg['X-Spam'] = true; } return msg; }); cb.onTip(function (tip) { var amountTipped = parseInt(tip['amount']); if (amountTipped == cb.settings.ulMinTip) { // Make Unicornland and announce it var announcement = cb.settings.ulAnnounce.replace("MEMBERNAME", tip['from_user']); makeUL(tip['from_user']); for (var i = 0; i < cb.settings.ulRainCount; i++) { cb.chatNotice(cb.settings.ulRainText); } cb.chatNotice(announcement); } }); function isUL(username) { return (username in ulMembers); } function isAV(username) { return (username in avMembers); } function isWG(username) { return (username in wgMembers); } function isAF(username) { return (username in afMembers); } function makeUL(username) { ulMembers[username] = {'u': 1}; } function makeAV(username) { avMembers[username] = {'u': 1}; } function makeWG(username) { wgMembers[username] = {'u': 1}; } function makeAF(username) { afMembers[username] = {'u': 1}; } function grabSettings() { cb.log("starting grabbing settings"); // Get Unicornland members if (cb.settings.ulMemberList) { var ulMemberSettings = cb.settings.ulMemberList.split(','); for (var ii = 0; ii < ulMemberSettings.length; ii++) { var clean = ulMemberSettings[ii].toLowerCase().replace(/ /g,""); ulMembers[clean] = {'u': 1}; } } // Get Queen Unicorns if (cb.settings.avMemberList) { var avMemberSettings = cb.settings.avMemberList.split(','); for (var ii = 0; ii < avMemberSettings.length; ii++) { var clean = avMemberSettings[ii].toLowerCase().replace(/ /g,""); avMembers[clean] = {'u': 1}; } } // Get Golden Unicorns if (cb.settings.wgMemberList) { var wgMemberSettings = cb.settings.wgMemberList.split(','); for (var ii = 0; ii < wgMemberSettings.length; ii++) { var clean = wgMemberSettings[ii].toLowerCase().replace(/ /g,""); wgMembers[clean] = {'u': 1}; } } // Get Ashley Fans if (cb.settings.afMemberList) { var afMemberSettings = cb.settings.afMemberList.split(','); for (var ii = 0; ii < afMemberSettings.length; ii++) { var clean = afMemberSettings[ii].toLowerCase().replace(/ /g,""); afMembers[clean] = {'u': 1}; } } cb.log("finished grabbing settings"); } grabSettings();
© Copyright Chaturbate 2011- 2026. All Rights Reserved.