Bots Home
|
Create an App
Notifier_multi
Author:
aerari
Description
Source Code
Launch Bot
Current Users
Created by:
Aerari
/* Title: "Rotating Notifier" bot Author: badbadbubba Version: 1.1 (03/07/2015) A simple rotating notifier bot. Only options are to set color and display interval. Messages are rotated in sequence. Message 1 will also be displayed on room entry privately. V1.0.1 - Removed unnecessary check for valid first messages V1.0.2 - Increase messages to 5 V1.0.3 - Added option to display msg1 on room entry V1.1 - Optimized code, expanded to 10 lines */ var i=0; var MAXITEMS=40; cb.settings_choices = [ {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: true, 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 11',}, {name:'msg11', type:'str', required: false, label:'Message 12',}, {name:'msg12', type:'str', required: false, label:'Message 13',}, {name:'msg13', type:'str', required: false, label:'Message 14',}, {name:'msg14', type:'str', required: false, label:'Message 15',}, {name:'msg15', type:'str', required: false, label:'Message 16',}, {name:'msg16', type:'str', required: false, label:'Message 17',}, {name:'msg17', type:'str', required: false, label:'Message 18',}, {name:'msg18', type:'str', required: false, label:'Message 19',}, {name:'msg19', type:'str', required: false, label:'Message 20',}, {name:'msg20', type:'str', required: false, label:'Message 21',}, {name:'msg21', type:'str', required: false, label:'Message 22',}, {name:'msg22', type:'str', required: false, label:'Message 23',}, {name:'msg23', type:'str', required: false, label:'Message 24',}, {name:'msg24', type:'str', required: false, label:'Message 25',}, {name:'msg25', type:'str', required: false, label:'Message 26',}, {name:'msg26', type:'str', required: false, label:'Message 27',}, {name:'msg27', type:'str', required: false, label:'Message 28',}, {name:'msg28', type:'str', required: false, label:'Message 29',}, {name:'msg29', type:'str', required: false, label:'Message 30',}, {name:'msg30', type:'str', required: false, label:'Message 31',}, {name:'msg31', type:'str', required: false, label:'Message 32',}, {name:'msg32', type:'str', required: false, label:'Message 33',}, {name:'msg33', type:'str', required: false, label:'Message 34',}, {name:'msg34', type:'str', required: false, label:'Message 35',}, {name:'msg35', type:'str', required: false, label:'Message 36',}, {name:'msg36', type:'str', required: false, label:'Message 37',}, {name:'msg37', type:'str', required: false, label:'Message 38',}, {name:'msg38', type:'str', required: false, label:'Message 39',}, {name:'msg39', type:'str', required: false, label:'Message 40',}, {name:'msgcolor', type:'str', label:'Notice color (html code default dark red #9F000F)', defaultValue: '#9F000F'}, {name: 'chat_ad', type:'int', minValue: 1, maxValue: 999, defaultValue: 2, label: 'Delay in minutes between notices being displayed (minimum 1)'} ]; 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)] == '') { //skip empty messages i++; if (i==40) {i=0}; } msg = cb.settings['msg' + (i + 1)]; i++; if (i==40) {i=0}; cb.sendNotice(msg,'','',cb.settings['msgcolor'],'bold'); cb.setTimeout(chatAd, (cb.settings.chat_ad * 5000)); } cb.setTimeout(chatAd, (cb.settings.chat_ad * 5000)); function init() { } init();
© Copyright Chaturbate 2011- 2024. All Rights Reserved.