Bots Home
|
Create an App
Aubribot
Author:
bigboyblue1
Description
Source Code
Launch Bot
Current Users
Created by:
Bigboyblue1
// Team Aubri bot // Pilfered from Finley Blake's WolfPack Bot // Modified for Aubrilee by bigboyblue1 // CB app settings cb.settings_choices = [ { name: 'doColoring', type: 'choice', label: 'Change text and background coloring for Team Aubri & Team Aubri Leader (choose colours below)?', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes' }, { name: 'doText', type: 'choice', label: 'Add text labels in front of Team Aubri & Team Aubri Leader messages (choose text below)?', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes' }, { name: 'aaText', label: 'Text to put in front of Team Aubri members messages (e.g. Team Aubri), the text will be put inside square brackets [ ]', type: 'str', minLength: 0, maxLength: 15, required: false, defaultValue: 'Team Aubri' }, { name: 'aaIcon', label: 'Icon to put in front of Team Aubri members messages', type: 'str', minLength: 0, maxLength: 15, required: false, defaultValue: '' }, { name: 'aaMinTip', label: 'Minimum tip to become Team Aubri member', type: 'int', minValue: 1, defaultValue: 995 }, { name: 'aaAnnounce', label: 'Text to show when someone tips to become a Team Aubri 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 Team Aubri <3 <3' }, { name: 'aaRainText', label: 'Text to use for Team Aubri rain lines', type: 'str', minLength: 0, maxLength: 80, required: false, defaultValue: '===== !!! ===== 995 !!! Team Aubri !!! 995 ===== !!! =====' }, { name: 'aaRainCount', label: 'Number of lines of Team Aubri rain', type: 'int', minValue: 1, maxValue: 15, defaultValue: 10 }, { name: 'aaTextColor', label: 'Team Aubri members text color - HTML colour code without starting \'#\' e.g. (FFFFFF is white)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: '000000' }, { name: 'aaBGColor', label: 'Team Aubri members background color - HTML colour code without starting \'#\' e.g. (000000 is black)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: 'f294ec' }, { name: 'aaMemberList', label: 'List of current Team Aubrimembers, separated by commas (and they need to be the CB username exactly)', type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue: 'bigboyblue1' }, { name: 'abText', label: 'Text to put in front of Queen Aubri messages (e.g. QU), the text will be put inside square brackets [ ]', type: 'str', minLength: 0, maxLength: 15, required: false, defaultValue: 'The Aubri' }, { name: 'abIcon', label: 'Icon to put in front of Queen Aubri members messages', type: 'str', minLength: 0, maxLength: 15, required: false, defaultValue: '' }, { name: 'abTextColor', 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: 'abBGColor', label: 'Queen Unicorns background color - HTML colour code without starting \'#\' e.g. (000000 is black)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: 'd886d6' }, { name: 'abMemberList', label: 'List of current Queen Aubri users, separated by commas (and they need to be the CB username exactly)', type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue: 'aubrilee' }, { name: 'acText', label: 'Text to put in front of Team Aubri Leader messages (e.g. GU), the text will be put inside square brackets []', type: 'str', minLength: 0, maxLength: 15, required: false, defaultValue: 'Team Aubri Leader' }, { name: 'acIcon', label: 'Icon to put in front of Team Aubri Leader members messages', type: 'str', minLength: 0, maxLength: 15, required: false, defaultValue: 'love' }, { name: 'acMinTip', label: 'Minimum tip to become Team Aubri Leader', type: 'int', minValue: 1, defaultValue: 9995 }, { name: 'acAnnounce', label: 'Text to show when someone tips to become a Team Aubri Leader , 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 became a Team Aubri Leader <3 <3' }, { name: 'acRainText', label: 'Text to use for Team Aubri Leader rain lines', type: 'str', minLength: 0, maxLength: 80, required: false, defaultValue: '===== !!! ===== 9,995 !!! Team Aubri Leader !!! 9,995 ===== !!! =====' }, { name: 'acRainCount', label: 'Number of lines of Team Aubri Leader rain', type: 'int', minValue: 1, maxValue: 15, defaultValue: 10 }, { name: 'acTextColor', label: 'Team Aubri Leader text color - HTML colour code without starting \'#\' e.g. (FFFFFF is white)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: '000000' }, { name: 'acBGColor', label: 'Team Aubri Leader background color - HTML colour code without starting \'#\' e.g. (000000 is black)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: 'e075d9' }, { name: 'acMemberList', label: 'List of current Team Aubri Leader users, separated by commas (and they need to be the CB username exactly)', type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue: 'username' }, { name: 'room1AD', label: 'First Room Advertisement here', type: 'str', minLength: 1, maxLength: 2000, required: false, defaultValue: ':followtip99' }, { name: 'room1ADMin', label: 'Number of Minutes for First Room Ad', type: 'int', minValue: 1, maxValue: 40, defaultValue: 5 }, { name: 'room2AD', label: 'Second Room Advertisement here', type: 'str', minLength: 1, maxLength: 2000, required: false, defaultValue: ':tweetaaubri' }, { name: 'room2ADMin', label: 'Number of Minutes for Second Room Ad', type: 'int', minValue: 1, maxValue: 40, defaultValue: 4 }, { name: 'room3AD', label: 'Third Room Advertisement here', type: 'str', minLength: 1, maxLength: 2000, required: false, defaultValue: ':aubrigiftcard' }, { name: 'room3ADMin', label: 'Number of Minutes for Third Room Ad', type: 'int', minValue: 1, maxValue: 40, defaultValue: 6 } ]; var aaMembers = {}; var abMembers = {}; var acMembers = {}; // var CONFIG_AD_MINUTES = 8; // var CONFIG_ADS_MINUTES = 5; // 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 ( isAC(u) ) { msg['background'] = '#' + cb.settings.acBGColor; msg['c'] = '#' + cb.settings.acTextColor; msg['m'] = '[' + cb.settings.acText + "] " + msg['m']; } else if ( isAB(u) ) { msg['background'] = '#' + cb.settings.abBGColor; msg['c'] = '#' + cb.settings.abTextColor; msg['m'] = '[' + cb.settings.abText + "] " + msg['m']; } else if ( isAA(u) ) { msg['background'] = '#' + cb.settings.aaBGColor; msg['c'] = '#' + cb.settings.aaTextColor; msg['m'] = '[' + cb.settings.aaText + "] " + 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.aaMinTip) { // Make Unicornland and announce it var announcement = cb.settings.aaAnnounce.replace("MEMBERNAME", tip['from_user']); makeAA(tip['from_user']); for (var i = 0; i < cb.settings.aaRainCount; i++) { cb.sendNotice(cb.settings.aaRainText); } cb.sendNotice(announcement); } else if (amountTipped == cb.settings.acMinTip) { // Make Unicornland and announce it var announcement = cb.settings.acAnnounce.replace("MEMBERNAME", tip['from_user']); makeAC(tip['from_user']); for (var i = 0; i < cb.settings.acRainCount; i++) { cb.sendNotice(cb.settings.acRainText); } cb.sendNotice(announcement); } }); function ad1() { cb.sendNotice(cb.settings.room1AD); cb.setTimeout(follow, (cb.settings.room1ADMin * 60000)); } function ad2() { cb.sendNotice(cb.settings.room2AD); cb.setTimeout(follow, (cb.settings.room2ADMin * 60000)); } function ad3() { cb.sendNotice(cb.settings.room3AD); cb.setTimeout(follow, (cb.settings.room3ADMin * 60000)); } function init() { cb.sendNotice(cb.settings.room1AD); cb.setTimeout(ad1, (cb.settings.room1ADMin * 60000)); cb.sendNotice(cb.settings.room2AD); cb.setTimeout(ad1, (cb.settings.room2ADMin * 60000)); cb.sendNotice(cb.settings.room3AD); cb.setTimeout(ad1, (cb.settings.room3ADMin * 60000)); } init(); function isAA(username) { return (username in aaMembers); } function isAB(username) { return (username in abMembers); } function isAC(username) { return (username in acMembers); } function makeAA(username) { aaMembers[username] = {'u': 1}; } function makeAB(username) { abMembers[username] = {'u': 1}; } function makeAC(username) { acMembers[username] = {'u': 1}; } function grabSettings() { cb.log("starting grabbing settings"); // Get Unicornland members if (cb.settings.aaMemberList) { var aaMemberSettings = cb.settings.aaMemberList.split(','); for (var ii = 0; ii < aaMemberSettings.length; ii++) { var clean = aaMemberSettings[ii].toLowerCase().replace(/ /g,""); aaMembers[clean] = {'u': 1}; } } // Get Queen Unicorns if (cb.settings.abMemberList) { var abMemberSettings = cb.settings.abMemberList.split(','); for (var ii = 0; ii < abMemberSettings.length; ii++) { var clean = abMemberSettings[ii].toLowerCase().replace(/ /g,""); abMembers[clean] = {'u': 1}; } } // Get Golden Unicorns if (cb.settings.acMemberList) { var acMemberSettings = cb.settings.acMemberList.split(','); for (var ii = 0; ii < acMemberSettings.length; ii++) { var clean = acMemberSettings[ii].toLowerCase().replace(/ /g,""); acMembers[clean] = {'u': 1}; } } cb.log("finished grabbing settings"); } grabSettings();
© Copyright Chaturbate 2011- 2026. All Rights Reserved.