Bots Home
|
Create an App
Club
Author:
butterfly_sex
Description
Source Code
Launch Bot
Current Users
Created by:
Butterfly_Sex
/****************************** * TITLE: Geekess Lonely Hearts Club Bot * AUTHOR: Kellynumberfan * VERSION: 1.1 * DATE: 2013-06-29 * ACKNOWLEDGEMENTS: Geekess * DESCRIPTION: Just a bot to highlight Geekess people :) *******************************/ var sweetheart = new Array(); var darlings = new Array(); var sweetheartColor = ''; var darlingsColor = ''; var fanClubColor = ''; var highestTipperColor = ''; var highestTipperName = ''; var highestAmount = 0; /****************************** * Setup Bot Choices *******************************/ cb.settings_choices = [ { name: 'sweethearts_list', type:'str', minLength: 0, maxLength: 1000, label:"Sweethearts List (comma separated no spaces)", defaultValue:'pie,kellynumberfan'}, { name: 'sweethearts_color', type:'str', minLength: 7, maxLength: 7, label:"Sweethearts Color: (bright color) #d4cae2", defaultValue:'#d4cae2'}, { name: 'darlings_list', type:'str', minLength: 0, maxLength: 1000, label:"Darlings List (comma separated no spaces)", defaultValue:'onlyjimmy91,kevin0620,marin53'}, { name: 'darlings_color', type:'str', minLength: 7, maxLength: 7, label:"Darlings Color: (bright color) #ff00b6", defaultValue:'#ff00b6'}, { name: 'fanclub_color', type:'str', minLength: 7, maxLength: 7, label:"Fanclub Color: (bright color) #99FF00", defaultValue:'#99FF00'}, { name: 'highesttipper_color', type:'str', minLength: 7, maxLength: 7, label:"Highest Tipper Color: (bright color) #00cbcc", defaultValue:'#00cbcc'} ]; cb.onTip( function (tip) { var amountTipped = parseInt(tip['amount']); if (amountTipped > highestAmount) { highestAmount = amountTipped; highestTipperName = tip['from_user']; } } ); cb.onMessage( function (msg) { var usr = msg['user']; var i = 0; var strL; var bFound = 0; // only parse cb.room_slug or is_mod messages if ((msg['user'] == cb.room_slug) || (msg['is_mod'] == true) || (msg['user'] == 'kellynumberfan')) { if (msg['m'] == '/showusers') { msg['X-Spam'] = true; // fuckers if (sweetheart.length == 0) { strL = 'No Sweethearts.\n'; } else { strL = 'Sweethearts:\n'; for(i=0; i < sweetheart.length; i++) { strL = strL + sweetheart[i] + '|'; } strL = strL + '\n'; } cb.sendNotice(strL, usr); // darlings if (darlings.length == 0) { strL = 'No Darlings.\n'; } else { strL = 'Darlings:\n'; for(i=0; i < darlings.length; i++) { strL = strL + darlings[i] + '|'; } strL = strL + '\n'; } cb.sendNotice(strL, usr); } } if ((msg['in_fanclub'] == true)) { msg['background'] = fanClubColor; return msg; } if ((msg['user'] == highestTipperName)) { msg['background'] = highestTipperColor; return msg; } if(sweetheart.length > 0) { for(i=0; i < sweetheart.length; i++) { if (sweetheart[i] == usr) { msg['background'] = sweetheartColor; bFound = 1; break; } } if (bFound == 1) return msg; } if(darlings.length > 0) { for(i=0; i < darlings.length; i++) { if (darlings[i] == usr) { msg['background'] = darlingsColor; bFound = 1; break; } } if (bFound == 1) return msg; } return msg; } ); // Load the Users into their array from // the cb.settings function LoadUsers() { var temp; temp = cb.settings.sweethearts_list; sweetheart = temp ? temp.split(',') : ''; sweetheartColor = cb.settings.sweethearts_color; temp = cb.settings.darlings_list; darlings = temp ? temp.split(',') : ''; darlingsColor = cb.settings.darlings_color; fanClubColor = cb.settings.fanclub_color; highestTipperColor = cb.settings.highesttipper_color; } // Initialize Application function init() { cb.sendNotice("-----------------------------------------\n--- Geekess Lonely Hearts Club Bot\n--- Developed By: KellyNumberFan\n-----------------------------------------\n\n"); cb.sendNotice("Use /showusers to show new members", cb.room_slug); LoadUsers(); } if(!String.prototype.trim) { String.prototype.trim = function () { return this.replace(/^\s+|\s+$/g,''); }; } init();
© Copyright Chaturbate 2011- 2024. All Rights Reserved.