Bots Home
|
Create an App
menubot
Author:
masta_shake
Description
Source Code
Launch Bot
Current Users
Created by:
Masta_Shake
if (cb === undefined) { Array.prototype.includes = function(element) { var i = this.length; for (; i--;) { if (this[i] === element) { return true; } } return false; }; var testing = true; var cb = {settings:{}, settings_choices:[], room_slug:"whoever", onEnter:function() { }, onMessage:function() { }, onTip:function() { }, sendNotice:function(a, b, c, d, e) { if (a === undefined) { a = ""; } if (b === undefined) { b = ""; } if (c === undefined) { c = ""; } if (d === undefined) { d = ""; } if (e === undefined) { e = ""; } console.log(a, b, c, d, e); }, setTimeout:function(func, msec) { setTimeout(func, msec); }}; } var colors = {maroon:"800000", red:"#B60000", orange:"#DB3B00", green:"#008000", blue:"#0000FF", violet:"#8D00C9", purple:"#800080", magenta:"#CE00CE", brown:"#4C2B11", black:"#252525"}; var room = {}; var bold = "bold"; var sep; var moderators = []; var instructed = []; var background; var foreground; var title_text; var timer; var reminder_id; var leader_timer; var leaderboard = false; var pauseMenu = false; var max; var leader_foreground; var leader_background; var lbt; var lb_timer; var current_king; var listMenu = false; var menu = []; var bullet = "\u2022"; var heart = "\u2665"; var diamond = "\u2666"; var star = "\u2605"; var poop = "\ud83d\udca9"; var roomHost = cb.room_slug.charAt(0).toUpperCase() + cb.room_slug.substring(1); var question = /(how\s(much|many)\s*(tok*e*n*s*|for|is)*)|\b.+\b\?*$/gi; var regex = {boobs:/bo+b+i*e*s*|tit+i*e*s*|breasts*|chest|bra/gi, pussy:/pus+y+|dog+(y|ie)|spread|zo+o+m|gape|cunt|vagina|kitty|piska|play|squirt|hole|clit/gi, ass:/(ass|butt)(hole)*|spanks|slap|anal/gi, pm:/pm/gi, pvt:/(pvt|prvt|private)\s*(show)*/gi, mouth:/(lick|suck|spit|(blow)j*o*b*|kiss|finger)i*n*g*|tongue/gi, flash:/flash/gi, strip:/strip|tease|dance|pole|(fully*|completel*y*)*\s*(naked|nude)/gi, naked:/naked|full|completely/gi, feet:/fe+e+t|legs|heels|soles|toes/gi, toys:/dildo|vibrator|lovense|ohmibod|lush/gi}; var fontarray = ["andale mono", "arial", "arial black", "avant garde", "bookman old style", "century schoolbook", "charcoal", "comic sans ms", "copperplate", "courier", "cursive", "lucida", "fantasy", "futura", "garamond", "georgia", "impact", "lucida", "monaco", "palatino", "papyrus", "tahoma", "times new roman", "trebuchet ms", "ubuntubold", "ubuntumedium", "verdana"]; var sepchars = [{label:"Vertical Bar", value:"|"}, {label:"Hearts", value:":heart2"}, {label:"Glitter", value:":pixelglitter"}, {label:"Flowers", value:":tinyflower2"}, {label:"Bow", value:":bluebow"}, {label:"Hearts2", value:":pixelheart"}, {label:"Smiley", value:":smile"}, {label:"Text Heart", value:heart}, {label:"Text Diamond", value:diamond}, {label:"Text Star", value:star}, {label:"Bullet", value:bullet}, {label:"Pile of poo", value:poop}, {label:"Fapp", value:":fapp"}, {label:"Hearty", value:":hearty"}, {label:"Spinning Star", value:":star_olivia_dellvine"}, {label:"Butterflies", value:":earthbutterfly"}, {label:"Blue Heart", value:":bluepixelheart"}]; cb.settings_choices = [{name:"menu_style", type:"choice", choice1:"Single line", choice2:"Multi line", label:"Single line or Multi line tip menu? (Single line = all items on 1 continuous line. Multi line = list 1 menu item per line)", defaultValue:"Multi line"}, {name:"custom_separator", type:"str", minLength:1, label:"You may choose your own graphic, text or emoji to use as an item separator. Leave blank to use one of the choices below [Optional]", required:false, defaultValue:""}, {name:"separator", 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:"Pile of poo", choice13:"Fapp", choice14:"Hearty", choice15:"Spinning Star", choice16:"Butterflies", choice17:"Blue Heart", label:"Preset item separators (The setting above will override this one)", defaultValue:"Blue Heart"}, {name:"menu_color", type:"str", required:false, label:"HTML color code or HTML color name", defaultValue:"rebeccapurple"}, {name:"menu_time", type:"int", minValue:2, maxValue:99, label:"Number of minutes between each tip menu notice", defaultValue:4}, {name:"sort_menu", type:"choice", choice1:"Lowest to highest", choice2:"Highest to lowest", choice3:"Do not sort", label:"Sort menu items by price", defaultValue:"Lowest to highest"}]; var sample = ["show my pussy", "flash boobs", "ass in doggy", "5 spanks", "suck a finger", "send you pm", "fully naked", "sexy striptease", "zoom feet"]; var keys = Object.keys(regex); for (var v = 0; v < keys.length; v++) { var x = v + 1; if (x === 1) { var req = true; } else { var req = false; } cb.settings_choices.push({name:"item" + x, type:"str", minLength:1, maxLength:255, label:"Menu Item " + x, defaultValue:sample[v], required:req}, {name:"price" + x, type:"int", minValue:1, maxValue:99999, label:"Price of Item " + x, defaultValue:random(500), required:req}); } cb.settings_choices.push({name:"leaderboard_choice", type:"choice", choice1:"Yes", choice2:"No", label:"Use Leaderboard?", defaultValue:"Yes"}, {name:"leaderboard_timer", type:"int", minValue:2, maxValue:99, label:"Number of minutes between leaderboard notices", defaultValue:2}, {name:"leaderboard_length", type:"int", minValue:1, maxValue:10, label:"Number of users to display on the leaderboard", defaultValue:5}, {name:"leaderboard_minimum", type:"int", minValue:1, label:"Minimum amount required to be on the leaderboard", defaultValue:25}); if (testing) { cb.settings_choices.forEach(function(setting) { cb.settings[setting.name] = setting.defaultValue; }); } function setValue(username, property, value) { room[username][property] = value; } function updateUser(username, property, value) { return room[username][property].push(value); } function isHex(str) { if (str) { str = str.trim(); } var re = /^#?[a-f0-9]{6}$/i; return re.test(str); } function isBlank(s) { return s === void 0 || s === null || s === ""; } function isImage(s) { return s.charAt(0) === ":"; } function clean(str) { return str.replace(/\s+/g, " ").trim().toLowerCase(); } function random(number) { return Math.floor(Math.random() * (number + 1)); } function getCmd(str) { return str.split(" ")[0].substring(1); } function addUser(username) { room[username] = {msgs:[], tips:[], total:0, notes:[], color:"", font:"", "default":false, king:false}; setMessageColor(username); setRandomFont(username); } function hexify(a) { var b = parseInt(a); if (0 == b || isNaN(a)) { return "00"; } b = Math.round(Math.min(Math.max(0, b), 255)); return "0123456789abcdef".charAt((b - b % 16) / 16) + "0123456789abcdef".charAt(b % 16); } function convertToHex(str) { return hexify(str[0]) + hexify(str[1]) + hexify(str[2]); } function hexTrim(hex) { return "#" == hex.charAt(0) ? hex.substring(1, 7) : hex; } function addHash(str) { return "#" === str.charAt(0) ? str : "#" + str; } function convertToRGB(hex) { var rgb = []; rgb[0] = parseInt(hexTrim(hex).substring(0, 2), 16); rgb[1] = parseInt(hexTrim(hex).substring(2, 4), 16); rgb[2] = parseInt(hexTrim(hex).substring(4, 6), 16); return rgb; } function getGradient(color1, color2, number) { color1 = convertToRGB(color1); color2 = convertToRGB(color2); var c = 0.0; var array = []; i = 0; for (; i < number; i++) { var rgb = []; c = c + 1.0 / number; rgb[0] = color1[0] * c + (1 - c) * color2[0]; rgb[1] = color1[1] * c + (1 - c) * color2[1]; rgb[2] = color1[2] * c + (1 - c) * color2[2]; var hex = convertToHex(rgb); if (!array.includes(hex)) { array.push(hex); } } return array; } function getBackground(hexcode) { var color = hexTrim(hexcode); var array = convertToRGB(color); var uicolors = [array[0] / 255, array[1] / 255, array[2] / 255]; var c = uicolors.map(function(col) { if (col <= 0.03928) { return col / 12.92; } return Math.pow((col + 0.055) / 1.055, 2.4); }); var L = 0.2126 * c[0] + 0.7152 * c[1] + 0.0722 * c[2]; return L > 0.179 ? "#000000" : "#ffffff"; } function hexShift(str) { str = hexTrim(str); var a = str.substring(0, 2); var b = str.substring(2, 4); var c = str.substring(4, 6); var hex = b + c + a; return addHash(hex); } function randomHexColor() { var arr = Array.from("abcdef0123456789"); var hex = "#"; var i = 0; while (i < 6) { hex += arr[random(arr.length - 1)]; i++; } return hex; } function leaderboardTime() { showLeaderboard(); lb_timer = cb.setTimeout(leaderboardTime, lbt); } function showLeaderboard() { var arr = sortTippers(); var title = " \u2605 Leaderboard \u2605 "; var title_text; var main_text = "#000000"; var color = hexShift(foreground); var title_background = getBackground(color); var main_background = addHash(getGradient(color, "#ffffff", 16)[1]); if (title_background === "#000000") { title_background = "#252525"; title_text = main_background; } else { if (title_background === "#ffffff") { title_background = addHash(getGradient(leaderboardColor(), "#ffffff", 8)[1]); title_text = "#000000"; } } var w = addHash(title_background); var x = addHash(title_text); var y = addHash(main_background); var z = addHash(main_text); echo(title, "", w, x, "bold"); arr.forEach(function(item, index) { if (item.total >= cb.settings.leaderboard_minimum && index < max) { var line = " \u2605 " + item.name + ": " + item.total; echo(line, "", y, z, "bold"); } }); echo("", "", "transparent", "transparent"); } function sortTippers() { var array = []; for (var user in room) { array.push({name:user, total:room[user].total}); } array.sort(function(a, b) { return b.total - a.total; }); return array; } function leaderboardColor() { return hexShift(foreground); } function echo(a, b, c, d, e) { if (a === undefined) { a = ""; } if (b === undefined) { b = ""; } if (c === undefined) { c = ""; } if (d === undefined) { d = ""; } if (e === undefined) { e = ""; } cb.sendNotice(a, b, c, d, e); } function sum(array) { return array.reduce(function(a, b) { return a + b; }, 0); } function setMessageColor(user) { var color = getRandomColor(); var bg = getBackground(color); while (bg !== "#ffffff") { color = getRandomColor(); bg = getBackground(color); } return setValue(user, "color", color); } function setRandomFont(user) { var l = fontarray.length - 1; var font = fontarray[random(l)]; return setValue(user, "font", font); } function setUserFont(str, user) { var font = getArg(str).toLowerCase(); if (font.length === 0) { return false; } return setValue(user, "font", font); } function setFont(str, user) { return setUserFont(str, user) === false ? setRandomFont(user) : void 0; } function toggleDefault(user) { if (!room[user]["default"]) { room[user]["default"] = true; cb.sendNotice("Colors: OFF", user, "", "", "bold"); } else { room[user]["default"] = false; cb.sendNotice("Colors: ON", user, "", "", "bold"); } } function getArg(str) { var cmd = getCmd(str); var l = cmd.length + 1; return str.substring(l).toLowerCase().trim(); } function storeMsg(user, message, color, font) { if (!(user in room)) { addUser(user); if (color === "#494949" && font === "default") { setMessageColor(user); setRandomFont(user); } else { setValue(user, "color", color); setValue(user, "font", font); } } updateUser(user, "msgs", message); } function storeTips(user, amount, note) { if (!(user in room)) { addUser(user); } if (!isBlank(note)) { updateUser(user, "notes", note); } updateUser(user, "tips", amount); setValue(user, "total", sum(room[user].tips)); } function clearChat() { var n = "\n"; for (var i = 0; i <= 200; i++) { n += "\n"; } cb.sendNotice(n, "", "transparent", "#ffffff"); } function getSep() { return sepCustom() || sepChoice(); } function sepCustom() { if (!isBlank(cb.settings.custom_separator)) { return cb.settings.custom_separator; } return false; } function sepChoice() { for (var i = 0; i < sepchars.length; i++) { if (cb.settings.separator === sepchars[i].label) { return sepchars[i].value; } } return false; } function tagMenu() { var keys = Object.keys(regex); menu.forEach(function(m, index) { keys.forEach(function(key) { if (m.item.match(regex[key])) { addTags(menu, "tag", key, index); } }); }); } function addTags(object, property, value, index) { if (!object[index][property]) { object[index][property] = [value]; } else { object[index][property].push(value); } } function buildMenu() { var i = 0; for (; i < 20; i++) { var j = i + 1; var items = cb.settings["item" + j]; var prices = cb.settings["price" + j]; if (!isBlank(items) && !isBlank(prices)) { menu.push({item:cb.settings["item" + j], price:cb.settings["price" + j]}); } } sortMenu(); } function sortMenu() { if (cb.settings.sort_menu !== "Do not sort") { if (cb.settings.sort_menu === "Lowest to highest") { menu.sort(function(e, t) { return e.price - t.price; }); } else { menu.sort(function(e, t) { return t.price - e.price; }); } } } function showMenu(user) { var tipMenu = ""; var space; var title = " " + sep + "\u00a0" + roomHost + "'s Tip Menu:\u00a0" + sep + "\u00a0"; if (listMenu) { space = "\n"; } if (!listMenu) { space = " "; } if (isBlank(user)) { user = ""; } menu.forEach(function(item, index) { if (index === 0) { tipMenu = sep + " " + item.item + " (" + item.price + ")\u00a0"; } else { tipMenu += space + sep + " " + item.item + " (" + item.price + ")\u00a0"; } }); setTimeout(function() { cb.sendNotice(title, user, foreground, title_text, bold); }, 10); setTimeout(function() { cb.sendNotice(tipMenu, user, "", foreground, bold); }, 20); setTimeout(function() { cb.sendNotice("", user, "transparent", "#ffffff"); }, 100); } function menuTimer() { if (menu.length > 0) { showMenu(); timer = cb.setTimeout(menuTimer, cb.settings.menu_time * 6e4); } } function reminder() { var notice = "Don't forget! The tip menu is paused. Type /pause to start it again"; cb.sendNotice(notice, "", "#ffdddd", "#252525", "red"); reminder_id = cb.setTimeout(reminder, cb.settings.menu_time * 6e4); } function getItems(msg) { var array = []; for (var re in regex) { if (regex[re].test(msg)) { for (var i = 0; i < menu.length; i++) { if (!isBlank(menu[i].tag) && menu[i].tag.includes(re) && !array.includes(menu[i])) { array.push(menu[i]); } } } } return array; } function sendItems(array) { array.forEach(function(menu) { var item = menu.item; var price = menu.price; cb.sendNotice(item + ": (" + price + ")", "", "", "", bold); }); } function useLogic(user) { var i = room[user].msgs.length - 2; var message = room[user].msgs[i]; if (!isBlank(message)) { var temp = getItems(message); if (temp.length > 0) { sendItems(temp); return true; } } return false; } function answerQuestion(msg, user) { var msg_array = msg.match(question); if (msg_array.length > 1) { var temp = getItems(msg); sendItems(temp); } else { useLogic(user); } } function checkMenu(amount, user) { var i = 0; var l = menu.length; for (; i < l; i++) { if (parseInt(amount) === menu[i].price) { var tipNotice = user + " tipped for " + menu[i].item; cb.sendNotice(tipNotice, "", "", foreground, bold); } } } function listMsgColors(user) { var keys = Object.keys(colors); var i = 0; var len = keys.length - 1; function tick() { if (i <= len) { var fg = colors[keys[i]]; var bg = getBackground(fg); if (bg === "#ffffff") { bg = "transparent"; cb.sendNotice(keys[i], user, bg, fg); } i++; setTimeout(tick, 10); } } tick(); } function divideColors() { var obj = {dark:{}, light:{}}; for (var color in colors) { if (getBackground(colors[color]) === "#ffffff") { obj.dark[color] = colors[color]; } else { obj.light[color] = colors[color]; } } return obj; } function listColors(str, user) { var obj = divideColors(); var i = 0; var bg = ""; if (str === "light") { bg = "transparent"; } var keys = Object.keys(obj[str]); function tick() { var name = keys[i]; var object = obj[str]; var value = object[name]; var notice = value + " " + name; echo(notice, user, bg, value, bold); i++; if (i < keys.length) { setTimeout(tick, 10); } } tick(); } function listAllColors(user) { var keys = Object.keys(colors); var i = 0; var len = keys.length - 1; var white = {}; var black = {}; function tick() { if (i <= len) { var fg = colors[keys[i]]; var bg = getBackground(fg); if (bg === "#ffffff") { white[keys[i]] = colors[keys[i]]; } else { black[keys[i]] = colors[keys[i]]; } i++; setTimeout(tick, 10); } } tick(); } function modeSwitch(user) { listMenu = !listMenu; cb.sendNotice("Menu style: " + (listMenu ? "Multi Line" : "Single Line"), user, "", "", bold); showMenu(user); setTimeout(function() { cb.sendNotice("This is a preview", user, "#dddddd", "#252525", bold); }, 200); } function newSeparator(str, user) { sep = str.split(" ")[1]; showMenu(user); setTimeout(function() { cb.sendNotice("This is a preview", user, "#dddddd", "#252525", bold); }, 200); } function pauseToggle(user) { pauseMenu = !pauseMenu; cb.sendNotice("Tip Menu: " + (pauseMenu ? "Paused" : "Running"), user, "", "", bold); if (moderators.includes(user)) { var modNotice = "Moderator " + user + " " + (pauseMenu ? "paused" : "started") + " the tip menu"; cb.sendNotice(modNotice, cb.room_slug, "#dddddd", "#252525", bold); } if (pauseMenu === true) { cb.cancelTimeout(timer); reminder(); } else { cb.cancelTimeout(reminder_id); menuTimer(); } } function randomMenu(user) { var l = sepchars.length - 1; sep = sepchars[random(l)].value; foreground = getRandomColor(); showMenu(user); setTimeout(function() { cb.sendNotice("This is a preview", cb.room_slug, "#dddddd", "#252525", bold); }, 200); } function getColorByName(str) { var names = Object.keys(colors); if (names.includes(clean(str))) { var i = names.indexOf(str); return colors[names[i]]; } return false; } function getRandomColor() { var obj = divideColors().dark; var keys = Object.keys(obj); return obj[keys[random(keys.length - 1)]]; } function setMenuColor(str) { return getColorByName(str) === false ? getRandomColor() : getColorByName(str); } function newMenuColor(str, user) { if (!isHex(str)) { foreground = setMenuColor(str); } else { foreground = addHash(str); } showMenu(user); setTimeout(function() { cb.sendNotice("This is a preview", cb.room_slug, "#dddddd", ""); }, 200); } function setColors() { var color = cb.settings.menu_color; if (isHex(color)) { color = addHash(color); } else { color = getRandomColor(); } return color; } function getNewColor(string) { var keys = Object.keys(colors); var i = 0; var l = keys.length; for (; i < l; i++) { if (string === keys[i]) { return colors[keys[i]]; } } return false; } function arrayRemove(array, item) { var i = array.indexOf(item); while (i > -1) { array.splice(i, 1); i = array.indexOf(item); } } function showHelp(user) { var help = "Commands:"; if (user !== cb.room_slug && !moderators.includes(user)) { help += "\n" + "/menu -- Display the tip menu"; } if (user === cb.room_slug || moderators.includes(user)) { help += "\n" + "/menu -- send the tip menu to everyone in the room"; help += "\n" + "/pause -- pause or unpause the tip menu"; } if (user === cb.room_slug) { help += "\n" + "/mode -- switch between Single and Multi line modes"; help += "\n" + "/menucolor [name|code] -- change the menu color. E.g. '/menucolor blue' or '/menucolor 0000ff'"; help += "\n" + "/sep [text|image|emote] -- change the item separator. E.g. '/sep #' or '/sep :heart' or '/sep " + poop + "'"; help += "\n" + "/cc -- clear the chat messages"; } help += "\n" + "/color -- get a new random color"; help += "\n" + "/font -- get a new random font"; help += "\n" + "/[name of color] -- choose a specific color. E.g. /blue"; help += "\n" + "/default -- revert color and font back to their default values"; help += "\n" + "/list -- view a list of available colors"; help += "\n" + "/help -- display this help message"; cb.sendNotice(help, user, "", "#252525"); } function showChatLog(guest, query) { room[guest].msgs.forEach(function(message) { if (!isBlank(query) && message.includes(query)) { cb.sendNotice(guest + ": " + message, cb.room_slug); } else { cb.sendNotice(guest + ": " + message, cb.room_slug); } }); } function updateKing() { var user = sortTippers()[0].name; if (!room[user].king) { for (var name in room) { if (room[name].king === true) { room[name].king = false; break; } } room[user].king = true; } return user; } function botStartHelp(user) { setTimeout(function() { cb.sendNotice("", user, "#FFFFFF", "#FFFFFF", ""); showHelp(user); }, 1000); } function init() { leaderboard = cb.settings.leaderboard_choice === "Yes"; max = cb.settings.leaderboard_length; lbt = cb.settings.leaderboard_timer * 60000; listMenu = cb.settings.menu_style === "Multi line"; foreground = setColors(); title_text = addHash(getGradient(foreground, "#ffffff", 32)[1]); sep = getSep(); if (sep === undefined) { sep = poop.toString(); } buildMenu(); tagMenu(); menuTimer(); if (cb.settings.start_help === "Yes") { botStartHelp(cb.room_slug); } } cb.onEnter(function(chat) { var user = chat.user; var isMod = chat.is_mod; if (!(user in room)) { addUser(user); showMenu(user); } setTimeout(function() { cb.sendNotice("Type /menu at anytime to see the tip menu", user, "", "", bold); }, 600); if (isMod) { if (!moderators.includes(user)) { moderators.push(user); } if (!instructed.includes(user)) { botStartHelp(user); instructed.push(user); } } }); cb.onMessage(function(msg) { var user = msg.user; var gender = msg.gender; var isHost = user == cb.room_slug; var isFan = msg.in_fanclub; var isMod = msg.is_mod; var isBlue = msg.has_tokens && !isHost && !isMod && !isFan; var isGrey = !isBlue && !isHost && !isMod && !isFan; var m = clean(msg.m); var c = msg.c; var f = msg.f; var command = false; storeMsg(user, m, c, f); var isKing = room[user].king; if (room[user].total > 0) { msg.m = "|" + room[user].total + "| " + msg.m; } if (m.charAt(0) === "/") { command = true; } if (isGrey && gender === "f") { msg["X-Spam"] = true; } if (isMod && !moderators.includes(user)) { moderators.push(user); } if (!isMod && moderators.includes(user)) { arrayRemove(moderators, user); } if (!isHost && !isMod && !pauseMenu) { if (question.test(m)) { answerQuestion(m, user); } var temp = m.match(/\w+/g); if (!isBlank(temp)) { if (temp.length === 1 && !isImage(m)) { var items = getItems(msg); sendItems(items); } } } if (command) { msg["X-Spam"] = true; var cmd = getCmd(m); var arg = getArg(m); if (!isHost && !isMod && (cmd === "menu" || cmd === "tipmenu")) { showMenu(user); } if (cmd in colors && getBackground(colors[cmd]) === "#ffffff") { setValue(user, "color", colors[cmd]); } if (cmd === "help") { showHelp(user); } if (cmd === "font") { setFont(msg.m, user); } if (cmd === "default") { toggleDefault(user); } if (cmd === "list") { listMsgColors(user); } if (cmd === "color") { setMessageColor(user); } if (isHost) { if (cmd in room) { showChatLog(cmd, arg[0]); } if (cmd === "cc") { clearChat(); } if (cmd === "menucolor") { newMenuColor(arg[0], user); } if (cmd === "sep") { newSeparator(m, user); } if (cmd === "random") { randomMenu(user); } if (cmd === "mode") { modeSwitch(user); } } if (isHost || isMod) { if (cmd === "menu" || cmd === "tipmenu") { showMenu(); } if (cmd === "pause") { pauseToggle(user); } if (cmd === "colors") { if (arg === "dark" || arg === "light") { listColors(arg, user); } } } } if (room[user]["default"] === false) { if (!isKing) { if (c === "#494949" && f === "default") { msg.c = room[user].color; msg.f = room[user].font; } } if (isKing) { msg.c = room[user].color; msg.f = "Arial Black"; } } return msg; }); cb.onTip(function(tip) { var user = tip.from_user; var amt = parseInt(tip.amount); var message = tip.message; storeTips(user, amt, message); var king = updateKing(); if (current_king !== king || isBlank(current_king)) { if (!isBlank(current_king)) { cb.sendNotice("A tyrant has stormed the castle and taken your throne! ", current_king, "#252525", "#FFA500"); } cb.sendNotice("We have a new king! All hail king " + king + "!", "", "#252525", "#BF9EE0", bold); current_king = king; } cb.cancelTimeout(lb_timer); leaderboardTime(); if (!pauseMenu) { checkMenu(amt, user); } }); init();
© Copyright Chaturbate 2011- 2024. All Rights Reserved.