Bots Home
|
Create an App
Gabrielle Club
Author:
gabired
Description
Source Code
Launch Bot
Current Users
Created by:
Gabired
/** * Gabrielle_Club * * Author: Gabby * Version: 1.2 * */ /* ChaturBate set-up */ cb.settings_choices = [ // The Fiancee { name: 'siMinTip', label: 'Minimum tip to become The Fiancee ', type: 'int', minValue: 1, defaultValue: 999 }, { name: 'siAnnounce', label: 'Text to show when someone tips to become Gabby`s Fiancee , 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 - Welcome to Gabby`s Fiancee List!' }, { name: 'siRainText', label: 'Text to use for rain lines', type: 'str', minLength: 0, maxLength: 80, required: false, defaultValue: 'Gaby`s Fiancee arrived!' }, { name: 'siText', label: 'Text to put in front of Hero members, the text will be put inside square brackets [ ]', type: 'str', minLength: 0, maxLength: 15, required: false, defaultValue: 'DF0101' }, { name: 'siTextColor', label: 'fiancee text color - HTML colour code', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: '424242' }, { name: 'siBGColor', label: 'fiancee background color - HTML colour code', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: 'B8860B' }, { name: 'siMemberList', label: 'List of current fiancee users, separated by commas (and they need to be the CB username exactly)', type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue: 'hopefree' }, // The Lover { name: 'moMinTip', label: 'Minimum tip to become The Lover ', type: 'int', minValue: 1, defaultValue: 2222 }, { name: 'moAnnounce', label: 'Text to show when someone tips to become The 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 - Welcome to The Lovers List!' }, { name: 'moRainText', label: 'Text to use for rain lines', type: 'str', minLength: 0, maxLength: 80, required: false, defaultValue: 'Gaby`s Lover arrived!' }, { name: 'moTextColor', label: 'Lover text color - HTML colour code', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: 'DF0101' }, { name: 'moBGColor', label: 'Lover background color - HTML colour code', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: 'DAA520' }, { name: 'moMemberList', 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: 'noon3,wholuvsya' }, // Husband { name: 'piMinTip', label: 'Minimum tip to become The Husband ', type: 'int', minValue: 1, defaultValue: 3333 }, { name: 'piAnnounce', label: 'Text to show when someone tips to become Husband, 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 - Welcome to Husband List!' }, { name: 'piRainText', label: 'Text to use for rain lines', type: 'str', minLength: 0, maxLength: 80, required: false, defaultValue: 'Gaby`s Husband arrived!' }, { name: 'piText', label: 'Text to put in front of Husband members, the text will be put inside square brackets [ ]', type: 'str', minLength: 0, maxLength: 15, required: false, defaultValue: 'DF0101' }, { name: 'piTextColor', label: 'Husband text color - HTML colour code', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: '424242' }, { name: 'piBGColor', label: 'Husband background color - HTML colour code', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: '98FB98' }, { name: 'piMemberList', label: 'List of current Husband users, separated by commas (and they need to be the CB username exactly)', type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue: 'ar3a5' } ]; var heMembers = {}; var siMembers = {}; var moMembers = {}; var piMembers = {}; var poMembers = {}; var kaMembers = {}; var paMembers = {}; var peMembers = {}; var seMembers = {}; var faMembers = {}; var tip_history = []; var tip_user = []; var tip_time = []; var number_tip = 0; var counter = 0; // For auto-silencing at least some of token_wh*re_c*nts usernames var twcRegex = /t.?k.?n.?wh.?r.?_c.?nt.?/i; // Variables commands var history_command = '!hist'; cb.onMessage(function (msg) { // vars for ease of use var u = msg['user']; if ( isSI(u) && isMO(u) ) { msg['background'] = '#' + cb.settings.bothBGColor; msg['c'] = '#' + cb.settings.bothTextColor; msg['m'] = " :pkhe2 :pkking2 ... " + msg['m']; } else if ( isHE(u) && isMO(u) ) { msg['background'] = '#' + cb.settings.moBGColor; msg['c'] = '#' + cb.settings.moTextColor; msg['m'] = " :pkhb2 :pkking2... " + msg['m']; } else if ( isHE(u) ) { msg['background'] = '#' + cb.settings.heBGColor; msg['c'] = '#' + cb.settings.ulTextColor; msg['m'] = " :pkhb2 ... " + msg['m']; } else if ( isSI(u) ) { msg['background'] = '#' + cb.settings.siBGColor; msg['c'] = '#' + cb.settings.siTextColor; msg['m'] = " :pkhe2 ... " + msg['m']; } else if ( isMO(u) ) { msg['background'] = '#' + cb.settings.moBGColor; msg['c'] = '#' + cb.settings.moTextColor; msg['m'] = " :pkking2 ... " + msg['m']; } else if ( isPE(u) ) { msg['background'] = '#' + cb.settings.peBGColor; msg['c'] = '#' + cb.settings.ulTextColor; msg['m'] = " :pkmember ... " + msg['m']; } else if ( isPI(u) ) { msg['background'] = '#' + cb.settings.piBGColor; msg['c'] = '#' + cb.settings.piTextColor; msg['m'] = " :pkvip1 ... " + msg['m']; } else if ( isPO(u) ) { msg['background'] = '#' + cb.settings.poBGColor; msg['c'] = '#' + cb.settings.poTextColor; msg['m'] = " :pkbg ... " + msg['m']; } else if ( isKA(u) ) { msg['background'] = '#' + cb.settings.kaBGColor; msg['c'] = '#' + cb.settings.kaTextColor; msg['m'] = " :pkmanager ... " + msg['m']; } else if ( isPA(u) ) { msg['background'] = '#' + cb.settings.paBGColor; msg['c'] = '#' + cb.settings.paTextColor; msg['m'] = " :pkpvt ... " + msg['m']; } else if ( isPE(u) ) { msg['background'] = '#' + cb.settings.peBGColor; msg['c'] = '#' + cb.settings.peTextColor; msg['m'] = " :pkmember ... " + msg['m']; } else if ( isSE(u) ) { msg['background'] = '#' + cb.settings.seBGColor; msg['c'] = '#' + cb.settings.seTextColor; msg['m'] = " :pkboss ... " + msg['m']; } else if ( isFA(u) ) { msg['background'] = '#' + cb.settings.faBGColor; msg['c'] = '#' + cb.settings.faTextColor; msg['m'] = " :pkfam2 ... " + msg['m']; } if (twcRegex.test(u)){ // Auto-silencing at least some of token_wh*re_c*nts usernames msg['X-Spam'] = true; } var i = 1; var number = 0; if (msg['m'][0] == '!') { if (msg['user'] == cb.room_slug) { // Tips History if (startsWith(msg['m'], history_command)) { msg['X-Spam'] = true; if (number_tip > 0) { counter = number_tip; if (msg['m'].length > (history_command.length+1)) { var number_wanted = msg['m'].slice(history_command.length+1); if (number_wanted > number_tip) { number_wanted = number_tip; } number = counter - number_wanted; } cb.sendNotice("Number of tips received: " + number_tip,cb.room_slug, '', '', 'bold'); while (counter > number) { cb.sendNotice((i) + ". " + tip_user[counter-1] + " tipped " + tip_history[counter-1] + " tokens " + Math.floor(((new Date()).getTime() - tip_time[counter-1]) / 60000) + " minute(s) ago",cb.room_slug); counter = counter - 1; i = i + 1; } } else { cb.sendNotice("No tip received until now !",cb.room_slug, '', '', 'bold'); } } } } var n=msg.m.indexOf("sex"); var n1=msg.m.indexOf("fuck"); var n2=msg.m.indexOf("lol"); var st=1; if (st>0) { x="Good day"; var n2=msg.m.replace("fuck","fuck").replace(cb.settings.slang1,cb.settings.replace).replace(cb.settings.slang1,cb.settings.replace).replace(cb.settings.slang2,cb.settings.replace2).replace(cb.settings.slang3,cb.settings.replace3).replace(cb.settings.slang4,cb.settings.replace4).replace(cb.settings.slang5,cb.settings.replace5).replace(cb.settings.slang6,cb.settings.replace6).replace(cb.settings.slang7,cb.settings.replace7).replace(cb.settings.slang8,cb.settings.replace8).replace(cb.settings.slang9,cb.settings.replace9).replace(cb.settings.slang10,cb.settings.replace10).replace(cb.settings.slang11,cb.settings.replace11).replace(cb.settings.slang12,cb.settings.replace12).replace(cb.settings.slang13,cb.settings.replace13).replace(cb.settings.slang14,cb.settings.replace14).replace(cb.settings.slang15,cb.settings.replace15).replace(cb.settings.slang16,cb.settings.replace16).replace(cb.settings.slang17,cb.settings.replace17).replace(cb.settings.slang18,cb.settings.replace18).replace(cb.settings.slang19,cb.settings.replace19).replace(cb.settings.slang20,cb.settings.replace20).replace(cb.settings.slang1,cb.settings.replace).replace(cb.settings.slang1,cb.settings.replace).replace(cb.settings.slang1,cb.settings.replace).replace(cb.settings.slang1,cb.settings.replace).replace(cb.settings.slang1,cb.settings.replace).replace(cb.settings.slang1,cb.settings.replace).replace(cb.settings.slang1,cb.settings.replace).replace(cb.settings.slang1,cb.settings.replace).replace(cb.settings.slang1,cb.settings.replace).replace(cb.settings.slang1,cb.settings.replace).replace(cb.settings.slang1,cb.settings.replace).replace(cb.settings.slang1,cb.settings.replace).replace(cb.settings.slang1,cb.settings.replace).replace(cb.settings.slang1,cb.settings.replace).replace(cb.settings.slang1,cb.settings.replace).replace(cb.settings.slang1,cb.settings.replace).replace(cb.settings.slang1,cb.settings.replace).replace(cb.settings.slang1,cb.settings.replace).replace(cb.settings.slang2,cb.settings.replace2).replace(cb.settings.slang1,cb.settings.replace); msg.m = n2; } //cb.chatNotice(msg); return msg; }); cb.onTip(function (tip) { var amountTipped = parseInt(tip['amount']); if ((amountTipped >= cb.settings.heMinTip || (amountTipped >= (cb.settings.siMinTip - cb.settings.peMinTip) && isSI(tip['from_user'])) || (amountTipped >= (cb.settings.moMinTip - cb.settings.heMinTip) && isHE(tip['from_user']))) && !isMO(tip['from_user'])) { // Make The King and announce it var announcement = cb.settings.moAnnounce.replace("MEMBERNAME", tip['from_user']); makeMO(tip['from_user']); for (var i = 0; i < cb.settings.moRainCount; i++) { cb.chatNotice(cb.settings.moRainText); } cb.chatNotice(announcement); } else if ((amountTipped >= cb.settings.siMinTip || (amountTipped >= (cb.settings.siMinTip - cb.settings.heMinTip) && isHE(tip['from_user'])) ) && !isSI(tip['from_user']) && !isMO(tip['from_user'])) { // Make The Hero and announce it var announcement = cb.settings.siAnnounce.replace("MEMBERNAME", tip['from_user']); makeSI(tip['from_user']); for (var i = 0; i < cb.settings.siRainCount; i++) { cb.chatNotice(cb.settings.siRainText); } cb.chatNotice(announcement); } else if (amountTipped >= cb.settings.heMinTip && !isHE(tip['from_user']) && !isSI(tip['from_user']) && !isMO(tip['from_user'])) { // Make cyber hunband and announce it var announcement = cb.settings.heAnnounce.replace("MEMBERNAME", tip['from_user']); makeHE(tip['from_user']); for (var i = 0; i < cb.settings.heRainCount; i++) { cb.chatNotice(cb.settings.heRainText); } cb.chatNotice(announcement); } else if (amountTipped >= cb.settings.piMinTip && !isPI(tip['from_user']) && !isHE(tip['from_user']) && !isSI(tip['from_user']) && !isMO(tip['from_user'])) { // Make VIP and announce it var announcement = cb.settings.piAnnounce.replace("MEMBERNAME", tip['from_user']); makePI(tip['from_user']); for (var i = 0; i < cb.settings.piRainCount; i++) { cb.chatNotice(cb.settings.piRainText); } cb.chatNotice(announcement); } else if (amountTipped >= cb.settings.peMinTip && !isPE(tip['from_user']) && !isHE(tip['from_user']) && !isSI(tip['from_user']) && !isMO(tip['from_user']) && !isPI(tip['from_user'])) { // Make VIP and announce it var announcement = cb.settings.peAnnounce.replace("MEMBERNAME", tip['from_user']); makePE(tip['from_user']); for (var i = 0; i < cb.settings.peRainCount; i++) { cb.chatNotice(cb.settings.peRainText); } cb.chatNotice(announcement); tip_user[number_tip] = tip['from_user']; tip_history[number_tip] = tip['amount']; tip_time[number_tip] = new Date(); number_tip += 1; } if (parseInt(tip['amount']) >= cb.settings.tipamount) { tipper = tip['from_user']; tipmsg=cb.settings.tipmsg; tipmsg = tipmsg.replace("[tipper]", tipper); cb.chatNotice(tipmsg, tipper); } }); function isHE(username) { return (username in heMembers); } function isSI(username) { return (username in siMembers); } function isMO(username) { return (username in moMembers); } function isPI(username) { return (username in piMembers); } function isPO(username) { return (username in poMembers); } function isKA(username) { return (username in kaMembers); } function isPA(username) { return (username in paMembers); } function isPE(username) { return (username in peMembers); } function isSE(username) { return (username in seMembers); } function isFA(username) { return (username in faMembers); } function makeHE(username) { heMembers[username] = {'u': 1}; } function makeSI(username) { siMembers[username] = {'u': 1}; } function makeMO(username) { moMembers[username] = {'u': 1}; } function makePI(username) { piMembers[username] = {'u': 1}; } function makePO(username) { poMembers[username] = {'u': 1}; } function makeKA(username) { kaMembers[username] = {'u': 1}; } function makePA(username) { paMembers[username] = {'u': 1}; } function makePE(username) { peMembers[username] = {'u': 1}; } function makeSE(username) { seMembers[username] = {'u': 1}; } function makeFA(username) { faMembers[username] = {'u': 1}; } function grabSettings() { cb.log("starting grabbing settings"); // Get husband if (cb.settings.heMemberList) { var heMemberSettings = cb.settings.heMemberList.split(','); for (var ii = 0; ii < heMemberSettings.length; ii++) { var clean = heMemberSettings[ii].toLowerCase().replace(/ /g,""); heMembers[clean] = {'u': 1}; } } // Get The Hero if (cb.settings.siMemberList) { var siMemberSettings = cb.settings.siMemberList.split(','); for (var ii = 0; ii < siMemberSettings.length; ii++) { var clean = siMemberSettings[ii].toLowerCase().replace(/ /g,""); siMembers[clean] = {'u': 1}; } } // Get The king if (cb.settings.moMemberList) { var moMemberSettings = cb.settings.moMemberList.split(','); for (var ii = 0; ii < moMemberSettings.length; ii++) { var clean = moMemberSettings[ii].toLowerCase().replace(/ /g,""); moMembers[clean] = {'u': 1}; } } // Get VIP if (cb.settings.piMemberList) { var piMemberSettings = cb.settings.piMemberList.split(','); for (var ii = 0; ii < piMemberSettings.length; ii++) { var clean = piMemberSettings[ii].toLowerCase().replace(/ /g,""); piMembers[clean] = {'u': 1}; } } // Get Bodyguard if (cb.settings.poMemberList) { var poMemberSettings = cb.settings.poMemberList.split(','); for (var ii = 0; ii < poMemberSettings.length; ii++) { var clean = poMemberSettings[ii].toLowerCase().replace(/ /g,""); poMembers[clean] = {'u': 1}; } } // Get Manager if (cb.settings.kaMemberList) { var kaMemberSettings = cb.settings.kaMemberList.split(','); for (var ii = 0; ii < kaMemberSettings.length; ii++) { var clean = kaMemberSettings[ii].toLowerCase().replace(/ /g,""); kaMembers[clean] = {'u': 1}; } } // Get PVT Lover if (cb.settings.paMemberList) { var paMemberSettings = cb.settings.paMemberList.split(','); for (var ii = 0; ii < paMemberSettings.length; ii++) { var clean = paMemberSettings[ii].toLowerCase().replace(/ /g,""); paMembers[clean] = {'u': 1}; } } // Get Member if (cb.settings.peMemberList) { var peMemberSettings = cb.settings.peMemberList.split(','); for (var ii = 0; ii < peMemberSettings.length; ii++) { var clean = peMemberSettings[ii].toLowerCase().replace(/ /g,""); peMembers[clean] = {'u': 1}; } } // Get Sexy Boss if (cb.settings.seMemberList) { var seMemberSettings = cb.settings.seMemberList.split(','); for (var ii = 0; ii < seMemberSettings.length; ii++) { var clean = seMemberSettings[ii].toLowerCase().replace(/ /g,""); seMembers[clean] = {'u': 1}; } } // Get Family members if (cb.settings.faMemberList) { var faMemberSettings = cb.settings.faMemberList.split(','); for (var ii = 0; ii < faMemberSettings.length; ii++) { var clean = faMemberSettings[ii].toLowerCase().replace(/ /g,""); faMembers[clean] = {'u': 1}; } } cb.log("finished grabbing settings"); } grabSettings(); cb.onEnter(function(user) { cb.sendNotice('Welcome to my room, ' + user['user'] + '. Please take a moment to read my room rules before chatting. Thank you!', user['user'], '#CCF5EB', '', 'bold'); displayRules(user); }); function displayRules(user) { var username = ' '; if(user) username = user['user']; var notices = '########## ROOM RULES ##########'; for(var i=1; i<=10;i++) { if(cb.settings['rule' + i]) notices += '\nRule #'+ i +': ' + cb.settings['rule'+i]; } cb.sendNotice(notices, username, '', '#0066CC', 'bold'); if(!user || user == null) cb.setTimeout(displayRules, cb.settings.advertisement_wait_time * 60000); } // Function startsWith function startsWith(source, str) { return source.substring(0, str.length) === str; } function init() { displayRules(); } init();
© Copyright Chaturbate 2011- 2024. All Rights Reserved.