Bots Home
|
Create an App
2FITNESSMADSBOT SPANISH
Author:
2fitnessmadshere
Description
Source Code
Launch Bot
Current Users
Created by:
2fitnessmadshere
var bullet = " \u2022 "; var txtHeart = " \u2665 "; var txtDiamond = " \u2666 "; var txtStar = " \u2605 "; var mystery = " \ud83d\udca9 "; var vertBar = " | "; var bold1 = "bold"; var bold2 = "bolder"; var bold3 = ""; var menuMsg; var titleMsg; var noticeMsg; var titleBGC; var titleFGC; var menuBGC; var menuFGC; var noteBGC; var noteFGC; var titleweight; var noteweight; var weight; var endline; var sep; var smartPeople = []; var vanity; var hostGender; var modHelper; var showHelp = false; var showSettings = false; var welcomeMessage = false; var leaderBoard = false; var ticketShow = false; var showAmounts = false; var userOptOut = false; var greyChat = false; var greyGraphics = false; var modActivity = false; var autoMenu = false; var autoPM = false; var showStarted = false; var autoPVT = false; var logChat = false; var playGames = false; var allTippers = []; var tipperNames = []; var menuList = []; var itemList = []; var costList = []; var prizeList = []; var prizeLog = []; var chatLog = []; var greyList = []; var blueList = []; var secretList = []; var blockList = []; var guestList = []; var modlist = []; var noMenu = []; var colorLog = []; var lifetime_tickets = [] var combinedTips = 0; var blockedMsgs = 0; var note_index = 0; var maxItems = 20; var maxNotices = 10; var userlist = []; var fanlist = []; var lightBlueList = []; var darkBlueList = []; var pinkList = []; var purpleList = []; var white = "#FFFFFF"; var silver = "#C0C0C0"; var gray = "#808080"; var black = "#000000"; var red = "#FF0000"; var maroon = "#800000"; var yellow = "#FFFF00"; var olive = "#808000"; var lime = "#00FF00"; var green = "#008000"; var aqua = "#00FFFF"; var teal = "#008080"; var blue = "#0000FF"; var navy = "#000080"; var fuchsia = "#FF00FF"; var purple = "#800080"; colors = [{ label : "AliceBlue", hex : "#F0F8FF" }, { label : "AntiqueWhite", hex : "#FAEBD7" }, { label : "Aqua", hex : "#00FFFF" }, { label : "Aquamarine", hex : "#7FFFD4" }, { label : "Azure", hex : "#F0FFFF" }, { label : "Beige", hex : "#F5F5DC" }, { label : "Bisque", hex : "#FFE4C4" }, { label : "Black", hex : "#000000" }, { label : "BlanchedAlmond", hex : "#FFEBCD" }, { label : "Blue", hex : "#0000FF" }, { label : "BlueViolet", hex : "#8A2BE2" }, { label : "Brown", hex : "#A52A2A" }, { label : "BurlyWood", hex : "#DEB887" }, { label : "CadetBlue", hex : "#5F9EA0" }, { label : "Chartreuse", hex : "#7FFF00" }, { label : "Chocolate", hex : "#D2691E" }, { label : "Coral", hex : "#FF7F50" }, { label : "CornflowerBlue", hex : "#6495ED" }, { label : "Cornsilk", hex : "#FFF8DC" }, { label : "Crimson", hex : "#DC143C" }, { label : "Cyan", hex : "#00FFFF" }, { label : "DarkBlue", hex : "#00008B" }, { label : "DarkCyan", hex : "#008B8B" }, { label : "DarkGoldenRod", hex : "#B8860B" }, { label : "DarkGray", hex : "#A9A9A9" }, { label : "DarkGrey", hex : "#A9A9A9" }, { label : "DarkGreen", hex : "#006400" }, { label : "DarkKhaki", hex : "#BDB76B" }, { label : "DarkMagenta", hex : "#8B008B" }, { label : "DarkOliveGreen", hex : "#556B2F" }, { label : "DarkOrange", hex : "#FF8C00" }, { label : "DarkOrchid", hex : "#9932CC" }, { label : "DarkRed", hex : "#8B0000" }, { label : "DarkSalmon", hex : "#E9967A" }, { label : "DarkSeaGreen", hex : "#8FBC8F" }, { label : "DarkSlateBlue", hex : "#483D8B" }, { label : "DarkSlateGray", hex : "#2F4F4F" }, { label : "DarkSlateGrey", hex : "#2F4F4F" }, { label : "DarkTurquoise", hex : "#00CED1" }, { label : "DarkViolet", hex : "#9400D3" }, { label : "DeepPink", hex : "#FF1493" }, { label : "DeepSkyBlue", hex : "#00BFFF" }, { label : "DimGray", hex : "#696969" }, { label : "DimGrey", hex : "#696969" }, { label : "DodgerBlue", hex : "#1E90FF" }, { label : "FireBrick", hex : "#B22222" }, { label : "FloralWhite", hex : "#FFFAF0" }, { label : "ForestGreen", hex : "#228B22" }, { label : "Fuchsia", hex : "#FF00FF" }, { label : "Gainsboro", hex : "#DCDCDC" }, { label : "GhostWhite", hex : "#F8F8FF" }, { label : "Gold", hex : "#FFD700" }, { label : "GoldenRod", hex : "#DAA520" }, { label : "Gray", hex : "#808080" }, { label : "Grey", hex : "#808080" }, { label : "Green", hex : "#008000" }, { label : "GreenYellow", hex : "#ADFF2F" }, { label : "HoneyDew", hex : "#F0FFF0" }, { label : "HotPink", hex : "#FF69B4" }, { label : "IndianRed", hex : "#CD5C5C" }, { label : "Indigo", hex : "#4B0082" }, { label : "Ivory", hex : "#FFFFF0" }, { label : "Khaki", hex : "#F0E68C" }, { label : "Lavender", hex : "#E6E6FA" }, { label : "LavenderBlush", hex : "#FFF0F5" }, { label : "LawnGreen", hex : "#7CFC00" }, { label : "LemonChiffon", hex : "#FFFACD" }, { label : "LightBlue", hex : "#ADD8E6" }, { label : "LightCoral", hex : "#F08080" }, { label : "LightCyan", hex : "#E0FFFF" }, { label : "LightGoldenRodYellow", hex : "#FAFAD2" }, { label : "LightGray", hex : "#D3D3D3" }, { label : "LightGrey", hex : "#D3D3D3" }, { label : "LightGreen", hex : "#90EE90" }, { label : "LightPink", hex : "#FFB6C1" }, { label : "LightSalmon", hex : "#FFA07A" }, { label : "LightSeaGreen", hex : "#20B2AA" }, { label : "LightSkyBlue", hex : "#87CEFA" }, { label : "LightSlateGray", hex : "#778899" }, { label : "LightSlateGrey", hex : "#778899" }, { label : "LightSteelBlue", hex : "#B0C4DE" }, { label : "LightYellow", hex : "#FFFFE0" }, { label : "Lime", hex : "#00FF00" }, { label : "LimeGreen", hex : "#32CD32" }, { label : "Linen", hex : "#FAF0E6" }, { label : "Magenta", hex : "#FF00FF" }, { label : "Maroon", hex : "#800000" }, { label : "MediumAquaMarine", hex : "#66CDAA" }, { label : "MediumBlue", hex : "#0000CD" }, { label : "MediumOrchid", hex : "#BA55D3" }, { label : "MediumPurple", hex : "#9370DB" }, { label : "MediumSeaGreen", hex : "#3CB371" }, { label : "MediumSlateBlue", hex : "#7B68EE" }, { label : "MediumSpringGreen", hex : "#00FA9A" }, { label : "MediumTurquoise", hex : "#48D1CC" }, { label : "MediumVioletRed", hex : "#C71585" }, { label : "MidnightBlue", hex : "#191970" }, { label : "MintCream", hex : "#F5FFFA" }, { label : "MistyRose", hex : "#FFE4E1" }, { label : "Moccasin", hex : "#FFE4B5" }, { label : "NavajoWhite", hex : "#FFDEAD" }, { label : "Navy", hex : "#000080" }, { label : "OldLace", hex : "#FDF5E6" }, { label : "Olive", hex : "#808000" }, { label : "OliveDrab", hex : "#6B8E23" }, { label : "Orange", hex : "#FFA500" }, { label : "OrangeRed", hex : "#FF4500" }, { label : "Orchid", hex : "#DA70D6" }, { label : "PaleGoldenRod", hex : "#EEE8AA" }, { label : "PaleGreen", hex : "#98FB98" }, { label : "PaleTurquoise", hex : "#AFEEEE" }, { label : "PaleVioletRed", hex : "#DB7093" }, { label : "PapayaWhip", hex : "#FFEFD5" }, { label : "PeachPuff", hex : "#FFDAB9" }, { label : "Peru", hex : "#CD853F" }, { label : "Pink", hex : "#FFC0CB" }, { label : "Plum", hex : "#DDA0DD" }, { label : "PowderBlue", hex : "#B0E0E6" }, { label : "Purple", hex : "#800080" }, { label : "RebeccaPurple", hex : "#663399" }, { label : "Red", hex : "#FF0000" }, { label : "RosyBrown", hex : "#BC8F8F" }, { label : "RoyalBlue", hex : "#4169E1" }, { label : "SaddleBrown", hex : "#8B4513" }, { label : "Salmon", hex : "#FA8072" }, { label : "SandyBrown", hex : "#F4A460" }, { label : "SeaGreen", hex : "#2E8B57" }, { label : "SeaShell", hex : "#FFF5EE" }, { label : "Sienna", hex : "#A0522D" }, { label : "Silver", hex : "#C0C0C0" }, { label : "SkyBlue", hex : "#87CEEB" }, { label : "SlateBlue", hex : "#6A5ACD" }, { label : "SlateGray", hex : "#708090" }, { label : "SlateGrey", hex : "#708090" }, { label : "Snow", hex : "#FFFAFA" }, { label : "SpringGreen", hex : "#00FF7F" }, { label : "SteelBlue", hex : "#4682B4" }, { label : "Tan", hex : "#D2B48C" }, { label : "Teal", hex : "#008080" }, { label : "Thistle", hex : "#D8BFD8" }, { label : "Tomato", hex : "#FF6347" }, { label : "Turquoise", hex : "#40E0D0" }, { label : "Violet", hex : "#EE82EE" }, { label : "Wheat", hex : "#F5DEB3" }, { label : "White", hex : "#FFFFFF" }, { label : "WhiteSmoke", hex : "#F5F5F5" }, { label : "Yellow", hex : "#FFFF00" }, { label : "YellowGreen", hex : "#9ACD32" }]; cb.settings_choices = [{ name : "Color Settings", type : "str", minLength : 0, maxLength : 0, required : false, label : "---------------------------------COLOR SETTINGS---------------------------------" }]; var colorSettings = ["menu_title_fgc", "menu_title_bgc", "menu_fgc", "menu_bgc", "note_fgc", "note_bgc"]; var colorLabels = ["Menu Title Color", "Title Background", "Menu Items Color", "Items Background", "Rotating Notices Color", "Notices Background"]; var customSettings = ["menu_title_fgc_custom", "menu_title_bgc_custom", "menu_fgc_custom", "menu_bgc_custom", "note_fgc_custom", "note_bgc_custom"]; var i = 0; for (;i <= 5;i++) { cb.settings_choices.push({ name : colorSettings[i], type : "choice", choice1 : "AliceBlue", choice2 : "AntiqueWhite", choice3 : "Aqua", choice4 : "Aquamarine", choice5 : "Azure", choice6 : "Beige", choice7 : "Bisque", choice8 : "Black", choice9 : "BlanchedAlmond", choice10 : "Blue", choice11 : "BlueViolet", choice12 : "Brown", choice13 : "BurlyWood", choice14 : "CadetBlue", choice15 : "Chartreuse", choice16 : "Chocolate", choice17 : "Coral", choice18 : "CornflowerBlue", choice19 : "Cornsilk", choice20 : "Crimson", choice21 : "Cyan", choice22 : "DarkBlue", choice23 : "DarkCyan", choice24 : "DarkGoldenRod", choice25 : "DarkGray", choice26 : "DarkGrey", choice27 : "DarkGreen", choice28 : "DarkKhaki", choice29 : "DarkMagenta", choice30 : "DarkOliveGreen", choice31 : "DarkOrange", choice32 : "DarkOrchid", choice33 : "DarkRed", choice34 : "DarkSalmon", choice35 : "DarkSeaGreen", choice36 : "DarkSlateBlue", choice37 : "DarkSlateGray", choice38 : "DarkSlateGrey", choice39 : "DarkTurquoise", choice40 : "DarkViolet", choice41 : "DeepPink", choice42 : "DeepSkyBlue", choice43 : "DimGray", choice44 : "DimGrey", choice45 : "DodgerBlue", choice46 : "FireBrick", choice47 : "FloralWhite", choice48 : "ForestGreen", choice49 : "Fuchsia", choice50 : "Gainsboro", choice51 : "GhostWhite", choice52 : "Gold", choice53 : "GoldenRod", choice54 : "Gray", choice55 : "Grey", choice56 : "Green", choice57 : "GreenYellow", choice58 : "HoneyDew", choice59 : "HotPink", choice60 : "IndianRed", choice61 : "Indigo", choice62 : "Ivory", choice63 : "Khaki", choice64 : "Lavender", choice65 : "LavenderBlush", choice66 : "LawnGreen", choice67 : "LemonChiffon", choice68 : "LightBlue", choice69 : "LightCoral", choice70 : "LightCyan", choice71 : "LightGoldenRodYellow", choice72 : "LightGray", choice73 : "LightGrey", choice74 : "LightGreen", choice75 : "LightPink", choice76 : "LightSalmon", choice77 : "LightSeaGreen", choice78 : "LightSkyBlue", choice79 : "LightSlateGray", choice80 : "LightSlateGrey", choice81 : "LightSteelBlue", choice82 : "LightYellow", choice83 : "Lime", choice84 : "LimeGreen", choice85 : "Linen", choice86 : "Magenta", choice87 : "Maroon", choice88 : "MediumAquaMarine", choice89 : "MediumBlue", choice90 : "MediumOrchid", choice91 : "MediumPurple", choice92 : "MediumSeaGreen", choice93 : "MediumSlateBlue", choice94 : "MediumSpringGreen", choice95 : "MediumTurquoise", choice96 : "MediumVioletRed", choice97 : "MidnightBlue", choice98 : "MintCream", choice99 : "MistyRose", choice100 : "Moccasin", choice101 : "NavajoWhite", choice102 : "Navy", choice103 : "OldLace", choice104 : "Olive", choice105 : "OliveDrab", choice106 : "Orange", choice107 : "OrangeRed", choice108 : "Orchid", choice109 : "PaleGoldenRod", choice110 : "PaleGreen", choice111 : "PaleTurquoise", choice112 : "PaleVioletRed", choice113 : "PapayaWhip", choice114 : "PeachPuff", choice115 : "Peru", choice116 : "Pink", choice117 : "Plum", choice118 : "PowderBlue", choice119 : "Purple", choice120 : "RebeccaPurple", choice121 : "Red", choice122 : "RosyBrown", choice123 : "RoyalBlue", choice124 : "SaddleBrown", choice125 : "Salmon", choice126 : "SandyBrown", choice127 : "SeaGreen", choice128 : "SeaShell", choice129 : "Sienna", choice130 : "Silver", choice131 : "SkyBlue", choice132 : "SlateBlue", choice133 : "SlateGray", choice134 : "SlateGrey", choice135 : "Snow", choice136 : "SpringGreen", choice137 : "SteelBlue", choice138 : "Tan", choice139 : "Teal", choice140 : "Thistle", choice141 : "Tomato", choice142 : "Turquoise", choice143 : "Violet", choice144 : "Wheat", choice145 : "White", choice146 : "WhiteSmoke", choice147 : "Yellow", choice148 : "YellowGreen", choice149 : "Random Selection", choice150 : "Customize your own", defaultValue : "Random Selection", label : colorLabels[i] }, { name : customSettings[i], type : "str", minLength : 6, maxLength : 6, required : false, label : "Custom" }); } var separators = [{ label : "Vertical Bar", shortcut : vertBar }, { label : "Hearts", shortcut : ":heart2" }, { label : "Glitter", shortcut : ":pixelglitter" }, { label : "Flowers", shortcut : ":tinyflower2" }, { label : "Bow", shortcut : ":bluebow" }, { label : "Hearts2", shortcut : ":pixelheart" }, { label : "Smiley", shortcut : ":smile" }, { label : "Text Heart", shortcut : txtHeart }, { label : "Text Diamond", shortcut : txtDiamond }, { label : "Text Star", shortcut : txtStar }, { label : "Bullet", shortcut : bullet }, { label : "Mystery", shortcut : mystery }]; var maxSep = separators.length; var boldSettings = ["title_weight", "menu_weight", "note_weight"]; var boldLabels = ["Title Boldness", "Menu Boldness", "Notifier Boldness"]; var timerSettings = ["menu_time", "note_time", "leaderboard_time", "game_time"]; var timerLabels = ["Tip Menu", "Rotating Messages", "Leaderboard", "Game Advertisements"]; cb.settings_choices.push({ name : "Menu Customization Settings", type : "str", minLength : 0, maxLength : 0, required : false, label : "----------------------------TIP MENU CUSTOMIZATION----------------------------" }, { name : "single_multi", type : "choice", choice1 : "Single Line", choice2 : "Multi Line", label : "Single or Multi Line Menu?", defaultValue : "Multi Line" }, { name : "sort_menu", type : "choice", choice1 : "Increasing", choice2 : "Decreasing", choice3 : "Do not sort", label : "Sort menu items by price?", defaultValue : "Increasing" }, { name : "sepchar", type : "choice", choice1 : "Vertical Bar", choice2 : "Hearts", choice3 : "Glitter", choice4 : "Flowers", choice5 : "Bow", choice6 : "Hearts2", choice7 : "Smiley", choice8 : "Text Heart", choice9 : "Text Diamond", choice10 : "Text Star", choice11 : "Bullet", choice12 : "Mystery", choice13 : "Customize your own", label : "Item Separator" }, { name : "custom_image", type : "str", label : "Custom Separator", required : false, defaultValue : "" }); i = 0; for (;i <= 2;i++) { cb.settings_choices.push({ name : boldSettings[i], type : "choice", choice1 : "Bold", choice2 : "Bolder", choice3 : "Off", label : boldLabels[i], defaultValue : "Bold" }); } cb.settings_choices.push({ name : "Tip Menu Settings", type : "str", minLength : 0, maxLength : 0, required : false, label : "-----------------------------TIP MENU ITEMS & PRICES-----------------------------" }); i = 0; for (;i < maxItems;i++) { cb.settings_choices.push({ name : "item" + i, type : "str", label : "Item " + add(i, 1), required : false }); cb.settings_choices.push({ name : "price" + i, type : "int", minValue : 1, label : "Price Item " + add(i, 1), required : false }); } cb.settings_choices.push({ name : "Rotating Messages Settings", type : "str", minLength : 0, maxLength : 0, required : false, label : "--------------------------------ROTATING MESSAGES--------------------------------" }); i = 1; for (;i <= maxNotices;i++) { cb.settings_choices.push({ name : "note" + i, type : "str", label : "Message " + i, required : false }); } cb.settings_choices.push({ name : "Automation Settings", type : "str", minLength : 0, maxLength : 0, required : false, label : "----------------------------AUTOMATED RESPONSES-------------------------------" }, { name : "welcome_notice", type : "str", label : "Welcome Message", defaultValue : "Welcome to my room [username]!", required : false }, { name : "auto_thank", type : "str", label : "Auto Thank You", defaultValue : "Thank you very much [username]!", required : false }, { name : "auto_menu", type : "choice", choice1 : "No", choice2 : "Yes", defaultValue : "Yes", label : "Use Auto Menu for tip menu related questions?'" }, { name : "opt_out", type : "choice", choice1 : "Yes", choice2 : "No", label : "Allow users to turn the Auto Menu off?" }, { name : "pm_choice", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "Yes", label : "Use auto responder for PM requests?" }, { name : "pm_notice", type : "str", label : "Set auto response for PM requests", required : false, defaultValue : "[Sample]: Hello, the price for PM and many other wonderful things can be found in my tip menu. Access it by typing /menu." }, { name : "pvt_choice", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "Yes", label : "User auto responder for PVT related questions?" }, { name : "pvt_notice", type : "str", label : "Set auto response for PVT related questions", required : false, defaultValue : "[Sample]: Sorry, I'm not accepting PVT today." }, { name : "Miscellaneous Settings", type : "str", minLength : 0, maxLength : 0, required : false, label : "----------------------------MISCELLANEOUS SETTINGS-----------------------------" }, { name : "block_notice", type : "choice", choice1 : "No", choice2 : "Yes", defaultValue : "Yes", label : "Do you want to be notified of Moderator activity?" }, { name : "leaderboard", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "Yes", label : "Use Leaderboard?" }, { name : "show_amount", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "Yes", label : "Do you want to display tip totals in chat?" }, { name : "user_opt_out", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "Yes", label : "Do you want to allow users the option to not display tip totals in chat?" }, { name : "play_cards", type : "choice", choice1 : "Yes", choice2 : "No", label : "Allow members a chance to win a prize playing BlackJack?", defaultValue : "Yes" }, { name : "bet_amount", type : "int", minValue : 1, label : "How many tokens to play BlackJack?" }, { name : "prize_amount", type : "int", minValue : 1, label : "Enter the token value amount prizes should not exceed" }); i = 0; for (;i < 4;i++) { cb.settings_choices.push({ name : "Timer Settings", type : "str", minLength : 0, maxLength : 0, required : false, label : "---------------------------------TIME INTERVALS---------------------------------" }, { name : timerSettings[i], type : "int", label : timerLabels[i] + " display time (minutes) ", minValue : 1, maxValue : 99 }); } cb.settings_choices.push({ name : "Content Settings", type : "str", minLength : 0, maxLength : 0, required : false, label : "----------------------------CONTENT FILTERING----------------------------" }, { name : "grey_chat", type : "choice", choice1 : "No", choice2 : "Yes", defaultValue : "Yes", label : "Allow Greys to Chat?" }, { name : "grey_graphics", type : "choice", choice1 : "No", choice2 : "Yes", defaultValue : "No", label : "Allow Greys to post gifs?" }, { name : "spam_filter", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "Yes", label : "Enable spam blocker?" }, { name : "block_other_models", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "Yes", label : "Block advertising broadcasters?" }, { name : "greyWords", type : "str", minLength : 0, maxLength : 4E3, label : "[Optional] Grey Word List (comma separated, no spaces)", defaultValue : "boobs,ass,pussy,cum,cock", required : false }, { name : "blueWords", type : "str", minLength : 0, maxLength : 4E3, label : "[Optional] Blue Word List (comma separated, no spaces)", defaultValue : "slut,bitch,cunt,whore", required : false }, { name : "privateWords", type : "str", minLength : 0, maxLength : 4E3, label : "[Optional] Private Word List (comma separated, no spaces)", required : false }, { name : "blockUsers", type : "str", minLength : 0, maxLength : 4E3, label : "[Optional] Blocked users (comma separated, no spaces)", defaultValue : "", required : false }, { name : "Ticket Show Settings", type : "str", minLength : 0, maxLength : 0, label : "------------------------------TICKET SHOW SETTINGS------------------------------", required : false }, { name : "ticket_shows", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "", label : "Enable Ticket Shows?" }, { name : "min_start_tokens", type : "int", minValue : 0, defaultValue : 100, label : "Price of admission before the show begins. Set to 0 to disable pre-selling tickets." }, { name : "min_join_tokens", type : "int", minValue : 0, defaultValue : 100, label : "Price of admission after the show has started. Set to 0 to disable joining a show in progress." }, { name : "free_ticket", type : "choice", choice1 : "Fanclub", choice2 : "Moderators", choice3 : "Fanclub and Moderators", choice4 : "Nobody", label : "Who should get a free ticket?" }, { name : "forever_ticket", label : "List of life time ticket holders (comma separated, no spaces)", type : "str", defaultValue : "", required : false }, { name : "mod_power", type : "choice", choice1 : "Yes", choice2 : "No", label : "Grant Moderators the ability to start/stop shows, award/revoke tickets on your behalf?" }, { name : "pre_sell", type : "choice", choice1 : "Before the show starts", choice2 : "After the show starts", choice3 : "Anytime", defaultValue : "After the show starts", label : "When should tickets be available to purchase?" }, { name : "hide_message", label : "Message to display when the cam is hidden", type : "str", minLength : 1, maxLength : 256, defaultValue : "Private Show in progress. Tip 100 tokens to spy on the show" }, { name : "clear_tickets", type : "choice", choice1 : "Yes", choice2 : "No", defaultValue : "Yes", label : "Clear all tickets once the show has stopped?" }, { name : "bot_startup", type : "str", minLength : 0, maxLength : 0, label : "----------------------------- BOT SETUP PREFERENCE -----------------------------", required : false }, { name : "cmd_prefix", type : "str", minLength : 1, maxLength : 1, label : "Bot Command's Prefix (Can be changed in order to play nice with other bots)", defaultValue : "/" }, { name : "show_help", type : "choice", choice1 : "No", choice2 : "Yes", defaultValue : "Yes", label : "Display Help at Startup?" }, { name : "show_settings", type : "choice", choice1 : "No", choice2 : "Yes", defaultValue : "Yes", label : "Display Settings at Startup?" }); var cmdPrefix = cb.settings.cmd_prefix; if ((new RegExp(/[a-zA-Z0-9 ]/)).test(cmdPrefix)) { var oldPrefix = cmdPrefix; cmdPrefix = "/"; cb.sendNotice(oldPrefix + " is not a valid commands prefix. Reverting to default " + cmdPrefix, cb.room_slug, "#ffaaaa", black); } var cmds = ["menu", "settings", "cc", "clear", "showusers", "su", "help", "h", "list", "l", "add <list> <words>", "rm <list> <words>", "mute <usernames>", "unmute <usernames>", "notice <message>", "pm <user> <message>", "greychat", "graphics", "leaderboard", "games", "automenu", "autopm", "autopvt", "start", "stop", "userlist", "adduser <usernames>", "revoke <usernames>", "check <user>", "trustmod", "ticketshow", "log", "stats", "colors", "c", "random", "colorlog", "prefix <symbol>", "change <setting> <attribute> <value>", "remove <list> <words>", "delete <list> <words>", "block <usernames>", "unblock <usernames>", "sep <symbol>"]; cmds.sort(); var tab = "\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0"; var slash = "\n" + tab + tab + cmdPrefix; //var slash = "\n" + tab + tab + cmdPrefix; var help = { basic : { help : "View command help and usage information", h : "Display this help message", menu : "Send the Tip Menu to everyone", settings : "Display the current configuration", clear : "Completely clear the chat of all messages.", cc : "Completely clear the chat of all messages.", su : "Display blocked users", showusers : "Display blocked users", list : "Display both Grey and Blue word lists", l : "Display both Grey and Blue word lists", add : "Add offensive or unwanted words to one of the word lists\n" + tab + "Valid lists are 'grey', 'blue', 'greylist', bluelist'", remove : "Remove words from from one of the word lists\n" + tab + "Valid lists are 'grey', 'blue', 'greylist', bluelist'", delete : "Remove words from from one of the word lists\n" + tab + "Valid lists are 'grey', 'blue', 'greylist', bluelist'", rm : "Remove words from from one of the word lists\n" + tab + "Valid lists are 'grey', 'blue', 'greylist', bluelist'", mute : "[mute | block] a users messages from appearing in chat", block : "[mute | block] a users messages from appearing in chat", unmute : "[unmute | unblock] a users messages in chat", unblock : "[unmute | unblock] a users messages in chat", notice : "Display a public notice for all to see", pm : "Display a notice for one specific user", greychat : "Turn grey chat ON or OFF", graphics : "Turn grey graphics ON or OFF", leaderboard : "Turn the leaderboard ON or OFF", games : "Turn card games ON or OFF", automenu : "Turn tip menu auto responder ON or OFF", autopm : "Turn PM auto responder ON or OFF", autopvt : "Turn PVT show auto responsder ON or OFF", start : "Hide the cam and start the show", stop : "Unhide the cam and end the show", userlist : "View the list of users who have access to the show", adduser : "Grant one or more users access to the show", revoke : "Revoke one or more users access to the show", check : "Check if an individual user has access to the show", trustmod : "Turn moderator notifications ON or OFF", ticketshow : "Enable or Disable ticket shows", log : "View the chat log of blocked messages", stats : "View your token statistics", colors : "View the list of color names available", c : "Random color examples (good way to find color combinations you like)", random : "Reset all background and foreground text colors to new randomly chosen colors", colorlog : "Display the current color settings and any previous color settings", prefix : "Change the prefix used to invoke commands.\n" + tab + "Useful if commands are conflicting with another bot.", sep : "Change the separator character of your tip menu", change : "Adjust the text color, background color, and boldness settings for your tip menu or rotating notices" }, examples : { help : slash + "help add" + slash + "help remove" + slash + "help mute", add : slash + "add grey tits cock cum pussy pm pvt spread" + slash + "add grey doggy spread cum bb daddy" + slash + "add blue slut bitch cunt whore", remove : slash + "rm greylist facebook c2c skype" + slash + "remove blue suck fuck upchuck" + slash + "delete grey small balls all yall", delete : slash + "rm greylist facebook c2c skype" + slash + "remove blue suck fuck upchuck" + slash + "delete grey small balls all yall", rm : slash + "rm greylist facebook c2c skype" + slash + "remove blue suck fuck upchuck" + slash + "delete grey small balls all yall", mute : slash + "mute thisguy thatguy anotherguy somedude" + slash + "block thisgirl thatgirl anothergirl somechick", block : slash + "mute thisguy thatguy anotherguy somedude" + slash + "block thisgirl thatgirl anothergirl somechick", unmute : slash + "unmute thisguy thatguy anotherguy somedude" + slash + "unblock thisgirl thatgirl anothergirl somechick", unblock : slash + "unmute thisguy thatguy anotherguy somedude" + slash + "unblock thisgirl thatgirl anothergirl somechick", notice : slash + "notice Please don't feed the polar bears!" + slash + "notice Follow me on instagram @ username and twitter @ username" + slash + "notice Check out my tip menu by typing /menu", pm : slash + "pm spiritbone I've heard you have a magical penis. May I see it?" + slash + "pm spiritbone OMG they were right! That IS magical." + slash + "pm spiritbone The magic is very effective. It's almost invisible!", adduser : slash + "adduser thisguy" + slash + "adduser thisguy thatguy anotherguy somedude", revoke : slash + "revoke thisgirl" + slash + "revoke thisgirl thatgirl anothergirl somechick", check : slash + "check spiritbone", prefix : slash + "prefix !" + slash + "prefix @" + slash + "prefix #", sep : slash + "sep" + bullet + slash + "sep" + mystery + slash + "sep :heart2", change : tab + "Type " + cmdPrefix + "change help for detailed instructions on this command" } }; cb.onEnter(function(user) { var usr = user.user; var gender = user.gender; var isHost = false; if (usr === cb.room_slug) { isHost = true; hostGender = gender; } var isMod = false; if (user.is_mod) { isMod = true; if (!cbjs.arrayContains(modlist, usr)) { modlist.push(usr); } } var isFan = false; if (user.in_fanclub) { isFan = true; if (!cbjs.arrayContains(fanlist, usr)) { fanlist.push(usr); } } var isPurple = user.tipped_tons_recently && (!isHost && (!isMod && !isFan)); var isPink = user.tipped_alot_recently && (!isPurple && (!isHost && (!isMod && !isFan))); var isDark = user.tipped_recently && (!isPink && (!isPurple && (!isHost && (!isMod && !isFan)))); var isBlue = user.has_tokens && (!isDark && (!isPink && (!isPurple && (!isHost && (!isMod && !isFan))))); if (isPurple) { if (!cbjs.arrayContains(purpleList, usr)) { purpleList.push(usr); } } if (isPink) { if (!cbjs.arrayContains(pinkList, usr)) { pinkList.push(usr); } } if (isDark) { if (!cbjs.arrayContains(darkBlueList, usr)) { darkBlueList.push(usr); } } if (isBlue) { if (!cbjs.arrayContains(lightBlueList, usr)) { lightBlueList.push(usr); } if (gender == hostGender && cb.settings.block_other_models == "Yes") { blockList.push(usr); } } if (!isHost) { var welcome = cb.settings.welcome_notice.replace(/\s+/g, " "); if (welcome !== "" && welcome !== undefined) { if (welcome.includes("[username]")) { welcome = welcome.replace(/\[username\]/, usr); } cb.sendNotice(welcome, usr, "", "#840079", bold1); } if (menuList.length > 0) { showMenu(usr); } } }); cb.onMessage(function(msg) { function gethelp(command, usr) { var parts = m.replace(/\s+/g, " ").split(" "); var lines = parts.length; var examples; var userinput; var toUser; var usage_array = []; var i = 0; for (;i < lines;i++) { userinput = parts[i]; var j = 0; for (;j < cmds.length;j++) { command = cmds[j].replace(/<\S+>/gm, "").trim(); if (userinput == command) { var helptext = tab + "----------------\n" + tab + cmdPrefix + cmds[j]; helptext += "\n" + tab + help.basic[command]; if (help.examples[command] !== undefined) { examples = help.examples[command]; } else { examples = false; } if (examples) { helptext = helptext + "\n" + examples; } usage_array.push(helptext); } } if (lines > 1 && i === lines - 1) { usage_array.push(tab + "----------------"); } } if (usr == "" || usr === undefined) { toUser = ""; } else { toUser = user; } usage_array.forEach(function(value) { cb.sendNotice(value, toUser, "", "#000000", "bold"); }); } // var gender = msg.gender; // var user = msg.user; // var broadcaster = cb.room_slug == user; // var moderator = msg.is_mod; // var fanclub = msg.in_fanclub; // var m = msg.m.replace(/\s+/g, " ").toLowerCase(); // if (m.charAt(0) === cmdPrefix) { // var user_command = true; // msg["X-Spam"] = true; // } // if (broadcaster) { //// if (m === cmdPrefix + "commands" || m === cmdPrefix + "cmds") { //// cmds.forEach(function(command) { //// command = cmdPrefix + command; //// cb.sendNotice(command, user); //// }); //// } //// if (m === cmdPrefix + "help") { //// displayHelp(user); //// } //// if (m.substring(1, 5) === "help") { //// var cmd = m.substring(6); //// gethelp(cmd, user); //// } // } // return msg; // }); // // // // function logMsg(messageText) { messageText = getTime(); messageText += " -- " + user + ": " + m; return messageText; } function showColorNames(usr) { var names = " * * * Colors * * * "; var i = 0; for (;i < colors.length;i++) { names += "\n" + colors[i].label; } cb.sendNotice(names, usr); } function randColor() { var hexarray = ["A", "B", "C", "D", "E", "F", 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; var last = hexarray.length - 1; var n = 0; var randHex = "#"; for (;n <= 5;) { randHex += hexarray[shuffle(0, last)]; n += 1; } return randHex; } function changeAttribute() { arr = m.split(" "); if (arr[1] === "help") { cb.sendNotice(extraHelp(), cb.room_slug); } else { if (arr[1] === "title" || (arr[1] === "menu" || (arr[1] === "item" || (arr[1] === "items" || (arr[1] === "notice" || arr[1] === "notices"))))) { if (arr[2] === "color" || (arr[2] === "colors" || arr[2] === "background")) { var re = new RegExp(/^#?([A-Fa-f0-9]{6})/); var x = 0; for (;x < colors.length;x++) { var colorname = colors[x].label.toLowerCase(); if (arr[3] == colorname) { arr[3] = colors[x].hex; var alt = colorname; } } if (re.test(arr[3])) { var hexcode = arr[3]; if (hexcode.substring(0, 1) !== "#") { hexcode = "#" + hexcode; } if (alt === undefined) { alt = hexcode; } if (arr[1] === "title") { if (arr[2] !== "background") { titleFGC = hexcode; cb.sendNotice("menu title font color set to " + alt, cb.room_slug); } else { titleBGC = hexcode; cb.sendNotice("menu title background color set to " + alt, cb.room_slug); } cb.sendNotice(titleMsg, cb.room_slug, titleBGC, titleFGC, titleweight); } else { if (arr[1] === "menu" || (arr[1] === "items" || arr[1] === "item")) { if (arr[2] !== "background") { menuFGC = hexcode; cb.sendNotice("menu items font color set to " + alt, cb.room_slug); } else { menuBGC = hexcode; cb.sendNotice("menu background color set to " + alt, cb.room_slug); } cb.sendNotice(menuMsg, cb.room_slug, menuBGC, menuFGC, weight); } else { if (arr[1] === "notice" || arr[1] === "notices") { if (arr[2] !== "background") { noteFGC = hexcode; cb.sendNotice("rotating notices font color set to " + alt, cb.room_slug); } else { noteBGC = hexcode; cb.sendNotice("rotating notices background color set to " + alt, cb.room_slug); } cb.sendNotice(noticeMsg, cb.room_slug, noteBGC, noteFGC, noteweight); } } } } else { cb.sendNotice(arr[3] + " is not a valid hex code", cb.room_slug); } } else { if (arr[2] === "weight" || arr[2] === "boldness") { if (arr[3] == "bold" || (arr[3] == "bolder" || arr[3] == "off")) { if (arr[1] === "title") { if (arr[3] == "off") { titleweight = ""; } else { titleweight = arr[3]; } cb.sendNotice("menu title boldness set to " + arr[3], cb.room_slug); } else { if (arr[1] === "menu" || (arr[1] === "items" || arr[1] === "item")) { if (arr[3] == "off") { weight = ""; } else { weight = arr[3]; } cb.sendNotice("menu items boldness set to " + arr[3], cb.room_slug); } else { if (arr[1] === "notices" || arr[1] === "notice") { if (arr[3] == "off") { noteweight = ""; } else { noteweight = arr[3]; } cb.sendNotice("rotating notices boldness set to " + arr[3], cb.room_slug); } } } } else { cb.sendNotice(arr[3] + " is not a valid boldness setting", cb.room_slug); } } else { cb.sendNotice(arr[2] + " is not a valid " + arr[1] + " attribute", cb.room_slug); } } } else { cb.sendNotice(arr[1] + " is not a valid parameter to the " + arr[0] + " command", cb.room_slug); } } } function extraHelp() { var helptext = "The " + cmdPrefix + '"change" command can be used to change various attributes of your Tip Menu and Rotating Messages'; helptext += "\nThe syntax for the command is structured like this:"; helptext += "\n\n\u00a0\u00a0\u00a0\u00a0" + cmdPrefix + "change <parameter> <attribute> <value>"; helptext += "\n\nValid parameters are:"; helptext += "\n\n\u00a0\u00a0\u00a0\u00a0menu -- edit the attributes of items listed in your Tip Menu"; helptext += "\n\u00a0\u00a0\u00a0\u00a0title -- edit the attributes of your Menu Title"; helptext += "\n\u00a0\u00a0\u00a0\u00a0notice -- edit the attributes of your Rotating Messages"; helptext += "\n\nValid attributes are:"; helptext += "\n\n\u00a0\u00a0\u00a0\u00a0color -- changes the color of the text"; helptext += "\n\u00a0\u00a0\u00a0\u00a0background -- changes the color the background"; helptext += "\n\u00a0\u00a0\u00a0\u00a0[weight | boldness] -- weight or boldness changes the level of the text boldness"; helptext += "\n\nValid weight/boldness values are:\n\n\u00a0\u00a0\u00a0\u00a0bold, bolder, off"; helptext += "\n\nValid color and background values are any valid hexidecimal color code with or without the leading #"; helptext += "\nA valid hex code is a sequence of 6 letters [A-F] or numbers [0-9]"; helptext += "\nUppercase or lowercase letters are fine. F and f both mean the same thing."; helptext += "\n\nValid hex examples:\n\n\u00a0\u00a0\u00a0\u00a0#000000, aaffee, AF03C2, #B1d4ee, bbbbbb."; helptext += "\n\nYou may also specify certain colors by their name."; helptext += "\nThese are the 140 color names supported by all web browswers."; helptext += "\nThese colors are listed in the color choices on the start up screen"; helptext += "\nType " + cmdPrefix + "colors to see all 140 colors (Only you will see them)"; helptext += "\nYou can also find them here -- https://www.w3schools.com/colors/colors_names.asp"; helptext += "\n\nExample usage:\n\n\u00a0\u00a0\u00a0\u00a0" + cmdPrefix + "change menu color red -- change the font color of the items listed in your tip menu"; helptext += "\n\u00a0\u00a0\u00a0\u00a0" + cmdPrefix + "change title background #00ff00 -- change the background color of your Menu Title (username's Tip Menu:)"; helptext += "\n\u00a0\u00a0\u00a0\u00a0" + cmdPrefix + "change notice boldness off -- sets the boldness of your rotating messages"; helptext += "\n\nMore examples:"; helptext += "\n\n\u00a0\u00a0\u00a0\u00a0" + cmdPrefix + "change title color magenta\n\u00a0\u00a0\u00a0\u00a0" + cmdPrefix + "change title boldness bold\n\u00a0\u00a0\u00a0\u00a0" + cmdPrefix + "change menu boldness bolder\n\u00a0\u00a0\u00a0\u00a0" + cmdPrefix + "change notice background purple"; helptext += "\n\nType " + cmdPrefix + "c for random color samples. This can be a good way to find color combinations you like. (Only you will see them)"; return helptext; } var blockedUsers = ""; var hasTipped = msg.tipped_recently; var bigTipper = msg.tipped_tons_recently; var goodTipper = msg.tipped_alot_recently; var gender = msg.gender; var user = msg.user; var m = msg.m; //m = m.toLowerCase(); var m = msg.m.replace(/\s+/g, " ").toLowerCase(); var broadcaster = cb.room_slug == user; var moderator = msg.is_mod; var fanclub = msg.in_fanclub; var isPurple = msg.tipped_tons_recently && (!broadcaster && (!moderator && !fanclub)); var isPink = msg.tipped_alot_recently && (!isPurple && (!broadcaster && (!moderator && !fanclub))); var isDark = msg.tipped_recently && (!isPink && (!isPurple && (!broadcaster && (!moderator && !fanclub)))); var isBlue = msg.has_tokens && (!isDark && (!isPink && (!isPurple && (!broadcaster && (!moderator && !fanclub))))); var isGrey = !msg.has_tokens && (!moderator && (!broadcaster && (!fanclub && (!isPurple && (!isPink && (!isDark && !isBlue)))))); var errorNotice; var ticketNotice; var modNotice; var plen; var glen; var blen; // var spaces = new RegExp(/\s+/g); // if (spaces.test(m)) { // m = m.replace(spaces, " "); // } if (m.substring(0, 1) == cmdPrefix) { msg["X-Spam"] = true; } if (m === cmdPrefix + "noauto") { if (cb.settings.opt_out !== "No") { noMenu.push(user); cb.sendNotice("You have opted out of the automatic menu. You may still access the menu at anytime by typing " + cmdPrefix + "menu.", user, "#9ea5bc", "#000000"); } } if (m === cmdPrefix + "winners") { var ep = 0; var pl = prizeLog.length; var prizesWon = ""; for (;ep < pl;ep++) { prizesWon += prizeLog[ep] + "\n"; } if (!broadcaster) { prizesWon += "Tip " + cb.settings.bet_amount + " to play!\nType " + cmdPrefix + "prizes to see the list of prizes available."; } cb.sendNotice(prizesWon, user, white, black, weight); } if (!greyChat && (isGrey && (!moderator && !fanclub))) { msg["X-Spam"] = true; chatLog.push(logMsg(m)); blockedMsgs += 1; } if (cb.settings["spam_filter"] == "Yes") { if (isGrey && gender == "f") { msg["X-Spam"] = true; } } if (IsBlockedUser(user)) { msg["X-Spam"] = true; } if (m == cmdPrefix + "prizes") { var pp = 0; var prizeMsg = "Possible Prizes:"; for (;pp < prizeList.length;pp++) { prizeMsg += "\n" + prizeList[pp]; } cb.sendNotice(prizeMsg, user, "", "", "bold"); } if (m === cmdPrefix + "menu") { if (broadcaster || moderator) { showMenu(); } else { showMenu(user); } } if (!broadcaster) { plen = secretList.length; var p = 0; for (;p < plen;p++) { if (m.includes(secretList[p])) { msg["X-Spam"] = true; } } if (showAmounts && cbjs.arrayContains(tipperNames, user)) { var aaa = 0; for (;aaa < allTippers.length;aaa++) { if (allTippers[aaa].contains(user) && !cbjs.arrayContains(smartPeople, user)) { msg.m = "|" + allTippers[aaa][1].toString() + "| " + msg.m; } } if (userOptOut) { if (m === cmdPrefix + "off" && !cbjs.arrayContains(smartPeople, user)) { smartPeople.push(user); cb.sendNotice("The amount you have tipped will no longer be displayed next to your name", user, "#9ea5bc", black, bold1); } if (m === cmdPrefix + "on" && cbjs.arrayContains(smartPeople, user)) { cbjs.arrayRemove(smartPeople, user); cb.sendNotice("The amount you have tipped will be displayed next to your name", user, "#9ea5bc", black, bold1); } } } if (cbjs.arrayContains(cb.limitCam_allUsersWithAccess(), user)) { msg.background = "#eeeaff"; } } if (!broadcaster && (!moderator && !fanclub)) { if (autoPVT && (!bigTipper && !goodTipper)) { if (cb.settings["pvt_notice"] !== "") { var pvtNote = cb.settings["pvt_notice"]; var rePVT = new RegExp(/^p[r]*?vt\?|((pm.+|.+go|want) pvt\?*|pvt open\?*)/ig); if (rePVT.test(m)) { if (isGrey) { msg["X-Spam"] = true; cb.sendNotice(pvtNote + "\nYou will first need tokens if you want to go PVT", user); } else { cb.sendNotice(pvtNote, user, "", "", "bold"); } } } } if (autoPM) { if (!cbjs.arrayContains(tipperNames, user) && cb.settings["pm_notice"] !== "") { var rePM = new RegExp(/(^pm$|pm\?|pm me)/ig); if (rePM.test(m)) { if (isGrey) { msg["X-Spam"] = true; cb.sendNotice(cb.settings["pm_notice"] + "\nYou will probably need to get some tokens if you want PM", user); } else { cb.sendNotice(cb.settings["pm_notice"], user, "", "", "bold"); } } } } if (autoMenu) { var reMenu = new RegExp(/((\bhow\smuch\sfor.+|\bhow\smuch\sto.+)\?)/ig); if (reMenu.test(m) && !cbjs.arrayContains(noMenu, user)) { showMenu(user); if (cb.settings.opt_out == "Yes") { var optNotice = "This menu was generated automatically based on the question you asked."; optNotice += "\nYou may turn this off by typing " + cmdPrefix + "noauto."; setTimeout(function() { cb.sendNotice(optNotice, user, "#9ea5bc", black); }, 300); } } } } if (isGrey) { glen = greyList.length; ig = 0; for (;ig < glen;ig++) { if (m.includes(greyList[ig])) { msg["X-Spam"] = true; } } blen = blueList.length; ibg = 0; for (;ibg < blen;ibg++) { if (m.includes(blueList[ibg])) { msg["X-Spam"] = true; } } if (!greyGraphics) { var re1 = new RegExp(/:[a-zA-Z0-9\-_]{3,}/ig); if (re1.test(m)) { msg["X-Spam"] = true; } } } if (isBlue) { blen = blueList.length; ib = 0; for (;ib < blen;ib++) { if (m.includes(blueList[ib])) { msg["X-Spam"] = true; } } } if (isBlue || (isDark || (isPink || isPurple))) { var bText = m.replace(/[\.,\?\/@#!$%\^&\*;:{}=\-_`~()]/g, ""); bText = bText.replace(/\s+/g, " ").split(" "); var b = 0; for (;b < bText.length;b++) { if (cbjs.arrayContains(blueList, bText[b])) { msg["X-Spam"] = true; } } } if (fanclub) { if (showStarted && cb.settings.free_ticket !== "Nobody") { if (cb.settings.free_ticket === "Fanclub and Moderators" || cb.settings.free_ticket === "Fanclub") { if (m === cmdPrefix + "enter") { cb.limitCam_addUsers([user]); cb.sendNotice("Welcome to the show. You may need to refresh the page.", user, black, yellow, bold1); } } } } if (moderator) { if (m === cmdPrefix + "igotit") { stopHelper(); } if (showStarted && cb.settings.free_ticket !== "Nobody") { if (cb.settings.free_ticket === "Fanclub and Moderators" || cb.settings.free_ticket === "Moderators") { if (m === cmdPrefix + "enter") { cb.limitCam_addUsers([user]); cb.sendNotice("Welcome to the show. You may need to refresh the page.", user, black, yellow, bold1); } } } if (ticketShow) { if (cb.settings.mod_power == "Yes") { if (m === cmdPrefix + "start") { if (!cb.limitCam_isRunning()) { ticketNotice = user + " has started the show for " + cb.room_slug; cb.sendNotice(ticketNotice, "", "#e2e2e2", red, bold1); cb.limitCam_start(cb.settings.hide_message); showStarted = true; } } if (m === cmdPrefix + "stop") { if (cb.limitCam_isRunning()) { ticketNotice = user + " has stopped the show for " + cb.room_slug; cb.sendNotice(ticketNotice, "", "#e2e2e2", red, bold1); cb.limitCam_stop(); cb.sendNotice("You are now BROADCASTING PUBLICLY.", cb.room_slug, red, white, bold1); if (cb.settings.clear_tickets == "Yes") { cb.limitCam_removeAllUsers(); } } } if (m.substring(0, 6) == cmdPrefix + "check") { username = m.substring(7, m.length); if (cb.limitCam_userHasAccess(username)) { cb.sendNotice(username + " is in the show!", user, white, red, bold1); } else { cb.sendNotice(username + " is NOT in the show!", user, white, red, bold1); } } // if (m === cmdPrefix + "guests" || (m === cmdPrefix + "guest" || m === cmdPrefix + "guestlist")) { if (m === cmdPrefix + "userlist") { var userlist = cb.limitCam_allUsersWithAccess(); if (userlist.length > 0) { var iii = 0; var usersInShow = userlist.length + " Users in show"; for (;iii < userlist.length;iii++) { usersInShow += "\n" + userlist[iii]; } cb.sendNotice(usersInShow, user); } else { cb.sendNotice("No users in show.", user); } } if (m.substring(0, 9) == cmdPrefix + "adduser ") { if ((new RegExp(/(\w)+/)).test(m.substring(9))) { var addList = m.substring(9).split(" "); var au = 0; for (;au < addList.length;au++) { if (addList[au] !== "" && (addList[au] !== undefined && addList[au] != user)) { if ((new RegExp(/(\w)+/)).test(addList[au])) { cb.limitCam_addUsers(addList[au]); var regex = new RegExp(/\S+/g); if (regex.test(addList[au])) { var addNotice = user + " has added " + addList[au] + " to the show!"; cb.sendNotice(addNotice); } } } } } } if (m.substring(0, 7) == cmdPrefix + "revoke" && cb.limitCam_allUsersWithAccess().length > 0) { var kickArr = m.substring(8).split(" "); var ku = 0; for (;ku < cb.limitCam_allUsersWithAccess().length;ku++) { if (cbjs.arrayContains(cb.limitCam_allUsersWithAccess(), kickArr[ku])) { cb.limitCam_removeUsers(kickArr[ku]); var revokeNotice = user + " has removed " + kickArr[ku] + " from the show!"; cb.sendNotice(revokeNotice); } } } } } } if (broadcaster) { if (m.substring(0, 7) === cmdPrefix + "prefix") { var pre_tmp = m.split(" "); if ((new RegExp(/[^A-z0-9\s]/)).test(pre_tmp[1]) && pre_tmp[1].length === 1) { cmdPrefix = pre_tmp[1]; cb.sendNotice("Command prefix has been changed to " + cmdPrefix, cb.room_slug, white, black, bold1); } else { cb.sendNotice(pre_tmp[1] + " is not a valid commands prefix. No changes made.\n" + cmdPrefix + " is still the current prefix for bot commands.\nType " + cmdPrefix + "help for command usage information", cb.room_slug, "#ffaaaa", black); } } if (m.substring(0, 4) === cmdPrefix + "sep") { tmp = m.split(" "); if ((new RegExp(/[^\\]/)).test(tmp[1])) { sep = tmp[1]; menuList = []; costList = []; itemList = []; menuMsg = ""; createMenu(); cb.sendNotice("Menu item separator has been changed to " + sep, cb.room_slug, white, black, bold1); } else { cb.sendNotice(tmp[1] + " is not a valid menu item separator. No changes made.\n" + sep + " is still the current menu item separator.\nType " + cmdPrefix + "help for command usage information", cb.room_slug, "#ffaaaa", black); } } if (m.substring(0, 7) === cmdPrefix + "change") { changeAttribute(); updateColor(); } if (m === cmdPrefix + "random") { cb.sendNotice(menuBGC, user); menuBGC = randColor(); menuFGC = randColor(); titleBGC = randColor(); titleFGC = randColor(); noteBGC = randColor(); noteFGC = randColor(); showMenu(user); cb.sendNotice(noticeMsg, user, noteBGC, noteFGC, noteweight); updateColor(); } if (m === cmdPrefix + "colorlog") { showLog(colorLog, user); } if (m === cmdPrefix + "ticketshow") { ticketShow = !ticketShow; cb.sendNotice("Ticket shows: " + (ticketShow ? "Enabled" : "Disabled"), cb.room_slug, "", "", bold1); } if (ticketShow) { if (m === cmdPrefix + "start") { if (!cb.limitCam_isRunning()) { cb.limitCam_start(cb.settings.hide_message); showStarted = true; ticketNotice = "Private show has started."; cb.sendNotice(ticketNotice, "", "#ff8822", black, bold1); if (lifetime_tickets.length > 0) { for (var lt = 0; lt < lifetime_tickets.length; lt++){ cb.limitCam_addUsers(lifetime_tickets[lt]); } } if (cb.settings.free_ticket !== "Nobody") { if (cb.settings.free_ticket === "Fanclub and Moderators") { var fanmodNotice = "The show is starting. Fans and Mods type " + cmdPrefix + "enter to join."; cb.sendNotice(fanmodNotice, "", "#b4b4b4", red, bold1, "red"); cb.sendNotice(fanmodNotice, "", "#b4b4b4", green, bold1, "green"); } if (cb.settings.free_ticket === "Fanclub") { var fanNotice = "The show is starting. Fanclub Members type " + cmdPrefix + "enter to join the show."; cb.sendNotice(fanNotice, "", black, yellow, bold1, "green"); } if (cb.settings.free_ticket === "Moderators") { var modTicketNotice = "The show is starting. Moderators type " + cmdPrefix + "enter to join the show."; cb.sendNotice(modTicketNotice, "", black, yellow, bold1, "red"); } } } else { cb.sendNotice("Your cam is already hidden", cb.room_slug, "#ffaaaa", black, bold1); } } if (m === cmdPrefix + "stop") { if (cb.limitCam_isRunning()) { ticketNotice = "Private show has ended."; cb.sendNotice(ticketNotice, "", "#ff8822", black, bold1); cb.limitCam_stop(); cb.sendNotice("You are now BROADCASTING PUBLICLY.", cb.room_slug, red, white, bold1); if (cb.settings.clear_tickets == "Yes") { cb.limitCam_removeAllUsers(); } } else { cb.sendNotice("Your cam is not hidden", cb.room_slug, "#ffaaaa", black, bold1); } } if (m.substring(0, 6) == cmdPrefix + "check") { username = m.substring(7, m.length); if (cb.limitCam_userHasAccess(username)) { cb.sendNotice(username + " is in the show!", user, white, red, bold1); } else { cb.sendNotice(username + " is NOT in the show!", user, white, red, bold1); } } //if (m === cmdPrefix + "guests" || (m === cmdPrefix + "guest" || m === cmdPrefix + "guestlist")) { if (m === cmdPrefix + "userlist"){ userlist = cb.limitCam_allUsersWithAccess(); if (userlist.length > 0) { iii = 0; usersInShow = userlist.length + " Users in show"; for (;iii < userlist.length;iii++) { usersInShow += "\n" + userlist[iii]; } cb.sendNotice(usersInShow, user); } else { cb.sendNotice("No users in show.", user); } } if (m.substring(0, 9) == cmdPrefix + "adduser ") { if ((new RegExp(/(\w)+/)).test(m.substring(9))) { addList = m.substring(9).split(" "); au = 0; for (;au < addList.length;au++) { if (addList[au] !== "" && (addList[au] !== undefined && addList[au] != user)) { if ((new RegExp(/(\w)+/)).test(addList[au])) { cb.limitCam_addUsers(addList[au]); regex = new RegExp(/\S+/g); if (regex.test(addList[au])) { addNotice = user + " has added " + addList[au] + " to the show!"; cb.sendNotice(addNotice); } } } } } } if (m.substring(0, 7) == cmdPrefix + "revoke" && cb.limitCam_allUsersWithAccess().length > 0) { kickArr = m.substring(8).split(" "); if (kickArr[1] === "all") { cb.limitCam_removeAllUsers(); } else { ku = 0; for (;ku < cb.limitCam_allUsersWithAccess().length;ku++) { if (cbjs.arrayContains(cb.limitCam_allUsersWithAccess(), kickArr[ku])) { cb.limitCam_removeUsers(kickArr[ku]); revokeNotice = user + " has removed " + kickArr[ku] + " from the show!"; cb.sendNotice(revokeNotice); } } } } } if (m === cmdPrefix + "stats") { getStats(); } if (m === cmdPrefix + "log") { showLog(chatLog, user); } if (m == cmdPrefix + "trustmod") { modActivity = !modActivity; cb.sendNotice("Display Moderator Activity: " + (modActivity ? "Yes" : "No"), cb.room_slug, "", "", "bold"); } } if (broadcaster || moderator) { if (m === cmdPrefix + "commands" || m === cmdPrefix + "cmds") { cmds.forEach(function(command) { command = cmdPrefix + command; cb.sendNotice(command, user); }); } var bluewords = function() { var blueNotice = "Blue word list : " + readlist(blueList); cb.sendNotice(blueNotice, user, "", blue, "bold"); }; var greywords = function() { var greyNotice = "Grey word list : " + readlist(greyList); cb.sendNotice(greyNotice, user, "", "#444444", "bold"); }; if (m === cmdPrefix + "igotit") { stopHelper(); } if (m === cmdPrefix + "colors") { showColorNames(user); } if (m === cmdPrefix + "c" && m.length === 2) { var getRandomColors = function() { var randBGC = randColor(); var randFGC = randColor(); var hexNotice = "Background: " + randBGC + " "; hexNotice += "Font Color: " + randFGC; var hexReverse = "Background: " + randFGC + " "; hexReverse += "Font Color: " + randBGC; cb.sendNotice(hexNotice, user, randBGC, randFGC, "bold"); cb.sendNotice(hexReverse, user, randFGC, randBGC, "bold"); cb.sendNotice("Black text on background " + randBGC, user, randBGC, black, "bold"); cb.sendNotice("White text on background " + randBGC, user, randBGC, white, "bold"); cb.sendNotice("Black text on background " + randFGC, user, randFGC, black, "bold"); cb.sendNotice("White text on background " + randFGC, user, randFGC, white, "bold"); }; setTimeout(function() { getRandomColors(); }, 100); } if (m === cmdPrefix + "games" || m === cmdPrefix + "games") { playGames = !playGames; cb.sendNotice("Blackjack: " + (playGames ? "Enabled" : "Disabled"), user, "", "", "bold"); if (moderator && modActivity) { modNotice = "Moderator " + user + " has " + (playGames ? "Enabled" : "Disabled") + " Blackjack"; cb.sendNotice(modNotice, cb.room_slug, "#ffaaaa", black, "bold"); } } if (m == cmdPrefix + "help" || m == cmdPrefix + "h") { displayHelp(user); } if (m.substring(1, 5) === "help") { var cmd = m.substring(6); if (cmd !== "" || cmd !== undefined){ gethelp(cmd, user); } } if (m == cmdPrefix + "settings") { displaySettings(user); } if (m == cmdPrefix + "clear" || m == cmdPrefix + "cc") { clearChat(); } if (m.substring(0, 7) == cmdPrefix + "notice") { var n_arr = m.split(" "); var cmd = n_arr[0]; var txt = n_arr[1]; if (txt != undefined && txt.length > 0) { cb.sendNotice(msg.m.substring(cmd.length + 1), "", "", "", "bold"); } else { cb.sendNotice("You didn't write a notice. Empty notice not sent. Type " + cmdPrefix + "help for command usage information", user, "", "", "bold"); } } if (m.substring(0, 3) == cmdPrefix + "pm") { var m_arr = m.split(" "); cmd = m_arr[0]; var reciever = m_arr[1]; if (reciever != undefined && reciever.length > 0) { var iirr = reciever.length + 1 + cmd.length + 1; var pmsg = msg.m.substring(iirr); rePM = new RegExp(/\b\w+\b/); if (rePM.test(pmsg)) { cb.sendNotice(user + ": " + pmsg, reciever); } else { cb.sendNotice("Empty message not sent to " + reciever, user, "", "", "bold"); } } else { cb.sendNotice("You must specifiy a recipient", user, "", "", "bold"); } } if (m == cmdPrefix + "list" || m == cmdPrefix + "l") { if (greyList.length > 0) { greywords(); } else { cb.sendNotice("Grey list is empty", user, "", "", "bold"); } if (blueList.length > 0) { bluewords(); } else { cb.sendNotice("Blue list is empty", user, "", "", "bold"); } } if (m === cmdPrefix + "showtips") { showAmounts = !showAmounts; cb.sendNotice("User tip totals display is now: " + (showAmounts ? "Enabled" : "Disabled"), user, "", "", bold1); if (moderator && modActivity) { modNotice = "Moderator " + user + " has " + (showAmounts ? "Enabled" : "Disabled") + "Tip totals display"; cb.sendNotice(modNotice, cb.room_slug, "#ffaaaa", black, bold1); } } if (m === cmdPrefix + "leaderboard") { leaderBoard = !leaderBoard; cb.sendNotice("Leaderboard is now: " + (leaderBoard ? "Enabled" : "Disabled"), user, "", "", "bold"); if (moderator && modActivity) { modNotice = "Moderator " + user + " has " + (leaderBoard ? "Enabled" : "Disabled") + " the Leaderboard"; cb.sendNotice(modNotice, cb.room_slug, "#ffaaaa", black, bold1); } } if (m === cmdPrefix + "greychat") { greyChat = !greyChat; cb.sendNotice("Grey Chat is now: " + (greyChat ? "On" : "Off"), user, "", "", "bold"); if (moderator && modActivity) { modNotice = "Moderator " + user + " has turned Grey Chat " + (greyChat ? "On" : "Off"); cb.sendNotice(modNotice, cb.room_slug, "#ffaaaa", black, "bold"); } } if (m === cmdPrefix + "graphics" || m === cmdPrefix + "graphic") { greyGraphics = !greyGraphics; cb.sendNotice("Grey Graphics are now: " + (greyGraphics ? "On" : "Off"), user, "", "", "bold"); if (moderator && modActivity) { modNotice = "Moderator " + user + " has turned Grey Graphics " + (greyGraphics ? "On" : "Off"); cb.sendNotice(modNotice, cb.room_slug, "#ffaaaa", black, "bold"); } } if (m === cmdPrefix + "autopm") { autoPM = !autoPM; cb.sendNotice("PM Auto Response is now: " + (autoPM ? "On" : "Off"), user, "", "", "bold"); if (moderator && modActivity) { modNotice = "Moderator " + user + " has turned PM Auto Response: " + (autoPM ? "On" : "Off"); cb.sendNotice(modNotice, cb.room_slug, "#ffaaaa", black, "bold"); } } if (m === cmdPrefix + "autopvt") { autoPVT = !autoPVT; cb.sendNotice("PVT Show Auto Response is now: " + (autoPVT ? "On" : "Off"), user, "", "", "bold"); if (moderator && modActivity) { modNotice = "Moderator " + user + " has turned PVT Show Auto Response: " + (autoPVT ? "On" : "Off"); cb.sendNotice(modNotice, cb.room_slug, "#ffaaaa", black, "bold"); } } if (m === cmdPrefix + "automenu") { autoMenu = !autoMenu; cb.sendNotice("Auto Menu is now " + (autoMenu ? "On" : "Off"), user, "", "", "bold"); if (moderator && modActivity) { modNotice = "Moderator " + user + " has turned the Auto Menu " + (autoMenu ? "On" : "Off"); cb.sendNotice(modNotice, cb.room_slug, "#ffaaaa", black, "bold"); } } if (m.substring(0, 5) === cmdPrefix + "add ") { var tmp = m.split(" "); if (tmp[1] == "blue" || tmp[1] === "bluelist") { var wordList = blueList } else { if (tmp[1] == "grey" || (tmp[1] == "gray" || (tmp[1] === "greylist" || tmp[1] === "graylist"))) { wordList = greyList; } else { if (tmp[1] == "" || tmp[1] === undefined) { cb.sendNotice("You didn't specify a list!", user, "#ffaaaa", black, bold1); var inValid = 1; } else { cb.sendNotice(tmp[1] + " is not a valid wordlist.\nTo use this command correctly, type:\n\u00a0\u00a0\u00a0\u00a0" + cmdPrefix + "add <list> <words>\nThe list can be either 'grey' or 'blue' or 'greylist' or 'bluelist'", user, "#ffaaaa", black, bold1); inValid = 1; } } } if (!inValid) { var i3 = 2; for (;i3 < tmp.length;i3++) { if (!cbjs.arrayContains(wordList, tmp[i3])) { wordList.push(tmp[i3]); if (moderator && modActivity) { var caps = tmp[1].charAt(0).toUpperCase(); var theList = tmp[1].replace(tmp[1].charAt(0), caps); cb.sendNotice("Moderator " + user + " has added " + tmp[i3] + " to the " + theList + " word list", cb.room_slug, white, red, bold1); } } } if (wordList == greyList) { greywords(); } if (wordList == blueList) { bluewords(); } } } if (m.substring(0, 7) == cmdPrefix + "delete" || (m.substring(0, 7) == cmdPrefix + "remove" || m.substring(0, 3) == cmdPrefix + "rm")) { tmp = m.split(" "); if (tmp[1] == "blue" || tmp[1] === "bluelist") { wordList = blueList; } else { if (tmp[1] == "grey" || (tmp[1] == "gray" || (tmp[1] === "greylist" || tmp[1] === "graylist"))) { wordList = greyList; } else { if (tmp[1] == "" || tmp[1] === undefined) { cb.sendNotice("You didn't specify a list!", user, "#ffaaaa", black, bold1); inValid = 1; } else { cb.sendNotice(tmp[1] + " is not a valid wordlist", user, "#ffaaaa", black, bold1); inValid = 1; } } } if (!inValid) { i4 = 2; for (;i4 < tmp.length;i4++) { if (cbjs.arrayContains(wordList, tmp[i4])) { cbjs.arrayRemove(wordList, tmp[i4]); if (moderator && modActivity) { caps = tmp[1].charAt(0).toUpperCase(); theList = tmp[1].replace(tmp[1].charAt(0), caps); cb.sendNotice("Moderator " + user + " has removed " + tmp[i4] + " from the " + theList + " word list", cb.room_slug, white, red, "bold"); } } } if (wordList == greyList) { greywords(); } if (wordList == blueList) { bluewords(); } } } if (m.substring(0, 6) == cmdPrefix + "block" || m.substring(0, 5) === cmdPrefix + "mute") { tmp = m.split(" "); if (tmp[1] !== undefined && tmp[1] !== "") { var i5 = 1; for (;i5 < tmp.length;i5++) { if (broadcaster) { if (tmp[i5] != "" && (tmp[i5] != undefined && (tmp[i5] != cb.room_slug && !cbjs.arrayContains(blockList, tmp[i5])))) { blockList.push(tmp[i5]); } } if (moderator) { if (tmp[i5] != "" && (tmp[i5] != undefined && (tmp[i5] != cb.room_slug && (tmp[i5] !== user && !cbjs.arrayContains(modlist, tmp[i5] && !cbjs.arrayContains(blockList, tmp[i5])))))) { blockList.push(tmp[i5]); if (modActivity) { cb.sendNotice("Moderator " + user + " has blocked " + tmp[i5], cb.room_slug, white, red, "bold"); } } } } if (blockList.length > 0) { cb.sendNotice("[Blocked]: " + blockList, user, "#ffaaaa", black, "bold"); } else { cb.sendNotice("[Blocked]: No users blocked", user, "#ffaaaa", black, "bold"); } } else { cb.sendNotice("You must specify a user to block. Type " + cmdPrefix + "help for command usage information.", user, "#ffaaaa", black, "bold"); } } if (m.substring(0, 8) == cmdPrefix + "unblock" || m.substring(0, 7) === cmdPrefix + "unmute") { tmp = m.split(" "); if (tmp[1] !== undefined && tmp[1] !== "") { var i6 = 1; for (;i6 < tmp.length;i6++) { if (tmp[i6] != "" && (tmp[i6] != undefined && cbjs.arrayContains(blockList, tmp[i6]))) { cbjs.arrayRemove(blockList, tmp[i6]); if (moderator && modActivity) { cb.sendNotice("Moderator " + user + " has unblocked " + tmp[i6], cb.room_slug, white, red, "bold"); } } } if (blockList.length > 0) { cb.sendNotice("[Blocked]: " + blockList, user, "#ffaaaa", black, "bold"); } else { cb.sendNotice("[Blocked]: No users blocked", user, "#ffaaaa", black, "bold"); } } else { cb.sendNotice("You must specify a user to unblock. Type " + cmdPrefix + "help for command usage information.", user, "#ffaaaa", black, "bold"); } } if (m == cmdPrefix + "showusers" || (m == cmdPrefix + "showuser" || m == cmdPrefix + "su")) { if (blockList.length > 0) { blockedUsers += "Muted Users: "; blockedUsers += readlist(blockList); } else { blockedUsers += "Muted users: None"; } cb.sendNotice(blockedUsers, user, "", "", "bold"); } } if (msg["X-Spam"] && m.substring(0, 1) !== cmdPrefix) { chatLog.push(logMsg(m)); blockedMsgs += 1; } return msg; }); cb.onTip(function(tip) { function getPrize() { var randomPrize; var lastItem = prizeList.length - 1; var prizeIndex = shuffle(0, lastItem); randomPrize = prizeList[prizeIndex]; cb.sendNotice(":goldstar7 :goldstar7 :goldstar7"); cb.sendNotice("prize " + randomPrize, "", green, black, bold2); prizeLog.push(randomPrize + " won by: " + tip["from_user"]); } function blackjack() { var blackJack; var dealerWin; var spades = "\u2660"; var clubs = "\u2663"; var hearts = "\u2665"; var diamonds = "\u2666"; var dealer = cb.room_slug; var player = tip.from_user; var table = [player, dealer]; var suits = [hearts, clubs, diamonds, spades]; var deck = []; var score = []; var x; x = 0; for (;x < suits.length;x++) { var cards = ["A", 2, 3, 4, 5, 6, 7, 8, 9, 10, "J", "Q", "K"]; var i; i = 0; for (;i < cards.length;i++) { deck.push(cards[i] + suits[x]); } } var seat; seat = 0; for (;seat < table.length;seat++) { var cardsToDeal = 1; var cardsHeld = []; var sum = []; for (;0 < cardsToDeal;) { var index = shuffle(0, deck.length - 1); var card = deck[index]; cardsHeld.push(card); deck.splice(index, 1); var value = card.substring(0, card.length - 1); if (value == "J" || (value == "Q" || value == "K")) { value = 10; } else { if (value == "A") { value = 11; } else { value = Number(value); } } sum.push(value); var total = sum.reduce(add, 0); if (total > 21 && cbjs.arrayContains(sum, 11)) { var ii = sum.indexOf(11); if (ii !== -1) { sum[ii] = 1; } total = sum.reduce(add, 0); } if (total >= 17) { total = Number(total); score.push(total); cardsToDeal--; } } var playerScore = score[0]; var dealerScore = score[1]; var result; var prize = false; var hand = table[seat] + " drew cards " + "[" + cardsHeld + "]\n" + table[seat] + " has " + total; if (table[seat] === player) { if (cardsHeld.length === 2 && playerScore === 21) { blackJack = 1; result = player + " has BlackJack!"; prize = true; cb.sendNotice(hand, "", "", black, "bold"); blankline(); } } if (table[seat] === dealer) { if (blackJack === undefined && (cardsHeld.length === 2 && dealerScore === 21)) { dealerWin = 1; result = dealer + " has BlackJack!"; cb.sendNotice(hand, "", "", black, "bold"); blankline(); } } if (blackJack === undefined) { if (dealerWin === undefined) { cb.sendNotice(hand, "", "", black, "bold"); blankline(); } } } if (blackJack === undefined && dealerWin === undefined) { if (playerScore >= 17 && (playerScore <= 21 && playerScore === dealerScore)) { result = "Push!"; } else { if (playerScore >= 17 && (playerScore <= 21 && (dealerScore >= 17 && (dealerScore <= 21 && playerScore > dealerScore)))) { result = table[0] + " Wins!"; prize = true; } else { if (playerScore >= 17 && (playerScore <= 21 && dealerScore > 21)) { result = table[1] + " Busts!"; prize = true; } else { if (playerScore >= 17 && (playerScore <= 21 && (dealerScore >= 17 && (dealerScore <= 21 && playerScore < dealerScore)))) { result = table[1] + " Wins!"; } else { if (dealerScore >= 17 && (dealerScore <= 21 && playerScore > 21)) { result = table[0] + " Busts!"; } else { if (playerScore > 21 && dealerScore > 21) { result = table[0] + " Busts!\n"; result += table[1] + " Busts!"; } } } } } } } cb.sendNotice(result, "", "", red, "bold"); if (!prize) { cb.sendNotice(":panic1 "); } if (prize || blackJack) { getPrize(); } } var user = tip.from_user; var amt = tip.amount; combinedTips += amt; if (showAmounts && !cbjs.arrayContains(tipperNames, user)) { tipperNames.push(user); if (userOptOut) { cb.sendNotice("The total amount you have tipped will be displayed next to your name in chat.\nType " + cmdPrefix + "off at any time to stop showing your tip totals.\nType " + cmdPrefix + "on if you want to display them again.", user, "#9ea5bc", black); } } var thankyou = cb.settings.auto_thank.replace(/\s+/g, " "); if (thankyou !== "" && thankyou !== undefined) { if (thankyou.includes("[username]")) { thankyou = thankyou.replace(/\[username\]/, user); } cb.sendNotice(thankyou, user, "", "#840079", bold1); } var n = allTippers.length; var ind = 0; for (;ind < n;ind++) { if (allTippers[ind][0] == user) { allTippers[ind][1] += amt; newTipper = false; break; } if (ind == n - 1) { newTipper = true; } } if (n === ind) { allTippers[n] = []; allTippers[n][0] = user; allTippers[n][1] = amt; n += 1; } ind = 0; if (playGames) { if (cb.settings["play_cards"] == "Yes") { if (amt == cb.settings["bet_amount"]) { blackjack(); } } } if (ticketShow) { if (showStarted && cb.settings.pre_sell === "After the show starts") { if (!cbjs.arrayContains(cb.limitCam_allUsersWithAccess(), user)) { if (cb.limitCam_isRunning() && (parseInt(amt) >= cb.settings.min_join_tokens && cb.settings.min_join_tokens > 0)) { cb.limitCam_addUsers([tip["from_user"]]); cb.sendNotice("Added " + tip["from_user"] + " to hidden cam show!"); } } } else { if (!showStarted && cb.settings.pre_sell === "Before the show starts") { if (!cbjs.arrayContains(cb.limitCam_allUsersWithAccess(), user)) { if (!cb.limitCam_isRunning() && (parseInt(amt) >= cb.settings.min_start_tokens && cb.settings.min_start_tokens > 0)) { cb.limitCam_addUsers([tip["from_user"]]); cb.sendNotice("Added " + tip["from_user"] + " to hidden cam show!"); } } } else { if (cb.settings.pre_sell === "Anytime") { if (!cbjs.arrayContains(cb.limitCam_allUsersWithAccess(), user)) { if (!cb.limitCam_isRunning() && (parseInt(amt) >= cb.settings.min_start_tokens && cb.settings.min_start_tokens > 0)) { cb.limitCam_addUsers([tip["from_user"]]); cb.sendNotice("Added " + tip["from_user"] + " to hidden cam show!"); } if (cb.limitCam_isRunning() && (parseInt(amt) >= cb.settings.min_join_tokens && cb.settings.min_join_tokens > 0)) { cb.limitCam_addUsers([tip["from_user"]]); cb.sendNotice("Added " + tip["from_user"] + " to hidden cam show!"); } } } } } } }); function hex(c) { var s = "0123456789abcdef"; var i = parseInt(c); if (i == 0 || isNaN(c)) { return "00"; } i = Math.round(Math.min(Math.max(0, i), 255)); return s.charAt((i - i % 16) / 16) + s.charAt(i % 16); } function convertToHex(rgb) { return hex(rgb[0]) + hex(rgb[1]) + hex(rgb[2]); } function hexTrim(s) { return s.charAt(0) == "#" ? s.substring(1, 7) : s; } function convertToRGB(hex) { var color = []; color[0] = parseInt(hexTrim(hex).substring(0, 2), 16); color[1] = parseInt(hexTrim(hex).substring(2, 4), 16); color[2] = parseInt(hexTrim(hex).substring(4, 6), 16); return color; } function generateColor(colorStart, colorEnd, colorCount) { var start = convertToRGB(colorStart); var end = convertToRGB(colorEnd); var len = colorCount; var alpha = 0; var gradient = []; i = 0; for (;i < len;i++) { var c = []; alpha += 1 / len; c[0] = start[0] * alpha + (1 - alpha) * end[0]; c[1] = start[1] * alpha + (1 - alpha) * end[1]; c[2] = start[2] * alpha + (1 - alpha) * end[2]; gradient.push(convertToHex(c)); } return gradient; } function updateColor() { colorLog.push(getTime()); var colorupdate = ""; colorupdate += "\nmenu background: " + menuBGC; colorupdate += "\nmenu color: " + menuFGC; colorupdate += "\ntitle background: " + titleBGC; colorupdate += "\ntitle color: " + titleFGC; colorupdate += "\nnotice background: " + noteBGC; colorupdate += "\nnotice color: " + noteFGC; colorLog.push(colorupdate); } function startHelper() { cb.sendNotice("Need some help? Type " + cmdPrefix + "help to see the available commands and how to use them\nType " + cmdPrefix + "igotit if you're tired of seeing this message.", "", white, black, bold1, "red"); modHelper = cb.setTimeout(startHelper, 6E4 * 5); } function stopHelper() { cb.cancelTimeout(modHelper); } function clearChat() { var c = 0; var notice = ""; for (;c < 200;) { notice += "\n"; c += 1; } cb.sendNotice(notice, "", white, white); } function add(a, b) { return a + b; } function shuffle(min, max) { min = Math.ceil(min); max = Math.floor(max); return Math.floor(Math.random() * (max - min + 1)) + min; } function blankline(usr) { if (usr == "" || usr == undefined) { toUser = ""; } else { toUser = usr; } cb.sendNotice("", toUser, "#ffffff", "#ffffff", "bold"); blankline.called = true; } function createMenu() { var i = 0; for (;i < maxItems;i++) { var eachItem = cb.settings["item" + i]; var eachCost = cb.settings["price" + i]; if (eachItem != "") { if (eachCost != null) { costList.push(eachCost); itemList.push(eachItem); } } } var sorted = []; var j = 0; for (;j < costList.length;j++) { sorted.push({ "prices" : costList[j], "itemslistlist" : itemList[j], "id" : j }); } if (cb.settings.sort_menu !== "Do Not Sort") { sorted.sort(function(a, b) { if (cb.settings.sort_menu == "Increasing") { return a.itemslistlist - b.itemslistlist; } else { return b.itemslistlist - a.itemslistlist; } }); } i = 0; for (;i < sorted.length;i++) { menuList.push(itemList[sorted[i]["id"]]); } var len = menuList.length; if (len > 0) { if (cb.settings["single_multi"] == "Multi Line") { endline = "\n"; } else { endline = " "; } menuMsg = ""; i = 0; for (;i < len;i++) { if (i == len - 1) { endline = " "; } menuMsg += sep + " " + menuList[i] + " " + endline; } } } function showMenu(usr) { if (usr == undefined) { usr = ""; } // cb.sendNotice("", usr, white, white); var cap = cb.room_slug.charAt(0).toUpperCase(); var hostName = cb.room_slug.replace(cb.room_slug.charAt(0), cap); var stars = "\u2605 "; titleMsg = "MY LOVENSE EDGE VIBRATOR WILL REACT TO YOUR TIPS"; setTimeout(function() { cb.sendNotice(titleMsg, usr, titleBGC, titleFGC, titleweight); }, 100); setTimeout(function() { cb.sendNotice(menuMsg, usr, menuBGC, menuFGC, weight); }, 200); } function gameNotify() { var gameNotice = "Try your luck at Blackjack! Tip " + cb.settings["bet_amount"] + " to play and a chance to win a prize!"; gameNotice += "\nType " + cmdPrefix + "prizes to see the list of possible prizes."; gameNotice += "\nType " + cmdPrefix + "winners to see a list of prizes won."; blankline(); cb.sendNotice(gameNotice, "", "", "", "bold"); cb.setTimeout(gameNotify, cb.settings.game_time * 6E4); } function menuTimer() { cb.setTimeout(showMenu(), cb.settings.menu_time * 6E4); cb.setTimeout(menuTimer, cb.settings.menu_time * 6E4); } function showLeaderBoard() { var len = allTippers.length; var i = 0; var tmp = []; for (;i < len;i++) { tmp.push(allTippers[i][1] + " " + allTippers[i][0]); } leaders = []; tmp.sort(naturalCompare); i = 0; for (;i <= 2;i++) { leaders.push(tmp[i].split(" ")); } var leaderboard = "Leaderboard"; leaderboard += "\n1. " + leaders[0][1] + ": " + leaders[0][0]; leaderboard += "\n2. " + leaders[1][1] + ": " + leaders[1][0]; leaderboard += "\n3. " + leaders[2][1] + ": " + leaders[2][0]; cb.sendNotice(leaderboard); } function leaderboardTimer() { if (allTippers.length > 2) { cb.setTimeout(showLeaderBoard, cb.settings.leaderboard_time * 6E4); } cb.setTimeout(leaderboardTimer, cb.settings.leaderboard_time * 6E4); } function naturalCompare(a, b) { var ax = []; var bx = []; a.replace(/(\d+)|(\D+)/g, function(_, $1, $2) { ax.push([$1 || Infinity, $2 || ""]); }); b.replace(/(\d+)|(\D+)/g, function(_, $1, $2) { bx.push([$1 || Infinity, $2 || ""]); }); for (;ax.length && bx.length;) { var an = ax.shift(); var bn = bx.shift(); var nn = bn[0] - an[0] || bn[1].localeCompare(an[1]); if (nn) { return nn; } } return ax.length - bx.length; } function notifyMsg() { for (;cb.settings["note" + (note_index + 1)] == 0;) { note_index++; note_index %= maxNotices; } var noticeMsg = cb.settings["note" + (note_index + 1)]; note_index++; note_index %= maxNotices; blankline(); cb.sendNotice(noticeMsg, "", noteBGC, noteFGC, noteweight); cb.setTimeout(notifyMsg, cb.settings.note_time * 6E4); } function loadPrizes() { var topPrize = cb.settings["prize_amount"]; var k = 0; for (;topPrize >= costList[k];k++) { prizeList.push(itemList[k]); } } function IsBlockedUser(usr) { return blockList.contains(usr); } function readlist(list) { var temp = {}; var i = 0; for (;i < list.length;i++) { temp[list[i]] = true; } var r = []; var k; for (k in temp) { r.push(k); } return r; } function getTime() { var d = new Date; var min = d.getMinutes(); var hrs = d.getHours(); var sec = d.getSeconds(); var clock = hrs + ":" + min + ":" + sec; return clock; } function showLog(logs, usr) { var logText = logs.toString(); logText = logText.replace(/,/g, "\n"); cb.sendNotice(logText, usr); } function displaySettings(usr) { var settingNotice = "***** Settings *****"; settingNotice += "\n--------------------------"; settingNotice += "\nDisplay welcome message: " + (welcomeMessage ? "Yes" : "No"); settingNotice += "\nLeaderboard: " + (leaderBoard ? "Enabled" : "Disabled"); settingNotice += "\nAllow greys to chat: " + (greyChat ? "Yes" : "No"); settingNotice += "\nAllow grey graphics: " + (greyGraphics ? "Yes" : "No"); settingNotice += "\nAuto Menu function: " + (autoMenu ? "Enabled" : "Disabled"); settingNotice += "\nAuto Response PVT: " + (autoPVT ? "Enabled" : "Disabled"); settingNotice += "\nAuto Response PM: " + (autoPM ? "Enabled" : "Disabled"); settingNotice += "\nBlackJack: " + (playGames ? "Enabled" : "Disabled"); settingNotice += "\nTicket shows: " + (ticketShow ? "Enabled" : "Disabled"); if (usr === cb.room_slug) { settingNotice += "\nDisplay moderator activity: " + (modActivity ? "Yes" : "No"); } settingNotice += "\n--------------------------"; cb.sendNotice(settingNotice, usr, white, black, "bold"); } function displayHelp(usr) { var indent = "\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0"; var notice = "***** Commands *****"; notice += "\n-----------------------------------------"; notice += "\n** " + cmdPrefix + "help, " + cmdPrefix + "h -- Display this help message"; notice += "\n** " + cmdPrefix + "settings -- Display the current configuration"; notice += "\n** " + cmdPrefix + "menu -- Send the Tip Menu to everyone"; notice += "\n** " + cmdPrefix + "list, " + cmdPrefix + "l -- Display both Grey and Blue word lists"; notice += "\n** " + cmdPrefix + "add <list> <words> -- Add words to either the GREY list or BLUE list"; notice += "\n** " + cmdPrefix + "remove, " + cmdPrefix + "delete, " + cmdPrefix + "rm <list> <words> -- Remove words from either the GREY list or BLUE list"; notice += "\n** " + cmdPrefix + "mute, " + cmdPrefix + "block <users> -- Mute/Block some users"; notice += "\n** " + cmdPrefix + "unmute, " + cmdPrefix + "unblock <users> -- Unmute/Unblock users"; notice += "\n** " + cmdPrefix + "su, " + cmdPrefix + "showusers -- Display blocked users"; notice += "\n** " + cmdPrefix + "cc, " + cmdPrefix + "clear -- Completely clear the chat of all messages."; notice += "\n** " + cmdPrefix + "notice <text> -- Send a notice to everyone"; notice += "\n** " + cmdPrefix + "pm <username> <message> -- Send a personal notice to a single user."; notice += "\n-----------------------------------------"; notice += "\n***** ON/OFF Commands *****"; notice += "\n** " + cmdPrefix + "greychat -- Turn grey chat ON or OFF"; notice += "\n** " + cmdPrefix + "graphics -- Turn grey graphics ON or OFF"; notice += "\n** " + cmdPrefix + "leaderboard -- Turn the leaderboard ON or OFF"; notice += "\n** " + cmdPrefix + "games -- Turn card games ON or OFF"; notice += "\n** " + cmdPrefix + "automenu -- Turn the auto response Tip Menu ON or OFF"; notice += "\n** " + cmdPrefix + "autopm -- Turn the auto response for PM requests ON or OFF"; notice += "\n** " + cmdPrefix + "autopvt -- Turn the auto response for PVT show requests ON or OFF"; notice += "\n-----------------------------------------"; notice += "\n***** Ticket Show Commands *****"; notice += "\n** " + cmdPrefix + "start -- Hide the cam and start the show"; notice += "\n** " + cmdPrefix + "stop -- Unhide the cam and end the show"; notice += "\n** " + cmdPrefix + "adduser <username> -- grant one or more users access to the show"; notice += "\n** " + cmdPrefix + "revoke <username> -- revoke one or more users access to the show"; notice += "\n** " + cmdPrefix + "userlist -- view the list of users who have access to the show"; notice += "\n** " + cmdPrefix + "check <username> -- check if an individual user has access to the show"; if (usr === cb.room_slug) { notice += "\n***** Broadcaster Only *****"; notice += "\n** " + cmdPrefix + "prefix <symbol> -- change the prefix used with commands."; notice += "\n** " + cmdPrefix + "trustmod -- Turn moderator notifications ON or OFF"; notice += "\n** " + cmdPrefix + "ticketshow -- Enable or Disable ticket show functionality"; notice += "\n** " + cmdPrefix + "log -- View the chat log of blocked messages"; notice += "\n** " + cmdPrefix + "stats -- View your token statistics"; notice += "\n** " + cmdPrefix + "colors -- View every color listed on the startup page"; notice += "\n** " + cmdPrefix + "c -- random color examples (good way to find color combinations you like)"; notice += "\n** " + cmdPrefix + "random -- will reset all background and foreground text colors to new randomly chosen colors"; notice += "\n** " + cmdPrefix + "colorlog -- Display the current color settings and any previous color settings"; notice += "\n** " + cmdPrefix + "change <parameter> <attribute> <value> -- change colors and boldness settings of your tip menu and rotating messages"; notice += "\n** Type " + cmdPrefix + "change help for more information on using the '" + cmdPrefix + "change' command"; notice += "\n-----------------------------------------"; } cb.sendNotice(notice, usr); } //function displayHelp(usr) { // var indent = "\xA0\xA0\xA0\xA0" // var bigspace = indent + indent // var adjustRight = indent + indent + indent + indent + indent + indent // var newline = "\n\xA0\xA0" //// var notice = indent + indent + "**** Commands ****"; //// notice += "\n----------------------------------"; // var notice = "" // notice += "\n\u2022 " + cmdPrefix + "menu\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0Send the Tip Menu to everyone"; // notice += "\n\u2022 " + cmdPrefix + "settings\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0" + indent + "Display the current configuration"; // notice += "\n\u2022 " + cmdPrefix + "cc | " + cmdPrefix + "clear\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0" + indent + "Completely clear the chat of all messages."; // notice += "\n\u2022 " + cmdPrefix + "su | " + cmdPrefix + "showusers\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0Display blocked users"; // notice += "\n\u2022 " + cmdPrefix + "help | " + cmdPrefix + "h\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0" + indent + "Display this help message"; // notice += "\n\u2022 " + cmdPrefix + "list | " + cmdPrefix + "l\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0" + indent + "Display both Grey and Blue word lists"; // notice += "\n\u2022 " + cmdPrefix + "add <list> <words>\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0Add offensive or unwanted words to one of the word lists" // notice += "\n\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0" + indent + "Word lists: grey | greylist | blue | bluelist" //// notice += "\n\n" + bigspace + cmdPrefix + "add grey doggy spread cum bb daddy" //// notice += "\n" + bigspace + cmdPrefix + "add blue slut bitch cunt whore" // // notice += "\n\u2022 " + cmdPrefix + "rm <list> <words>\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0Remove words from from one of the word lists" //// notice += "\n\u2022 " + cmdPrefix + "remove <list> <words>" + " | " + cmdPrefix + "delete <list> <words>" + " | " + cmdPrefix + "rm <list> <words>" + newline + "Remove words from from one of the word lists" //// notice += "\n\n" + bigspace + cmdPrefix + "rm greylist facebook c2c skype" //// notice += "\n" + bigspace + cmdPrefix + "remove blue suck fuck upchuck" //// notice += "\n" + bigspace + cmdPrefix + "delete grey small balls all yall" //// notice += "\n\n\u2022 " + cmdPrefix + "mute <users> | " + cmdPrefix + "block <users> " + newline + "Mute | Block some users"; //// notice += "\n\n" + bigspace + cmdPrefix + "mute thisguy thatguy anotherguy somedude" //// notice += "\n" + bigspace + cmdPrefix + "block thisgirl thatgirl anothergirl somechick" //// notice += "\n\n\u2022 " + cmdPrefix + "unmute <users> | " + cmdPrefix + "unblock <users>" + newline + "Unmute | Unblock some users"; //// notice += "\n\n" + bigspace + cmdPrefix + "unmute thisguy thatguy anotherguy somedude" //// notice += "\n" + bigspace + cmdPrefix + "unblock thisgirl thatgirl anothergirl somechick" //// notice += "\n\n\u2022 " + cmdPrefix + "notice <text>" + newline + "Send a public notice to the room"; //// notice += "\n\n" + bigspace + cmdPrefix + "notice Please don't feed the polar bears!" //// notice += "\n\n\u2022 " + cmdPrefix + "pm <username> <message>" + newline + "Send a personal notice to a single user."; //// notice += "\n\n" + bigspace + cmdPrefix + "pm spiritbone I've heard you have a magical penis. May I see it?" //// notice += "\n----------------------------------"; //// notice += "\n **** ON/OFF Commands ****"; // notice += "\n\u2022 " + cmdPrefix + "greychat\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0Turn grey chat ON or OFF"; // notice += "\n\u2022 " + cmdPrefix + "graphics\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0Turn grey graphics ON or OFF"; // notice += "\n\u2022 " + cmdPrefix + "leaderboard\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0Turn the leaderboard ON or OFF"; // notice += "\n\u2022 " + cmdPrefix + "games\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0Turn card games ON or OFF"; // notice += "\n\u2022 " + cmdPrefix + "automenu\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0Turn the auto response Tip Menu ON or OFF"; // notice += "\n\u2022 " + cmdPrefix + "autopm\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0Turn the auto response for PM requests ON or OFF"; // notice += "\n\u2022 " + cmdPrefix + "autopvt\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0Turn the auto response for PVT show requests ON or OFF"; // notice += "\n----------------------------------"; //// notice += "\n***** Ticket Show Commands *****"; // notice += "\n\u2022 " + cmdPrefix + "start\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0" + indent + "Hide the cam and start the show"; // notice += "\n\u2022 " + cmdPrefix + "stop\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0" + indent + "Unhide the cam and end the show"; // notice += "\n\u2022 " + cmdPrefix + "userlist\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0" + indent + "View the list of users who have access to the show"; // notice += "\n\u2022 " + cmdPrefix + "adduser <username>\xA0\xA0\xA0\xA0\xA0\xA0Grant one or more users access to the show"; // notice += "\n\u2022 " + cmdPrefix + "revoke <username>\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0Revoke one or more users access to the show"; // notice += "\n\u2022 " + cmdPrefix + "check <username>\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0Check if an individual user has access to the show"; //// notice += "\n\n" + bigspace + cmdPrefix + "adduser thisguy thatguy anotherguy somedude" //// notice += "\n" + bigspace + cmdPrefix + "revoke thisgirl thatgirl anothergirl somechick" //// notice += "\n" + bigspace + cmdPrefix + "check someguy" // if (usr === cb.room_slug) { //// notice += "\n----------------------------------"; //// notice += "\n**** Broadcaster Only ****"; // notice += "\n\n\u2022 " + cmdPrefix + "trustmod\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0Turn moderator notifications ON or OFF"; // notice += "\n\u2022 " + cmdPrefix + "ticketshow\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0Enable or Disable ticket shows"; // notice += "\n\u2022 " + cmdPrefix + "log\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0View the chat log of blocked messages"; // notice += "\n\u2022 " + cmdPrefix + "stats\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0View your token statistics"; // notice += "\n\u2022 " + cmdPrefix + "colors\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0View the list of color names available"; // notice += "\n\u2022 " + cmdPrefix + "c\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0Random color examples (good way to find color combinations you like)"; // notice += "\n\u2022 " + cmdPrefix + "random\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0Reset all background and foreground text colors to new randomly chosen colors"; // notice += "\n\u2022 " + cmdPrefix + "colorlog\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0Display the current color settings and any previous color settings" // notice += "\n\n\u2022 " + cmdPrefix + "change <parameter> <attribute> <value>" // notice += "\n\n" + bigspace + "Change colors and boldness settings of your tip menu and rotating messages"; // notice += "\n" + bigspace + "Type " + cmdPrefix + "change help for more information on using the '" + cmdPrefix + "change' command"; // notice += "\n\n\u2022 " + cmdPrefix + "prefix <symbol>" // notice += "\n\n" + bigspace + "Change the prefix used when invoking commands." // notice += "\n" + bigspace + "Useful if commands are conflicting with other apps or bots." // notice += "\n\n" + bigspace + cmdPrefix + "prefix ! " + indent + "changes the command prefix from " + cmdPrefix + " to !" // notice += "\n" + bigspace + cmdPrefix + "prefix # " + indent + "changes the command prefix from " + cmdPrefix + " to #" // } // notice += "\n----------------------------------"; // cb.sendNotice(notice, usr, white, black, bold1); //} function LoadSettings() { showHelp = cb.settings.show_help == "Yes"; showAmounts = cb.settings.show_amount == "Yes"; userOptOut = cb.settings.user_opt_out == "Yes"; showSettings = cb.settings.show_settings == "Yes"; autoMenu = cb.settings.auto_menu == "Yes"; autoPM = cb.settings.pm_choice == "Yes"; autoPVT = cb.settings.pvt_choice == "Yes"; playGames = cb.settings.play_cards == "Yes"; greyChat = cb.settings.grey_chat == "Yes"; leaderBoard = cb.settings.leaderboard == "Yes"; greyGraphics = cb.settings.grey_graphics == "Yes"; modActivity = cb.settings.block_notice == "Yes"; welcomeMessage = cb.settings.welcome_on_off == "Yes"; ticketShow = cb.settings.ticket_shows == "Yes"; if (!isBlank(cb.settings.greyWords)) { LoadArrays(cb.settings.greyWords, greyList); } if (!isBlank(cb.settings.blueWords)) { LoadArrays(cb.settings.blueWords, blueList); } if (!isBlank(cb.settings.privateWords)) { LoadArrays(cb.settings.privateWords, secretList); } if (!isBlank(cb.settings.blockUsers)) { LoadArrays(cb.settings.blockUsers, blockList); } if (!isBlank(cb.settings.forever_ticket)) { LoadArrays(cb.settings.forever_ticket, lifetime_tickets); } } function LoadArrays(inputSettings, outputArray) { var temp1; var temp2; var temp3; temp1 = inputSettings; temp2 = temp1 ? temp1.split(",") : ""; var i = 0; for (;i <= temp2.length;++i) { temp3 = ""; if (temp2[i] != null) { temp3 = temp2[i]["replace"](/\s+$/, ""); if (temp3.length > 0) { outputArray.push(temp3.toLowerCase()); } } } } function isBlank(cbsetting) { var s; if (cbsetting) { s = cbsetting.trim(); } if (s == null || (s == "" || s.substr(0, 10) == "[Optional]")) { return true; } else { return false; } } function getStats() { var i = 0; var l = allTippers.length; var statMsg = "Tips Received:"; for (;i < l;i++) { statMsg += "\n" + allTippers[i][0] + ": " + allTippers[i][1]; } statMsg += "\nTotal Tips: " + combinedTips; cb.sendNotice(statMsg, cb.room_slug, white, black); } function Setup() { var oops; var lenColors = colors.length; var i = 0; for (;i < lenColors;i++) { if (cb.settings.note_fgc == colors[i].label) { noteFGC = colors[i].hex; } else { if (cb.settings.note_fgc == "Customize your own") { re = new RegExp(/^[0-9a-fA-F]{6}/g); if (re.test(cb.settings.note_fgc_custom)) { noteFGC = "#" + cb.settings.note_fgc_custom; } else { oops = 1; noteFGC = black; } } else { if (cb.settings.note_fgc == "Random Selection") { var maxColor = colors.length - 1; var n = shuffle(0, maxColor); noteFGC = colors[n].hex; } } } if (cb.settings.note_bgc == colors[i].label) { noteBGC = colors[i].hex; } else { if (cb.settings.note_bgc == "Customize your own") { re = new RegExp(/^[0-9a-fA-F]{6}/g); if (re.test(cb.settings.note_bgc_custom)) { noteBGC = "#" + cb.settings.note_bgc_custom; } else { oops = 1; noteBGC = white; } } else { if (cb.settings.note_bgc == "Random Selection") { maxColor = colors.length - 1; n = shuffle(0, maxColor); noteBGC = colors[n].hex; } } } if (cb.settings.menu_fgc == colors[i].label) { menuFGC = colors[i].hex; } else { if (cb.settings.menu_fgc == "Customize your own") { var re = new RegExp(/^[0-9a-fA-F]{6}/g); if (re.test(cb.settings.menu_fgc_custom)) { menuFGC = "#" + cb.settings.menu_fgc_custom; } else { oops = 1; menuFGC = black; } } else { if (cb.settings.menu_fgc == "Random Selection") { maxColor = colors.length - 1; n = shuffle(0, maxColor); menuFGC = colors[n].hex; } } } if (cb.settings.menu_bgc == colors[i].label) { menuBGC = colors[i].hex; } else { if (cb.settings.menu_bgc == "Customize your own") { re = new RegExp(/^[0-9a-fA-F]{6}/g); if (re.test(cb.settings.menu_bgc_custom)) { menuBGC = "#" + cb.settings.menu_bgc_custom; } else { oops = 1; menuBGC = white; } } else { if (cb.settings.menu_bgc == "Random Selection") { maxColor = colors.length - 1; n = shuffle(0, maxColor); menuBGC = colors[n].hex; } } } if (cb.settings.menu_title_bgc == colors[i].label) { titleBGC = colors[i].hex; } else { if (cb.settings.menu_title_bgc == "Customize your own") { re = new RegExp(/^[0-9a-fA-F]{6}/g); if (re.test(cb.settings.menu_title_bgc_custom)) { titleBGC = "#" + cb.settings.menu_title_bgc_custom; } else { oops = 1; titleBGC = white; } } else { if (cb.settings.menu_title_bgc == "Random Selection") { maxColor = colors.length - 1; n = shuffle(0, maxColor); titleBGC = colors[n].hex; } } } if (cb.settings.menu_title_fgc == colors[i].label) { titleFGC = colors[i].hex; } else { if (cb.settings.menu_title_fgc == "Customize your own") { re = new RegExp(/^[0-9a-fA-F]{6}/g); if (re.test(cb.settings.menu_title_fgc_custom)) { titleFGC = "#" + cb.settings.menu_title_fgc_custom; } else { oops = 1; titleFGC = white; } } else { if (cb.settings.menu_title_fgc == "Random Selection") { maxColor = colors.length - 1; n = shuffle(0, maxColor); titleFGC = colors[n].hex; } } } } if (oops) { var errorMsg = "You entered an invalid color code. You need to enter a 6 character hex color code. For example: Black is 000000"; cb.sendNotice(errorMsg, cb.room_slug, white, red, bold1); } if (cb.settings.title_weight == "Bold") { titleweight = bold1; } else { if (cb.settings.title_weight == "Bolder") { titleweight = bold2; } else { if (cb.settings.title_weight == "Off") { titleweight = bold3; } } } if (cb.settings.menu_weight == "Bold") { weight = bold1; } else { if (cb.settings.menu_weight == "Bolder") { weight = bold2; } else { if (cb.settings.menu_weight == "Off") { weight = bold3; } } } if (cb.settings.note_weight == "Bold") { noteweight = bold1; } else { if (cb.settings.note_weight == "Bolder") { noteweight = bold2; } else { if (cb.settings.note_weight == "Off") { noteweight = bold3; } } } if (cb.settings.sepchar !== "Customize your own") { var i = 0; for (;i < maxSep;i++) { if (cb.settings.sepchar == separators[i].label) { sep = separators[i].shortcut + "\xA0"; } } } else { if (cb.settings.custom_image !== "" || cb.settings.custom_image !== undefined) { sep = cb.settings.custom_image.toString(); } else { cb.sendNotice("You did not enter a valid image code. Reverting to default", cb.room_slug, white, red, bold1); sep = mystery; } } } function init() { LoadSettings(); Setup(); updateColor(); createMenu(); if (showHelp) { displayHelp(cb.room_slug); } if (showSettings) { displaySettings(cb.room_slug); } else { cb.sendNotice("Type " + cmdPrefix + "settings to check the current configuration\nType " + cmdPrefix + "help to see a list of available commands", cb.room_slug, "", "", "bold"); } loadPrizes(); if (cb.settings.play_cards !== "No") { if (cb.settings.game_time > 0) { cb.setTimeout(gameNotify, cb.settings.game_time * 6E4); } } if ((new RegExp(/\w+/)).test(cb.settings["note1"])) { if (cb.settings.note1 !== "" && cb.settings.note1 !== undefined) { cb.setTimeout(notifyMsg, cb.settings.note_time * 6E4); } } if (menuList.length > 0) { menuTimer(); } if (sep === undefined) { sep = mystery; } startHelper(); if (cb.settings.leaderboard === "Yes") { leaderboardTimer(); } chatLog.push("Bot started at " + getTime()); } Array.prototype.contains = function(element) { var i = this.length; for (;i--;) { if (this[i] === element) { return true; } } return false; }; init();
© Copyright Chaturbate 2011- 2026. All Rights Reserved.