Bots Home
|
Create an App
notice+
Author:
staringatstars
Description
Source Code
Launch Bot
Current Users
Created by:
Staringatstars
cb.settings_choices = [ {name:'WMsg', type:'str', required: false, label:"--------------------------------ROOM_ENTRY_MSG'S--------------------------------- ------------------------------------------------------------------------------------------------- The Grey and Anon room welcome Msg. (if blank no msg sent)", }, {name:'bWMsg', type:'str', required: false, label:"The Blue room welcome Msg (if blank, the grey msg will be sent, if that is blank no msg sent)",}, {name:'pWMsg', type:'str', required: false, label:"The Purple room welcome Msg. (if blank, the grey msg will be sent, if that is blank no msg sent)",}, {name:'gWMsg', type:'str', required: false, label:"The Green room welcome Msg (this includes added fanclub users) (if blank, the grey msg will be sent, if that is blank no msg sent)",}, {name:'wMsgTextCol', type:'str', required: false, label:"The room welcome Msg text colour",}, {name:'wMsgbackCol', type:'str', required: false, label:"The room welcome Msg background colour",}, {name: 'wMsgWeight', type: 'choice', choice1: 'normal', choice2: 'bold', choice3: 'bolder', defaultValue: 'normal', label: "The boldness of the welcome msg text"}, {name: 'rnOn', type: 'choice', choice1: 'on', choice2: 'off', defaultValue: 'off', label: "--------------------------------NOTIFIER_SETTINGS--------------------------------- ------------------------------------------------------------------------------------------------- Notifier on or off"}, {name:'rtc1', type:'str', required: false, label:'1st Notice Text colour in html code eg: #494949' }, {name:'rnc1', type:'str', required: false, label:'1st Notice background colour in html code eg: #494949'}, {name:'rMsg1', type:'str', required: false, label:"1st rotating notice text.",}, {name: 'rmt1', label: 'The time in mins before the next populated (text filled in) notice is displayed, if this is the last populated notice in the settings this is the time before the first msg is displayed again.', type: 'int', type: 'int', minValue: 0, maxValue: 1000000, defaultValue: 1}, {name:'rtc2', type:'str', label:'2nd Notice Text colour in html code eg: #494949', required: false}, {name:'rnc2', type:'str', required: false, label:'2nd Notice background colour in html code eg: #494949'}, {name:'rMsg2', type:'str', required: false, label:"2nd rotating notice text. ",}, {name: 'rmt2', label: 'The time in mins before the next populated (text filled in) notice is displayed, if this is the last populated notice in the settings this is the time before the first msg is displayed again.', type: 'int', type: 'int', minValue: 0, maxValue: 1000000, defaultValue: 1}, {name:'rtc3', type:'str', label:'3rd Notice Text colour in html code eg: #494949', required: false}, {name:'rnc3', type:'str', required: false, label:'3rd Notice background colour in html code eg: #494949'}, {name:'rMsg3', type:'str', required: false, label:"3rd rotating notice text.",}, {name: 'rmt3', label: 'The time in mins before the next populated (text filled in) notice is displayed, if this is the last populated notice in the settings this is the time before the first msg is displayed again.', type: 'int', type: 'int', minValue: 0, maxValue: 1000000, defaultValue: 1}, {name:'rtc4', type:'str', label:'4th Notice Text colour in html code eg: #494949', required: false}, {name:'rnc4', type:'str', required: false, label:'4th Notice background colour in html code eg: #494949'}, {name:'rMsg4', type:'str', required: false, label:"4th rotating notice text.",}, {name: 'rmt4', label: 'The time in mins before the next populated (text filled in) notice is displayed, if this is the last populated notice in the settings this is the time before the first msg is displayed again.', type: 'int', type: 'int', minValue: 0, maxValue: 1000000, defaultValue: 1}, {name:'rtc5', type:'str', label:'5th Notice Text colour in html code eg: #494949', required: false}, {name:'rnc5', type:'str', required: false, label:'5th Notice background colour in html code eg: #494949'}, {name:'rMsg5', type:'str', required: false, label:"5th rotating notice text.",}, {name: 'rmt5', label: 'The time in mins before the next populated (text filled in) notice is displayed, if this is the last populated notice in the settings this is the time before the first msg is displayed again.', type: 'int', type: 'int', minValue: 0, maxValue: 1000000, defaultValue: 1}, {name:'rtc6', type:'str', label:'6th Notice Text colour in html code eg: #494949', required: false}, {name:'rnc6', type:'str', required: false, label:'6th Notice background colour in html code eg: #494949'}, {name:'rMsg6', type:'str', required: false, label:"6th rotating notice text.",}, {name: 'rmt6', label: 'The time in mins before the next populated (text filled in) notice is displayed, if this is the last populated notice in the settings this is the time before the first msg is displayed again.', type: 'int', type: 'int', minValue: 0, maxValue: 1000000, defaultValue: 1}, {name:'rtc7', type:'str', label:'7th Notice Text colour in html code eg: #494949', required: false}, {name:'rnc7', type:'str', required: false, label:'7th Notice background colour in html code eg: #494949'}, {name:'rMsg7', type:'str', required: false, label:"7th rotating notice text. ",}, {name: 'rmt7', label: 'The time in mins before the next populated (text filled in) notice is displayed, if this is the last populated notice in the settings this is the time before the first msg is displayed again.', type: 'int', type: 'int', minValue: 0, maxValue: 1000000, defaultValue: 1}, {name:'rtc8', type:'str', label:'8th Notice Text colour in html code eg: #494949', required: false}, {name:'rnc8', type:'str', required: false, label:'8th Notice background colour in html code eg: #494949'}, {name:'rMsg8', type:'str', required: false, label:"8th rotating notice text.",}, {name: 'rmt8', label: 'The time in mins before the next populated (text filled in) notice is displayed, if this is the last populated notice in the settings this is the time before the first msg is displayed again.', type: 'int', type: 'int', minValue: 0, maxValue: 1000000, defaultValue: 1}, {name:'rtc9', type:'str', label:'9th Notice Text colour in html code eg: #494949', required: false}, {name:'rnc9', type:'str', required: false, label:'9th Notice background colour in html code eg: #494949'}, {name:'rMsg9', type:'str', required: false, label:"9th rotating notice text.",}, {name: 'rmt9', label: 'The time in mins before the next populated (text filled in) notice is displayed, if this is the last populated notice in the settings this is the time before the first msg is displayed again.', type: 'int', minValue: 0, maxValue: 1000000, defaultValue: 1}, {name:'rtc10', type:'str', label:'10th Notice Text colour in html code eg: #494949', required: false}, {name:'rnc10', type:'str', required: false, label:'10th Notice background colour in html code eg: #494949'}, {name:'rMsg10', type:'str', required: false, label:"10th rotating notice text.",}, {name: 'rmt10', label: 'The time in mins before the next populated (text filled in) notice is displayed, if this is the last populated notice in the settings this is the time before the first msg is displayed again.', type: 'int', minValue: 0, maxValue: 1000000, defaultValue: 1} ]; var noticeOn = ''; var rotatinc = 1; var maxItems = 10; var welMsgWeight = ''; var wm = ''; var bwm = ''; var pwm = ''; var gwm = ''; var welMsgText = ''; var welMsgback = ''; function isGreen(msg) { return (msg['in_fanclub']); } function rotatingNotices() { if (noticeOn == 'on') { if (cb.settings['rMsg' + rotatinc]) { cb.chatNotice((cb.settings['rMsg' + rotatinc]),'',(cb.settings['rnc' + rotatinc]),(cb.settings['rtc' + rotatinc]),'bold'); rotatinc++; if (rotatinc > (maxItems)) {rotatinc = 1;} cb.setTimeout(rotatingNotices,(cb.settings['rmt' + (rotatinc - 1)] * 60000)); } else { rotatinc++; if (rotatinc > (maxItems)) {rotatinc = 1;} rotatingNotices(); } } } //grab settings noticeOn = (cb.settings['rnOn']); cb.setTimeout(rotatingNotices,(cb.settings['rmt1'] * 60000)); if (cb.settings.WMsg) { wm = cb.settings['WMsg']; } if (cb.settings.bWMsg) { bwm = cb.settings['bWMsg']; } else {bwm = cb.settings['WMsg'];} if (cb.settings.pWMsg) { pwm = cb.settings['pWMsg']; } else {pwm = cb.settings['WMsg'];} if (cb.settings.gWMsg) { gwm = cb.settings['gWMsg']; } else {gwm = cb.settings['WMsg'];} if (cb.settings.wMsgTextCol) { welMsgText = cb.settings['wMsgTextCol']; } if (cb.settings.wMsgbackCol) { welMsgback = cb.settings['wMsgbackCol']; } if (cb.settings.wMsgWeight) { welMsgWeight = cb.settings['wMsgWeight']; } cb.onEnter(function(user) { var u = user['user']; var m = ''; if (isGreen(user)) { m = gwm; } else { if (user['tipped_tons_recently'] || user['tipped_alot_recently']) { m = pwm; } else { if (user['tipped_recently'] || user['has_tokens']) { m = bwm; } else { m = wm; } } } if (m != '') { cb.chatNotice(m,u,welMsgback,welMsgText,welMsgWeight); } });
© Copyright Chaturbate 2011- 2024. All Rights Reserved.