Bots Home
|
Create an App
sdbotlol
Author:
daisyistestingathing
Description
Source Code
Launch Bot
Current Users
Created by:
Daisyistestingathing
// title - daisybot // author - @daisy_marz // including bits of code from indshadow, aperson1, badbadbhudda, and kinddino because i'm a dumb baby // author's note:i worked really hard on this so please do not duplicate! if you modify my code, i would appreciate it if you please gave credit! // //includes: //-clubs //-optional freeze //-optional thank you //-rotating notifier for announcements and deals //-tip menu and elite menu //-hatstore cb.settings_choices = [ { name: 'memberList', label: "list of all club members. each club is delimited by semicolons, and each member in each club is delimited by commas. [cc;kk;ha;eha;]", type: 'str', minlength: 0, maxlength: 10240, required: false, defaultValue: '' }, { name: 'docoloring', label: 'change background coloring for club members?', type: 'choice', choice1: 'yes', choice2: 'no', required: true, defaultValue: 'yes' }, { name: 'dotext', label: 'add text labels in front of club members?', type: 'choice', choice1: 'yes', choice2: 'no', required: true, defaultValue: 'yes' }, { name: 'limitlist', label: 'limit club listing (/clublist)?', type: 'choice', choice1: 'broadcaster only', choice2: 'broadcaster and mods', choice3: 'everyone', required: true, defaultValue: 'broadcaster and mods'}, { name: 'cctip', label: 'tip amount to become a cum club member:', type: 'int', minValue: 1, required: true, defaultValue: 500}, { name: 'kktip', label: 'tip amount to become a kink kult member:', type: 'int', minValue: 1, required: true, defaultValue: 510}, {name: 'tipmenutoggle', label: 'enable tip menu?', type: 'choice', choice1: 'yes', choice2: 'no', defaultValue: 'yes'}, {name: 'leaderboardtoggle', label: 'enable leaderboard?', type: 'choice', choice1: 'yes', choice2: 'no', defaultValue: 'yes'}, {name: 'tipdisplaytoggle', label: 'display how much a user has tipped next to their name?', type: 'choice', choice1: 'yes', choice2: 'no', defaultValue: 'no'}, {name: 'freezetoggle', label: 'would you like to use the freeze counter?', type: 'choice', choice1: 'yes', choice2: 'no', defaultValue: 'yes'}, {name: 'freezetime', label: 'seconds to increase freeze by:', type: 'int', minValue: 1, defaultValue: 5}, {name: 'thawtime', label: 'seconds to reduce freeze by:', type: 'int', minValue: 1, defaultValue: 5}, {name: 'thankstoggle', label: 'automatic thank you for tips over 25tk?', type: 'choice', choice1: 'yes', choice2: 'no', defaultValue: 'yes'}, {name: 'thanksmessage', label: 'thank you message:', type: 'str', minLength: 1, maxLength: 1000, defaultValue: 'thanks!'}, {name: 'notifiertoggle', label: 'would you like to periodically send messages to the room?', type: 'choice', choice1: 'yes', choice2: 'no', defaultValue: 'yes'}, {name:'msgcolor', type:'str', label:'message color:', defaultValue: '#7B7B7B'}, {name: 'msg1', label: 'message one:', type: 'str', minLength: 1, maxLength: 1000, defaultValue: 'love me!'}, {name: 'msg2', label: 'message two:', type: 'str', minLength: 1, maxLength: 1000, defaultValue: 'uwu!',required: false}, {name: 'msg3', label: 'message three', type: 'str', minLength: 1, maxLength: 1000, defaultValue: 'owo!',required: false}, {name: 'msg4', label: 'message four:', type: 'str', minLength: 1, maxLength: 1000, defaultValue: 'uWu!',required: false}, {name: 'msg5', label: 'message five:', type: 'str', minLength: 1, maxLength: 1000, defaultValue: 'OwO!',required: false}, ] // club variables var cctext = 'cum club'; var ccannounce = 'welcome to the cum club, MEMBERNAME!'; var ccjoinannounce = 'cum club member MEMBERNAME has joined the chat!'; var kktext = 'kink kult'; var kkannounce = 'welcome to the kink kult, MEMBERNAME!'; var kkjoinannounce = 'kink kult member MEMBERNAME has joined the chat!'; var hatext = 'h4x0r'; var haannounce = 'MEMBERNAME broke the system!'; var hajoinannounce = 'hacker MEMBERNAME has joined the chat! hide your IP.'; var ehatext = 'l337 h4x0r'; var ehaannounce = 'hacker MEMBERNAME broke the system AGAIN and became elite! they now have access to the elite menu.'; var ehajoinannounce = 'elite hacker MEMBERNAME has joined the chat! this is now their domain.'; var ccBGcolor = '#BBECFC'; var kkBGcolor = '#3ACCFC'; var haBGcolor = '#A8F0E6'; var ehaBGcolor = '#7B7B7B'; var ccMembers = []; var kkMembers = []; var haMembers = []; var ehaMembers = []; // freeze variables var totalfreezetime = 0; var freezerunning = false; // thank you variables var minthanktip = 25; var badtip = 666 var verybadtip = 2222 //notifier variables var i=0; var maxitems = 5; var notifminutes = 3; //tip menu variables var menuminutes = 5; var menuitemcolor = '#F590AA'; var secretmenuitemcolor = '#c6efff'; var elitemenuitemcolor = '#0535ff'; //hatstore variables var blkhattext = ':l33tblackhatt '; var gryhattext = ':l33tgreyhatt '; var whthattext = ':l33twhitehatt '; var pnkhattext = ':l33tpinkhatt '; var blkhatannounce = 'MEMBERNAME has put on a black hat!'; var gryhatannounce = 'MEMBERNAME has put on a grey hat!'; var whthatannounce = 'MEMBERNAME has put on a white hat!'; var pnkhatannounce = 'MEMBERNAME has put on a pink hat!'; var hatlessannounce = 'MEMBERNAME took off their hat.' var hasblkhat = []; var haswhthat = []; var hasgryhat = []; var haspnkhat = []; ////////////////////////////////////////// //leaderboard vars //how often the leaderboard should periodically show up in the chat (in mins) var leaderboardminutes = 10; var leaderArray = [['',0],['',0],['',0]]; var tipperArray = new Array; var numTippers = 0; cb.onMessage(function (msg) { var u = msg['user']; // Show tip amounts if(cb.settings.tipdisplaytoggle == 'yes') { if(tipperArray[findTipper(u)][1] > 0) { msg['m'] = '|' + tipperArray[findTipper(u)][1] + '| ' + msg['m']; } } //clubmsgs if (iscc(u)) { if(cb.settings.docoloring == 'yes') { msg['background'] = ccBGcolor; } if(cb.settings.dotext == 'yes') { msg['m'] = "[" + cctext + "] " + msg['m']; } } else if (iskk(u)) { if(cb.settings.docoloring == 'yes') { msg['background'] = kkBGcolor; } if(cb.settings.dotext == 'yes') { msg['m'] = "[" + kktext + "] " + msg['m']; } } else if (isha(u)) { if(cb.settings.docoloring == 'yes') { msg['background'] = haBGcolor; } if(cb.settings.dotext == 'yes') { msg['m'] = "[" + hatext + "] " + msg['m']; } } else if (iseha(u)) { if(cb.settings.docoloring == 'yes') { msg['background'] = ehaBGcolor; msg['c'] = '#FFFFFF'; } if(cb.settings.dotext == 'yes') { msg['m'] = "[" + ehatext + "] " + msg['m']; } } if(msg['m'].includes('/clublist')) { msg['X-Spam'] = true; if(cb.settings.limitlist == 'broadcaster only' && u != cb.room_slug) { setTimeout(function() {cb.sendNotice("you do not have permission to view the club list. only the broadcaster may view the list.", msg['user']);}, 250); } else if(cb.settings.limitlist == 'broadcaster and mods' && u != cb.room_slug && !msg['is_mod']) { setTimeout(function() {cb.sendNotice("you do not have permission to view the club list. only the broadcaster and moderators may view the list.", msg['user']);}, 250); } else { var currMembers = serialize(); setTimeout(function() {cb.sendNotice(cctext + ":\n" + currMembers[0], u, ccBGcolor);}, 250); setTimeout(function() {cb.sendNotice(kktext + ":\n" + currMembers[1], u, kkBGcolor);}, 500); setTimeout(function() {cb.sendNotice(hatext + ":\n" + currMembers[2], u, haBGcolor);}, 750); setTimeout(function() {cb.sendNotice(ehatext + ":\n" + currMembers[3], u, ehaBGcolor);}, 1000); } } //menumsgs if(msg['m'].includes('/menu')) { msg['X-Spam'] = true; showmenu(u); } //broadcaster commands if (msg['user'] == cb.room_slug) { if(msg['m'].includes("/leaderboardon")) { cb.settings.leaderboardtoggle = 'yes'; cb.sendNotice("broadcaster has enabled the leaderboard!", '', '#7B7B7B', '', 'bold'); showleaderboard(); } if(msg['m'].includes("/leaderboardoff")) { cb.settings.leaderboardtoggle = 'no'; cb.sendNotice("broadcaster has disabled the leaderboard!", '', '#7B7B7B', '', 'bold'); } if(msg['m'].includes("/tipdisplayon")) { cb.settings.tipdisplaytoggle = 'yes'; cb.sendNotice("broadcaster has enabled tip tracking!", '', '#7B7B7B', '', 'bold'); } if(msg['m'].includes("/tipdisplayoff")) { cb.settings.tipdisplaytoggle = 'no'; cb.sendNotice("broadcaster has disabled tip tracking!", '', '#7B7B7B', '', 'bold'); } if(msg['m'].includes("/clublabelson")) { cb.settings.dotext = 'yes'; cb.sendNotice("broadcaster has enabled club tags!", '', '#7B7B7B', '', 'bold'); } if(msg['m'].includes("/clublabelsoff")) { cb.settings.dotext = 'no'; cb.sendNotice("broadcaster has disabled club tags!", '', '#7B7B7B', '', 'bold'); } if(msg['m'].includes("/tipmenuon")) { cb.settings.tipmenutoggle = 'yes'; cb.sendNotice("broadcaster has enabled the tip menu!", '', '#7B7B7B', '', 'bold'); } if(msg['m'].includes("/tipmenuoff")) { cb.settings.tipmenutoggle = 'no'; cb.sendNotice("broadcaster has disabled the tip menu!", '', '#7B7B7B', '', 'bold'); } } //hatstore else if(msg['m'].includes('/hatstore') && iseha(u)) { msg['X-Spam'] = true; hatstore(u); } else if(msg['m'].includes('/blackhat') && iseha(u)) { msg['X-Spam'] = true; giveblackhat(u); } else if(msg['m'].includes('/greyhat') && iseha(u)) { msg['X-Spam'] = true; givegreyhat(u); } else if(msg['m'].includes('/whitehat') && iseha(u)) { msg['X-Spam'] = true; givewhitehat(u); } else if(msg['m'].includes('/pinkhat') && iseha(u)) { msg['X-Spam'] = true; givepinkhat(u); } else if(msg['m'].includes('/nohat') && iseha(u)) { msg['X-Spam'] = true; clearHats(u); var announcement = hatlessannounce.replace("MEMBERNAME", u); cb.sendNotice(announcement, '', ehaBGcolor) } ///broken hat labels////////////////////////////// if(wearingblkhat(u)) { msg['m'] = blkhattext + msg['m']; } if(wearinggryhat(u)) { msg['m'] = gryhattext + msg['m']; } if(wearingwhthat(u)) { msg['m'] = whthattext + msg['m']; } if(wearingpnkhat(u)) { msg['m'] = pnkhattext + msg['m']; } return msg; }); cb.onEnter(function(user) { if(iscc(user['user'])) { setTimeout(function() {cb.sendNotice( ccjoinannounce.replace("MEMBERNAME", user['user']), '', ccBGcolor);}, 250); } else if(iskk(user['user'])) { setTimeout(function() {cb.sendNotice( kkjoinannounce.replace("MEMBERNAME", user['user']), '', kkBGcolor);}, 250); } else if(isha(user['user'])) { setTimeout(function() {cb.sendNotice( hajoinannounce.replace("MEMBERNAME", user['user']), '', haBGcolor);}, 250); } else if(iseha(user['user'])) { setTimeout(function() {cb.sendNotice( ehajoinannounce.replace("MEMBERNAME", user['user']), '', ehaBGcolor);}, 250); } }); cb.onTip(function (tip) { var amountTipped = parseInt(tip['amount']); var u = tip['from_user']; tipperArray[findTipper(u)][1] += amountTipped; //clubtips if (amountTipped == cb.settings.cctip && !iscc(u) && !isha(u)) { if(iskk(u)){ // Make h4x0r and announce it makeha(tip['from_user']); kkMembers.splice(kkMembers.indexOf(tip['from_user']), 1); } else { // Make Cum Club and announce it makecc(tip['from_user']); } } else if (amountTipped == cb.settings.kktip && !iskk(u) && !isha(u)) { if(iscc(u)){ // Make h4x0r and announce it makeha(tip['from_user']); ccMembers.splice(ccMembers.indexOf(tip['from_user']), 1) } else { // Make Kink Kult and announce it makekk(tip['from_user']); } } else if (amountTipped == (cb.settings.cctip + cb.settings.kktip) && !isha(u)) { // Make h4x0r and announce it makeha(tip['from_user']); } else if (amountTipped == (1010) && isha(u)) { // Make l33t h4x0r and announce it makeeha(tip['from_user']); haMembers.splice(haMembers.indexOf(tip['from_user']), 1) } //freezetips if(cb.settings.freezetoggle == 'yes' && parseInt(tip['amount']) == 11) { totalfreezetime += cb.settings.freezetime; cb.sendNotice (tip['from_user'] + " tipped to freeze daisy! - " + totalfreezetime + " seconds left!",'', '#c6efff', '', 'bold' ); if ( freezerunning == false && parseInt(tip['amount']) == 11) { ticktock(); } } if(cb.settings.freezetoggle == 'yes' && parseInt(tip['amount']) == 12 && freezerunning == true) { totalfreezetime -= cb.settings.thawtime; cb.sendNotice (tip['from_user'] + " tipped to thaw daisy! - " + totalfreezetime + " seconds left!",'', '#c6efff', '', 'bold' ); } //thankyoutips if(cb.settings.thankstoggle == 'yes' && parseInt(tip['amount']) >= minthanktip && parseInt(tip['amount']) != badtip && parseInt(tip['amount']) != verybadtip) { cb.sendNotice(cb.settings.thanksmessage,'','#fdd9ff'); } if (parseInt(tip['amount']) == badtip) { cb.sendNotice('you suck, ' + tip['from_user'] + '.', '', '', '#F590AA', 'bold'); } if (parseInt(tip['amount']) == verybadtip) { cb.sendNotice('fuck you, ' + tip['from_user'] + '. i hope you get a computer virus.', '', '', '#F590AA', 'bold'); } //menutips if (cb.settings.tipmenutoggle == 'yes') { if (amountTipped == 10) {cb.sendNotice(tip['from_user'] + ' tipped for a spank!', '', '', menuitemcolor, 'bold');} else if (amountTipped == 19) {cb.sendNotice(tip['from_user'] + ' tipped for face slap!', '', '', menuitemcolor, 'bold');} else if (amountTipped == 22) {cb.sendNotice(tip['from_user'] + ' tipped to see my feet!', '', '', menuitemcolor, 'bold');} else if (amountTipped == 35 && !iseha(u)) {cb.sendNotice(tip['from_user'] + ' tipped for a flash! (tits or ass?)', '', '', menuitemcolor, 'bold');} else if (amountTipped == 50) {cb.sendNotice(tip['from_user'] + ' tipped for a pussy flash!', '', '', menuitemcolor, 'bold');} else if (amountTipped == 150 && !iseha(u)) {cb.sendNotice(tip['from_user'] + ' tipped for a tease!', '', '', menuitemcolor, 'bold');} else if (amountTipped == 500) {cb.sendNotice(tip['from_user'] + ' tipped for an instant cumshow!!!!!!', '', '', menuitemcolor, 'bold');} else if (amountTipped == 777) {cb.sendNotice(tip['from_user'] + ' tipped to add a butt plug!', '', '', menuitemcolor, 'bold');} else if (amountTipped == 999) {cb.sendNotice(tip['from_user'] + ' tipped to get me naked!', '', '', menuitemcolor, 'bold');} //secret else if (amountTipped == 4) {cb.sendNotice(tip['from_user'] + ' tipped for a meow/woof/bunny nose!', '', '', secretmenuitemcolor, 'bold');} else if (amountTipped == 6) {cb.sendNotice(tip['from_user'] + ' tipped for ??????????????', '', '', secretmenuitemcolor, 'bold');} else if (amountTipped == 9) {cb.sendNotice(tip['from_user'] + ' twipped fow OWO', '', '', secretmenuitemcolor, 'bold');} else if (amountTipped == 13) {cb.sendNotice(tip['from_user'] + ' tipped to see my tongue!', '', '', secretmenuitemcolor, 'bold');}} else if (amountTipped == 18) {cb.sendNotice('fuck you, ' + tip['from_user'] + '.', '', '', secretmenuitemcolor, 'bold');} else if (amountTipped == 21) {cb.sendNotice(tip['from_user'] + 'tipped for an outdated vine reference. *dab*', '', '', secretmenuitemcolor, 'bold');} else if (amountTipped == 24) {cb.sendNotice(tip['from_user'] + 'tipped for aheago~', '', '', secretmenuitemcolor, 'bold');} else if (amountTipped == 26) {cb.sendNotice(tip['from_user'] + 'tipped for a wiggle~~~~', '', '', secretmenuitemcolor, 'bold');} else if (amountTipped == 29) {cb.sendNotice(tip['from_user'] + ' tipped for a scary spank :(', '', '', secretmenuitemcolor, 'bold');} else if (amountTipped == 33) {cb.sendNotice(tip['from_user'] + ' loves meeeeeee <3 <3 <3 <3', '', '', secretmenuitemcolor, 'bold');} else if (amountTipped == 55) {cb.sendNotice(tip['from_user'] + ' tipped for a wedgie :(', '', '', secretmenuitemcolor, 'bold');} else if (amountTipped == 63) {cb.sendNotice(tip['from_user'] + ' tipped for socks on/off', '', '', secretmenuitemcolor, 'bold');} else if (amountTipped == 67) {cb.sendNotice(tip['from_user'] + ' tipped for me to suck my toes!', '', '', secretmenuitemcolor, 'bold');} else if (amountTipped == 77) {cb.sendNotice(tip['from_user'] + ' tipped for me to be a drooly baby~', '', '', secretmenuitemcolor, 'bold');} else if (amountTipped == 88) {cb.sendNotice(tip['from_user'] + ' tipped to ask the almighty 8 ball a question. what knowledge do you seek?', '', '', secretmenuitemcolor, 'bold');} else if (amountTipped == 101) {cb.sendNotice(tip['from_user'] + ' tipped to roll the workout dice!', '', '', secretmenuitemcolor, 'bold');} else if (amountTipped == 222) {cb.sendNotice(tip['from_user'] + ' tipped for nipple clamps or a ball gag! (which one?)', '', '', secretmenuitemcolor, 'bold');} else if (amountTipped == 333) {cb.sendNotice(tip['from_user'] + ' tipped to request an unscheduled private show!', '', '', secretmenuitemcolor, 'bold'); setTimeout(function() { cb.sendNotice("please send a 1tk tipnote with a short description of what you would like to do with me!", u,'', ehaBGcolor, 'bold' ); }, 100);} else if (amountTipped == 444) {cb.sendNotice(tip['from_user'] + ' tipped to start a blowjob show with my cumming dildo!', '', '', secretmenuitemcolor, 'bold');} else if (amountTipped == 600) {cb.sendNotice(tip['from_user'] + ' tipped to add me on snapchat', '', '', secretmenuitemcolor, 'bold'); setTimeout(function() { cb.sendNotice("my snap username is freshlildaisy, please add me and send me a message with your chaturbate username so i know it's you!", u,'', ehaBGcolor, 'bold' ); }, 100);} else if (amountTipped == 888) {cb.sendNotice(tip['from_user'] + ' tipped for rope bunny fun!', '', '', secretmenuitemcolor, 'bold');} else if (amountTipped == 999) {cb.sendNotice(tip['from_user'] + ' GETS FREE SPANKS FOR 24 HOURS!', '', '', secretmenuitemcolor, 'bold');} else if (amountTipped == 8888) {cb.sendNotice(tip['from_user'] + ' tipped to control my show for the night. i have to do everything they ask.', '', '', secretmenuitemcolor, 'bold');} //elite menu if (iseha(u) && amountTipped == 7) {cb.sendNotice('elite hacker ' + tip['from_user'] + ' tipped for a spank!', '', '', elitemenuitemcolor, 'bold');} if (iseha(u) && amountTipped == 30) {cb.sendNotice('elite hacker ' + tip['from_user'] + ' tipped for any flash!', '', '', elitemenuitemcolor, 'bold');} if (iseha(u) && amountTipped == 75) {cb.sendNotice('elite hacker ' + tip['from_user'] + ' tipped for any tease!', '', '', elitemenuitemcolor, 'bold');} if (iseha(u) && amountTipped == 150) {cb.sendNotice('elite hacker ' + tip['from_user'] + ' tipped to brand me with their name!', '', '', elitemenuitemcolor, 'bold');} if (iseha(u) && amountTipped == 250) {cb.sendNotice('elite hacker ' + tip['from_user'] + ' tipped for an instant cumshow!!!!', '', '', elitemenuitemcolor, 'bold');} if (iseha(u) && amountTipped == 323) {cb.sendNotice('elite hacker ' + tip['from_user'] + ' tipped to hack the current cumshow! they now have control.', '', '', elitemenuitemcolor, 'bold');} if (iseha(u) && amountTipped == 543) {cb.sendNotice('elite hacker ' + tip['from_user'] + ' tipped for me to get naked!~', '', '', elitemenuitemcolor, 'bold');} if (iseha(u) && amountTipped == 1110) {cb.sendNotice('elite hacker ' + tip['from_user'] + ' tipped to free me from a 24 hour denial!!', '', '', elitemenuitemcolor, 'bold');} if (iseha(u) && amountTipped == 1111) {cb.sendNotice('elite hacker ' + tip['from_user'] + ' tipped for a 24 hour denial. i am not allowed to cum. :( :( :(', '', '', elitemenuitemcolor, 'bold');} if (iseha(u) && amountTipped == 2002) {cb.sendNotice('elite hacker ' + tip['from_user'] + ' tipped for me to hump a pillow.', '', '', elitemenuitemcolor, 'bold');} if (iseha(u) && amountTipped == 100) { cb.sendNotice('elite hacker ' + tip['from_user'] + ' can now access the hat store!', '', '', elitemenuitemcolor, 'bold'); cb.sendNotice("to access the hat store type /hatstore in the chat!", u,'', ehaBGcolor, 'bold' );} // LeaderBoard var nameArray = new Array; var usersTipAmount = tipperArray[findTipper(u)][1]; var leaderChanged = 0; for(var i = 0; i < leaderArray.length; i++) { nameArray[i] = leaderArray[i][0]; } // User is not currently in the top 3 if(!cbjs.arrayContains(nameArray, u)) { // If they've tipped more than the leader, bump everyone down. if(usersTipAmount > leaderArray[0][1]) { leaderArray[2][0] = leaderArray[1][0]; leaderArray[2][1] = leaderArray[1][1]; leaderArray[1][0] = leaderArray[0][0]; leaderArray[1][1] = leaderArray[0][1]; leaderArray[0][0] = u; leaderArray[0][1] = usersTipAmount; leaderChanged = 1; } // If they've tipped less than or equal to the leader but more than #2. else if(usersTipAmount > leaderArray[1][1] || usersTipAmount == leaderArray[0][1]) { leaderArray[2][0] = leaderArray[1][0]; leaderArray[2][1] = leaderArray[1][1]; leaderArray[1][0] = u; leaderArray[1][1] = usersTipAmount; leaderChanged = 1; } // If they've tipped less than or equal to #2 but more than #3. else if(usersTipAmount > leaderArray[2][1] || usersTipAmount == leaderArray[1][1]) { leaderArray[2][0] = u; leaderArray[2][1] = usersTipAmount; leaderChanged = 1; } } // User is currently in the top 3 else { // User is already #1 if(leaderArray[0][0] == u) { leaderArray[0][1] = usersTipAmount; leaderChanged = 1; } // User is #2 and moving to #1 else if(leaderArray[1][0] == u && usersTipAmount > leaderArray[0][1]) { leaderArray[1][0] = leaderArray[0][0]; leaderArray[1][1] = leaderArray[0][1]; leaderArray[0][0] = u; leaderArray[0][1] = usersTipAmount; leaderChanged = 1; } // User is staying #2 else if(leaderArray[1][0] == u && usersTipAmount <= leaderArray[0][1]) { leaderArray[1][1] = usersTipAmount; leaderChanged = 1; } // User is #3 and is moving to #1 else if(leaderArray[2][0] == u && usersTipAmount > leaderArray[0][1]) { leaderArray[2][0] = leaderArray[1][0]; leaderArray[2][1] = leaderArray[1][1]; leaderArray[1][0] = leaderArray[0][0]; leaderArray[1][1] = leaderArray[0][1]; leaderArray[0][0] = u; leaderArray[0][1] = usersTipAmount; leaderChanged = 1; } // User is #3 and is moving to #2 else if(leaderArray[2][0] == u && usersTipAmount > leaderArray[1][1]) { leaderArray[2][0] = leaderArray[1][0]; leaderArray[2][1] = leaderArray[1][1]; leaderArray[1][0] = u; leaderArray[1][1] = usersTipAmount; leaderChanged = 1; } // User is staying #3 else if(leaderArray[2][0] == u && usersTipAmount <= leaderArray[1][1]) { leaderArray[2][1] = usersTipAmount; leaderChanged = 1; } // Clean out the spots if leaderboard was empty if(leaderArray[2][0] == leaderArray[1][0] || leaderArray[2][0] == leaderArray[0][0]) { leaderArray[2][0] = ''; leaderArray[2][1] = 0; } if(leaderArray[1][0] == leaderArray[0][0]) { leaderArray[1][0] = ''; leaderArray[1][1] = 0; } } if(leaderChanged == 1) { showleaderboard(); } }); //club function junction function iscc(username) { return ccMembers.includes(username); } function iskk(username) { return kkMembers.includes(username); } function isha(username) { return haMembers.includes(username); } function iseha(username) { return ehaMembers.includes(username); } function wearingblkhat(username) { return hasblkhat.includes(username); } function wearinggryhat(username) { return hasgryhat.includes(username); } function wearingwhthat(username) { return haswhthat.includes(username); } function wearingpnkhat(username) { return haspnkhat.includes(username); } function makecc(username) { var announcement = ccannounce.replace("MEMBERNAME", username); ccMembers.push(username); setTimeout(function() {cb.sendNotice(announcement, '', ccBGcolor);}, 250); } function makekk(username) { var announcement = kkannounce.replace("MEMBERNAME", username); kkMembers.push(username); setTimeout(function() {cb.sendNotice(announcement, '', kkBGcolor);}, 250); } function makeha(username) { var announcement = haannounce.replace("MEMBERNAME", username); haMembers.push(username); setTimeout(function() {cb.sendNotice(announcement, '', haBGcolor);}, 250); } function makeeha(username) { var announcement = ehaannounce.replace("MEMBERNAME", username); ehaMembers.push(username); setTimeout(function() {cb.sendNotice(announcement, '', ehaBGcolor);}, 250); } function deserialize() { if(!cb.settings.memberList) return; var members = cb.settings.memberList.replace('Notice: ', '').split(';'); // Get Cum Club if (members[0]) { var ccMemberSettings = members[0].split(','); for (var i = 0; i < ccMemberSettings.length; i++) { var clean = ccMemberSettings[i].toLowerCase().replace(/ /g,""); ccMembers.push(clean); } } // Get Kink Kult if (members[1]) { var kkMemberSettings = members[1].split(','); for (var i = 0; i < kkMemberSettings.length; i++) { var clean = kkMemberSettings[i].toLowerCase().replace(/ /g,""); kkMembers.push(clean); } } // Get h4x0rs if (members[2]) { var haMemberSettings = members[2].split(','); for (var i = 0; i < haMemberSettings.length; i++) { var clean = haMemberSettings[i].toLowerCase().replace(/ /g,""); haMembers.push(clean); } } // Get l337 h4x0rs if (members[3]) { var ehaMemberSettings = members[3].split(','); for (var i = 0; i < ehaMemberSettings.length; i++) { var clean = ehaMemberSettings[i].toLowerCase().replace(/ /g,""); ehaMembers.push(clean); } } } function serialize() { var tmp = [ccMembers.join(','), kkMembers.join(','), haMembers.join(','), ehaMembers.join(',')]; tmp[4] = tmp.join(';'); return tmp; } //hatstore function junction function giveblackhat(username) { clearHats(username); var announcement = blkhatannounce.replace("MEMBERNAME", username); hasblkhat.push(username); setTimeout(function() {cb.sendNotice(announcement, '', ehaBGcolor);}, 250); } function givegreyhat(username) { clearHats(username); var announcement = gryhatannounce.replace("MEMBERNAME", username); hasgryhat.push(username); setTimeout(function() {cb.sendNotice(announcement, '', ehaBGcolor);}, 250); } function givewhitehat(username) { clearHats(username); var announcement = whthatannounce.replace("MEMBERNAME", username); haswhthat.push(username); setTimeout(function() {cb.sendNotice(announcement, '', ehaBGcolor);}, 250); } function givepinkhat(username) { clearHats(username); var announcement = pnkhatannounce.replace("MEMBERNAME", username); haspnkhat.push(username); setTimeout(function() {cb.sendNotice(announcement, '', ehaBGcolor);}, 250); } function clearHats(user) { removeHat(hasblkhat, user); removeHat(haswhthat, user); removeHat(hasgryhat, user); removeHat(haspnkhat, user); } function removeHat (array,user) { var index = array.indexOf(user); if(index != -1){ array.splice(index, 1); }} function hatstore(username) { var notices = '----------welcome to the hat store!----------\n'; notices += 'here, you can choose your hat and change it as you see fit\n'; notices += 'to put on a hat, simply type the corresponding command displayed in this menu\n'; notices += ':l33tblackhatt [blackhat] - /blackhat\n'; notices += ':l33tgreyhatt [greyhat] - /greyhat\n'; notices += ':l33twhitehatt [whitehat] - /whitehat\n'; notices += ':l33tpinkhatt [pinkhat] - /pinkhat\n'; notices += 'type /hatstore at any time to see this again!'; cb.sendNotice( notices, username, '#FFD1E0', '', 'bold' ); } //freeze function junction function ticktock() { //color for each freeze message [happens every 5 seconds] var color; totalfreezetime--; if ( totalfreezetime > 0 ) { freezerunning = true; if ( totalfreezetime % 5 == 0 ) { if ( totalfreezetime >= 61 ) { color = '#007be7'; } else if ( totalfreezetime >= 60 ) { color = '#00a8ec'; } else if ( totalfreezetime >= 55 ) { color = '#28c1ff'; } else if ( totalfreezetime >= 45 ) { color = '#4dccff'; } else if ( totalfreezetime >= 30 ) { color = '#76d7fe'; } else if ( totalfreezetime >= 15 ) { color = '#9ae1fe'; } else if ( totalfreezetime >= 6 ) { color = '#c6efff'; } else if ( totalfreezetime <= 5 ) { color = '#e9f9ff'; } cb.sendNotice( "daisy is frozen! - " + totalfreezetime + " seconds left", '', color, '', 'bold' ); } cb.setTimeout( ticktock, 1000 ); } else { cb.sendNotice( "daisy is no longer frozen!", '', '', '#28c1ff', 'bold'); freezerunning = false; } } // Tipper Array Functions // Add a new tipper to the array. function tipperArrayPopulate(user) { tipperArray[numTippers] = new Array; tipperArray[numTippers][0] = user; tipperArray[numTippers][1] = 0; numTippers++; } function findTipper(user) { // find index of the user in the tipperArray for ( var i=0; i < tipperArray.length; i++ ) { if ( tipperArray[i][0] == user ) {break;} } // If the user is not already in the array, add him and rerun findTipper if ( i == tipperArray.length ) { tipperArrayPopulate(user); findTipper(user); } return i; } // Show the leaderboard function showleaderboard() { if(cb.settings.leaderboardtoggle == 'yes') { if(leaderArray[0][1] != 0) { var leaderMsg = '1st - ' + leaderArray[0][0] + ': ' + leaderArray[0][1]; if (leaderArray[1][1] != 0) { leaderMsg = '2nd - ' + leaderMsg + "\n" + leaderArray[1][0] + ': ' + leaderArray[1][1]; } if (leaderArray[2][1] != 0) { leaderMsg = '3rd - ' + leaderMsg + "\n" + leaderArray[2][0] + ': ' + leaderArray[2][1]; } cb.sendNotice('Leaderboard!', '' , '#FFD1E0', '', 'bold' ); cb.sendNotice(leaderMsg,'', '', '#FFD1E0', 'bold'); } } } //notifier function junction function notifier() { var msg; if (cb.settings.notifiertoggle == 'yes'){ while (cb.settings['msg' + (i + 1)] == 0) { i++; i %= maxitems; } msg = cb.settings['msg' + (i + 1)]; i++; i %= maxitems; cb.sendNotice(msg,'','',cb.settings['msgcolor'],'bold'); cb.setTimeout(notifier, (notifminutes * 60000)); } else if (cb.settings.notifiertoggle == 'no'){ notifminutes = 10; cb.sendNotice("don't forget to follow me! if you don't, you might lose me in the internet forever!",'','',cb.settings['msgcolor'],'bold'); cb.setTimeout(notifier, (notifminutes * 60000)); } } //menu function junction function showmenu( username ) { if (cb.settings.tipmenutoggle == 'yes') { var notices = '----------menu----------\n'; notices += 'spank me [10]\n'; notices += 'face slap [19]\n'; notices += 'show feet [22]\n'; notices += 'tits or ass [35]\n'; notices += 'pussy [50]\n'; notices += 'tease [150]\n'; notices += 'cumshow [500]\n'; notices += 'denial.exe [2222]\n'; notices += 'type /menu at any time to see this again!'; cb.sendNotice( notices, username, '#FFD1E0', '', 'bold' ); cb.setTimeout(showmenu, (menuminutes * 60000)); } } function leaderboard() { if(cb.settings.leaderboardtoggle == 'yes') { showleaderboard(); cb.setTimeout(leaderboard, (leaderboardminutes * 60000)); } } deserialize(); notifier(); showmenu(); leaderboard();
© Copyright Chaturbate 2011- 2025. All Rights Reserved.