Bots Home
|
Create an App
Miss Notifier
Author:
butterfly_sex
Description
Source Code
Launch Bot
Current Users
Created by:
Butterfly_Sex
/* Title: "Miss Notifier" bot Author: Nika Version: 1.0 (10/03/2019) */ var i=0; var MAXITEMS=10; cb.settings_choices = [ {name: 'msgonentry', type: 'choice', choice1: 'yes', choice2: 'no', defaultValue: 'yes', label: "Display Message #1 on entry - set NO for busy rooms"}, {name:'msg1', type:'str', required: true, label:'Message 1', defaultValue:':followwwwww'}, {name:'msg2', type:'str', required: false, label:'Message 2', defaultValue:':lovenseon12'}, {name:'msg3', type:'str', required: false, label:'Message 3', defaultValue:':roll7 FOR 21 tk'}, {name:'msg4', type:'str', required: false, label:'Message 4', defaultValue:':prvt43545'}, {name:'msg5', type:'str', required: false, label:'Message 5', defaultValue:':tipfollow1'}, {name:'msg6', type:'str', required: false, label:'Message 6', defaultValue:':miss_pvt'}, {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:'msgcolor', type:'str', label:'Notice color', defaultValue: '#9F000F'}, {name: 'chat_ad', type:'int', minValue: 1, maxValue: 999, defaultValue: 2, label: 'Delay in minutes (min:1)'}, {name: 'thankcrown', type:'int', minValue: 1, maxValue: 999, defaultValue: 2, label: '###### CrownTHANKS (minimum tokens) ######'}, {name:'crowntext', type:'str', label:'CrownTHANKS: text color (#000000)', defaultValue: '#000000'}, {name:'crownbg', type:'str', label:'CrownTHANKS: bg color (#ffe6f5)', defaultValue: '#ffe6f5'}, {name:'msgcol', type:'str', label:'My Message color (#000000)', defaultValue: '#000000'}, {name:'msghighlight', type:'str', label:'Message BG (#ffeef0)', defaultValue: '#ffeef0'}, {name:'msgico', type:'str', label:'Message icon (:miheart3)', defaultValue: ':miheart3'} ]; cb.onEnter(function(user) { if (cb.settings['msgonentry'] == 'yes') { cb.sendNotice('Welcome ' + user['user'] + '! ' + cb.settings['msg1'],user['user'],'',cb.settings['msgcolor'],'bold'); } }); function chatAd() { var msg; while (cb.settings['msg' + (i + 1)] == 0) { //skip empty messages i++; i %= MAXITEMS; } msg = cb.settings['msg' + (i + 1)]; i++; i %= MAXITEMS; cb.sendNotice(msg,'','',cb.settings['msgcolor'],'bold'); cb.setTimeout(chatAd, (cb.settings.chat_ad * 60000)); } cb.setTimeout(chatAd, (cb.settings.chat_ad * 60000)); function init() { } init(); // НИК и КОРОНЫ cb.onTip(function (tip) { if (parseInt(tip['amount']) >= cb.settings.thankcrown) { cb.chatNotice(':crowngif282 ' + tip['from_user'] + ' :crowngif282', ' ', cb.settings['crownbg'], cb.settings['crowntext'],'bold'); } }); // Подсветка сообщений cb.onMessage(function (msg) { var colrtext = cb.settings['msgcol']; var colrbg = cb.settings['msghighlight']; if (msg['user'] == cb.room_slug) { msg['c'] = colrtext; msg['background'] = colrbg; msg['m'] = cb.settings['msgico'] + ' ' + msg['m']; } return msg; });
© Copyright Chaturbate 2011- 2024. All Rights Reserved.