Bots Home
|
Create an App
bunnybot2
Author:
mylittlebunny1
Description
Source Code
Launch Bot
Current Users
Created by:
Mylittlebunny1
cb.settings_choices = [ {name: 'mmText', label: 'Text to put in front of Lovers messages (e.g. JA), the text will be put inside square brackets []', type: 'str', minLength: 0, maxLength: 30, required: false, defaultValue: ':tytLover'}, {name: 'mmTextColor', label: 'Lovers text color - HTML colour code without starting \'#\' e.g. (FFFFFF is white)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: '000000'}, {name: 'mmBGColor', label: 'Lovers background color - HTML colour code without starting \'#\' e.g. (000000 is black)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: 'ffb4fd'}, {name: 'mmMinTip', label: 'Minimum tip to become Lover', type: 'int', minValue: 1, defaultValue: 143}, {name: 'mmAnnounce', label: 'Text to show when someone tips to become a Lover, 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 Lover'}, {name: 'mmMemberList', label: 'List of current Lovers, separated by commas (and they need to be the CB username exactly)', type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue: ''}, {name: 'mmRainText', label: 'Text to use for Lovers lines', type: 'str', minLength: 0, maxLength: 80, required: false, defaultValue: 'Lover'}, {name: 'mmRainCount', label: 'Number of lines of Lovers rain', type: 'int', minValue: 1, maxValue: 15, defaultValue: 5}, {name: 'mgText', label: 'Text to put in front of Bunny messages (e.g. JF)', type: 'str', minLength: 0, maxLength: 30, required: false, defaultValue: ':tytBunny'}, {name: 'mgTextColor', label: 'Bunny text color - HTML colour code without starting \'#\' e.g. (000000 is black)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: '000000'}, {name: 'mgBGColor', label: 'Bunny background color - HTML colour code without starting \'#\' e.g. (F5B608 is orangey/gold)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: 'd1f3f9'}, {name: 'mgMinTip', label: 'Minimum tip to become Bunny', type: 'int', minValue: 1, defaultValue: 222}, {name: 'mgAnnounce', label: 'Text to show when someone tips to become a Bunny, the text MEMBERNAME will be replaced with the username of the new member (Note: graphics don\'t work in this text)', type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue: 'MEMBERNAME just became a Bunny'}, {name: 'mgMemberList', label: 'List of current Bunny, separated by commas (and they need to be the CB username exactly)', type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue: ''}, {name: 'mgRainText', label: 'Text to use for Bunny rain lines', type: 'str', minLength: 0, maxLength: 80, required: false, defaultValue: 'Bunny'}, {name: 'mgRainCount', label: 'Number of lines of Bunny rain', type: 'int', minValue: 1, maxValue: 15, defaultValue: 'ohio60,sm3ark,bigonecc,tinkusjaworld2,bunnyjack,saeedforyou,hyt222,manhattand,jay_702,derock1,funguyon4wheels,kay777,tedoh,irijr,asfsurrey'}, {name: 'bText', label: 'Text to put in front of Super Bunny messages (e.g. JBF)', type: 'str', minLength: 0, maxLength: 30, required: false, defaultValue: ':sbhero'}, {name: 'bTextColor', label: 'Super Bunny text color - HTML colour code without starting \'#\' e.g. (FFFFFF is white)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: '000000'}, {name: 'bBGColor', label: 'Super Bunny background color - HTML colour code without starting \'#\' e.g. (2F1BE0 is blue)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: 'f7d69e'}, {name: 'bMinTip', label: 'Minimum tip to become Super Bunny', type: 'int', minValue: 1, defaultValue: 1111}, {name: 'bAnnounce', label: 'Text to show when someone tips to become a Super Bunny, the text MEMBERNAME will be replaced with the username of the new member (Note: graphics don\'t work in this text)', type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue: 'MEMBERNAME just became a Super Bunny'}, {name: 'bMemberList', label: 'List of current Super Bunnys, separated by commas (and they need to be the CB username exactly)', type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue: 'saeed4you,bigonecc,libens,bunny_loving,tokensmachine,almightytoken,manhattand'}, {name: 'bRainText', label: 'Text to use for Super Bunny rain lines', type: 'str', minLength: 0, maxLength: 80, required: false, defaultValue: 'Super Bunny'}, {name: 'bRainCount', label: 'Number of lines of Super Bunny rain', type: 'int', minValue: 1, maxValue: 15, defaultValue: 11}, {name: 'dText', label: 'Text to put in front of Bunnyholic messages (e.g. JHB)', type: 'str', minLength: 0, maxLength: 30, required: false, defaultValue: 'Bunnyholic'}, {name: 'dTextColor', label: 'Bunnyholic text color - HTML colour code without starting \'#\' e.g. (FFFFFF is white)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: '000000'}, {name: 'dBGColor', label: 'Bunnyholic background color - HTML colour code without starting \'#\' e.g. (A62121 is deep red)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: 'b1f9c4'}, {name: 'dMinTip', label: 'Minimum tip to become Bunnyholic', type: 'int', minValue: 1, defaultValue: 2222}, {name: 'dAnnounce', label: 'Text to show when someone tips to become a Bunnyholic, the text MEMBERNAME will be replaced with the username of the new member (Note: graphics don\'t work in this text)', type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue: 'MEMBERNAME just became a Bunnyholic'}, {name: 'dMemberList', label: 'List of current Bunnyholics, separated by commas (and they need to be the CB username exactly)', type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue: ''}, {name: 'dRainText', label: 'Text to use for Bunnyholic rain lines', type: 'str', minLength: 0, maxLength: 80, required: false, defaultValue: 'Bunnyholic'}, {name: 'dRainCount', label: 'Number of lines of Bunnyholic rain', type: 'int', minValue: 1, maxValue: 15, defaultValue: 15} ]; var mmMembers = {}; var mgMembers = {}; var bMembers = {}; var dMembers = {}; var mmNotice = "Tip " + cb.settings.mmMinTip + " to become a Slave, Tip " + cb.settings.mgMinTip + " to become a Lover.\nTip " + cb.settings.bMinTip + " to become a Bunny! Tip " + cb.settings.dMinTip + " to become a SuperBunny!"; // For auto-silencing at least some of token_wh*re_c*nts usernames var twcRegex = /t.?k.?n.?wh.?r.?_c.?nt.?/i; function showMMNotice() { cb.chatNotice(mmNotice); cb.setTimeout(showMMNotice, 900000); } cb.onMessage(function (msg) { // vars for ease of use var u = msg['user']; // Don't process commands and hide them if (/^\//.test(msg['m'])) { msg['X-Spam'] = true; return msg; } if (isD(u)) { // msg['background'] = '#' + cb.settings.dBGColor; msg['c'] = '#' + cb.settings.dTextColor; msg['m'] = "[" + cb.settings.dText + "] " + msg['m']; } else if (isB(u)) { // msg['background'] = '#' + cb.settings.bBGColor; msg['c'] = '#' + cb.settings.bTextColor; msg['m'] = "[" + cb.settings.bText + "] " + msg['m']; } else if (isMG(u)) { // msg['background'] = '#' + cb.settings.mgBGColor; msg['c'] = '#' + cb.settings.mgTextColor; msg['m'] = "[" + cb.settings.mgText + "] " + msg['m']; } else if (isMM(u)) { // msg['background'] = '#' + cb.settings.mmBGColor; msg['c'] = '#' + cb.settings.mmTextColor; msg['m'] = "[" + cb.settings.mmText + "] " + 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.dMinTip || (amountTipped >= (cb.settings.dMinTip - cb.settings.bMinTip) && isB(tip['from_user'])) || (amountTipped >= (cb.settings.dMinTip - cb.settings.mgMinTip) && isMG(tip['from_user']))) && !isD(tip['from_user'])) { // Make Bunnyholic and announce it var announcement = cb.settings.dAnnounce.replace("MEMBERNAME", tip['from_user']); makeD(tip['from_user']); for (var i = 0; i < cb.settings.dRainCount; i++) { cb.chatNotice(cb.settings.dRainText); } cb.chatNotice(announcement); } else if ((amountTipped >= cb.settings.bMinTip || (amountTipped >= (cb.settings.bMinTip - cb.settings.mgMinTip) && isMG(tip['from_user'])) ) && !isB(tip['from_user']) && !isD(tip['from_user'])) { // Make Super Bunny and announce it var announcement = cb.settings.bAnnounce.replace("MEMBERNAME", tip['from_user']); makeB(tip['from_user']); for (var i = 0; i < cb.settings.bRainCount; i++) { cb.chatNotice(cb.settings.bRainText); } cb.chatNotice(announcement); } else if (amountTipped >= cb.settings.mgMinTip && !isMG(tip['from_user']) && !isB(tip['from_user']) && !isD(tip['from_user'])) { // Make Bunny and announce it var announcement = cb.settings.mgAnnounce.replace("MEMBERNAME", tip['from_user']); makeMG(tip['from_user']); for (var i = 0; i < cb.settings.mgRainCount; i++) { cb.chatNotice(cb.settings.mgRainText); } cb.chatNotice(announcement); } else if (amountTipped >= cb.settings.mmMinTip && !isMM(tip['from_user']) && !isMG(tip['from_user']) && !isB(tip['from_user']) && !isD(tip['from_user'])) { // Make Lover and announce it var announcement = cb.settings.mmAnnounce.replace("MEMBERNAME", tip['from_user']); makeMM(tip['from_user']); for (var i = 0; i < cb.settings.mmRainCount; i++) { cb.chatNotice(cb.settings.mmRainText); } cb.chatNotice(announcement); } }); function isD(username) { return (username in dMembers); } function isB(username) { return (username in bMembers); } function isMG(username) { return (username in mgMembers); } function isMM(username) { return (username in mmMembers); } function makeD(username) { dMembers[username] = {'u': 1}; } function makeB(username) { bMembers[username] = {'u': 1}; } function makeMG(username) { mgMembers[username] = {'u': 1}; } function makeMM(username) { mmMembers[username] = {'u': 1}; } function grabSettings() { cb.log("starting grabbing settings"); // Get legend members if (cb.settings.mmMemberList) { var mmMemberSettings = cb.settings.mmMemberList.split(','); for (var ii = 0; ii < mmMemberSettings.length; ii++) { var clean = mmMemberSettings[ii].toLowerCase().replace(/ /g, ""); mmMembers[clean] = {'u': 1}; } } // Get ace if (cb.settings.mgMemberList) { var mgMemberSettings = cb.settings.mgMemberList.split(','); for (var ii = 0; ii < mgMemberSettings.length; ii++) { var clean = mgMemberSettings[ii].toLowerCase().replace(/ /g, ""); mgMembers[clean] = {'u': 1}; } } // Get Super Bunny if (cb.settings.bMemberList) { var bMemberSettings = cb.settings.bMemberList.split(','); for (var ii = 0; ii < bMemberSettings.length; ii++) { var clean = bMemberSettings[ii].toLowerCase().replace(/ /g, ""); bMembers[clean] = {'u': 1}; } } // Get Bunnyholic if (cb.settings.dMemberList) { var dMemberSettings = cb.settings.dMemberList.split(','); for (var ii = 0; ii < dMemberSettings.length; ii++) { var clean = dMemberSettings[ii].toLowerCase().replace(/ /g, ""); dMembers[clean] = {'u': 1}; } } cb.log("finished grabbing settings"); }
© Copyright Chaturbate 2011- 2026. All Rights Reserved.