Bots Home
|
Create an App
TestABC05
Author:
jason7878
Description
Source Code
Launch Bot
Current Users
Created by:
Jason7878
/* Title: "Aalliss's Tip Menu bot" Author: Based on original work from badbadbubba */ var HEART = '\u2665'; // ♥ BDIAMOND = '\u2666'; // ♦ BSTAR = '\u2605'; // ★ var tip_amt = 0; var separator_char = "| "; var msg; var fanmsg; var MAXITEMS=40; var tipmenuprice = []; var tipmenuitem= []; var MAXSEP = 9; var FANMAXITEMS=10; var fantipmenuprice = []; var fantipmenuitem= []; var FANMAXSEP = 9; var inFanTipMenu = 0; var numSpanks = 0; var numSquats = 0; var numSpanksSpam = 0; var numSquatsSpam = 0; var requesters = []; var request = []; var requestTime = []; separators = [ {label:'Hearts',shortcut:':heart2'}, {label:'Glitter',shortcut:':pixelglitter'}, {label:'Flowers',shortcut:':tinyflower2'}, {label:'Bow',shortcut:':bluebow'}, {label:'Hearts2',shortcut:':pixelheart'}, {label:'Smiley',shortcut:':smile'}, {label:'Text Heart',shortcut:HEART}, {label:'Text Diamond',shortcut:BDIAMOND}, {label:'Text Star',shortcut:BSTAR}, ] cb.settings_choices = [ {name: 'sepchar', type: 'choice', choice1: 'Vertical Bar', choice2: 'Hearts', choice3:'Glitter',choice4:'Flowers',choice5:'Bow',choice6:'Hearts2',choice7:'Smiley',choice8:'Text Heart', choice9:'Text Diamond', choice10:'Text Star', defaultValue: 'Vertical Bar', label: "Separator character"}, {name:'item1', type:'str', label:'Item 1 (eg 10--flash tits)',}, {name:'item2', type:'str', required: false, label:'Item 2',}, {name:'item3', type:'str', required: false, label:'Item 3',}, {name:'item4', type:'str', required: false, label:'Item 4',}, {name:'item5', type:'str', required: false, label:'Item 5',}, {name:'item6', type:'str', required: false, label:'Item 6',}, {name:'item7', type:'str', required: false, label:'Item 7',}, {name:'item8', type:'str', required: false, label:'Item 8',}, {name:'item9', type:'str', required: false, label:'Item 9',}, {name:'item10', type:'str', required: false, label:'Item 10',}, {name:'item11', type:'str', required: false, label:'Item 11',}, {name:'item12', type:'str', required: false, label:'Item 12',}, {name:'item13', type:'str', required: false, label:'Item 13',}, {name:'item14', type:'str', required: false, label:'Item 14',}, {name:'item15', type:'str', required: false, label:'Item 15',}, {name:'item16', type:'str', required: false, label:'Item 16',}, {name:'item17', type:'str', required: false, label:'Item 17',}, {name:'item18', type:'str', required: false, label:'Item 18',}, {name:'item19', type:'str', required: false, label:'Item 19',}, {name:'item20', type:'str', required: false, label:'Item 20',}, {name:'item21', type:'str', required: false, label:'Item 21',}, {name:'item22', type:'str', required: false, label:'Item 22',}, {name:'item23', type:'str', required: false, label:'Item 23',}, {name:'item24', type:'str', required: false, label:'Item 24',}, {name:'item25', type:'str', required: false, label:'Item 25',}, {name:'item26', type:'str', required: false, label:'Item 26',}, {name:'item27', type:'str', required: false, label:'Item 27',}, {name:'item28', type:'str', required: false, label:'Item 28',}, {name:'item29', type:'str', required: false, label:'Item 29',}, {name:'item30', type:'str', required: false, label:'Item 30',}, {name:'item31', type:'str', required: false, label:'Item 31',}, {name:'item32', type:'str', required: false, label:'Item 32',}, {name:'item33', type:'str', required: false, label:'Item 33',}, {name:'item34', type:'str', required: false, label:'Item 34',}, {name:'item35', type:'str', required: false, label:'Item 35',}, {name:'item36', type:'str', required: false, label:'Item 36',}, {name:'item37', type:'str', required: false, label:'Item 37',}, {name:'item38', type:'str', required: false, label:'Item 38',}, {name:'item39', type:'str', required: false, label:'Item 39',}, {name:'item40', type:'str', required: false, label:'Item 40',}, {name:'fitem1', type:'str', label:'Fan Item 1 (eg 10--flash tits)',}, {name:'fitem2', type:'str', required: false, label:'Fan Item 2',}, {name:'fitem3', type:'str', required: false, label:'Fan Item 3',}, {name:'fitem4', type:'str', required: false, label:'Fan Item 4',}, {name:'fitem5', type:'str', required: false, label:'Fan Item 5',}, {name:'fitem6', type:'str', required: false, label:'Fan Item 6',}, {name:'fitem7', type:'str', required: false, label:'Fan Item 7',}, {name:'fitem8', type:'str', required: false, label:'Fan Item 8',}, {name:'fitem9', type:'str', required: false, label:'Fan Item 9',}, {name:'fitem10', type:'str', required: false, label:'Fan Item 10',}, {name:'noticecolor', type:'str', label:'Notice color (html code default red #FF0000)', defaultValue: '#FF0000'}, {name:'fnoticecolor', type:'str', label:'Fan Notice color (html code default green #008000)', defaultValue: '#008000'}, {name:'dnoticecolor', type:'str', label:'Denial Notice color (html code default blue #0000FF)', defaultValue: '#0000FF'}, {name:'lcnoticecolor', type:'str', label:'Lush Control Notice color (html code default blue #0000FF)', defaultValue: '#0000FF'}, {name: 'chat_ad', type:'int', minValue: 1, maxValue: 999, defaultValue: 1, label: 'Delay in minutes between notice being displayed (minimum 1)'} ]; cb.onTip(function (tip) { var isMod = tip['from_user_is_mod']; var isFan = tip['from_user_in_fanclub']; tip_amt=parseInt(tip['amount']); var d = new Date(), h = (d.getHours()<10?'0':'') + d.getHours(), m = (d.getMinutes()<10?'0':'') + d.getMinutes(); t = h + ':' + m; inFanTipMenu = 0; if (isMod == 1 || isFan == 1) { for (var i = 1; i <= FANMAXITEMS; i++) { if (tip_amt == fantipmenuprice[i]) { inFanTipMenu = 1 } } if (inFanTipMenu == 1) { for (var i = 1; i <= FANMAXITEMS; i++) { if (tip_amt == fantipmenuprice[i]) { requesters.push(tip['from_user']); request.push('FC Tip - ' + fantipmenuitem[i]); requestTime.push(t); cb.sendNotice(tip['from_user'] + ' tipped for ' + fantipmenuitem[i] + ' from the Fan Club Tip Menu','','',cb.settings['noticecolor'],'bold'); } } switch (tip_amt) { case 31: numSpanks = numSpanks + 5; numSpanksSpam = numSpanksSpam + 1; if (numSpanksSpam >= 10) { cb.sendNotice('The Spank Counter is at ' + [numSpanks] + ' for today.','','',cb.settings['lcnoticecolor'],'bold'); numSpanksSpam = 0; } break; case 48: numSquats = numSquats + 11; numSquatsSpam = numSquatsSpam + 1; if (numSquatsSpam >= 10) { cb.sendNotice('The Squat Counter is at ' + [numSquats] + ' for today.','','',cb.settings['lcnoticecolor'],'bold'); numSquatsSpam = 0; } break; case 89: cb.sendNotice('**************UNMUTE Aalliss**************','','',cb.settings['dnoticecolor'],'bold'); cb.sendNotice('Take 10 mins off the Silence Timer','','',cb.settings['dnoticecolor'],'bold'); cb.sendNotice('******************************************','','',cb.settings['dnoticecolor'],'bold'); break; case 280: cb.sendNotice('***************LUSH CONTROL***************','','',cb.settings['lcnoticecolor'],'bold'); cb.sendNotice(tip['from_user'] + ' tipped for 90 seconds Lush control','','',cb.settings['lcnoticecolor'],'bold'); cb.sendNotice('******************************************','','',cb.settings['lcnoticecolor'],'bold'); break; case 317: cb.sendNotice('*************FREEDOM TO TOUCH*************','','',cb.settings['dnoticecolor'],'bold'); cb.sendNotice('Take 10 mins off the Denial Timer','','',cb.settings['dnoticecolor'],'bold'); cb.sendNotice('******************************************','','',cb.settings['dnoticecolor'],'bold'); break; default: text = ''; } } else { for (var i = 1; i <= MAXITEMS; i++) { if (tip_amt == tipmenuprice[i]) { requesters.push(tip['from_user']); request.push(fantipmenuitem[i]); requestTime.push(t); cb.sendNotice(tip['from_user'] + ' tipped for ' + tipmenuitem[i],'','',cb.settings['noticecolor'],'bold'); } } switch (tip_amt) { case 12: numSpanks = numSpanks + 1; numSpanksSpam = numSpanksSpam + 1; if (numSpanksSpam >= 10) { cb.sendNotice('The Spank Counter is at ' + [numSpanks] + ' for today.','','',cb.settings['lcnoticecolor'],'bold'); numSpanksSpam = 0; } break; default: text = ''; } } } else { for (var i = 1; i <= MAXITEMS; i++) { if (tip_amt == tipmenuprice[i]) { requesters.push(tip['from_user']); request.push(fantipmenuitem[i]); requestTime.push(t); cb.sendNotice(tip['from_user'] + ' tipped for ' + tipmenuitem[i],'','',cb.settings['noticecolor'],'bold'); } } switch (tip_amt) { case 12: numSpanks = numSpanks + 1; numSpanksSpam = numSpanksSpam + 1; if (numSpanksSpam >= 10) { cb.sendNotice('The Spank Counter is at ' + [numSpanks] + ' for today.','','',cb.settings['lcnoticecolor'],'bold'); numSpanksSpam = 0; } break; case 31: numSpanks = numSpanks + 4; numSpanksSpam = numSpanksSpam + 1; if (numSpanksSpam >= 10) { cb.sendNotice('The Spank Counter is at ' + [numSpanks] + ' for today.','','',cb.settings['lcnoticecolor'],'bold'); numSpanksSpam = 0; } break; case 48: numSquats = numSquats + 10; numSquatsSpam = numSquatsSpam + 1; if (numSquatsSpam >= 10) { cb.sendNotice('The Squat Counter is at ' + [numSquats] + ' for today.','','',cb.settings['lcnoticecolor'],'bold'); numSquatsSpam = 0; } break; default: text = ''; } } switch (tip_amt) { case 189: cb.sendNotice('**************UNMUTE Aalliss**************','','',cb.settings['dnoticecolor'],'bold'); cb.sendNotice('Take 10 mins off the Silence Timer','','',cb.settings['dnoticecolor'],'bold'); cb.sendNotice('******************************************','','',cb.settings['dnoticecolor'],'bold'); break; case 200: cb.sendNotice('**************UNMUTE Aalliss**************','','',cb.settings['noticecolor'],'bold'); cb.sendNotice('Take 10 mins off the Silence Timer','','',cb.settings['noticecolor'],'bold'); cb.sendNotice('******************************************','','',cb.settings['noticecolor'],'bold'); break; case 212: cb.sendNotice('************Mod**C2C**C2C**C2C************','','',cb.settings['dnoticecolor'],'bold','red'); cb.sendNotice('************C2C**C2C**C2C**C2C************','','',cb.settings['dnoticecolor'],'bold','red'); cb.sendNotice('******************************************','','',cb.settings['dnoticecolor'],'bold'); cb.sendNotice(tip['from_user'] + ' tipped for C2C','','',cb.settings['dnoticecolor'],'bold'); cb.sendNotice('******************************************','','',cb.settings['dnoticecolor'],'bold'); cb.sendNotice('******************************************','','',cb.settings['dnoticecolor'],'bold'); break; case 389: cb.sendNotice('***************MUTE Aalliss***************','','',cb.settings['dnoticecolor'],'bold'); cb.sendNotice('Add 10 mins to the Silence Timer','','',cb.settings['dnoticecolor'],'bold'); cb.sendNotice('******************************************','','',cb.settings['dnoticecolor'],'bold'); break; case 444: cb.sendNotice('***************LUSH CONTROL***************','','',cb.settings['lcnoticecolor'],'bold'); cb.sendNotice(tip['from_user'] + ' tipped for 90 seconds Lush control','','',cb.settings['lcnoticecolor'],'bold'); cb.sendNotice('******************************************','','',cb.settings['lcnoticecolor'],'bold'); break; case 467: cb.sendNotice('*************FREEDOM TO TOUCH*************','','',cb.settings['dnoticecolor'],'bold'); cb.sendNotice('Take 10 mins off the Denial Timer','','',cb.settings['dnoticecolor'],'bold'); cb.sendNotice('******************************************','','',cb.settings['dnoticecolor'],'bold'); break; case 468: cb.sendNotice('***************TOUCH DENIAL***************','','',cb.settings['dnoticecolor'],'bold'); cb.sendNotice('Add 10 mins to the Denial Timer','','',cb.settings['dnoticecolor'],'bold'); cb.sendNotice('******************************************','','',cb.settings['dnoticecolor'],'bold'); break; case 1000 <= 4443: cb.sendNotice('******************************************','','',cb.settings['dnoticecolor'],'bold'); cb.sendNotice(tip['from_user'] + ' tipped ' + tip_amt,'','',cb.settings['dnoticecolor'],'bold'); cb.sendNotice('******************************************','','',cb.settings['dnoticecolor'],'bold'); break; case 4444: cb.sendNotice('***************LUSH CONTROL***************','','',cb.settings['lcnoticecolor'],'bold'); cb.sendNotice('******************************************','','',cb.settings['lcnoticecolor'],'bold'); cb.sendNotice(tip['from_user'] + ' tipped for 25 minutes Lush control','','',cb.settings['lcnoticecolor'],'bold'); cb.sendNotice('******************************************','','',cb.settings['lcnoticecolor'],'bold'); cb.sendNotice('******************************************','','',cb.settings['lcnoticecolor'],'bold'); cb.sendNotice(':aallclap :aallboom :aallclap','','',cb.settings['lcnoticecolor'],'bold'); break; case 4445 <= 5000: cb.sendNotice('***BOOM*BOOM*BOOM*BOOM*BOOM*BOOM*BOOM***','','',cb.settings['noticecolor'],'bold'); cb.sendNotice('******************************************','','',cb.settings['noticecolor'],'bold'); cb.sendNotice(tip['from_user'] + ' tipped ' + tip_amt,'','',cb.settings['noticecolor'],'bold'); cb.sendNotice(':aalltnx OMG OMG OMG Thank You!! :aalltnx','','',cb.settings['noticecolor']); cb.sendNotice('******************************************','','',cb.settings['noticecolor'],'bold'); cb.sendNotice('******************************************','','',cb.settings['noticecolor'],'bold'); cb.sendNotice(':aallclap :aallboom :aallclap','','',cb.settings['lcnoticecolor'],'bold'); break; case 5000: cb.sendNotice('***BOOM*BOOM*BOOM*BOOM*BOOM*BOOM*BOOM***','','',cb.settings['noticecolor'],'bold'); cb.sendNotice('******************************************','','',cb.settings['noticecolor'],'bold'); cb.sendNotice('******************************************','','',cb.settings['noticecolor'],'bold'); cb.sendNotice('******************************************','','',cb.settings['noticecolor'],'bold'); cb.sendNotice('******************************************','','',cb.settings['noticecolor'],'bold'); cb.sendNotice(tip['from_user'] + ' tipped ' + tip_amt,'','',cb.settings['noticecolor'],'bold'); cb.sendNotice(':aalltnx OMG OMG OMG Thank You!! :aalltnx','','',cb.settings['noticecolor']); cb.sendNotice(':aallclap :aallboom :aallclap','','',cb.settings['lcnoticecolor'],'bold'); cb.sendNotice('******************************************','','',cb.settings['noticecolor'],'bold'); cb.sendNotice('******************************************','','',cb.settings['noticecolor'],'bold'); cb.sendNotice('******************************************','','',cb.settings['noticecolor'],'bold'); cb.sendNotice('******************************************','','',cb.settings['noticecolor'],'bold'); break; case 5001: cb.sendNotice('***BOOM*BOOM*BOOM*BOOM*BOOM*BOOM*BOOM***','','',cb.settings['noticecolor'],'bold'); cb.sendNotice('******************************************','','',cb.settings['noticecolor'],'bold'); cb.sendNotice('******************************************','','',cb.settings['noticecolor'],'bold'); cb.sendNotice('******************************************','','',cb.settings['noticecolor'],'bold'); cb.sendNotice('******************************************','','',cb.settings['noticecolor'],'bold'); cb.sendNotice(tip['from_user'] + ' tipped ' + tip_amt,'','',cb.settings['noticecolor'],'bold'); cb.sendNotice(':aalltnx OMG OMG OMG Thank You!! :aalltnx','','',cb.settings['noticecolor']); cb.sendNotice(':aallclap :aallboom :aallclap','','',cb.settings['lcnoticecolor'],'bold'); cb.sendNotice('******************************************','','',cb.settings['noticecolor'],'bold'); cb.sendNotice('******************************************','','',cb.settings['noticecolor'],'bold'); cb.sendNotice('******************************************','','',cb.settings['noticecolor'],'bold'); cb.sendNotice('******************************************','','',cb.settings['noticecolor'],'bold'); break; default: text = ''; } }); cb.onMessage(function(m) { if (m['m'].charAt(0) == "/") { var u = m['user']; var message = m['m'].split(" "); var isMod = m['is_mod']; var symbolString = '~`!@#$%^&*()_-+={[}]|\\:;"\'<,>.?/'; switch (message[0]) { case "/fantipmenu": m['X-Spam'] = true; m['background'] = '#d9d9d9'; cb.sendNotice(fanmsg,u,'',cb.settings['fnoticecolor'],'bold'); cb.sendNotice('Only my mods and current members of my Fan Club are eligible for the Fan Club Tip Menu.',u,'',cb.settings['fnoticecolor'],''); return m; case "/rules": m['X-Spam'] = true; m['background'] = '#d9d9d9'; cb.sendNotice('***************ROOM RULES***************','','',cb.settings['noticecolor'],'bold'); cb.sendNotice ( '#Never call me Baby, BB, or babe! It\'s my choice, please resct it' + '\n#Always speak in English' + '\n#Treat me, my mods and everyone in my room with respect' + '\n#I don\’t care if you have tipped, if you are rude my mods will silence you' + '\n#Don’t worry if you cant contribute/tip, just say hi, be nice and hang out' + '\n#Please keep dirty talk in tip notes and do not post any pornographic gifs' + '\n#Don’t beg or ask for free requests' + '\n#Please make all requests in a tip note' + '\n#For my safety, I do not answer any questions about my location' ,u,'',cb.settings['noticecolor'] ); return m; case "/tipmenu": m['X-Spam'] = true; m['background'] = '#d9d9d9'; cb.sendNotice(msg,u,'',cb.settings['noticecolor'],'bold'); return m; case "/tipmenurequests": m['X-Spam'] = true; m['background'] = '#d9d9d9'; if (isMod && message[0] == "/tipmenurequests") { u = ''; } var rL = request.length; if (rL == 0) { cb.sendNotice("There is no request at the moment.", u, menuBGColor1, menuTColor1); } else { var cmdInt1 = parseInt(message['1']); if (cmdInt1 <= 0) { cb.sendNotice('**** Here are the last 0 requests! :p', u, menuBGColor1, menuTColor1); } else { var noticeMsg; var rS = 0; if (message['1'] == "all" || message['1'] == "All") { cmdInt1 = rL; } else if (cmdInt1 == undefined || isNaN(cmdInt1)) { cmdInt1 = 10; rS = rL - 10; } if (rL <= cmdInt1) { noticeMsg = '**** Here is the list of all the requests! ****\n'; cmdInt1 = rL; rS = 0; } else if (rL > 100) { noticeMsg = '**** Here is are the last 100 requests! ****\n'; rS = rL - 100; } else { noticeMsg = '**** Here ' + (cmdInt1 == 1 ? "is the last" : "are the last " + cmdInt1) + ' request' + (cmdInt1 == 1 ? "" : "s") + '! **** \n'; rS = rL - cmdInt1; } for (var x = rS; x < rL; x++) { noticeMsg +=' #' + (x + 1) + ': ' + requesters[x] + ' requested ' + request[x] + ' at ' + requestTime[x] + '\n'; } noticeMsg += '**************************************'; cb.sendNotice(noticeMsg, u, menuBGColor1, menuTColor1); } } return m; } } }); function chatAd() { if (msg!='Tip Menu: ') { cb.sendNotice(msg,'','',cb.settings['noticecolor'],'bold'); } if (fanmsg!='Fan Tip Menu: ') { cb.sendNotice(fanmsg,'','',cb.settings['fnoticecolor'],'bold'); } cb.setTimeout(chatAd, (cb.settings.chat_ad * 60000)); } cb.setTimeout(chatAd, (cb.settings.chat_ad * 60000)); function init() { for (i=0;i<=MAXSEP-1;i++) { if (cb.settings['sepchar'] == separators[i].label) { separator_char = separators[i].shortcut + ' '; } } msg = 'Tip Menu: '; for (i=1;i<=MAXITEMS;i++) { var tmp; tmp=cb.settings['item' + i]; if (tmp) { var arr= tmp.split('--'); if (arr[1]===undefined) { cb.sendNotice('Error-You need two dashes to separate the tip amount and menu item for item no '+ i,'','',cb.settings['noticecolor'],'bold'); } else { var amt=parseInt(arr[0]); if (amt>0) { tipmenuprice[i]=amt; tipmenuitem[i]=arr[1]; if (i>=2) { msg += separator_char; } msg += arr[1] + ' (' + amt + ') '; } } } } if (msg!= 'Tip Menu: ') { cb.sendNotice(msg,'','',cb.settings['noticecolor'],'bold'); } else { cb.sendNotice('Error-No menu items found','','',cb.settings['noticecolor'],'bold'); } for (i=0;i<=FANMAXSEP-1;i++) { if (cb.settings['sepchar'] == separators[i].label) { separator_char = separators[i].shortcut + ' '; } } fanmsg = 'Aalliss\'s Fan Club Tip Menu: '; for (i=1;i<=FANMAXITEMS;i++) { var tmp1; tmp1=cb.settings['fitem' + i]; if (tmp1) { var farr= tmp1.split('--'); if (farr[1]===undefined) { cb.sendNotice('Error-You need two dashes to separate the tip amount and menu item for item no '+ i,'','',cb.settings['noticecolor'],'bold'); } else { var famt=parseInt(farr[0]); if (famt>0) { fantipmenuprice[i]=famt; fantipmenuitem[i]=farr[1]; if (i>=2) { fanmsg += separator_char; } fanmsg += farr[1] + ' (' + famt + ') '; } } } } if (fanmsg!= 'Aalliss\'s Fan Club Tip Menu: ') { cb.sendNotice(fanmsg,'','',cb.settings['fnoticecolor'],'bold'); cb.sendNotice('Only my mods and current members of my Fan Club are eligible for the Fan Club Tip Menu.','','',cb.settings['fnoticecolor'],''); } else { cb.sendNotice('Error-No menu items found','','',cb.settings['fnoticecolor'],'bold'); } } init();
© Copyright Chaturbate 2011- 2024. All Rights Reserved.