Bots Home
|
Create an App
KRISTINA_VIDS CLUBS
Author:
kristina_vid
Description
Source Code
Launch Bot
Current Users
Created by:
Kristina_Vid
// KRISTINA CLUBS // CB app settings cb.settings_choices = [ {name: 'doColoring', type: 'choice', label: 'Change text and background coloring for members (choose colors below)?', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes'}, {name: 'doText', type: 'choice', label: 'Add text labels in front of members messages (choose text below)?', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes'}, {name: 'f1Text', label: 'Text to put in front of Golden Club members messages (e.g. smoke), the text will be put inside square brackets []', type: 'str', minLength: 0, maxLength: 20, required: false, defaultValue: 'Golden Club'}, {name: 'f1TextColor', label: 'Golden Club members text color - HTML colour code without starting \'#\' e.g. (000000 is black)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: '000000'}, {name: 'f1BGColor', label: 'Golden Club members background color - HTML colour code without starting \'#\' e.g. (7FFF00 is chartreuse)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: 'FFCAFD'}, {name: 'f1MinTip', label: 'Minimum tip to become Golden Club member', type: 'int', minValue: 1, defaultValue: 455}, {name: 'f1Announce', label: 'Text to show when someone tips to become a Golden Club 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 Golden Club!'}, {name: 'f1MemberList', label: 'List of current Golden Club members, separated by commas (and they need to be the CB username exactly)', type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue: 'tigersforever,gazmadave62,racer197,martyridgeman,mrcochise,gerrrgizz,nobby985,grimfandango99,haggard81,rangle44,burning1123,justin76509,josh30x,toniessen,bld88,jwpjxp05,timdecully,jp40,clitlover25,chiefofthe11,merton09,thesailingdutchman,idontknowu2,flotatou,pyrricvictory,butters256,willempee,besochy,mucke89'}, {name: 'f1RainText', label: 'Text to use for Ass club rain lines', type: 'str', minLength: 0, maxLength: 80, required: false, defaultValue: 'Golden Club Golden Club Golden Club HELL YEAH'}, {name: 'f1RainCount', label: 'Number of lines of Golden Club rain', type: 'int', minValue: 1, maxValue: 15, defaultValue: 15}, {name: 'f2Text', label: 'Text to put in front of Elite Club messages (e.g. hr)', type: 'str', minLength: 0, maxLength: 15, required: false, defaultValue: 'Elite Club'}, {name: 'f2TextColor', label: 'Elite Club text color - HTML colour code without starting \'#\' e.g. (000000 is black)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: '000000'}, {name: 'f2BGColor', label: 'Elite Club background color - HTML colour code without starting \'#\' e.g. (01DFD7 is light blue)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: 'FF92FA'}, {name: 'f2MinTip', label: 'Minimum tip to become Elite Club', type: 'int', minValue: 1, defaultValue: 999}, {name: 'f2Announce', label: 'Text to show when someone tips to become a Elite Club, 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 Joined the Elite Club!'}, {name: 'f2MemberList', label: 'List of current Elite Club, separated by commas (and they need to be the CB username exactly)', type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue: 'tigersforever,tigersforever,pyrricvictory,willempee'}, {name: 'f2RainText', label: 'Text to use for Elite Club rain lines', type: 'str', minLength: 0, maxLength: 80, required: false, defaultValue: 'Elite Club Elite Club Elite Club Elite Club!'}, {name: 'f2RainCount', label: 'Number of lines of Elite Club rain', type: 'int', minValue: 1, maxValue: 15, defaultValue: 15} ]; var f1Members = {}; var f2Members = {}; var ffNotice = "Tip 77 to join Golden Club! Every member of club gets to be highlighted in Chat! => Follow me on Twitter kristina_i93"; // For auto-silencing at least some of token_wh*re_c*nts usernames var twcRegex = /t.?k.?n.?wh.?r.?_c.?nt.?/i; function showFFNotice(){ cb.chatNotice(ffNotice); cb.setTimeout(showFFNotice,900000); } cb.onMessage(function (msg) { // vars for ease of use var u = msg['user']; if (isF2(u)) { msg['background'] = '#' + cb.settings.f2BGColor; msg['c'] = '#' + cb.settings.f2TextColor; msg['m'] = "[" + cb.settings.f2Text + "] " + msg['m']; } else if (isF1(u)) { msg['background'] = '#' + cb.settings.f1BGColor; msg['c'] = '#' + cb.settings.f1TextColor; msg['m'] = "[" + cb.settings.f1Text + "] " + 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.f2MinTip && !isF2(tip['from_user'])) { // Make Elite Club and announce it var announcement = cb.settings.f2Announce.replace("MEMBERNAME", tip['from_user']); makeF2(tip['from_user']); for (var i = 0; i < cb.settings.f2RainCount; i++) { cb.chatNotice(cb.settings.f2RainText); } cb.chatNotice(announcement); } else if (amountTipped >= cb.settings.f1MinTip && !isF1(tip['from_user'])) { // Make Golden Club and announce it var announcement = cb.settings.f1Announce.replace("MEMBERNAME", tip['from_user']); makeF1(tip['from_user']); for (var i = 0; i < cb.settings.f1RainCount; i++) { cb.chatNotice(cb.settings.f1RainText); } cb.chatNotice(announcement); } }); function isF2(username) { return (username in f2Members); } function isF1(username) { return (username in f1Members); } function makeF2(username) { f2Members[username] = {'u': 1}; } function makeF1(username) { f1Members[username] = {'u': 1}; } function grabSettings() { cb.log("starting grabbing settings"); // Get Golden Club members if (cb.settings.f1MemberList) { var f1MemberSettings = cb.settings.f1MemberList.split(','); for (var ii = 0; ii < f1MemberSettings.length; ii++) { var clean = f1MemberSettings[ii].toLowerCase().replace(/ /g, ""); f1Members[clean] = {'u': 1}; } } // Get Elite Club if (cb.settings.F2MemberList) { var f2MemberSettings = cb.settings.f2MemberList.split(','); for (var ii = 0; ii < f2MemberSettings.length; ii++) { var clean = f2MemberSettings[ii].toLowerCase().replace(/ /g, ""); f2Members[clean] = {'u': 1}; } } cb.log("finished grabbing settings"); } grabSettings(); showFFNotice();
© Copyright Chaturbate 2011- 2026. All Rights Reserved.