Bots Home
|
Create an App
weristdorttest
Author:
weristdortdev
Description
Source Code
Launch Bot
Current Users
Created by:
Weristdortdev
// vars var total_tipped = 0; var high_tip_username = null; var high_tip_amount = 0; var last_tip_username = null; var last_tip_amount = 0; var subject_is_set_with_0 = false; var i=0; var ITEMS=5; var tip_amt = 0; var separator_char = "| " cb.settings_choices = [ {name: 'tokens', type: 'int', minValue: 1, default: 2000}, {name: 'goal_description', defaultValue: 'Cumshow #bigboobs #c2c #feet #cumshow #lush #lovesens #ohmibod #natural #sexy #glasses',type: 'str', minLength: 1, maxLength: 255}, {name: 'mcolor', type: 'choice', choice1: '#9F0000', choice2: '#000000', defaultValue: '#9F0000', label: "(AN) Color for AutoNotice use #9F0000 for red and #000000 for black"}, {name:'m1', type:'str', required: true, defaultValue: 'Please support me with your tip!!!', label:'(AN) Message or gif 1',}, {name:'m2', type:'str', required: false, label:'(AN) Message or gif 2',}, {name:'m3', type:'str', required: false, label:'(AN) Message or gif 3',}, {name:'m4', type:'str', required: false, label:'(AN) Message or gif 4',}, {name:'m5', type:'str', required: false, label:'(AN) Message or gif 5',}, {name: 'chat_ad', type:'int', minValue: 1, maxValue: 999, defaultValue: 3, label: '(AN) Time in minutes between Notice'}, {name: 'sepchar', type: 'choice', choice1: 'Vertical Bar', choice2: 'Hearts', choice3: 'Tips', defaultValue: 'Vertical Bar', label: "(TN) Separator character"}, {name:'item1', type:'str', label:'(TN) Item 1',}, {name:'item1price', type:'int', defaultvalue: 'test' ,label:'Item 1 Price'}, {name:'item2', type:'str', required: false, label:'(TN) Item 2',}, {name:'item2price', type:'int', required: false, label:'(TN) Item 2 Price'}, {name:'item3', type:'str', required: false, label:'(TN) Item 3',}, {name:'item3price', type:'int', required: false, label:'(TN) Item 3 Price'}, {name:'item4', type:'str', required: false, label:'(TN) Item 4',}, {name:'item4price', type:'int', required: false, label:'(TN) Item 4 Price'}, {name:'item5', type:'str', required: false, label:'(TN) Item 5',}, {name:'item5price', type:'int', required: false, label:'(TN) Item 5 Price'}, {name:'item6', type:'str', required: false, label:'(TN) Item 6',}, {name:'item6price', type:'int', required: false, label:'(TN) Item 6 Price'}, {name:'item7', type:'str', required: false, label:'(TN) Item 7',}, {name:'item7price', type:'int', required: false, label:'(TN) Item 7 Price'}, {name:'item8', type:'str', required: false, label:'(TN) Item 8',}, {name:'item8price', type:'int', required: false, label:'(TN) Item 8 Price'}, {name:'item9', type:'str', required: false, label:'(TN) Item 9',}, {name:'item9price', type:'int', required: false, label:'(TN) Item 9 Price'}, {name:'item10', type:'str', required: false, label:'(TN) Item 10',}, {name:'item10price', type:'int', required: false, label:'(TN) Item 10 Price'}, {name:'item11', type:'str', required: false, label:'(TN) Item 11',}, {name:'item11price', type:'int', required: false, label:'(TN) Item 11 Price'}, {name:'item12', type:'str', required: false, label:'(TN) Item 12',}, {name:'item12price', type:'int', required: false, label:'(TN) Item 12 Price'}, {name:'item13', type:'str', required: false, label:'(TN) Item 13',}, {name:'item13price', type:'int', required: false, label:'(TN) Item 13 Price'}, {name:'item14', type:'str', required: false, label:'(TN) Item 14',}, {name:'item14price', type:'int', required: false, label:'(TN) Item 14 Price'}, {name:'item15', type:'str', required: false, label:'(TN) Item 15',}, {name:'item15price', type:'int', required: false, label:'(TN) Item 15 Price'}, {name:'noticecolor', type:'str', label:'(TN) Notice color (html code default red #FF0000)', defaultValue: '#FF0000'}, {name: 'chat_ad', type:'int', minValue: 1, maxValue: 999, defaultValue: 5, label: '(TN) Delay in minutes between notice being displayed (minimum 1)'}, ]; function chatAd() { var m; var MCOLOR='#9F0000'; while (cb.settings['m' + (i + 1)] == 0) { i++; i %= ITEMS; } msg = cb.settings['m' + (i + 1)]; i++; i %= ITEMS; cb.sendNotice(msg,'','',cb.settings['mcolor'],'bold'); cb.setTimeout(chatAd, (cb.settings.chat_ad * 60000)); var msg = 'Tip Menu: '; for (p=1;p<=15;p++) { if (parseInt(cb.settings['item' + p + 'price'])>0) { if (p>=2) { msg += separator_char; } msg += cb.settings['item' + p] + '(' + parseInt(cb.settings['item' + p + 'price']) + ') '; } } cb.sendNotice(msg,'','',cb.settings['noticecolor'],'bold'); cb.setTimeout(chatAd, (cb.settings.chat_ad * 60000)); } cb.setTimeout(chatAd, (cb.settings.chat_ad * 60000)); cb.onEnter(function(user) { cb.sendNotice('************************************* \n *************************************\n *************************************\n ***** Welcome to my room, ' + user['user'] + '.\n *************************************\n ***** Please put your Dirtytalk in a tipnote!!!\n *************************************\n***** Do not forget to follow me!!!\n *************************************\n *************************************\n *************************************', user['user'], ['mcolor'], '', 'bold');}) ; cb.onMessage(function (msg) { var isMod = msg['is_mod']; var isFan = msg['in_fanclub']; var isModel = msg['user'] == cb.room_slug; var lblue = msg['hasTokens']; var dblue = msg['tipped_recently']; var purple = msg['tipped_alot_recently']; var dpurple = msg['tipped_tons_recently']; //if (lblue) { // msg['c'] = ['#7FBCFF']}; //if (dblue) { // msg['f'] = 'bold'; // msg['c'] = ['#00008B']}; //if (purple) { // msg['f'] = 'bold'; // msg['c'] = ['#DDA0DD']}; //if (dpurple) { // msg['f'] = 'bold'; // msg['c'] = ['#800080']}; if (isMod) { msg['f'] = 'bold'; msg['c'] = ['#FF0000']}; if (isFan) { msg['f'] = 'bold'; msg['c'] = ['#008000']}; if (isModel) { msg['f'] = 'bold'; msg['c'] = ['#DC5500'];} return msg;}) cb.onTip(function(tip) { total_tipped += tip['amount'] if (total_tipped > cb.settings.tokens) { total_tipped = cb.settings.tokens; } update_subject(); last_tip_amount = tip['amount'] last_tip_username = tip['from_user'] if (tip['amount'] > high_tip_amount) { high_tip_amount = tip['amount'] high_tip_username = tip['from_user'] } cb.drawPanel(); tip_amt=parseInt(tip['amount']); for (var i = 1; i <= 15; i++) { if (tip_amt == parseInt(cb.settings['item' + i + 'price'])) { cb.sendNotice(tip['from_user'] + ' tipped for ' + cb.settings['item' + i],'','',cb.settings['noticecolor'],'bold'); } } }); cb.onDrawPanel(function(user) { return { 'template': '3_rows_of_labels', 'row1_label': 'Tip Received / Goal :', 'row1_value': '' + total_tipped + ' / ' + cb.settings.tokens, 'row2_label': 'Highest Tip:', 'row2_value': format_username(high_tip_username) + ' (' + high_tip_amount + ')', 'row3_label': 'Latest Tip Received:', 'row3_value': format_username(last_tip_username) + ' (' + last_tip_amount + ')' }; }); // helper functions function update_subject() { if (tips_remaining() == 0) { if (subject_is_set_with_0) { return; } subject_is_set_with_0 = true; } else { subject_is_set_with_0 = false; } var new_subject = cb.settings.goal_description + " [" + tips_remaining() + " tokens remaining]"; cb.log("Changing subject to: " + new_subject); cb.changeRoomSubject(new_subject); } function tips_remaining() { var r = cb.settings.tokens - total_tipped; if (r < 0) { return 0; } else { return r; } } function format_username(val) { if (val === null) { return "--"; } else { return val.substring(0, 12); } } function init() { update_subject(); } init();
© Copyright Chaturbate 2011- 2024. All Rights Reserved.