Bots Home
|
Create an App
Cindy's student
Author:
hottestcamstars
Description
Source Code
Launch Bot
Current Users
Created by:
Hottestcamstars
// CB app settings cb.settings_choices = [ {name: 'msgonentry', type: 'choice', choice1: 'yes', choice2: 'no', defaultValue: 'yes', label: "Display Message 1 privately on entry - set to no for busy rooms"}, {name:'msg1', type:'str', required: true, label:'Message 1',}, {name:'msg2', type:'str', required: false, label:'Message 2',}, {name:'msg3', type:'str', required: false, label:'Message 3',}, {name:'msg4', type:'str', required: false, label:'Message 4',}, {name:'msg5', type:'str', required: false, label:'Message 5',}, {name:'msg6', type:'str', required: false, label:'Message 6',}, {name:'msg7', type:'str', required: false, label:'Message 7',}, {name:'msg8', type:'str', required: false, label:'Message 8',}, {name:'msg9', type:'str', required: false, label:'Message 9',}, {name:'msg10', type:'str', required: false, label:'Message 10',}, {name:'msgcolor', type:'str', label:'Notice color (html code default dark red #0096C3)', defaultValue: '#0096C3'}, {name: 'chat_ad', type:'int', minValue: 1, maxValue: 999, defaultValue: 2, label: 'Delay in minutes between notices being displayed (minimum 1)'}, //notifier end {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'}, //Bad Students {name: 'badText', label: 'Text to put in front of Bad Students messages (e.g. Bad Student), the text will be put inside square brackets []', type: 'str', minLength: 0, maxLength: 100, required: false, defaultValue: 'Bad-Student'}, {name: 'badTextColor', label: 'Bad Students text color - HTML colour code without starting \'#\' e.g. (000000 is black)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: '000000'}, {name: 'badBGColor', label: 'Bad Students background color - HTML colour code without starting \'#\' e.g. (7FFF00 is chartreuse)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: 'ffffff'}, {name: 'badMemberList', label: 'List of current Bad Students, separated by commas (and they need to be the CB username exactly)', type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue:'' }, //Students in detention {name: 'dtnText', label: 'Text to put in front of Student in detention messages (e.g. Student in Detention), the text will be put inside square brackets []', type: 'str', minLength: 0, maxLength: 100, required: false, defaultValue: 'Student-in-detention'}, {name: 'dtnTextColor', label: 'Student in detention text color - HTML colour code without starting \'#\' e.g. (000000 is black)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: '000000'}, {name: 'dtnBGColor', label: 'Student in detention background color - HTML colour code without starting \'#\' e.g. (7FFF00 is chartreuse)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: 'ffffff'}, {name: 'dtnMemberList', label: 'List of current Student in detention, separated by commas (and they need to be the CB username exactly)', type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue:'' }, //Students clean floors {name: 'scfText', label: 'Text to put in front of Student clean floor messages (e.g. Student Clean Floor), the text will be put inside square brackets []', type: 'str', minLength: 0, maxLength: 100, required: false, defaultValue: 'Student-Clean-Floor'}, {name: 'scfTextColor', label: 'Student clean floor text color - HTML colour code without starting \'#\' e.g. (000000 is black)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: '000000'}, {name: 'scfBGColor', label: 'Student clean floor background color - HTML colour code without starting \'#\' e.g. (7FFF00 is chartreuse)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: 'ffffff'}, {name: 'scfMemberList', label: 'List of current Student clean floor, separated by commas (and they need to be the CB username exactly)', type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue:'' }, //Students in corner {name: 'sicText', label: 'Text to put in front of Student in corner messages (e.g. Student in Corner), the text will be put inside square brackets []', type: 'str', minLength: 0, maxLength: 100, required: false, defaultValue: 'Studen-in-corner'}, {name: 'sicTextColor', label: 'Student in corner text color - HTML colour code without starting \'#\' e.g. (000000 is black)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: '000000'}, {name: 'sicBGColor', label: 'Student in corner background color - HTML colour code without starting \'#\' e.g. (7FFF00 is chartreuse)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: 'ffffff'}, {name: 'sicMemberList', label: 'List of current Student in corner, separated by commas (and they need to be the CB username exactly)', type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue:'' }, //worse students {name: 'wrsbText', label: 'Text to put in front of Worse Boy messages (e.g. Worse Boy), the text will be put inside square brackets []', type: 'str', minLength: 0, maxLength: 100, required: false, defaultValue: 'Worse-Boy'}, {name: 'wrsbTextColor', label: 'Worse Boy text color - HTML colour code without starting \'#\' e.g. (000000 is black)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: '000000'}, {name: 'wrsbBGColor', label: 'Worse Boy background color - HTML colour code without starting \'#\' e.g. (7FFF00 is chartreuse)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: 'ffffff'}, {name: 'wrsbMemberList', label: 'List of current Worse Boy, separated by commas (and they need to be the CB username exactly)', type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue:'' } ]; // students var i=0; var MAXITEMS=10; var badMembers = {}; var dtnMembers = {}; var scfMembers = {}; var sicMembers = {}; var wrsbMembers = {}; var stNotice = "******************************** To Be a member of Rack-Pack, you have to be a regular, big tippper and awesome. Don't ask to be a rack-packer, earn it. **************************"; // For auto-silencing at least some of token_wh*re_c*nts usernames var twcRegex = /t.?k.?n.?wh.?r.?_c.?nt.?/i; function showstNotice(){ cb.chatNotice(stNotice, '', '#f5f5f5', '#000000', 'bolder'); cb.setTimeout(showstNotice,300000); } cb.onMessage(function (msg) { // vars for ease of use var u = msg['user']; if (isBAD(u)) { msg['background'] = '#' + cb.settings.badBGColor; msg['c'] = '#' + cb.settings.badTextColor; msg['m'] = "[" + cb.settings.badText + "] " + msg['m']; } else if (isDTN(u)) { msg['background'] = '#' + cb.settings.dtnBGColor; msg['c'] = '#' + cb.settings.dtnTextColor; msg['m'] = "[" + cb.settings.dtnText + "] " + msg['m']; } else if (isSCF(u)) { msg['background'] = '#' + cb.settings.scfBGColor; msg['c'] = '#' + cb.settings.scfTextColor; msg['m'] = "[" + cb.settings.scfText + "] " + msg['m']; } else if (isSIC(u)) { msg['background'] = '#' + cb.settings.sicBGColor; msg['c'] = '#' + cb.settings.sicTextColor; msg['m'] = "[" + cb.settings.sicText + "] " + msg['m']; } else if (isWRSB(u)) { msg['background'] = '#' + cb.settings.wrsbBGColor; msg['c'] = '#' + cb.settings.wrsbTextColor; msg['m'] = "[" + cb.settings.wrsbText + "] " + 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.onEnter(function(user) { if (cb.settings['msgonentry'] == 'yes') { cb.sendNotice('Welcome ' + user['user'] + '! ' + cb.settings['msg1'],user['user'],'',cb.settings['msgcolor'],'bold'); } }); function isBAD(username) {return (username in badMembers);} function isDTN(username) {return (username in dtnMembers);} function isSCF(username) {return (username in scfMembers);} function isSIC(username) {return (username in sicMembers);} function isWRSB(username) {return (username in wrsbMembers);} function makeBAD(username){badMembers[username] = {'u': 1};} function makeDTN(username){dtnMembers[username] = {'u': 1};} function makeSCF(username){scfMembers[username] = {'u': 1};} function makeSIC(username){sicMembers[username] = {'u': 1};} function makeWRSB(username){wrsbMembers[username] = {'u': 1};} function grabSettings() {cb.log("starting grabbing settings"); // Bad students if (cb.settings.badMemberList) { var badMemberSettings = cb.settings.badMemberList.split(','); for (var ii = 0; ii < badMemberSettings.length; ii++) { var clean = badMemberSettings[ii].toLowerCase().replace(/ /g, ""); badMembers[clean] = {'u': 1};}} // Students in detention if (cb.settings.dtnMemberList) { var dtnMemberSettings = cb.settings.dtnMemberList.split(','); for (var ii = 0; ii < dtnMemberSettings.length; ii++) { var clean = dtnMemberSettings[ii].toLowerCase().replace(/ /g, ""); dtnMembers[clean] = {'u': 1};}} // Student clean floor if (cb.settings.scfMemberList) { var scfMemberSettings = cb.settings.scfMemberList.split(','); for (var ii = 0; ii < scfMemberSettings.length; ii++) { var clean = scfMemberSettings[ii].toLowerCase().replace(/ /g, ""); scfMembers[clean] = {'u': 1};}} // Student in corner if (cb.settings.sicMemberList) { var sicMemberSettings = cb.settings.sicMemberList.split(','); for (var ii = 0; ii < sicMemberSettings.length; ii++) { var clean = sicMemberSettings[ii].toLowerCase().replace(/ /g, ""); sicMembers[clean] = {'u': 1};}} // Worse Student if (cb.settings.wrsbMemberList) { var wrsbMemberSettings = cb.settings.wrsbMemberList.split(','); for (var ii = 0; ii < wrsbMemberSettings.length; ii++) { var clean = wrsbMemberSettings[ii].toLowerCase().replace(/ /g, ""); wrsbMembers[clean] = {'u': 1};}} cb.log("finished grabbing settings");} grabSettings(); showstNotice() ; cb.onEnter(function(user) { if (cb.settings['msgonentry'] == 'yes') { cb.sendNotice('Welcome ' + user['user'] + '! ' + cb.settings['msg1'],user['user'],'',cb.settings['msgcolor'],'bold'); } }); function chatAd() { var msg; while (cb.settings['msg' + (i + 1)] == 0) { //skip empty messages i++; i %= MAXITEMS; } msg = cb.settings['msg' + (i + 1)]; i++; i %= MAXITEMS; cb.sendNotice(msg,'','',cb.settings['msgcolor'],'bold'); cb.setTimeout(chatAd, (cb.settings.chat_ad * 60000)); } cb.setTimeout(chatAd, (cb.settings.chat_ad * 60000)); function init() { } init();
© Copyright Chaturbate 2011- 2025. All Rights Reserved.