Apps Home
|
Create an App
ntgfnjuy
Author:
mistressadelle
Description
Source Code
Launch App
Current Users
Created by:
Mistressadelle
var MaxValue = 50; var i=1; var total_tipped = 0; var high_tip_username = null; var high_tip_amount = 0; var last_tip_username = null; var last_tip_amount = 0; var subject_is_set_with_0 = false; //что внутри приложухи cb.settings_choices = [ {name: 'toc0', label: '**************************************************************** Welcome back, Mistress! ****************************************************************', type: 'choice',required: false}, {name: 'toc1', label: '**************************************************************** Section 1 Notices ****************************************************************', type: 'choice',required: false}, //список нотисов {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: false, 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:'msg11', type:'str', required: false, label:'Message 11',}, {name:'msg12', type:'str', required: false, label:'Message 12',}, {name:'msg13', type:'str', required: false, label:'Message 13',}, {name:'msg14', type:'str', required: false, label:'Message 14',}, {name:'msg15', type:'str', required: false, label:'Message 15',}, {name:'msg16', type:'str', required: false, label:'Message 16',}, {name:'msg17', type:'str', required: false, label:'Message 17',}, {name:'msg18', type:'str', required: false, label:'Message 18',}, {name:'msg19', type:'str', required: false, label:'Message 19',}, {name:'msg20', type:'str', required: false, label:'Message 20',}, {name:'msg21', type:'str', required: false, label:'Message 21',}, {name:'msg22', type:'str', required: false, label:'Message 22',}, {name:'msg23', type:'str', required: false, label:'Message 23',}, {name:'msg24', type:'str', required: false, label:'Message 24',}, {name:'msg25', type:'str', required: false, label:'Message 25',}, {name:'msg26', type:'str', required: false, label:'Message 26',}, {name:'msg27', type:'str', required: false, label:'Message 27',}, {name:'msg28', type:'str', required: false, label:'Message 28',}, {name:'msg29', type:'str', required: false, label:'Message 29',}, {name:'msg30', type:'str', required: false, label:'Message 30',}, {name:'msg31', type:'str', required: false, label:'Message 31',}, {name:'msg32', type:'str', required: false, label:'Message 32',}, {name:'msg33', type:'str', required: false, label:'Message 33',}, {name:'msg34', type:'str', required: false, label:'Message 34',}, {name:'msg35', type:'str', required: false, label:'Message 35',}, {name:'msg36', type:'str', required: false, label:'Message 36',}, {name:'msg37', type:'str', required: false, label:'Message 37',}, {name:'msg38', type:'str', required: false, label:'Message 38',}, {name:'msg39', type:'str', required: false, label:'Message 39',}, {name:'msg40', type:'str', required: false, label:'Message 40',}, {name:'msg41', type:'str', required: false, label:'Message 41',}, {name:'msg42', type:'str', required: false, label:'Message 42',}, {name:'msg43', type:'str', required: false, label:'Message 43',}, {name:'msg44', type:'str', required: false, label:'Message 44',}, {name:'msg45', type:'str', required: false, label:'Message 45',}, {name:'msg46', type:'str', required: false, label:'Message 46',}, {name:'msg47', type:'str', required: false, label:'Message 47',}, {name:'msg48', type:'str', required: false, label:'Message 48',}, {name:'msg49', type:'str', required: false, label:'Message 49',}, {name:'msg50', type:'str', required: false, label:'Message 50',}, {name:'msg51', type:'str', required: false, label:'Message 51',}, {name:'msg52', type:'str', required: false, label:'Message 52',}, {name:'msg53', type:'str', required: false, label:'Message 53',}, {name:'msg54', type:'str', required: false, label:'Message 54',}, {name:'msg55', type:'str', required: false, label:'Message 55',}, {name:'msg56', type:'str', required: false, label:'Message 56',}, {name:'msg57', type:'str', required: false, label:'Message 57',}, {name:'msg58', type:'str', required: false, label:'Message 58',}, {name:'msg59', type:'str', required: false, label:'Message 59',}, {name:'msg60', type:'str', required: false, label:'Message 60',}, {name:'msg61', type:'str', required: false, label:'Message 61',}, {name:'msg62', type:'str', required: false, label:'Message 62',}, {name:'msg63', type:'str', required: false, label:'Message 63',}, {name:'msg64', type:'str', required: false, label:'Message 64',}, {name:'msg65', type:'str', required: false, label:'Message 65',}, {name:'msg66', type:'str', required: false, label:'Message 66',}, {name:'msg67', type:'str', required: false, label:'Message 67',}, {name:'msg68', type:'str', required: false, label:'Message 68',}, {name:'msg69', type:'str', required: false, label:'Message 69',}, {name:'msg70', type:'str', required: false, label:'Message 70',}, {name:'msg71', type:'str', required: false, label:'Message 71',}, {name:'msg72', type:'str', required: false, label:'Message 72',}, {name:'msg73', type:'str', required: false, label:'Message 73',}, {name:'msg74', type:'str', required: false, label:'Message 74',}, {name:'msg75', type:'str', required: false, label:'Message 75',}, {name:'msg76', type:'str', required: false, label:'Message 76',}, {name:'msg77', type:'str', required: false, label:'Message 77',}, {name:'msg78', type:'str', required: false, label:'Message 78',}, {name:'msg79', type:'str', required: false, label:'Message 79',}, {name:'msg80', type:'str', required: false, label:'Message 80',}, {name:'msg81', type:'str', required: false, label:'Message 81',}, {name:'msg82', type:'str', required: false, label:'Message 82',}, {name:'msg83', type:'str', required: false, label:'Message 83',}, {name:'msg84', type:'str', required: false, label:'Message 84',}, {name:'msg85', type:'str', required: false, label:'Message 85',}, {name:'msg86', type:'str', required: false, label:'Message 86',}, {name:'msg87', type:'str', required: false, label:'Message 87',}, {name:'msg88', type:'str', required: false, label:'Message 88',}, {name:'msg89', type:'str', required: false, label:'Message 89',}, {name:'msg90', type:'str', required: false, label:'Message 90',}, {name:'msg91', type:'str', required: false, label:'Message 91',}, {name:'msg92', type:'str', required: false, label:'Message 92',}, {name:'msg93', type:'str', required: false, label:'Message 93',}, {name:'msg94', type:'str', required: false, label:'Message 94',}, {name:'msg95', type:'str', required: false, label:'Message 95',}, {name:'msg96', type:'str', required: false, label:'Message 96',}, {name:'msg97', type:'str', required: false, label:'Message 97',}, {name:'msg98', type:'str', required: false, label:'Message 98',}, {name:'msg99', type:'str', required: false, label:'Message 99',}, {name:'msg100', type:'str', required: false, label:'Message 100',}, //цвет нотисов {name:'msgcolor', type:'str', label:'Notice color (html code default dark red #9F000F)', defaultValue: '#9F000F'}, {name:'background', type: 'str', label: 'Color of backround is rainbow, dont change', defaultValue:'linear-gradient(to right, rgba(255,50,50,0.1) 0%,rgba(255,255,48,0.1) 26%,rgba(40,255,251,0.1) 60%,rgba(169,40,255,0.1) 99%)'}, //время в минутах {name: 'chat_ad', label: 'Delay in minutes between notices being displayed', type: 'str',defaultValue: 3.1,required: false}, {name: 'toc2', label: '**************************************************************** Section 2 Rainbow chat ****************************************************************', type: 'choice',required: false}, //цветной текст {name: 'InputName1', type: 'str', label: 'Not used for anything', defaultValue: 'SomeText'}, {name: 'toc3', label: '**************************************************************** Section 3 Hide gray chatting ****************************************************************', type: 'choice',required: false}, //затык серых { name: "msg_replace", type: "str", minLength: 1, maxLength: 255, defaultValue: "meow meow meow", label: "Replace messages of users without tokens with this message", required: true }, { name: "msg_control", label: "Show message to all", type: "choice", choice1: "yes", choice2: "no", defaultValue: "no", required: true }, //rules {name: 'toc4', label: '**************************************************************** Section 4 Room Rules ****************************************************************', type: 'choice',required: false}, {name:'rule1', type:'str', minLength:1, maxLength:300, label:'Rule #1'}, {name:'rule2', type:'str', minLength:1, maxLength:300, label:'Rule #2 (optional)', required:false}, {name:'rule3', type:'str', minLength:1, maxLength:300, label:'Rule #3 (optional)', required:false}, {name:'rule4', type:'str', minLength:1, maxLength:300, label:'Rule #4 (optional)', required:false}, {name:'rule5', type:'str', minLength:1, maxLength:300, label:'Rule #5 (optional)', required:false}, {name:'rule6', type:'str', minLength:1, maxLength:300, label:'Rule #6 (optional)', required:false}, {name:'rule7', type:'str', minLength:1, maxLength:300, label:'Rule #7 (optional)', required:false}, {name:'rule8', type:'str', minLength:1, maxLength:300, label:'Rule #8 (optional)', required:false}, {name:'rule9', type:'str', minLength:1, maxLength:300, label:'Rule #9 (optional)', required:false}, {name:'rule10', type:'str', minLength:1, maxLength:300, label:'Rule #10 (optional)', required:false}, {name:'advertisement_wait_time', type:'choice', label:'Notification Time (in minutes)', choice1:5, choice2:10, choice3:15, choice4:20, choice5:25, choice6:30, choice7:45, choice8:60, defaultValue:15}, {name: 'toc5', label: '**************************************************************** Section 5 Follow and Unfollow me ****************************************************************', type: 'choice',required: false}, //подписота {name: 'EnFollow', type: 'choice', choice1: 'yes', choice2: 'no', defaultValue: 'yes', label: "Enable notices for new followers"}, {name:'msgfollow', type:'str', minLength:1, maxLength:300, label:'Notice for new followers'}, {name:'EnFollowColor', type:'str', label:'Notice color for new followers', defaultValue: '#425e00'}, {name:'EnFollowBGColor', type:'str', label:'Notice background color for new followers', defaultValue: '#e6f7bc'}, //отписота {name: 'EnUnFollow', type: 'choice', choice1: 'yes', choice2: 'no', defaultValue: 'yes', label: "Enable notices for unfollowed users"}, {name:'EnUnFollowColor', type:'str', label:'Notice color for unfollowers', defaultValue: '#425e00'}, {name:'EnUnFollowBGColor', type:'str', label:'Notice background color for unfollowers', defaultValue: '#e6f7bc'}, {name:'msgunfollow', type:'str', minLength:1, maxLength:300, label:'Notice for unfollowed users'}, {name: 'toc6', label: '**************************************************************** Section 6 Make it rain ****************************************************************', type: 'choice',required: false}, //дождь {name: 'min_tokens', type: 'int', minValue: 1, maxValue: 10000, defaultValue: 150, label: "Minimum Tips to make it rain"}, {name: 'rain_amount', type: 'int', minValue: 1, maxValue: 50, defaultValue: 25, label: "How Many Lines of Rain?"}, //ивенты {name: 'toc7', label: '**************************************************************** Section 7 Special Events ****************************************************************', type: 'choice',required: false}, {name:'event1', type:'str', minLength:1, maxLength:300, label:'Event #1'}, {name:'event2', type:'str', minLength:1, maxLength:300, label:'Event #2 (optional)', required:false}, {name:'event3', type:'str', minLength:1, maxLength:300, label:'Event #3 (optional)', required:false}, {name: 'event_ad', label: 'Delay in minutes between notices being displayed', type: 'str',defaultValue: 88.4 ,required: false}, {name: 'toc8', label: '**************************************************************** Section 8 Media list ****************************************************************', type: 'choice',required: false}, {name:'linkname1', type:'str', minLength:1, maxLength:300, label:'Linkname #1 (optional)', required:false}, {name:'link1', type:'str', minLength:1, maxLength:300, label:'Link #1'}, {name:'linkname2', type:'str', minLength:1, maxLength:300, label:'Linkname #2 (optional)', required:false}, {name:'link2', type:'str', minLength:1, maxLength:300, label:'Link #2 (optional)', required:false}, {name:'linkname3', type:'str', minLength:1, maxLength:300, label:'Linkname #3 (optional)', required:false}, {name:'link3', type:'str', minLength:1, maxLength:300, label:'Link #3 (optional)', required:false}, {name:'linkname4', type:'str', minLength:1, maxLength:300, label:'Linkname #4 (optional)', required:false}, {name:'link4', type:'str', minLength:1, maxLength:300, label:'Link #4 (optional)', required:false}, {name:'linkname5', type:'str', minLength:1, maxLength:300, label:'Linkname #5 (optional)', required:false}, {name:'link5', type:'str', minLength:1, maxLength:300, label:'Link #5 (optional)', required:false}, {name:'linkname6', type:'str', minLength:1, maxLength:300, label:'Linkname #6 (optional)', required:false}, {name:'link6', type:'str', minLength:1, maxLength:300, label:'Link #6 (optional)', required:false}, {name:'linkname7', type:'str', minLength:1, maxLength:300, label:'Linkname #7 (optional)', required:false}, {name:'link7', type:'str', minLength:1, maxLength:300, label:'Link #7 (optional)', required:false}, {name:'linkname8', type:'str', minLength:1, maxLength:300, label:'Linkname #8 (optional)', required:false}, {name:'link8', type:'str', minLength:1, maxLength:300, label:'Link #8 (optional)', required:false}, {name:'linkname9', type:'str', minLength:1, maxLength:300, label:'Linkname #9 (optional)', required:false}, {name:'link9', type:'str', minLength:1, maxLength:300, label:'Link #9 (optional)', required:false}, {name:'linkname10', type:'str', minLength:1, maxLength:300, label:'Linkname #10 (optional)', required:false}, {name:'link10', type:'str', minLength:1, maxLength:300, label:'Link #10 (optional)', required:false}, {name:'linkname11', type:'str', minLength:1, maxLength:300, label:'Linkname #11 (optional)', required:false}, {name:'link11', type:'str', minLength:1, maxLength:300, label:'Link #11 (optional)', required:false}, {name:'linkname12', type:'str', minLength:1, maxLength:300, label:'Linkname #12 (optional)', required:false}, {name:'link12', type:'str', minLength:1, maxLength:300, label:'Link #12 (optional)', required:false}, {name:'linkname13', type:'str', minLength:1, maxLength:300, label:'Linkname #13 (optional)', required:false}, {name:'link13', type:'str', minLength:1, maxLength:300, label:'Link #13 (optional)', required:false}, {name:'linkname14', type:'str', minLength:1, maxLength:300, label:'Linkname #14 (optional)', required:false}, {name:'link14', type:'str', minLength:1, maxLength:300, label:'Link #14 (optional)', required:false}, {name:'linkname15', type:'str', minLength:1, maxLength:300, label:'Linkname #15 (optional)', required:false}, {name:'link15', type:'str', minLength:1, maxLength:300, label:'Link #15 (optional)', required:false}, {name:'linkname16', type:'str', minLength:1, maxLength:300, label:'Linkname #16 (optional)', required:false}, {name:'link16', type:'str', minLength:1, maxLength:300, label:'Link #16 (optional)', required:false}, {name:'linkname17', type:'str', minLength:1, maxLength:300, label:'Linkname #17 (optional)', required:false}, {name:'link17', type:'str', minLength:1, maxLength:300, label:'Link #17 (optional)', required:false}, {name:'linkname18', type:'str', minLength:1, maxLength:300, label:'Linkname #18 (optional)', required:false}, {name:'link18', type:'str', minLength:1, maxLength:300, label:'Link #18 (optional)', required:false}, {name:'linkname19', type:'str', minLength:1, maxLength:300, label:'Linkname #19 (optional)', required:false}, {name:'link19', type:'str', minLength:1, maxLength:300, label:'Link #19 (optional)', required:false}, {name:'linkname20', type:'str', minLength:1, maxLength:300, label:'Linkname #20 (optional)', required:false}, {name:'link20', type:'str', minLength:1, maxLength:300, label:'Link #20 (optional)', required:false}, {name: 'media_ad', label: 'Delay in minutes between notices being displayed', type: 'str',defaultValue: 75.6 ,required: false}, {name: 'toc9', label: '**************************************************************** Section 9 Hashtags ****************************************************************', type: 'choice',required: false}, {name:'item1', type:'str', label:'Subject 1', required:false, defaultValue:'cute sexy young'}, {name:'item2', type:'str', label:'Subject 2', required:false, defaultValue:'Make me wet with your tip -- lovense omibod'}, {name:'item3', type:'str', label:'Subject 3', required:false, defaultValue:'Help me cum --'}, {name:'item4', type:'str', label:'Subject 4', required:false, defaultValue:''}, {name:'item5', type:'str', label:'Subject 5', required:false, defaultValue:''}, {name:'item6', type:'str', label:'Subject 6', required:false, defaultValue:''}, {name:'item7', type:'str', label:'Subject 7', required:false, defaultValue:''}, {name:'item8', type:'str', label:'Subject 8', required:false, defaultValue:''}, {name:'item9', type:'str', label:'Subject 9', required:false, defaultValue:''}, {name:'item10', type:'str', label:'Subject 10', required:false, defaultValue:''}, {name: 'item_ad', label: 'Delay in minutes between changing hashtags', type: 'str',defaultValue: 1,required: false}, {name: 'tokens', type: 'int', minValue: 1, default: 100}, {name: 'goal_description', type: 'str', minLength: 1, maxLength: 255}, {name: 'toc10', label: '**************************************************************** Section 10 Auto-thanks ****************************************************************', type: 'choice',required: false}, ]; cb.settings_choices.push({"name": "msgcolorfg", "type": "str", "required": false, "minLength": 0, "maxLength": 7, "defaultValue": "#FFFFFF", "label": "Thank You Message Foreground Color"} , {"name": "msgcolorbg", "type": "str", "required": false, "minLength": 0, "maxLength": 7, "defaultValue": "#000000", "label": "Thank You Message Background Color"}); for(var i = 1; i <= MaxValue; i ++) { // build dynamic interface based on MaxValue if (i == 1) { // build output strings for 1st run instructions cb.settings_choices.push({"name": "tipamount" + i, "type": "int", "required": false, "minValue": 1, "defaultValue": "14", "label": "This Exact Tip Amount"} , {"name": "tipmsg" + i, "type": "str", "required": false, "minLength": 1, "maxLength": 128, "defaultValue": "[tipper] tipped for PM. Thanks, [tipper]!", "label": "Responds With This Public Thank You Note"}); } else if (i == 2) { cb.settings_choices.push({"name": "tipamount" + i, "type": "int", "required": false, "minValue": 1, "defaultValue": "133", "label": "Tip Amount 02"} , {"name": "tipmsg" + i, "type": "str", "required": false, "minLength": 1, "maxLength": 128, "defaultValue": "You want to see my Boobs? Thanks [tipper]!!", "label": "Thank You Note 02"}) } else { if (i < 10) { cb.settings_choices.push({"name": "tipamount" + i, "type": "int", "required": false, "minValue": 1, "defaultValue": "", "label": "Tip Amount 0" + i} , {"name": "tipmsg" + i, "type": "str", "required": false, "minLength": 1, "maxLength": 128, "defaultValue": "", "label": "Thank You Note 0" + i}); } else { cb.settings_choices.push({"name": "tipamount" + i, "type": "int", "required": false, "minValue": 1, "defaultValue": "", "label": "Tip Amount " + i} , {"name": "tipmsg" + i, "type": "str", "required": false, "minLength": 1, "maxLength": 128, "defaultValue": "", "label": "Thank You Note " + i}); } } } function is_model(message) { return (message.user == cb.room_slug); }; //variables from room rules var i=1; var meanBroadcasters = ['missilex']; //вход юзера cb.onEnter(function(user) { if (cb.settings['msgonentry'] == 'yes') { cb.sendNotice('Welcome ' + user['user'] + '! ' + cb.settings['msg1'],user['user'],'',cb.settings['msgcolor'],'bold'); } }); //rules cb.onEnter(function(user) { if(meanBroadcasters.indexOf(cb.room_slug) < 0) { cb.sendNotice('Lets start conversation, ' + user['user'] + '. First read my room rules before chatting. Hope you will follow them!', user['user'], '#DBFFDB', '', '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]; } notices += '\n######################'; cb.sendNotice(notices, username, '#E6FFFF', '#003399', 'bold'); if(!user || user == null) cb.setTimeout(displayRules, cb.settings.advertisement_wait_time * 60000); } //штука, отвечающая за нотифайер function chatAd() { var msg; while (cb.settings['msg' + i] == 0) { //пропустить пустые i++; if (i > 65) { //вернуться к первому i=1; } } msg = cb.settings['msg' + i]; i++; if (i > 100) { //вернуться к первому i=1; } cb.sendNotice(msg,'',cb.settings['background'],cb.settings['msgcolor'],'bold'); cb.setTimeout(chatAd, (cb.settings.chat_ad * 60000)); } cb.setTimeout(chatAd, (cb.settings.chat_ad * 60000)); function is_model(message) { return (message.user == cb.room_slug); } //цвет подложки cb.onMessage(function (message) {message['background'] = "linear-gradient(to right, rgba(255,50,50,0.3) 0%,rgba(255,255,48,0.3) 26%,rgba(40,255,251,0.3) 60%,rgba(169,40,255,0.3) 99%)"; var msg = cb.settings.msg_replace; if ((!message.has_tokens) && (!message.is_mod) && (!message.in_fanclub) && (!is_model(message))) { message.m = msg; if (cb.settings.msg_control == "no"){ message.m = msg; message['X-Spam'] = true; } } return message; }); cb.onUnFollow(user => { if (cb.settings['EnUnFollow'] == 'yes') { cb.chatNotice cb.chatNotice(user['user'] + ', '+ cb.settings['msgunfollow'],' ',cb.settings['EnUnFollowBGColor'],cb.settings['EnUnFollowColor'],'bold'); }; }); cb.onFollow(user => { if (cb.settings['EnFollow'] == 'yes') { cb.chatNotice (cb.settings['msgfollow'],' ',cb.settings['EnFollowBGColor'],cb.settings['EnFollowColor'],'bold'); }; }); var total_tipped = 0; var i; cb.onTip(function (tip) { total_tipped = parseInt(tip['amount']); if(total_tipped >= cb.settings.min_tokens) { cb.sendNotice("$$$ " + tip['from_user'] + " made it rain! $$$", '', '#000000', '#FFFF00', 'bolder'); for(i=0;i<cb.settings.rain_amount;i++) { var dollars = Math.ceil(Math.random() * 21); var msg = ''; while(dollars) { msg += "$"; dollars--; } cb.sendNotice(msg, '', '#000000', '#00ff00', 'bolder'); } cb.sendNotice(tip['from_user'] + " Tipped " + total_tipped + " For This Rain!", '', '#000000', '#00ff00', 'bolder'); cb.sendNotice(" :mlove2 " + tip['from_user'] + " For Tipping :mclap ", '', '#FFFFFF', '#ff0000', 'bolder'); cb.log(tip['from_user'] + " Tipped " + total_tipped); } }); function roomNotify() { cb.sendNotice(" :rain2 " + cb.settings.min_tokens + " To Make It Rain :raintkn", '', '#FFFFFF', '#FF0000', 'bold'); cb.setTimeout(roomNotify, 4080000) } //ивенты function displayEvents(user) { var username = ''; if(user) username = user['user']; var notices = '********* SPECIAL EVENTS **********'; for(var i=1; i<=3;i++) { if(cb.settings['event' + i]) notices += '\nEvent #'+ i +': ' + cb.settings['event'+i]; } notices += '\n*******************************'; cb.sendNotice(notices, username, '#c7fcec', '#122faa', 'bold'); if(!user || user == null) cb.setTimeout(displayEvents, cb.settings.event_ad * 60000); } //медиа function displayMedia(user) { var username = ''; if(user) username = user['user']; var notices = '☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ MEDIA LIST ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ '; for(var i=1; i<=20;i++) { if(cb.settings['link' + i]) notices += '\n'+cb.settings['linkname'+i] +': ' + cb.settings['link'+i]; } notices += '\n ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆'; cb.sendNotice(notices, username, 'linear-gradient(90deg, rgba(227,144,255,1) 0%, rgba(149,149,252,1) 50%, rgba(255,255,255,1) 100%)', '#2C01A4', 'bold'); if(!user || user == null) cb.setTimeout(displayMedia, cb.settings.media_ad * 60000); } var msgcolorbg = ""; var msgcolorfg = ""; if (cb.settings.msgcolorbg) { msgcolorbg = cb.settings.msgcolorbg.trim(); } if (cb.settings.msgcolorfg) { msgcolorfg = cb.settings.msgcolorfg.trim(); } cb.onTip(function(tip) { var tipuser = tip.from_user.trim().charAt(0).toUpperCase() + tip.from_user.slice(1, tip.from_user.length).toLowerCase(); if (tip.is_anon_tip) { tipuser = "Anonymous"; } // override output for cb's new anonymous tip option for (var t = 1; t <= MaxValue; t++) { // build public chat message output string if (parseInt(tip.amount) == parseInt(cb.settings['tipamount' + t])) { if (cb.settings['tipmsg' + t]) { cb.sendNotice(cb.settings['tipmsg' + t].replace(/\[tipper\]/g, tipuser).trim(), '', msgcolorbg, msgcolorfg, 'bold'); } } } }); cb.onTip(function(tip) { total_tipped += tip['amount'] if (total_tipped > cb.settings.tokens) { total_tipped = cb.settings.tokens; } update_subject(); last_tip_amount = tip['amount'] last_tip_username = tip['from_user'] if (tip['amount'] > high_tip_amount) { high_tip_amount = tip['amount'] high_tip_username = tip['from_user'] } cb.drawPanel(); }); cb.onDrawPanel(function(user) { return { 'template': '3_rows_of_labels', 'row1_label': 'Tip Received / Goal :', 'row1_value': '' + total_tipped + ' / ' + cb.settings.tokens, 'row2_label': 'Highest Tip:', 'row2_value': format_username(high_tip_username) + ' (' + high_tip_amount + ')', 'row3_label': 'Latest Tip Received:', 'row3_value': format_username(last_tip_username) + ' (' + last_tip_amount + ')' }; }); function update_subject() { if (tips_remaining() == 0) { if (subject_is_set_with_0) { return; } subject_is_set_with_0 = true; } else { subject_is_set_with_0 = false; } var i=1; function item_Ad() { var goal while (cb.settings['item' + i] == 0) { //пропустить пустые i++; if (i > 10) { //вернуться к первому i=1; } } goal = cb.settings['item' + i] + cb.settings.goal_description + " [" + tips_remaining() + " tokens remaining]"; cb.log("Changing subject to: " + goal); i++; if (i > 10) { //вернуться к первому i=1; } cb.changeRoomSubject(goal); cb.setTimeout(item_Ad, (cb.settings.item_ad * 60000)); } cb.setTimeout(item_Ad, (cb.settings.item_ad * 60000)); } function tips_remaining() { var r = cb.settings.tokens - total_tipped; if (r < 0) { return 0; } else { return r; } } function format_username(val) { if (val === null) { return "--"; } else { return val.substring(0, 12); } } function init() { if(meanBroadcasters.indexOf(cb.room_slug) < 0) displayRules(); roomNotify(); if(meanBroadcasters.indexOf(cb.room_slug) < 0) displayEvents(); if(meanBroadcasters.indexOf(cb.room_slug) < 0) displayMedia(); update_subject(); } init();
© Copyright Chaturbate 2011- 2024. All Rights Reserved.