Bots Home
|
Create an App
fghdf
Author:
mistressadelle
Description
Source Code
Launch Bot
Current Users
Created by:
Mistressadelle
var i=1; //штука для кастома //что внутри приложухи if (cb.room_slug == 'mistressadelle') { 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:'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', type:'str', minValue: 1, maxValue: 999, defaultValue: 1, label: 'Delay in minutes between notices being displayed (minimum 1)'}, {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 new followers', defaultValue: '#425e00'}, {name:'EnUnFollowBGColor', type:'str', label:'Notice background color for new followers', defaultValue: '#e6f7bc'}, {name:'msgunfollow', type:'str', minLength:1, maxLength:300, label:'Notice for unfollowed users'}, //нотисы за тип меню {name: 'toc6', label: '**************************************************************** Section 6 Tip Menu Notices ****************************************************************', type: 'choice',required: false}, {name:'Tmsg1', type:'str', required: false, label:'Message 1',}, {name:'Tmsg2', type:'str', required: false, label:'Message 2',}, {name:'Tmsg3', type:'str', required: false, label:'Message 3',}, {name:'Tmsg4', type:'str', required: false, label:'Message 4',}, {name:'Tmsg5', type:'str', required: false, label:'Message 5',}, {name:'Tmsg6', type:'str', required: false, label:'Message 6',}, {name:'Tmsg7', type:'str', required: false, label:'Message 7',}, {name:'Tmsg8', type:'str', required: false, label:'Message 8',}, {name:'Tmsg9', type:'str', required: false, label:'Message 9',}, {name:'Tmsg10', type:'str', required: false, label:'Message 10',}, {name:'Tmsgcolor', type:'str', label:'Tip menu notice color (html code default dark red #02b81a)', defaultValue: '#02b81a'}, {name:'Tbackground', type: 'str', label: 'Tip menu notice background', defaultValue:'#ffe7a3'}, //время в минутах {name: 'Tchat_ad', type:'str', minValue: 1, maxValue: 999, defaultValue: 1, label: 'Delay in minutes between notices being displayed (minimum 1)'}, //кастом условие два ]; } else { cb.settings_choices = [ {name: 'warning', label: 'Sorry, this bot is only usable for broadcaster Mistress Adele', type: 'choice',required: false}, ]; } var i=1; //variables from room rules 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 init() { if(meanBroadcasters.indexOf(cb.room_slug) < 0) displayRules(); } init(); //штука, отвечающая за нотифайер function chatAd() { var msg; while (cb.settings['msg' + i] == 0) { //пропустить пустые i++; if (i > 65) { //вернуться к первому i=1; } } msg = cb.settings['msg' + i]; i++; if (i > 65) { //вернуться к первому 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'); }; }); //нотисы за тип меню function TchatAd() { var Tmsg; while (cb.settings['Tmsg' + i] == 0) { //пропустить пустые i++; if (i > 10) { //вернуться к первому i=1; } } Tmsg = cb.settings['Tmsg' + i]; i++; if (i > 10) { //вернуться к первому i=1; } cb.sendNotice(Tmsg,'',cb.settings['Tbackground'],cb.settings['Tmsgcolor'],'bold'); cb.setTimeout(TchatAd, (cb.settings.Tchat_ad * 60000)); } cb.setTimeout(TchatAd, (cb.settings.Tchat_ad * 60000));
© Copyright Chaturbate 2011- 2024. All Rights Reserved.