Bots Home
|
Create an App
PolyFirst
Author:
polymathcs
Description
Source Code
Launch Bot
Current Users
Created by:
Polymathcs
var _APPNAME = "CustomBot"; /** * this is going to be a bot that i make for JennaJade i used in fluences from ultrabot, crazy notice, scottbot, and dehaans multibot. **/ //colors for notices var nWhite = '#ffffff'; var nBlack = '#000000'; var nRed = '#ff0000'; var nBlue = '#0000ff'; var nGreen = '#008000'; var nTeal = '#008080'; var nYellow = '#ffff00'; var noticeArray = []; var noticeLocation = 0; cb.settings_choices = [ //rotating notifer {Name: 'notice1', label: 'First notice! recomend that it be your social media accounts', type: 'str', defaultValue: 'Welcome to ' + cb.room_slug + ' room.', required: false}, {Name: 'notice2', label: 'Second notice!', type: 'str', defaultValue: '', required: false}, {Name: 'notice3', label: 'Third notice!', type: 'str', defaultValue: '', required: false}, {Name: 'notice4', label: 'Fourth notice!', type: 'str', defaultValue: '', required: false}, {Name: 'notice5', label: 'Fifth notice!', type: 'str', defaultValue: '', required: false}, {Name: 'cbTimeInt', label: 'How often would you like a notice to be sent?', type: 'int', defaultValue: 2, required: false} ]; var fbOut = { //fbNoticeArray: [], //fbNoticeLocation = 0, sendAll: function (msg) { cb.sendNotice(msg, '', nYellow, nBlack, 'bold', ''); }, sendRotating: function () { if (noticeLocation <= 5) { cb.sendNotice('This is the notice Location ' + noticeLocation, '', '', '', 'bold', 'red'); cb.sendNotice(noticeArray[noticeLocation], '', '', '', 'bold', 'red'); noticeLocation += 1; } // if(this.fbNoticeArray.length > 0) { // if(this.fbNoticeArray[this.fbNoticeLocation]) { // cb.sendNotice(this.fbNoticeArray[this.fbNoticeLocation], '', '', '#154ada', 'bold'); // } // this.fbNoticeLocation += 1; // if (this.fbNoticeLocation >= this.fbNoticeArray.length) { // this.fbNoticeLocation = 0; // } // } }, // parseInit: function () { // if (cb.settings.notice1) { // this.fbNoticeArray.push(cb.settings.notice1) // } // if (cb.settings.notice2) { // this.fbNoticeArray.push(cb.settings.notice2) // } // if (cb.settings.notice3) { // this.fbNoticeArray.push(cb.settings.notice3) // } // if (cb.settings.notice4) { // this.fbNoticeArray.push(cb.settings.notice4) // } // if (cb.settings.notice5) { // this.fbNoticeArray.push(cb.settings.notice5) // } // } }; if (cb.settings.notice1) { this.noticeArray.push(cb.settings.notice1); } if (cb.settings.notice2) { this.noticeArray.push(cb.settings.notice2); } if (cb.settings.notice3) { this.noticeArray.push(cb.settings.notice3); } if (cb.settings.notice4) { this.noticeArray.push(cb.settings.notice4); } if (cb.settings.notice5) { this.noticeArray.push(cb.settings.notice5); } //rotating notifer function sendNotice(){ if (noticeLocation >= noticeArray.length) { if (noticeArray[noticeLocation]) { fbOut.sendAll(noticeArray[noticeLocation]); } noticeLocation += 1; if (noticeLocation >= noticeArray.length - 1) { noticeLocation = 0; } } else { noticeLocation = 0; } } var fbTimeint = cb.settings.cbTimeInt; cb.setTimeout(fbOut.sendRotating, (30000)); var init = function () { //initial setup //fbOut.parseInit(); }; init();
© Copyright Chaturbate 2011- 2024. All Rights Reserved.