Bots Home
|
Create an App
Ciarastarz321 Bot
Author:
dole2000
Description
Source Code
Launch Bot
Current Users
Created by:
Dole2000
// ClairesBears bot // CB app settings cb.settings_choices = [ { name: 'doColoring', type: 'choice', label: 'Change text and background coloring for Ciarastarz SideKicks(choose colours below)?', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes' }, { name: 'doText', type: 'choice', label: 'Add text labels in front of Ciarastarz SideKicks (choose text below)?', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes' }, { name: 'ulText', label: 'Text to put in front of Ciarastarz SideKicks members messages (e.g. Ciarastarz SideKicks), the text will be put inside square brackets [ ]', type: 'str', minLength: 0, maxLength: 25, required: false, defaultValue: 'Ciarastarz SideKicks' }, { name: 'ulMinTip', label: 'Minimum tip to become Ciarastarz SideKicks member', type: 'int', minValue: 1, defaultValue: 888 }, { name: 'ulAnnounce', label: 'Text to show when someone tips to become a Ciarastarz SideKick 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 Ciarastarz SideKicks!!~~' }, { name: 'ulRainText', label: 'Text to use for Ciarastarz SideKicks rain lines', type: 'str', minLength: 0, maxLength: 80, required: false, defaultValue: '!!~~ 888 ~~!!Ciarastarz SideKicks!!~~ 888 ~~!!' }, { name: 'ulRainCount', label: 'Number of lines of Ciarastarz SideKicks rain', type: 'int', minValue: 1, maxValue: 15, defaultValue: 10 }, { name: 'ulTextColor', label: 'Ciarastarz SideKicks members text color - HTML colour code without starting \'#\' e.g. (FFFFFF is white)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: '2ECCFA' }, { name: 'ulBGColor', label: 'Ciarastarz SideKicks members background color - HTML colour code without starting \'#\' e.g. (000000 is black)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: '2ECCFA' }, { name: 'ulMemberList', label: 'List of current Ciarastarz SideKicks members, separated by commas (and they need to be the CB username exactly)', type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue: 'Dole2000' }, { name: 'avText', label: 'Text to put in front of Ciarastarz SideKicks messages (e.g. QU), the text will be put inside square brackets [ ]', type: 'str', minLength: 0, maxLength: 30, required: false, defaultValue: 'Ciarastarz SideKicksKING' }, { name: 'avBGColor', label: 'Ciarastarz SideKicks 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 Ciarastarz SideKicks users, separated by commas (and they need to be the CB username exactly)', type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue: 'claireity' }, { name: 'wgText', label: 'Text to put in front of king Ciarastarz SideKicks messages (e.g. GU), the text will be put inside square brackets []', type: 'str', minLength: 0, maxLength: 15, required: false, defaultValue: 'King Ciarastarz SideKick' }, { name: 'wgTextColor', label: 'king Ciarastarz SideKick 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: 'king Ciarastarz SideKicks 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 king Ciarastarz SideKicks users, separated by commas (and they need to be the CB username exactly)', type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue: 'none' }, ]; 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 clairebears 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 clairebears 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 clairebears 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 king tipper of clairesbears 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 clairebear 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- 2024. All Rights Reserved.