Bots Home
|
Create an App
Digbot
Author:
dignityr
Description
Source Code
Launch Bot
Current Users
Created by:
Dignityr
/** Name: Dig_bot Author: diginityr Creation Date: 5/23/16 Date Last Edited: 5/23/16 Version: 0.2 Change log 0.1 - Added an on-enter notice for fanclub members. 0.2 - Added single line notice for four messages **/ var msg_index = 1; cb.settings_choices = [ {name:'msg1', type:'str', label:'Message 1 (displayed on room entry also)'}, {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:'noticecolor', 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 notice being displayed (minimum 1)'} ]; cb.onTip(function (user) { cb.sendNotice('Thank you' + " " + + user['user'] + "!"); }); cb.onEnter(function(user) { if (cb.room_slug == 'mslou' && user['in_fanclub']) { cb.sendNotice(':greenfist' + " " + user['user']); } }); function chatAd() { var msg; while ((cb.settings['msg' + msg_index ] == 0) && (msg_index <=4)) { //skip empty messages msg_index ++; } msg = cb.settings['msg' + msg_index ]; msg_index++; if (msg_index>4) { msg_index=1; } cb.setTimeout(chatAd, (cb.settings.chat_ad * 60000)); } cb.setTimeout(chatAd, (cb.settings.chat_ad * 60000)); function init() { chatAd(); } init();
© Copyright Chaturbate 2011- 2024. All Rights Reserved.