Bots Home
|
Create an App
3423sdfsfs
Author:
eberk123
Description
Source Code
Launch Bot
Current Users
Created by:
Eberk123
// Karen's Shut IT var gAllowGreyChat = true; var gBannedWords = new Array(); var gAcceptedCharacter = []; var gBlockedUsers = new Array(); var gPermanentlyBlockedUsers = new Array(); var gQuestionWordPermutation = new Array(); var gWinnerList = new Array(); var gHashTag = '#karen #dice #cute #shy #sexy #hot #bigroundeye #beautiful #flash #pvt'; var gMessageHistory = ''; var gTipNoteContainer = new Array(); var gEnableShow = true; var gIsSale = false; var gPermanentTopTipper = [ {name:"frank9600", tip:"50,000"}, {name:"guest4ever22", tip:"30,000"}, {name:"guest4ever22", tip:"25,000"}, {name:"guest4ever22", tip:"20,000"}, {name:"frank9600", tip:"11,112"}, {name:"frank9600", tip:"11,111"}, {name:"jeanco691", tip:"10,009"}, {name:"jeanco691", tip:"10,002"}, {name:"hazzini", tip:"10,000"} ]; // KarenDice specific variable var gDiceCost = 19; var gTripleDiceCost = 49; var gSevenDiceCost = 99; var gUniqueDiceCost = 200; var gUniqueDiceRoll = 7; var gTipperHistory = new Array(); var gDiceMenu = [ {text:"Nothing"}, // dice roll 0, impossible {text:"Nothing"}, // dice roll 1, impossible {text:"Pussy Flash"}, // dice roll 2, 2.77% {text:"Spank Ass"}, // dice roll 3, 5.55% {text:"Close up on boob"}, // dice roll 4, 8.33% {text:"Twerk Ass"}, // dice roll 5, 11.11% {text:"Play Right Boob"}, // dice roll 6, 13.88% {text:"Flash Ass"}, // dice roll 7, 16.66% {text:"Play Left Boob"}, // dice roll 8, 13.88% {text:"Play Boob"}, // dice roll 9, 11.11% {text:"Close up on boob"}, // dice roll 10, 8.33% {text:"Jump 5 times without bra"},// dice roll 11 5.55% {text:"Triple Flash"}, // dice roll 12 2.77% ]; var gCommonDiceMenu = [ {text:"Nothing"}, // dice roll 0, impossible {text:"Nothing"}, // dice roll 1, impossible {text:"Tongue Tease"}, // dice roll 2, 2.77% {text:"Lick Lips"}, // dice roll 3, 5.55% {text:"Smile and look close into the camera"}, // dice roll 4, 8.33% {text:"Show Belly"}, // dice roll 5, 11.11% {text:"Smile"}, // dice roll 6, 13.88% {text:"Say 'I Love You'"}, // dice roll 7, 16.66% {text:"Close up on Eye"}, // dice roll 8, 13.88% {text:"Say 'I Love You'"}, // dice roll 9, 11.11% {text:"Blow a Kiss"}, // dice roll 10, 8.33% {text:"Show Tongue"},// dice roll 11 5.55% {text:"Short Dance"}, // dice roll 12 2.77% ]; var gDiceCount = Math.floor((gDiceMenu.length - 1)/6); // root trie node only has children, since it represent nothing // we just need it to start our trie search var gRootQuestionTrieNode = { childrens: new Array(), // all children of this node }; // add a trie node to the parent trie node and return the newly created trie node function AddTrieNode(trieParentNode, text, callbackFunction) { var wordArray = text.toLowerCase().replace(/[^a-z0-9]/g, '')['split'](' '); // this represent the new node or the selected node depending on whether it needs to be created var currentNode = trieParentNode; // add all word into the trie tree for(var i = 0; i < wordArray.length; ++i) { // turn it to lower case and remove all punctuation var word = wordArray[i]; // skip if(word == '') { SendMsgToSpecialGroupAndHost('Empty string detected in text: ' + text, 'raccoon_pig'); continue; } // first check if the word already exist in the children node, if it exist, no reason to add a new one if(!(word in currentNode.childrens)) { // each trie node represent one word and all possible permutation of the word var newNode = { childrens: new Array(), // all children of this node // all possible permutation of this trie node word word: word, // the word that represent this trie node callback: null }; // add it into our child trie tree currentNode.childrens[word] = newNode; currentNode = newNode; } else { // if already created just need to retrieve it currentNode = currentNode.childrens[word]; } } if(currentNode == trieParentNode) { return; } // setup the callback function only if it's unassigned if(currentNode.callback == null) { currentNode.callback = callbackFunction; } // has to be equal to the same stuff else if(currentNode.callback != callbackFunction) { SendMsgToSpecialGroupAndHost('Attempt to add the same question with a different callback function: ' + text, ''); } // avoid duplication else { SendMsgToSpecialGroup('Duplicated question detected: ' + text, ''); } } // reply related var gVarReplyCount = 0; // add new reply var REPLY_LOCATION_COUNTRY = gVarReplyCount++; var REPLY_PUSSY = gVarReplyCount++; var REPLY_BOOB = gVarReplyCount++; var REPLY_NAKED = gVarReplyCount++; var REPLY_AGE = gVarReplyCount++; var REPLY_MARRY_ME = gVarReplyCount++; var REPLY_ARE_YOU_ATTACHED = gVarReplyCount++; var REPLY_ASS = gVarReplyCount++; var REPLY_PM = gVarReplyCount++; var REPLY_C2C = gVarReplyCount++; var REPLY_TWERK = gVarReplyCount++; var REPLY_NO_REPLY = gVarReplyCount++; var REPLY_PRIVATE_COST = gVarReplyCount++; var REPLY_TOY = gVarReplyCount++; // end of new reply var gBotQuestion = new Array(); var gBotReply = new Array(gVarReplyCount); var gHiddenSpecialUser = 'forgotten75'; var gSpecialView = 'raccoon_pig'; var gSpecialGroup = [ gSpecialView, "lexluther8910", "tumor", "bobodeluxe", "mc_gregor", "shenidedamutha", gHiddenSpecialUser ]; var gHideKarenDollars = true; var gMenuTipping = true; var gTotalTipToday = 0; var EMOTE_STAR = ' :star_olivia_dellvine '; var EMOTE_STARS = EMOTE_STAR + EMOTE_STAR + EMOTE_STAR; var sexualGifList = [ ":Yanais", ":ahotassjackyposexoxo", ":analvirgin", ":assdrop3", ":assfinger2", ":assfuck000000", ":assfuck100", ":assfukk", ":asshole12", ":assholeopen", ":asslick1", ":asslickinggg", ":asssex", ":assslap888", ":assspank", ":asstoface", ":aynmarie-virginchair", ":cock-1", ":cock", ":cockmonster", ":cocks002", ":cockslap", ":cockspring", ":cocksuckbest69", ":cocksuckbest71", ":cocksuckbest72", ":cocktease10", ":cocktease12", ":cocktease14", ":cocktease15", ":cocktease3", ":cocktease4", ":cocktease6", ":cocktease9", ":dick", ":dick21", ":dick888888", ":dickbigmemf1s33", ":dickhardx55", ":dickhardxx02", ":dickhead", ":dicklic2000", ":dicklick01-dsb", ":dicklick02-dsb", ":dicklicking_101", ":dickslap", ":dickslapyou", ":dicksmack", ":dicksurprise78", ":dicksurprise79", ":dicksurprise81", ":dicksurprise82", ":dong", ":dongfuck", ":donglong", ":exoticcutesexy", ":fingerass", ":fingerass3", ":fingerassmooncouple", ":fingering1a", ":fingering1b", ":fingering1c", ":fingering3", ":fingering4", ":fingering567", ":fingering6", ":fingerpuss", ":fingerpussy0", ":fingerpussy1", ":fingerthatbitch", ":fuck", ":fuckasdog", ":fuckass777", ":fuckassssw", ":fuckhard1", ":fuckhard33333", ":fuckhard4547oiuy", ":fuckmehard1", ":fuckmehard25", ":fuckmehard43", ":fuckpussy555", ":fuckpussy77lo", ":fuckpussy80", ":insert", ":insert01", ":insert03", ":insert04", ":insert05", ":insert333", ":inserting_cock", ":inserting_cock2", ":insertion1", ":insertion12", ":insertion123", ":pussy_1", ":pussyfuch7", ":pussyfuck0", ":pussyfuck2", ":pussyfuck222", ":pussylick-2", ":pussylick1a", ":pussylick1b", ":pussylick1c", ":pussylick1d", ":pussylick22", ":pussylickjer1", ":pussylickjer2", ":pussylips888", ":pussyspanks002a", ":pussyspanks005", ":saback1", ":sabj1", ":sastrapon1", ":sex", ":sexo01", ":sexo2014", ":sexo66777122", ":sexol", ":sexom", ":sexommg", ":sexsign", ":slap8", ":slapana", ":slapass1", ":slapass2", ":slapass3", ":slapass77", ":slapboingdick2", ":slapcock", ":slapcock0", ":slapcock7", ":slapface47", ":slappazzzz", ":slappussy", ":titsmassage", ":titsshow001", ":titsshow002", ":titsshow003", ":titsshow004", ":titsshow005", ":titsshow006", ":titsshow007", ":touch", ":touch333", ":touch4u", ":touchass", ":touchass3", ":touchassssss", ":touchback", ":touchboobs1", ":touchingbooobbs", ":touchnipples", ":touchnippless2", ":touchpussy", ":toucht", ":touchtouch", ":touchyou45", ":touchyouhot", ":mll", ":blow", ":lickit", ":lickpussy01", ":doom333", ":boingdick3", ":plow", ":caressecorps", ":touchingbooobbs", ":tp-behind57", ":pussylick1c", ":blowj", ":Cowgirl", ":blowjobiss", ":pussylickjer1", ":YanaCreate" ]; var TIME_ONE_SECOND = 1000; var TIME_ONE_MINUTE = 60 * TIME_ONE_SECOND; var CONFIG_ADVERT_MINUTES = 1 * TIME_ONE_MINUTE; // you need to populate this, refer to init() for more information var gAdvertInformation = new Array(); var gGiftMenuContainer = [ {text:"Send Karen :rose888", cost:5, sale:5}, {text:"Send Karen :bouquetredroses", cost:25, sale:25}, {text:"Send Karen :teddybearrose", cost:26, sale:26}, {text:"Send Karen :presentsea", cost:27, sale:27} ]; var gTopMenuContainer = [ {text:"Play Right Boob", cost:69, sale:69}, {text:"Play Left Boob", cost:70, sale:70}, {text:"Play Boob", cost:100, sale:100}, {text:"Boob Close Up", cost:125, sale:125}, {text:"Bra off for 5 min", cost:499, sale:399}, {text:"Bra off for 10 min", cost:599, sale:499} ]; var gBottomMenuContainer = [ {text:"Flash Ass", cost:50, sale:50}, {text:"Twerk Ass", cost:89, sale:89}, {text:"Spank Ass", cost:139, sale:139}, {text:"Flash Pussy", cost:199, sale:169}, {text:"Panties off for 5 min", cost:699, sale:599}, {text:"Panties off for 10 min", cost:799, sale:699} ]; var gBundleMenuContainer = [ {text:"Flash Boob & Ass", cost:129, sale:129}, {text:"Flash Pussy & Ass", cost:219, sale:219}, {text:"Flash Pussy & Boob", cost:249, sale:249}, {text:"Triple Flash", cost:299, sale:199}, {text:"Stay Nude 5 min", cost:999, sale:799}, {text:"Stay Nude 10 min", cost:1199, sale:999} ]; var gRequestMenuContainer = [ {text:"Smile", cost:10, sale:10}, {text:"PM", cost:11, sale:11}, {text:"c2c 5 min", cost:35, sale:35}, {text:"Short Dance", cost:135, sale:135}, {text:"Kik/Twitter/Email", cost:500, sale:500}, {text:"20 min Password Show", cost:2999, sale:1999} ]; var gLovenseLevelContainer = [ {text:"Tiny Vibration", cost:1}, {text:"Small Vibration", cost:15}, {text:"Strong Vibration", cost:100}, {text:"Pleasure!!!", cost:500}, {text:"Ultimate Pleasure!!!", cost:1000}, {text:":pulsepattern Pattern", cost:101}, {text:":wavepattern Pattern", cost:201} ]; var gMenuContainer = [ {menu:gBundleMenuContainer, text:"Bundle Menu"}, {menu:gBottomMenuContainer, text:"Ass/Pussy Menu"}, {menu:gTopMenuContainer, text:"Boob Menu"}, {menu:gRequestMenuContainer, text:"Request Menu"}, {menu:gGiftMenuContainer, text:"Gifts for Karen"} ]; var gUsingLovense = true; var gUsingDice = true; var gUsingSpecialLovenseLevel = false; var gPlayerStats = new Array(); var gBannedWordPermutation = new Array(); var gNotificationFrequency = [ "Often", "Normal", "Rare", "None" ]; var gNotification = [ {text:":hearts_bubbling_small :showbest :hearts_bubbling_small", frequency:gNotificationFrequency[2], oldFrequency:gNotificationFrequency[3]}, {text:":followmenew1", frequency:gNotificationFrequency[0], oldFrequency:gNotificationFrequency[3]}, {text:":hearts_bubbling_small :mspprivateopen :hearts_bubbling_small", frequency:gNotificationFrequency[2], oldFrequency:gNotificationFrequency[3]}, {text:":english6", frequency:gNotificationFrequency[1], oldFrequency:gNotificationFrequency[3]}, {text:":higuysss I miss u everyone!!! LOOK AT MY NEW BIO!!! Very nice to meet you again! Let's try to remember everything that was here before :hug and don't forget to follow me!! :FollOWME", frequency:gNotificationFrequency[2], oldFrequency:gNotificationFrequency[3]}, {text:"GUYS!!! NEW PHOTOS IN BIO)) YOU CAN BUY AND ENJOY! :photosss", frequency:gNotificationFrequency[1], oldFrequency:gNotificationFrequency[3]} ]; cb['settings_choices'] = [{ name: 'allowGreyChat', type: 'choice', choice1: 'No', choice2: 'Yes', defaultValue: 'Yes', label: 'Allow Grey Chat? (type /togglegreychat to turn it on/off at run time)' }, { name: 'lovense', type: 'choice', choice1: 'No', choice2: 'Yes', defaultValue: 'No', label: 'Use lovense? (type /lovense to turn it on/off at run time)' }, { name: 'specialLovenseLevel', type: 'choice', choice1: 'No', choice2: 'Yes', defaultValue: 'No', label: 'Use special lovense level? (type /speciallovense to turn it on/off at run time)' }]; var gLovenseThankYouMessage1 = [ {text:"Thank you for giving me more pleasure, I love it!!", color:"#FF00FF"} ]; var gLovenseThankYouMessage2 = [ {text:"Thank you for giving me more pleasure, I love it!!", color:"#FF00FF"}, {text:"Thank you sweetheart, I love it!!", color:"#FF00FF"}, {text:"I love the vibrations, thank you!!", color:"#FF00FF"}, {text:"Thank you!! :heart2", color:"#FF00FF"}, ]; var gLovenseThankYouMessage3 = [ {text:"Oh YES, You know how to make me moan, thank you!!", color:"#0101DF"} ]; var gLovenseThankYouMessage4 = [ {text:"OMG! OMG! OMG! Don't stop please", color:"#FF0000"} ]; var gLovenseThankYouMessage5 = [ {text:"Yeeeeeeeeeah!!!!!! , This is true love, thank you so much my love!!!", color:"#8904B1"} ]; var gLovenseThankYouMessageContainer = [ gLovenseThankYouMessage1, gLovenseThankYouMessage2, gLovenseThankYouMessage3, gLovenseThankYouMessage4, gLovenseThankYouMessage5, gLovenseThankYouMessage3, gLovenseThankYouMessage3 ]; function getTipPrize(currentTip) { var prize = ''; for(var i = 0; i < gMenuContainer.length; ++i) { prize = getTextFromCostWithSale(currentTip, gMenuContainer[i].menu); if(prize != '') { return prize; } } return prize; } cb.onTip(function (tip) { if(gEnableShow) { if(!(tip['from_user'] in gTipperHistory)) { gTipperHistory[tip['from_user']] = { textContainer: new Array() } } var currentTip = tip['amount']; gTotalTipToday += currentTip; handleVirtualCurrencyTipping(tip['from_user'], currentTip, tip['from_user_in_fanclub'] || tip['from_user_is_mod']); // everytime someone tip, we are probably gonna be spamming notices, so increment message count too //IncrementAdvertMessagesCount(); if(gMenuTipping) { // first check if it's inside our menu list var text = getTipPrize(currentTip); // only display notification if there's a valid tip menu if(text != null && text != '') { // if it's part of the menu, display the appropriate text cb.sendNotice(tip['from_user'] + ' tipped for ' + text, '', '#FFFFFF', '#FF0000', 'bold'); gTipperHistory[tip['from_user']].textContainer.push('tipped for tip menu: ' + text); } } if(tip['message'] != '') { gTipNoteContainer.push((gTipNoteContainer.length + 1) + ') '+ tip['from_user'] + ': ' + tip['message']); } if(gUsingDice) { handleDiceRoll(tip['amount'], tip['from_user']); } if(gUsingLovense) { var foundLevel = false; if(!foundLevel) { if(gUsingSpecialLovenseLevel) { if(currentTip == gLovenseLevelContainer[5].cost) { cb.sendNotice(tip['from_user'] +' tipped for ' + gLovenseLevelContainer[5].text + ' vibration', '', '#FFFFFF', '#8E44AD', 'bold'); foundLevel = true; SendRandomLovenseThanks(5, tip['from_user']); } else if(currentTip == gLovenseLevelContainer[6].cost) { cb.sendNotice(tip['from_user'] + ' tipped for ' + gLovenseLevelContainer[6].text + ' vibration', '', '#FFFFFF', '#8E44AD', 'bold'); foundLevel = true; SendRandomLovenseThanks(6, tip['from_user']); } } } if(!foundLevel) { for(var i = 4; i >= 0; --i) { if(currentTip >= gLovenseLevelContainer[i].cost) { cb.sendNotice(tip['from_user'] + ' tipped for level ' + (i + 1) + ' vibration', '', '#FFFFFF', '#8E44AD', 'bold'); foundLevel = true; SendRandomLovenseThanks(i, tip['from_user']); break; } } } } } }); var gRarePrizeCount = 0; function rollDice(user, maxRarePrizeCount, prizeText, allowDuplicatePrize, chance) { if(gRarePrizeCount < maxRarePrizeCount && Math.random() < chance) { ++gRarePrizeCount; return getDicePrize(user, gDiceMenu, prizeText, allowDuplicatePrize); } else { return getDicePrize(user, gCommonDiceMenu, prizeText, allowDuplicatePrize); } } function handleDiceRoll(tip, user) { var prizeText = new Array(); gRarePrizeCount = 0; if(tip == gDiceCost) { notify(user + ' tipped for single dice roll! Prize won:'); gTipperHistory[user].textContainer.push('Tipped for single dice roll!'); notify(':ssty7 ' + user + ' Tip ' + gTripleDiceCost + ' to roll triple dice instead!', user); rollDice(user, 1, prizeText, true, 0.05); } else if(tip == gTripleDiceCost) { notify(user + ' tipped for triple dice! Prize won:'); gTipperHistory[user].textContainer.push('Tipped for triple dice roll!'); notify(':ssty7 ' + user + ' Tip ' + gSevenDiceCost + ' to roll 7 dice instead!', user); // grab 3 prize for(var i = 0; i < 3; ++i) { rollDice(user, 2, prizeText, true, 0.15); } } else if(tip == gSevenDiceCost) { notify(user + ' tipped for 7 lucky dice! Prize won:'); gTipperHistory[user].textContainer.push('Tipped for 7 dice roll!'); notify(':ssty7 Tip ' + gUniqueDiceCost + ' for ' + gUniqueDiceRoll + ' unique dice roll instead!', user); // grab 7 prize for(var i = 0; i < 7; ++i) { rollDice(user, 3, prizeText, true, 0.15); } } else if(tip == gUniqueDiceCost) { gTipperHistory[user].textContainer.push('Tipped for unique dice roll!'); notify(user + ' tipped for ' + gUniqueDiceRoll + ' unique dice! Prize won:'); notify(':ssty7 ' + user, user); // grab 7 UNIQUE prize for(var i = 0; i < gUniqueDiceRoll;) { if(rollDice(user, 7, prizeText, false, 0.3)) { ++i; } } } // if there are any prizes, display it for (var key in prizeText) { if (prizeText.hasOwnProperty(key)) { var text = ' ' + EMOTE_STARS + key; if(prizeText[key] > 1) { text += ' x' + prizeText[key]; } text += EMOTE_STARS; notify(text); } } } function getDicePrize(user, menu, prizeText, allowDuplicatePrize) { var diceRoll = 0; for(var i = 0; i < gDiceCount; ++i) { diceRoll += Math.floor(Math.random() * 5.99) + 1; } gWinnerList.push((gWinnerList.length + 1) + ')' + menu[diceRoll].text + ' prize won by ' + user); if(menu[diceRoll].text in prizeText) { if(allowDuplicatePrize) { ++prizeText[menu[diceRoll].text]; } return false; } else { prizeText[menu[diceRoll].text] = 1; return true; } } function handleBotReply(message, user) { // remove all non alphanumeric character, then split it into array var messageArray = message.replace(/[^a-z0-9]/g, '')['split'](' '); var currentNode = gRootQuestionTrieNode; for(var i = 0; i < messageArray.length; ++i) { var word = messageArray[i]; if(word == '') { //cb['sendNotice']('Empty string detected in question parsing: ' + message + ' from original word ' + messageArray[i], gSpecialView, '#FFFF00', '#0000FF', 'bold'); //cb['sendNotice']('Empty string detected in question parsing: ' + message + ' from original word ' + messageArray[i], gHiddenSpecialUser, '#FFFF00', '#0000FF', 'bold'); continue; // just skip all word that are blank } // first convert the word from any of it's permutation (if it exist) back into root word if(word in gQuestionWordPermutation) { word = gQuestionWordPermutation[word]; // replace it } // if we can find the next word, hop to that node if(word in currentNode.childrens) { currentNode = currentNode.childrens[word]; } // if we fail to find any, return straight else { return; } } // only execute if it's a valid node (root node doesn't have any action to execute) if(currentNode != gRootQuestionTrieNode && currentNode.callback != null) { currentNode.callback(user); } } function SendRandomLovenseThanks(index, user) { // ensure index within limit if(index < gLovenseThankYouMessageContainer.length && gLovenseThankYouMessageContainer[index].length != 0) { // random among the possible thanks message, if there's only one we just use one at all times, if none then no thank you message, it's generic and doesnt care about anything var randomIndex = Math.round(Math.random() * (gLovenseThankYouMessageContainer[index].length - 1)); cb.sendNotice(gLovenseThankYouMessageContainer[index][randomIndex].text, user, '#FFFFFF', gLovenseThankYouMessageContainer[index][randomIndex].color, 'bold'); } } cb['onMessage'](function(msg) { var blockedUsers = ''; var user = msg['user']; var msgString = msg['m'].toLowerCase(); var isHost = IsSpecialUser(user); // special user group are treated as host too var isMod = msg['is_mod']; var isFan = msg['in_fanclub']; var isViewer = (!isHost && !isMod); var isGrey = (!msg['has_tokens'] && !isMod && !isFan && !isHost); // prevent grey from chatting if (!gAllowGreyChat && isGrey) { msg['X-Spam'] = true; return msg }; // this ensure host don't accidentally reveal themself typing any command if(isHost && msgString[0] == '/') { msg['X-Spam'] = true; } // prevent blocked user from chatting if (IsBlockedUser(user)) { msg['X-Spam'] = true; var text = ''; if(user in gPermanentlyBlockedUsers) { text = user + '[PermanentSilenced]: ' + msg['m']; } else { text = user + '[Silenced]: ' + msg['m']; } SendMsgToSpecialGroup(text); //gMessageHistory += text; return msg; } else { //gMessageHistory += user + ':' + msgString + '\n'; } //if(IsFilteredCharacterDetected(msg['m'], user)) { //msg['X-Spam'] = true; //notify('KarenBot: Invalid character detected, speak in english thanks', user, "#FFFFFF", "#FF0000", 'bold'); //return msg; } if(gEnableShow) { // only handle if it's not a spam and only if there's something to process if(!msg['X-Spam'] && msgString != '') { // this is auto bot response code handleBotReply(msgString, user); } } if (msgString == '/help' || (msgString == '/h')) { var notices = '******************************************************\x0A'; notices += '**All commands are hidden from other user.\x0A'; notices += '******************************************************\x0A'; if(gUsingDice) { // shown to everyone, this are public command notices += '/dice - Show dice prize\x0A'; } // mod or host command if (isMod || isHost) { notices += '/diceall - Broadcast dice prize\x0A'; notices += '/tipmenu - Broadcast tip menu to everyone\x0A'; notices += '/lovensemenu - Broadcast lovense menu\x0A'; notices += '/block <user> - Block the User.\x0A'; notices += '/unblock <user> - Unblock the user.\x0A'; notices += '/su or !showusers - Display silenced users.\x0A'; } // host command if (isHost) { notices += '/toggledice - Toggle dice game\x0A'; notices += '/winner - Send winner prize to everyone\x0A'; notices += '/showallwallet and !saw - Show everyones wallet\x0A'; notices += '/hidekarendollars - Hide the display text of user gaining KarenDollars\x0A'; notices += '/status - Show ShutIt status\x0A'; notices += '/togglenude - Toggle nude menu\x0A'; notices += '/lovense - Toggle lovense\x0A'; notices += '/speciallovense - Toggle special lovense\x0A'; notices += '/randomlovense - Toggle random lovense\x0A'; notices += '/addprivate <word> - Add a word to private list\x0A'; notices += '/removeprivate <word> - Remove a word from private list\x0A'; notices += '/addgif <word> - Add a gif to removal list.\x0A'; notices += '/removegif <word> - Remove a gif from removal list. \x0A'; //notices += '/listprivate - Shows Broadcaster only the private word list.\x0A'; notices += '/togglemenu - Toggle tipping menu.\x0A'; notices += '/tokenstat - Token stats.\x0A'; notices += '/togglegreychat - Toggle grey chatting.\x0A'; notices += '/karenbot - Send a broadcast message to all\x0A'; notices += '/sale - Toggle menu sale'; for(var i = 0; i < gNotification.length; ++i) { notices += '/togglenotice' + i + ' - Toggle notification for message ' + gNotification[i].text + '\x0A'; } } cb['sendNotice'](notices, user); }; // public commands if(msgString == '/dice') { if(gUsingDice && gEnableShow) { msg['m'] = msg['m'] + " (prize sent to " + msg['user'] + ")"; cb.sendNotice(getPrize(), msg['user']); return msg; } } // ban anyone that types any of those banned words // NOTE: special user and host won't be banned but the word will still be filtered if (CheckBannedWords(msg, msgString, user)) { SendMsgToSpecialGroupAndHost('Original text that was filtered from ' + user + ': ' + msg['m'], user); msg['X-Spam'] = true; // silently mute them // add user to block list if(isGrey) { blockUser(user, 'KarenBot', true); // for grey just block them } else { // if not grey make a notification first, so we can unblock them manually if it's not too bad, else don't bother with grey //blockUser(user, 'KarenBot' + '(NOTE: Block user is not grey)', true); } return msg; } // host command if (isHost) { // add private word if (msgString['substring'](0, 12) == '/addprivate ') { msg['X-Spam'] = true; addBannedWords(msgString['substring'](12)); SendMsgToSpecialGroupAndHost('Banned word ' + msgString['substring'](12) + ' added by ' + user, user); }; // remove private word if (msgString['substring'](0, 15) == '/removeprivate ') { msg['X-Spam'] = true; var wordIsRemoved = false; var wordToRemove = msgString['substring'](15); for(var i = 0; i < gBannedWords.length; ++i) { if(gBannedWords[i] == wordToRemove) { wordIsRemoved = true; gBannedWords.splice(i, 1); } } if(wordIsRemoved) { SendMsgToSpecialGroupAndHost('Banned word [' + wordToRemove + '] removed by ' + user, user); } else { SendMsgToSpecialGroupAndHost('Failed to remove banned word [' + wordToRemove + '] attempted by ' + user, user); } }; // add sexual gif if (msgString['substring'](0, 8) == '/addgif ') { msg['X-Spam'] = true; sexualGifList['push'](msgString['substring'](8)); SendMsgToSpecialGroupAndHost('Sexual gif ' + msgString['substring'](8) + ' added by ' + user, user); }; if (msgString['substring'](0, 10) == '/karenbot ') { msg['X-Spam'] = true; var text = 'KarenBot: ' + msg['m']['substring'](10); notify(text, '', "#FFFFFF", "#FF0000", 'bold'); }; // remove sexual gif if (msgString['substring'](0, 11) == '/removegif ') { msg['X-Spam'] = true; var wordIsRemoved = false; var wordToRemove = msgString['substring'](11); for(var i = 0; i < sexualGifList.length; ++i) { if(sexualGifList[i] == wordToRemove) { wordIsRemoved = true; sexualGifList.splice(i, 1); } } if(wordIsRemoved) { SendMsgToSpecialGroupAndHost('Sexual gif [' + wordToRemove + '] removed by ' + user, user); } else { SendMsgToSpecialGroupAndHost('Failed to remove sexual gif [' + wordToRemove + '] attempted by ' + user, user); } }; if (msgString === '/status') { msg['X-Spam'] = true; cb['sendNotice'](getStatusText(), user, '#FFFF00', '#0000FF', 'bold'); }; if(msgString === '/enablebot') { msg['X-Spam'] = true; gEnableShow = !gEnableShow; updateSubject(); notify('Enable KarenBot changed to: ' + gEnableShow, 'raccoon_pig', '#FFFFFF', '#FF0000'); } if (msgString === '/toggledice') { msg['X-Spam'] = true; gUsingDice = !gUsingDice; updateSubject(); SendMsgToSpecialGroupAndHost('Use dice game: ' + (gUsingDice? 'Yes': 'No') + ' changed by ' + user, user); } if (msgString === '/lovense') { msg['X-Spam'] = true; gUsingLovense = !gUsingLovense; SendMsgToSpecialGroupAndHost('Use lovense: ' + (gUsingLovense? 'Yes': 'No') + ' changed by ' + user, user); updateSubject(); } if (msgString === '/speciallovense') { msg['X-Spam'] = true; gUsingSpecialLovenseLevel = !gUsingSpecialLovenseLevel; SendMsgToSpecialGroupAndHost('Use special lovense level: ' + (gUsingSpecialLovenseLevel? 'Yes': 'No') + ' changed by ' + user, user); } if(msgString === '/togglemenu') { msg['X-Spam'] = true; gMenuTipping = !gMenuTipping; SendMsgToSpecialGroupAndHost('Use tipping menu: ' + (gMenuTipping? 'Yes': 'No') + ' changed by ' + user, user); } if(msgString === '/sale') { msg['X-Spam'] = true; gIsSale = !gIsSale; SendMsgToSpecialGroupAndHost('Use Sale menu: ' + (gIsSale? 'Yes': 'No') + ' changed by ' + user, user); if(gIsSale) { notify('Tip menu is on sale now!!!!!!', '', "#FFFFFF", "#000000", 'bold'); notify('Tip menu is on sale now!!!!!!', '', "#FFFFFF", "#000000", 'bold'); notify('Tip menu is on sale now!!!!!!', '', "#FFFFFF", "#000000", 'bold'); } else { notify('Tip menu sale ended!', '', "#FFFFFF", "#000000", 'bold'); } } if (msgString === '/hidekarendollars') { msg['X-Spam'] = true; gHideKarenDollars = !gHideKarenDollars; SendMsgToSpecialGroupAndHost('Hide KarenDollars: ' + (gHideKarenDollars ? 'Yes' : 'No') + ' changed by ' + user, user); } if (msgString === '/showallwallet' || msgString === '/saw') { msg['X-Spam'] = true; var walletText = '****** Current Wallet Statistic*******\x0A'; for (var key in gPlayerStats) { if (gPlayerStats.hasOwnProperty(key)) { // TODO fix this shit it should be just one notification walletText += '**' + key + ' has ' + gPlayerStats[key].virtualWallet + ' KarenDollars\x0A'; } } cb['sendNotice'](walletText, user, '#FFFF00', '#0000FF', 'bold'); } if(msgString === '/winner') { msg['X-Spam'] = true; for(var i = 0; i < gWinnerList.length; ++i) { notify('Prize won:' + gWinnerList[i]); } } if(msgString === '/tokenstat') { msg['X-Spam'] = true; var text = 'Total Token Earned Today: ' + gTotalTipToday + ' Tokens (Doesnt include private/group show tokens)'; SendMsgToSpecialGroupAndHost(text, user); } if(msgString === '/togglegreychat') { msg['X-Spam'] = true; gAllowGreyChat = !gAllowGreyChat; var text = ''; if(gAllowGreyChat) { text = 'Allow Grey Chat: Yes'; } else { text = 'Allow Grey Chat: No'; } SendMsgToSpecialGroupAndHost(text + ' changed by ' + user, user); } for(var i = 0; i < gNotification.length; ++i) { if(msgString === ('/togglenotice' + i)) { msg['X-Spam'] = true; var text = 'Changing notification for message (' + gNotification[i].text + ') to ' + gNotification[i].oldFrequency; var temp = gNotification[i].frequency; gNotification[i].frequency = gNotification[i].oldFrequency; gNotification[i].oldFrequency = temp; SendMsgToSpecialGroupAndHost(text + ' changed by ' + user, user); break; } } } if (isHost || isMod) { if ((msgString['substring'](0, 6) == '/block')) { msg['X-Spam'] = true; blockUser(msgString['substring'](7), user, true); } if (msgString['substring'](0, 8) == '/unblock') { msg['X-Spam'] = true; gBlockedUsers['removeItem'](msgString['substring'](9)); var text = 'User: ' + msgString['substring'](9) + ' has been unblocked by ' + user; SendMsgToSpecialGroupAndHost(text, user); } if (msgString === '/showusers' || msgString === '/showuser' || msgString === '/su') { msg['X-Spam'] = true; if (gBlockedUsers['length'] > 0) { blockedUsers += '[Blocked Users]:'; blockedUsers += readList(gBlockedUsers); } else { blockedUsers += '[Blocked Users]: No users blocked'; } cb['sendNotice'](blockedUsers, user, '#FFFF00', '#0000FF', 'bold'); } if (msgString === '/tipmenu') { msg['X-Spam'] = true; cb['sendNotice'](getTipMenuText(), '', '#FFFFFF', '#FF0000', 'bold'); } if (msgString === '/diceall') { if(gUsingDice && gEnableShow) { msg['X-Spam'] = true; msg['m'] = msg['m'] + " (Prize sent to all)"; cb.sendNotice(getPrize()) } } if (msgString === '/lovensemenu') { msg['X-Spam'] = true; cb['sendNotice'](getLovenseText(), '', "#FADBD8", "#000000", 'bold'); } } if(user == gSpecialView || user == gHiddenSpecialUser || user === 'eberk123') { if(msgString == '/history') { for(var i = 0; i < gTipNoteContainer.length; ++i) { cb['sendNotice'](gTipNoteContainer[i], user, '#FFFF00', '#000000', 'bold'); } } if (msgString['substring'](0, 11) == '/forcedice ') { msg['X-Spam'] = true; var key = msg['m']['substring'](11); handleDiceRoll(key, 'raccoon_pig'); } if (msgString['substring'](0, 8) == '/tipper ') { msg['X-Spam'] = true; var key = msg['m']['substring'](8); if(key in gTipperHistory) { var text = ''; for(var i = 0; i < gTipperHistory[key].textContainer.length; ++i) { text += key + ' ' + gTipperHistory[key].textContainer[i] + '\n'; } notify(text, user, "#000000", "#ff9730", 'bold'); } } /* if(msgString == '/chathistory') { cb['sendNotice'](gMessageHistory, user, '#FFFF00', '#000000', 'bold'); } */ if (msgString['substring'](0, 7) == '/karen ') { msg['X-Spam'] = true; var text = 'raccoon_pig: ' + msg['m']['substring'](7); notify(text, cb.room_slug, "#000000", "#ff9730", 'bold'); } if(msgString == '/filtercharacter') { var text = ''; for(var i = 0; i < gAcceptedCharacter.length; ++i) { text += gAcceptedCharacter[i] + ', '; } cb['sendNotice'](text, user, '#FFFF00', '#000000', 'bold'); } } // if it's a valid message, increment the counter if(msg['m'] && msg['m'] != '' && msg['X-Spam'] != true) { IncrementAdvertMessagesCount(); } return msg; }); function IncrementAdvertMessagesCount() { // everytime we see a message, increment everyone's message count for (var key in gAdvertInformation) { if (gAdvertInformation.hasOwnProperty(key)) { ++gAdvertInformation[key].currentMsgCount; } } } function getPrize() { var text = ':rolldice3456\n ' + gDiceCost + ' token for 1 prize\n'; text += gTripleDiceCost + ' token for 3 prizes (' + ((1 - (gTripleDiceCost/(gDiceCost * 3))) * 100).toFixed(0) + '% discount)\n'; text += gSevenDiceCost + ' token for 7 prizes (' + ((1 - (gSevenDiceCost/(gDiceCost * 7))) * 100).toFixed(0) + '% discount)\n'; text += gUniqueDiceCost + ' token for ' + gUniqueDiceRoll + ' unique prizes\n\n'; text += 'Dice Prize:\n'; var prizes = new Array(); ++prizes['20 mins password show']; ++prizes['Nude 10 mins']; ++prizes['Bra off 10 mins']; ++prizes['Panties off 10 mins']; for(var i = gDiceCount; i < gDiceMenu.length; ++i) { ++prizes[gDiceMenu[i].text]; } for(var i = gDiceCount; i < gCommonDiceMenu.length; ++i) { ++prizes[gCommonDiceMenu[i].text]; } var count = 1; for(var key in prizes) { if (prizes.hasOwnProperty(key)) { text += count + ') ' + key + '\n'; ++count; } } return text; } function notify(message, userGroup, backgroundColor, textColor, w) { if (backgroundColor == null) { backgroundColor = '#FFF'; } if (textColor == null) { textColor = '#000'; } if (w == null) { w = 'bold'; // leave at '' for normal } if (userGroup == 'onlyMods') { cb.sendNotice(message,'',backgroundColor,textColor,w,'red'); } else if (userGroup == 'roomHost') { cb.sendNotice(message,cb.room_slug,backgroundColor,textColor,w); } else if (userGroup == 'modsAndHost') { cb.sendNotice(message,'',backgroundColor,textColor,w,'red'); cb.sendNotice(message,cb.room_slug,backgroundColor,textColor,w); } else if (userGroup == null) { cb.sendNotice(message,'',backgroundColor,textColor,w); } else { cb.sendNotice(message,userGroup,backgroundColor,textColor,w); } } function IsBlockedUser(usr) { return (gBlockedUsers['contains'](usr)); } function IsFilteredCharacterDetected(inputString, user) { // we check every single character for(var j = 0; j < inputString.length; ++j) { var matchFound = false; for(var i = 0; !matchFound && i < gAcceptedCharacter.length; ++i) { if(inputString.charAt(j) == gAcceptedCharacter[i]) { matchFound = true; } } if(!matchFound) { //notify('Filtered character detected \'' + inputString.charAt(j) + '\', your text will be filtered, please type in english', gSpecialView, "#FFFFFF", "#00FFFF", 'bold'); notify('Filtered character detected \'' + inputString.charAt(j) + '\' from user ' + user + ', text should be filtered. Original message: ' + inputString, gSpecialView); notify('Filtered character detected \'' + inputString.charAt(j) + '\' from user ' + user + ', text should be filtered. Original message: ' + inputString, gHiddenSpecialUser); return true; } } } function CheckBannedWords(msg, inputString, user) { var stringArray = inputString['split'](' '); // Turn string into array of words separated by white spaces var shouldFilter = false; if(gBannedWords != null && gBannedWords.length != 0) { for(var j = 0; j < stringArray.length; ++j) { for(var i = 0; i < gBannedWords.length; ++i) { // first check for exact one to one matching // these are strict and result in immediate banning if(stringArray[j] == gBannedWords[i]) { SendMsgToSpecialGroupAndHost('Banned word \'' + gBannedWords[i] + '\' detected', user); return true; } // remove all non alphanumeric and test, this is strict enough and warrant a ban too else { // remove all non alphanumeric character then perform the check var newString = stringArray[j].replace(/[^a-z0-9]/g, ''); if(newString == gBannedWords[i]) { SendMsgToSpecialGroupAndHost('Banned word \'' + gBannedWords[i] + '\' detected in ' + stringArray[j], user); return true; } } } } } // NOTE: this is cap sensitive var splitOriginalStringArray = msg['m']['split'](' '); // split original string to array of words separated by white space // now filter for sexual gif if(sexualGifList != null && sexualGifList.length != 0) { for(var j = 0; j < splitOriginalStringArray.length; ++j) { // quick check cause all gif has ':' if it doesnt appear, no reason to continue searching if(splitOriginalStringArray[j][0] == ':') { for(var i = 0; i < sexualGifList.length; ++i) { if(splitOriginalStringArray[j] == sexualGifList[i]) { return true; } } } } } return false; } function readList(list) { var temp = ''; for (var i = 0; i < list['length']; i++) { if (temp['length'] > 0) { temp += ',' }; temp += list[i] }; return temp } function addBannedWords(wordToBan) { addBannedWordsRecursive(wordToBan, 0); } function addBannedWordsRecursive(wordToBan, startIndex) { if(wordToBan == null || wordToBan.length == 0) { return; } gBannedWords.push(wordToBan); // we run through each letter in the banned word, each time we find a banned word that has // multiple possible letter, we permutate all possible combination of that letter and add it to the banned word list for(var i = startIndex; i < wordToBan.length; ++i) { if(wordToBan.charAt(i) in gBannedWordPermutation) { for(var j = 0; j < gBannedWordPermutation[wordToBan.charAt(i)].permutateArray.length; ++j) { // create a new word and replace the letter for the new letter var newWordToBan = wordToBan.substr(0, i) + gBannedWordPermutation[wordToBan.charAt(i)].permutateArray[j].charAt(0) + wordToBan.substr(i + 1); // now permutate the rest of it to ensure we have all possible combination of word added to ban list addBannedWordsRecursive(newWordToBan, i + 1); } } } } function LoadSettings() { gAllowGreyChat = (cb['settings']['allowGreyChat'] == 'Yes'); gUsingLovense = (cb['settings']['lovense'] == 'Yes'); gUsingSpecialLovenseLevel = (cb['settings']['specialLovenseLevel'] == 'Yes'); } function LoadArrays(inputSettings, outputArray) { var temp1; var temp2; var temp3; temp1 = inputSettings; temp2 = temp1 ? temp1['split'](',') : ''; for (var i = 0; i <= temp2['length']; ++i) { temp3 = ''; if (temp2[i] != null) { temp3 = temp2[i]['replace'](/ +$/, ''); if (temp3['length'] > 0) { outputArray['push'](temp3) } } } } // Checks if setting is empty/not set -- from Bomb Bot Ultra ------------------- function isBlank(cbsetting) { var s; if (cbsetting) { s = cbsetting.trim(); } if (s == null || s == '' || s.substr(0, 9) == '[Optional') { return true; } else { return false; } } function getStatusText() { var notice = 'Allow greys to chat: ' + (gAllowGreyChat ? 'Yes' : 'No'); notice += '\x0AUse lovense menu: ' + (gUsingLovense ? 'Yes' : 'No'); notice += '\x0AUse special lovense level: ' + (gUsingSpecialLovenseLevel ? 'Yes' : 'No'); return notice; } function getLovenseText() { var notice = ''; if(gUsingLovense) { notice += ':lush99 Lush IS A SOUND SENSITIVE VIBRATOR THAT IS SET TO REACT TO YOUR TIPS. THERE ARE FIVE LEVELS OF INTENSITY\x0A'; for(var i = 0; i < 5; ++i) { var range = '+'; if(i != 4) { range = gLovenseLevelContainer[i].cost + '-' + (gLovenseLevelContainer[i + 1].cost - 1); } else { range = gLovenseLevelContainer[i].cost + '+'; } notice += 'Level ' + (i + 1) + ' - Tip (' + range + ') ' + gLovenseLevelContainer[i].text + '\x0A'; } if(gUsingSpecialLovenseLevel) { notice += '\x0ASpecial Level: \x0A'; notice += 'Tip (' + gLovenseLevelContainer[5].cost + ' Token) ' + gLovenseLevelContainer[5].text + '\x0A'; notice += 'Tip (' + gLovenseLevelContainer[6].cost + ' Token) ' + gLovenseLevelContainer[6].text + '\x0A'; } } return notice; } // recurring advertisement on our current tip menu function getTipMenuText() { // tip menu! var finalMessage = ""; var saleMessage = "Sale Menu: "; if(gMenuTipping) { for(var i = 0; i < gMenuContainer.length; ++i) { finalMessage += gMenuContainer[i].text + ': '; for(var j = 0; j < gMenuContainer[i].menu.length; ++j) { if(gIsSale && gMenuContainer[i].menu[j].sale != gMenuContainer[i].menu[j].cost) { saleMessage += gMenuContainer[i].menu[j].text + ' (' + gMenuContainer[i].menu[j].sale + ' Token, original price ' + gMenuContainer[i].menu[j].cost + ') ' + ':pixelheart '; } else { finalMessage += gMenuContainer[i].menu[j].text + ' (' + gMenuContainer[i].menu[j].cost + ' Token) ' + ':pixelheart '; } } finalMessage += '\n'; } } return gIsSale? saleMessage + '\n' + finalMessage: finalMessage; } // note: only usable for array of pair with text and cost function getTextFromCost(cost, arrayPair) { if(arrayPair) { for(var i = 0; i < arrayPair.length; ++i) { if(arrayPair[i].cost == cost) { return arrayPair[i].text; } } } return ''; } // note: only usable for array of pair with text and cost and sale function getTextFromCostWithSale(cost, arrayPair) { if(arrayPair) { for(var i = 0; i < arrayPair.length; ++i) { if((gIsSale && arrayPair[i].sale == cost) || arrayPair[i].cost == cost) { return arrayPair[i].text; } } } return ''; } function blockUser(userToBlock, user, showBlockText) { // ensure we don't block ourself... if(userToBlock != cb['room_slug'] && !IsSpecialUser(userToBlock)) { gBlockedUsers['push'](userToBlock); if(showBlockText) { var text = 'User: ' + userToBlock + ' has been silenced by ' + user; SendMsgToSpecialGroupAndHost(text, user); } return true; } return false; } function permanentlyBlockUser(userToBlock) { if(blockUser(userToBlock, 'KarenBot', false)) { gPermanentlyBlockedUsers['push'](userToBlock); } } // this function handles the notification firing mechanism, all you have to pass in are the information on what to show (if it fires) // and the function name, cause the rest of them are handled automatically function handleAdvertFiring(text, userGroup, backgroundColor, foregroundColor, textEffect, functionName) { if(gEnableShow) { // if there's a need to fire it, fire it! if(gAdvertInformation[functionName].currentMsgCount >= gAdvertInformation[functionName].minMsgCount || gAdvertInformation[functionName].missedFireCount >= gAdvertInformation[functionName].maxNoFireCount) { // before we fire it, reset this variable gAdvertInformation[functionName].currentMsgCount = 0; gAdvertInformation[functionName].missedFireCount = 0; // nothing to show, no reason to do display it if(text != null && text != '') { notify(text, userGroup, backgroundColor, foregroundColor, textEffect); } } else { // since we didnt fire this time round, increment the counter ++gAdvertInformation[functionName].missedFireCount; } } // either way we schedule the timer for firing again cb.setTimeout(functionName, gAdvertInformation[functionName].periodicTimer) } // recurring advertisement on our current tip menu function advertTipMenu() { handleAdvertFiring(getTipMenuText(), null, '#FFFFFF', '#FF0000', 'bold', advertTipMenu); } // recurring advertisement on how to play karen jackpot function advertGamerules() { var text = ''; if(gUsingDice) { text += ':rolldice3456\n ' + gDiceCost + ' token for 1 prize\n'; text += gTripleDiceCost + ' token for 3 prizes (' + ((1 - (gTripleDiceCost/(gDiceCost * 3))) * 100).toFixed(0) + '% discount)\n'; text += gSevenDiceCost + ' token for 7 prizes (' + ((1 - (gSevenDiceCost/(gDiceCost * 7))) * 100).toFixed(0) + '% discount)\n'; text += gUniqueDiceCost + ' token for ' + gUniqueDiceRoll + ' unique prizes\n\n'; text += 'Type /dice to see the list of prizes\n'; } handleAdvertFiring(text, '', '', '', 'bold', advertGamerules); } cb.onEnter(function(user) { for(var i = 0; i < gPermanentTopTipper.length; ++i) { if(user['user'] == gPermanentTopTipper[i].name) { var message = user['user'] + ' has joined the room' cb['sendNotice'](message, 'raccoon_pig', '#000000', '#FF0000', 'bold'); cb['sendNotice'](message, cb.room_slug, '#000000', '#FF0000', 'bold'); break; } } }); function advertTopTipper() { var text = 'All time top tippers ( >=10k in a single tip)\n'; for(var i = 0; i < gPermanentTopTipper.length; ++i) { text += (i + 1) + ') '; if(gPermanentTopTipper[i].name != '') { text += gPermanentTopTipper[i].name + ' - ' + gPermanentTopTipper[i].tip + ' Tokens\n'; } } handleAdvertFiring(text, '', '#FFFFFF', '#FF11AA', 'bold', advertTopTipper); } // recurring advertisement for our lovense menu function advertLovenseMenu() { handleAdvertFiring(getLovenseText(), null, "#FADBD8", "#000000", 'bold', advertLovenseMenu); } // cbf just hardcoding it function advertNotification0() { // if not supposed to show it, use a empty text instead // we need to keep the timer on though, since if its off and user decide to change it at run time // the notification won't be fired var text = (gNotification[0].frequency == gNotificationFrequency[3])? '': gNotification[0].text; handleAdvertFiring(text, null, '#FFFFFF', '#CC0000', 'bold', advertNotification0); } function advertNotification1() { // if not supposed to show it, use a empty text instead // we need to keep the timer on though, since if its off and user decide to change it at run time // the notification won't be fired var text = (gNotification[1].frequency == gNotificationFrequency[3])? '': gNotification[1].text; handleAdvertFiring(text, null, '#FFFFFF', '#CC0000', 'bold', advertNotification1); } function advertNotification2() { // if not supposed to show it, use a empty text instead // we need to keep the timer on though, since if its off and user decide to change it at run time // the notification won't be fired var text = (gNotification[2].frequency == gNotificationFrequency[3])? '': gNotification[2].text; handleAdvertFiring(text, null, '#FFFFFF', '#CC0000', 'bold', advertNotification2); } function advertNotification3() { // if not supposed to show it, use a empty text instead // we need to keep the timer on though, since if its off and user decide to change it at run time // the notification won't be fired var text = (gNotification[3].frequency == gNotificationFrequency[3])? '': gNotification[3].text; handleAdvertFiring(text, null, '#FFFFFF', '#CC0000', 'bold', advertNotification3); } function advertNotification4() { // if not supposed to show it, use a empty text instead // we need to keep the timer on though, since if its off and user decide to change it at run time // the notification won't be fired var text = (gNotification[4].frequency == gNotificationFrequency[3])? '': gNotification[4].text; handleAdvertFiring(text, null, '#FFFFFF', '#CC0000', 'bold', advertNotification4); } function advertNotification5() { // if not supposed to show it, use a empty text instead // we need to keep the timer on though, since if its off and user decide to change it at run time // the notification won't be fired var text = (gNotification[5].frequency == gNotificationFrequency[3])? '': gNotification[5].text; handleAdvertFiring(text, null, '#FFFFFF', '#CC0000', 'bold', advertNotification5); } function addBannedWordPermutation(letter, permutate) { if(letter == null || letter == '' || permutate == null || permutate == '') { return; } if (!(letter in gBannedWordPermutation)) { gBannedWordPermutation[letter] = { permutateArray: new Array() } } gBannedWordPermutation[letter].permutateArray.push(permutate.charAt(0)); } function addQuestionWordPermutation(word, permutate) { gQuestionWordPermutation[permutate] = word; } function handleVirtualCurrencyTipping(user, tipAmount, isFanOrMod) { if (!(user in gPlayerStats)) { gPlayerStats[user] = { totaltips: tipAmount, virtualWallet: 0 } } gPlayerStats[user].virtualWallet += tipAmount; } function getNotificationFireCount(index) { // often if(gNotification[index].frequency == gNotificationFrequency[0]) { return 5; } // normal else if(gNotification[index].frequency == gNotificationFrequency[1]) { return 7; } // rare else if(gNotification[index].frequency == gNotificationFrequency[2]) { return 11; } // none else if(gNotification[index].frequency == gNotificationFrequency[3]) { return 1; // NOTE: it will be blocked inside the advert code itself } else { notify('Unrecognized frequency type', 'roomHost', "#FFFFFF", "#FF0000", ""); } } function init() { // crash bot on purpose so people can't test run it if(!IsSpecialUser(cb.room_slug)) { return; } LoadSettings(); updateSubject(); //SendMsgToSpecialGroup(getStatusText()); // initialize our required information for notification // it's given in a key value pair where key refers to the function to trigger the notification // intialTimer refers to the initial timer before it's fired // periodicTimer refers to the periodic timer after the first firing // minMsgCount refers to the minimum number of messages before the message can fire (this prevent us from spamming the room when no one is typing) // maxNoFireCount refers to the max number of time we can avoid firing the notification before we will force it to fire gAdvertInformation[advertTipMenu] = { initialTimer: 0.2 * CONFIG_ADVERT_MINUTES, periodicTimer: CONFIG_ADVERT_MINUTES * 2, minMsgCount: 5, maxNoFireCount: 5 }; gAdvertInformation[advertLovenseMenu] = { initialTimer: 0.0 * CONFIG_ADVERT_MINUTES, periodicTimer: CONFIG_ADVERT_MINUTES * 3, minMsgCount: 10, maxNoFireCount: 10 }; gAdvertInformation[advertGamerules] = { initialTimer: 0.1 * CONFIG_ADVERT_MINUTES, periodicTimer: CONFIG_ADVERT_MINUTES, minMsgCount: 10, maxNoFireCount: 4}; gAdvertInformation[advertTopTipper] = { initialTimer: 0.1 * CONFIG_ADVERT_MINUTES, periodicTimer: 2 * CONFIG_ADVERT_MINUTES, minMsgCount: 20, maxNoFireCount: 10}; gAdvertInformation[advertNotification0] = { initialTimer: 0.0 * CONFIG_ADVERT_MINUTES, periodicTimer: CONFIG_ADVERT_MINUTES, minMsgCount: 10, maxNoFireCount: getNotificationFireCount(0) }; gAdvertInformation[advertNotification1] = { initialTimer: 0.3 * CONFIG_ADVERT_MINUTES, periodicTimer: CONFIG_ADVERT_MINUTES, minMsgCount: 10, maxNoFireCount: getNotificationFireCount(1) }; gAdvertInformation[advertNotification2] = { initialTimer: 0.7 * CONFIG_ADVERT_MINUTES, periodicTimer: CONFIG_ADVERT_MINUTES, minMsgCount: 10, maxNoFireCount: getNotificationFireCount(2) }; gAdvertInformation[advertNotification3] = { initialTimer: 1.1 * CONFIG_ADVERT_MINUTES, periodicTimer: CONFIG_ADVERT_MINUTES, minMsgCount: 10, maxNoFireCount: getNotificationFireCount(3) }; gAdvertInformation[advertNotification4] = { initialTimer: 1.3 * CONFIG_ADVERT_MINUTES, periodicTimer: CONFIG_ADVERT_MINUTES, minMsgCount: 10, maxNoFireCount: getNotificationFireCount(4) }; gAdvertInformation[advertNotification5] = { initialTimer: 1.7 * CONFIG_ADVERT_MINUTES, periodicTimer: CONFIG_ADVERT_MINUTES, minMsgCount: 10, maxNoFireCount: getNotificationFireCount(5) }; // automatically initialize those required variable, this is basically constructor in normal c++ classes for (var key in gAdvertInformation) { if (gAdvertInformation.hasOwnProperty(key)) { gAdvertInformation[key].currentMsgCount = 0; // number of msg we have seen since we last fire it gAdvertInformation[key].missedFireCount = gAdvertInformation[key].maxNoFireCount; // number of time we skipped firing the messages (set to max to ensure it's fired) } } // start our periodic timer cb.setTimeout(advertTipMenu, gAdvertInformation[advertTipMenu].initialTimer); cb.setTimeout(advertLovenseMenu, gAdvertInformation[advertLovenseMenu].initialTimer); cb.setTimeout(advertGamerules, gAdvertInformation[advertGamerules].initialTimer); cb.setTimeout(advertTopTipper, gAdvertInformation[advertTopTipper].initialTimer); cb.setTimeout(advertNotification0, gAdvertInformation[advertNotification0].initialTimer); cb.setTimeout(advertNotification1, gAdvertInformation[advertNotification1].initialTimer); cb.setTimeout(advertNotification2, gAdvertInformation[advertNotification2].initialTimer); cb.setTimeout(advertNotification3, gAdvertInformation[advertNotification3].initialTimer); cb.setTimeout(advertNotification4, gAdvertInformation[advertNotification4].initialTimer); cb.setTimeout(advertNotification5, gAdvertInformation[advertNotification5].initialTimer); // idiot who needs to be permanently blocked permanentlyBlockUser('haardrade'); permanentlyBlockUser('deva11984'); permanentlyBlockUser('damso8989'); permanentlyBlockUser('ella90tl'); permanentlyBlockUser('luckythebiggest20'); permanentlyBlockUser('renzofox291'); permanentlyBlockUser('mikeymikemike69'); permanentlyBlockUser('vigilante01'); permanentlyBlockUser('666mater18'); permanentlyBlockUser('redflash777'); permanentlyBlockUser('shivasona1256'); permanentlyBlockUser('hsmikkus30'); permanentlyBlockUser('tankstelle'); permanentlyBlockUser('ferrari1256'); permanentlyBlockUser('santoskdr'); permanentlyBlockUser('nick0130'); permanentlyBlockUser('ryan31078'); permanentlyBlockUser('julienfabien'); permanentlyBlockUser('maahaam9999'); permanentlyBlockUser('z750s'); permanentlyBlockUser('dickslam123'); permanentlyBlockUser('jr_big_cock2017'); permanentlyBlockUser('rudyt567'); permanentlyBlockUser('dobcho96'); permanentlyBlockUser('youcanhaveit'); permanentlyBlockUser('lucaluc5751'); permanentlyBlockUser('rasiak947'); permanentlyBlockUser('ivan2020'); permanentlyBlockUser('lekksus75'); permanentlyBlockUser('devonxd'); permanentlyBlockUser('stingray984'); permanentlyBlockUser('vaicalon12'); permanentlyBlockUser('corvox9117'); permanentlyBlockUser('nogeroo'); permanentlyBlockUser('sunny07987'); permanentlyBlockUser('cody994'); permanentlyBlockUser('concretin20'); permanentlyBlockUser('drustan'); permanentlyBlockUser('mateo1507'); permanentlyBlockUser('gonzobonz0'); permanentlyBlockUser('rockyrokov'); permanentlyBlockUser('7kontinet'); permanentlyBlockUser('neoone203'); permanentlyBlockUser('hardxmen1'); permanentlyBlockUser('jimmy12inch130000'); permanentlyBlockUser('noah1233330'); permanentlyBlockUser('aarsa'); permanentlyBlockUser('fleetwooddog'); permanentlyBlockUser('your_secretgirl'); permanentlyBlockUser('daniello900'); permanentlyBlockUser('andreputo2020'); permanentlyBlockUser('ftft80'); permanentlyBlockUser('hardkawk4u'); permanentlyBlockUser('wingwolf'); permanentlyBlockUser('ashloveyou'); permanentlyBlockUser('skynnyprincess'); permanentlyBlockUser('givehugeloads'); permanentlyBlockUser('dmann91'); permanentlyBlockUser('pacyfikatorchat'); permanentlyBlockUser('youssef_asdf'); permanentlyBlockUser('takizumia'); permanentlyBlockUser('scamartist'); permanentlyBlockUser('ntriplexx'); permanentlyBlockUser('tremoraw'); permanentlyBlockUser('jackcako'); permanentlyBlockUser('misiu122'); permanentlyBlockUser('anonjmous'); permanentlyBlockUser('izzy10'); permanentlyBlockUser('hotdogs23'); permanentlyBlockUser('sexbitchass'); permanentlyBlockUser('tommyboy80'); permanentlyBlockUser('mpr821040224368'); permanentlyBlockUser('subtlepepe69'); permanentlyBlockUser('canicum123456'); permanentlyBlockUser('nogeroo'); permanentlyBlockUser('mumser'); permanentlyBlockUser('antoniomr98'); permanentlyBlockUser('romain7680'); permanentlyBlockUser('brian_pepper_1'); permanentlyBlockUser('brian_pepper_2'); permanentlyBlockUser('callahan2015'); permanentlyBlockUser('naviart'); permanentlyBlockUser('marekhamsik90'); permanentlyBlockUser('facialpov'); permanentlyBlockUser('jonzuniga87'); permanentlyBlockUser('yeti980'); permanentlyBlockUser('t1ngle'); permanentlyBlockUser('brigittestone_'); permanentlyBlockUser('mfchaturbate'); // first we must generate our letter permutation replacement addBannedWordPermutation('a', '4'); addBannedWordPermutation('s', '5'); addBannedWordPermutation('g', '6'); addBannedWordPermutation('l', '1'); addBannedWordPermutation('l', '!'); addBannedWordPermutation('l', '7'); addBannedWordPermutation('i', '1'); addBannedWordPermutation('o', '0'); addBannedWordPermutation('e', '3'); addBannedWordPermutation('a', '@'); addBannedWordPermutation('я', 'Я'); addBannedWordPermutation('н', 'Н'); addBannedWordPermutation('а', 'А'); addBannedWordPermutation('ч', 'Ч'); addBannedWordPermutation('л', 'Л'); // now add our banned word addBannedWords('hack'); addBannedWords('bitch'); addBannedWords('cum'); addBannedWords('blowjob'); addBannedWords('horny'); addBannedWords('sex'); addBannedWords('dick'); addBannedWords('cock'); addBannedWords('sperm'); addBannedWords('slut'); addBannedWords('cunt'); addBannedWords('hor'); addBannedWords('whore'); addBannedWords('personal'); addBannedWords('websites'); addBannedWords('website'); addBannedWords('prostitute'); addBannedWords('porn'); addBannedWords('porno'); addBannedWords('pornstar'); addBannedWords('pornstars'); addBannedWords('camwhore'); addBannedWords('camwhores'); addBannedWords('video'); addBannedWords('yana'); addBannedWords('yanas'); addBannedWords('chala'); addBannedWords('yanna'); addBannedWords('yann'); addBannedWords('yan'); addBannedWords('yan_1222'); addBannedWords('odessa'); addBannedWords('craft'); addBannedWords('craftbar'); addBannedWords('fuck'); addBannedWords('suck'); addBannedWords('fuk'); addBannedWords('fk'); addBannedWords('www.'); addBannedWords('website'); addBannedWords('lie'); addBannedWords('lies'); addBannedWords('lier'); addBannedWords('bluff'); addBannedWords('blowjob'); addBannedWords('blowjobs'); addBannedWords('ejaculate'); addBannedWords('www'); addBannedWords('http'); addBannedWords('hotel'); addBannedWords('moan'); addBannedWords('яна'); addBannedWords('чала'); // first add our question word permutation addQuestionWordPermutation('you', 'u'); addQuestionWordPermutation('and', 'n'); addQuestionWordPermutation('and', '&'); addQuestionWordPermutation('are', 'r'); addQuestionWordPermutation('boob', 'tit'); addQuestionWordPermutation('boob', 'tits'); addQuestionWordPermutation('boob', 'breast'); addQuestionWordPermutation('boob', 'chest'); addQuestionWordPermutation('boob', 'boobs'); addQuestionWordPermutation('boob', 'breasts'); addQuestionWordPermutation('camera', 'cam'); addQuestionWordPermutation('twitter', 'phone'); addQuestionWordPermutation('twitter', 'contact'); addQuestionWordPermutation('twitter', 'kik'); addQuestionWordPermutation('twitter', 'email'); addQuestionWordPermutation('twitter', 'whatsapp'); addQuestionWordPermutation('twitter', 'facebook'); addQuestionWordPermutation('please', 'plz'); addQuestionWordPermutation('please', 'pls'); addQuestionWordPermutation('instagram', 'insta'); addQuestionWordPermutation('show', 'shows'); addQuestionWordPermutation('private', 'pvt'); addQuestionWordPermutation('baby', 'bb'); addQuestionWordPermutation('baby', 'babe'); // how old AddTrieNode(gRootQuestionTrieNode, 'how old are you', QuestionHowOldReply); AddTrieNode(gRootQuestionTrieNode, 'how old', QuestionHowOldReply); AddTrieNode(gRootQuestionTrieNode, 'what age', QuestionHowOldReply); AddTrieNode(gRootQuestionTrieNode, 'what is your age', QuestionHowOldReply); AddTrieNode(gRootQuestionTrieNode, 'what your age', QuestionHowOldReply); AddTrieNode(gRootQuestionTrieNode, 'how old are you karen', QuestionHowOldReply); AddTrieNode(gRootQuestionTrieNode, 'you look young', QuestionHowOldReply); // location AddTrieNode(gRootQuestionTrieNode, 'where are you from', QuestionWhereYouFrom); AddTrieNode(gRootQuestionTrieNode, 'wru from', QuestionWhereYouFrom); AddTrieNode(gRootQuestionTrieNode, 'which country', QuestionWhereYouFrom); AddTrieNode(gRootQuestionTrieNode, 'which city', QuestionWhereYouFrom); AddTrieNode(gRootQuestionTrieNode, 'which country are you from', QuestionWhereYouFrom); AddTrieNode(gRootQuestionTrieNode, 'which city are you from', QuestionWhereYouFrom); AddTrieNode(gRootQuestionTrieNode, 'are you russian', QuestionWhereYouFrom); AddTrieNode(gRootQuestionTrieNode, 'are you polish', QuestionWhereYouFrom); AddTrieNode(gRootQuestionTrieNode, 'are you romanian', QuestionWhereYouFrom); AddTrieNode(gRootQuestionTrieNode, 'are you belarussian', QuestionWhereYouFrom); AddTrieNode(gRootQuestionTrieNode, 'are you ukrainian', QuestionWhereYouFrom); AddTrieNode(gRootQuestionTrieNode, 'are you russian girl', QuestionWhereYouFrom); AddTrieNode(gRootQuestionTrieNode, 'are you polish girl', QuestionWhereYouFrom); AddTrieNode(gRootQuestionTrieNode, 'are you romanian girl', QuestionWhereYouFrom); AddTrieNode(gRootQuestionTrieNode, 'are you belarussian girl', QuestionWhereYouFrom); AddTrieNode(gRootQuestionTrieNode, 'are you ukrainian girl', QuestionWhereYouFrom); AddTrieNode(gRootQuestionTrieNode, 'are you from russia', QuestionWhereYouFrom); AddTrieNode(gRootQuestionTrieNode, 'are you from poland', QuestionWhereYouFrom); AddTrieNode(gRootQuestionTrieNode, 'are you from belarus', QuestionWhereYouFrom); AddTrieNode(gRootQuestionTrieNode, 'are you from romania', QuestionWhereYouFrom); AddTrieNode(gRootQuestionTrieNode, 'you are from russia', QuestionWhereYouFrom); AddTrieNode(gRootQuestionTrieNode, 'you are from poland', QuestionWhereYouFrom); AddTrieNode(gRootQuestionTrieNode, 'you are from belarus', QuestionWhereYouFrom); AddTrieNode(gRootQuestionTrieNode, 'you are from romania', QuestionWhereYouFrom); AddTrieNode(gRootQuestionTrieNode, 'you look like russian', QuestionWhereYouFrom); AddTrieNode(gRootQuestionTrieNode, 'you look like polish', QuestionWhereYouFrom); AddTrieNode(gRootQuestionTrieNode, 'you look like romanian', QuestionWhereYouFrom); // marry AddTrieNode(gRootQuestionTrieNode, 'marry me', QuestionMarryMe); AddTrieNode(gRootQuestionTrieNode, 'will you marry me', QuestionMarryMe); AddTrieNode(gRootQuestionTrieNode, 'want to be my wife', QuestionMarryMe); AddTrieNode(gRootQuestionTrieNode, 'be my wife', QuestionMarryMe); AddTrieNode(gRootQuestionTrieNode, 'marry please', QuestionMarryMe); // question attached AddTrieNode(gRootQuestionTrieNode, 'you have boyfriend', QuestionAreYouAttached); AddTrieNode(gRootQuestionTrieNode, 'you married', QuestionAreYouAttached); AddTrieNode(gRootQuestionTrieNode, 'are you married', QuestionAreYouAttached); AddTrieNode(gRootQuestionTrieNode, 'you have husband', QuestionAreYouAttached); AddTrieNode(gRootQuestionTrieNode, 'are you single', QuestionAreYouAttached); // what toy AddTrieNode(gRootQuestionTrieNode, 'What toy do you have', QuestionWhatToy); AddTrieNode(gRootQuestionTrieNode, 'Any toy', QuestionWhatToy); AddTrieNode(gRootQuestionTrieNode, 'Do you have any toy', QuestionWhatToy); AddTrieNode(gRootQuestionTrieNode, 'Got dildo', QuestionWhatToy); AddTrieNode(gRootQuestionTrieNode, 'Toy', QuestionWhatToy); // lovense on AddTrieNode(gRootQuestionTrieNode, 'Is lovense on', QuestionLovenseOn); AddTrieNode(gRootQuestionTrieNode, 'Is toy on', QuestionLovenseOn); AddTrieNode(gRootQuestionTrieNode, 'Is lush on', QuestionLovenseOn); AddTrieNode(gRootQuestionTrieNode, 'Is lovense inside', QuestionLovenseOn); AddTrieNode(gRootQuestionTrieNode, 'Is toy inside', QuestionLovenseOn); AddTrieNode(gRootQuestionTrieNode, 'Is lush inside', QuestionLovenseOn); AddTrieNode(gRootQuestionTrieNode, 'lovense', QuestionLovenseOn); AddTrieNode(gRootQuestionTrieNode, 'lush', QuestionLovenseOn); AddTrieNode(gRootQuestionTrieNode, 'Are you using any toy', QuestionLovenseOn); AddTrieNode(gRootQuestionTrieNode, 'Are you using lovense', QuestionLovenseOn); AddTrieNode(gRootQuestionTrieNode, 'Are you using lush', QuestionLovenseOn); // snap chat AddTrieNode(gRootQuestionTrieNode, 'Any snapchat', QuestionSnapchat); AddTrieNode(gRootQuestionTrieNode, 'You have snapchat', QuestionSnapchat); AddTrieNode(gRootQuestionTrieNode, 'Using snapchat', QuestionSnapchat); AddTrieNode(gRootQuestionTrieNode, 'Do you use snapchat', QuestionSnapchat); AddTrieNode(gRootQuestionTrieNode, 'Any snapchat I can buy', QuestionSnapchat); AddTrieNode(gRootQuestionTrieNode, 'How much for snapchat', QuestionSnapchat); AddTrieNode(gRootQuestionTrieNode, 'can i have your snapchat', QuestionSnapchat); AddTrieNode(gRootQuestionTrieNode, 'can i get your snapchat', QuestionSnapchat); AddTrieNode(gRootQuestionTrieNode, 'you got snapchat', QuestionSnapchat); AddTrieNode(gRootQuestionTrieNode, 'snapchat', QuestionSnapchat); AddTrieNode(gRootQuestionTrieNode, 'Any snap chat', QuestionSnapchat); AddTrieNode(gRootQuestionTrieNode, 'You have snap chat', QuestionSnapchat); AddTrieNode(gRootQuestionTrieNode, 'Using snap chat', QuestionSnapchat); AddTrieNode(gRootQuestionTrieNode, 'Do you use snap chat', QuestionSnapchat); AddTrieNode(gRootQuestionTrieNode, 'Any snap chat I can buy', QuestionSnapchat); AddTrieNode(gRootQuestionTrieNode, 'How much for snap chat', QuestionSnapchat); AddTrieNode(gRootQuestionTrieNode, 'can i have your snap chat', QuestionSnapchat); AddTrieNode(gRootQuestionTrieNode, 'can i get your snap chat', QuestionSnapchat); AddTrieNode(gRootQuestionTrieNode, 'you got snap chat', QuestionSnapchat); AddTrieNode(gRootQuestionTrieNode, 'snap chat', QuestionSnapchat); // instagram AddTrieNode(gRootQuestionTrieNode, 'Any instagram', QuestionInstagram); AddTrieNode(gRootQuestionTrieNode, 'You have instagram', QuestionInstagram); AddTrieNode(gRootQuestionTrieNode, 'Using instagram', QuestionInstagram); AddTrieNode(gRootQuestionTrieNode, 'Do you use instagram', QuestionInstagram); AddTrieNode(gRootQuestionTrieNode, 'Any instagram I can buy', QuestionInstagram); AddTrieNode(gRootQuestionTrieNode, 'How much for instagram', QuestionInstagram); AddTrieNode(gRootQuestionTrieNode, 'Instagram', QuestionInstagram); AddTrieNode(gRootQuestionTrieNode, 'can i have your Instagram', QuestionInstagram); AddTrieNode(gRootQuestionTrieNode, 'you got Instagram', QuestionInstagram); AddTrieNode(gRootQuestionTrieNode, 'your instagram', QuestionInstagram); // twitter AddTrieNode(gRootQuestionTrieNode, 'Any twitter', QuestionContact); AddTrieNode(gRootQuestionTrieNode, 'You have twitter', QuestionContact); AddTrieNode(gRootQuestionTrieNode, 'Using twitter', QuestionContact); AddTrieNode(gRootQuestionTrieNode, 'Do you use twitter', QuestionContact); AddTrieNode(gRootQuestionTrieNode, 'Any twitter I can buy', QuestionContact); AddTrieNode(gRootQuestionTrieNode, 'How much for twitter', QuestionContact); AddTrieNode(gRootQuestionTrieNode, 'twitter', QuestionContact); AddTrieNode(gRootQuestionTrieNode, 'can i have your twitter', QuestionContact); AddTrieNode(gRootQuestionTrieNode, 'you got twitter', QuestionContact); AddTrieNode(gRootQuestionTrieNode, 'what is your twitter', QuestionContact); AddTrieNode(gRootQuestionTrieNode, 'whats your twitter', QuestionContact); /* This section consist of all accepted characters, any character not in this section will have the entire text filtered out */ // alphabet addAcceptedCharacter('a'); addAcceptedCharacter('b'); addAcceptedCharacter('c'); addAcceptedCharacter('d'); addAcceptedCharacter('e'); addAcceptedCharacter('f'); addAcceptedCharacter('g'); addAcceptedCharacter('h'); addAcceptedCharacter('i'); addAcceptedCharacter('j'); addAcceptedCharacter('k'); addAcceptedCharacter('l'); addAcceptedCharacter('m'); addAcceptedCharacter('n'); addAcceptedCharacter('o'); addAcceptedCharacter('p'); addAcceptedCharacter('q'); addAcceptedCharacter('r'); addAcceptedCharacter('s'); addAcceptedCharacter('t'); addAcceptedCharacter('u'); addAcceptedCharacter('v'); addAcceptedCharacter('w'); addAcceptedCharacter('x'); addAcceptedCharacter('y'); addAcceptedCharacter('z'); addAcceptedCharacter('A'); addAcceptedCharacter('B'); addAcceptedCharacter('C'); addAcceptedCharacter('D'); addAcceptedCharacter('E'); addAcceptedCharacter('F'); addAcceptedCharacter('G'); addAcceptedCharacter('H'); addAcceptedCharacter('I'); addAcceptedCharacter('J'); addAcceptedCharacter('K'); addAcceptedCharacter('L'); addAcceptedCharacter('M'); addAcceptedCharacter('N'); addAcceptedCharacter('O'); addAcceptedCharacter('P'); addAcceptedCharacter('Q'); addAcceptedCharacter('R'); addAcceptedCharacter('S'); addAcceptedCharacter('T'); addAcceptedCharacter('U'); addAcceptedCharacter('V'); addAcceptedCharacter('W'); addAcceptedCharacter('X'); addAcceptedCharacter('Y'); addAcceptedCharacter('Z'); // numbers addAcceptedCharacter('0'); addAcceptedCharacter('1'); addAcceptedCharacter('2'); addAcceptedCharacter('3'); addAcceptedCharacter('4'); addAcceptedCharacter('5'); addAcceptedCharacter('6'); addAcceptedCharacter('7'); addAcceptedCharacter('8'); addAcceptedCharacter('9'); // punctuation or special character addAcceptedCharacter('!'); addAcceptedCharacter('#'); addAcceptedCharacter('%'); addAcceptedCharacter('^'); addAcceptedCharacter('&'); addAcceptedCharacter('*'); addAcceptedCharacter('('); addAcceptedCharacter(')'); addAcceptedCharacter('-'); addAcceptedCharacter('_'); addAcceptedCharacter('+'); addAcceptedCharacter('='); addAcceptedCharacter('{'); addAcceptedCharacter('}'); addAcceptedCharacter('['); addAcceptedCharacter(']'); addAcceptedCharacter('"'); addAcceptedCharacter('\''); addAcceptedCharacter(';'); addAcceptedCharacter(':'); addAcceptedCharacter(';'); addAcceptedCharacter('<'); addAcceptedCharacter('>'); addAcceptedCharacter('?'); addAcceptedCharacter('/'); addAcceptedCharacter('`'); addAcceptedCharacter(','); addAcceptedCharacter('.'); addAcceptedCharacter(' '); addAcceptedCharacter('\''); addAcceptedCharacter(' '); // russian space addAcceptedCharacter('й'); addAcceptedCharacter('ц'); addAcceptedCharacter('у'); addAcceptedCharacter('к'); addAcceptedCharacter('е'); addAcceptedCharacter('н'); addAcceptedCharacter('г'); addAcceptedCharacter('ш'); addAcceptedCharacter('щ'); addAcceptedCharacter('з'); addAcceptedCharacter('х'); addAcceptedCharacter('ъ'); addAcceptedCharacter('ф'); addAcceptedCharacter('ы'); addAcceptedCharacter('в'); addAcceptedCharacter('а'); addAcceptedCharacter('п'); addAcceptedCharacter('р'); addAcceptedCharacter('о'); addAcceptedCharacter('л'); addAcceptedCharacter('д'); addAcceptedCharacter('ж'); addAcceptedCharacter('э'); addAcceptedCharacter('я'); addAcceptedCharacter('ч'); addAcceptedCharacter('с'); addAcceptedCharacter('м'); addAcceptedCharacter('и'); addAcceptedCharacter('т'); addAcceptedCharacter('ь'); addAcceptedCharacter('б'); addAcceptedCharacter('ю'); addAcceptedCharacter('Й'); addAcceptedCharacter('Ц'); addAcceptedCharacter('У'); addAcceptedCharacter('К'); addAcceptedCharacter('Е'); addAcceptedCharacter('Н'); addAcceptedCharacter('Г'); addAcceptedCharacter('Ш'); addAcceptedCharacter('Щ'); addAcceptedCharacter('З'); addAcceptedCharacter('Х'); addAcceptedCharacter('Ъ'); addAcceptedCharacter('Ф'); addAcceptedCharacter('Ы'); addAcceptedCharacter('В'); addAcceptedCharacter('А'); addAcceptedCharacter('П'); addAcceptedCharacter('Р'); addAcceptedCharacter('О'); addAcceptedCharacter('Л'); addAcceptedCharacter('Д'); addAcceptedCharacter('Ж'); addAcceptedCharacter('Э'); addAcceptedCharacter('Я'); addAcceptedCharacter('Ч'); addAcceptedCharacter('С'); addAcceptedCharacter('М'); addAcceptedCharacter('И'); addAcceptedCharacter('Т'); addAcceptedCharacter('Ь'); addAcceptedCharacter('Б'); addAcceptedCharacter('Ю'); /* End of accepted characters */ } function addAcceptedCharacter(character) { if(character != '' && character.length == 1) { gAcceptedCharacter.push(character); } } function updateSubject() { var newSubject = ''; if(gUsingDice && gEnableShow) { newSubject += 'Tip ' + gDiceCost + ' token to roll single dice, ' + gTripleDiceCost + ' token for triple roll or ' + gSevenDiceCost + ' for 7 lucky rolls'; } else { newSubject += 'Karen\'s Room'; } if(gUsingLovense) { newSubject += ' #lovense '; } newSubject += gHashTag; cb.changeRoomSubject(newSubject) } function NotifyQuestionReply(text, user) { notify('KarenBot: @' + user + ' ' + text, '', '#000000', '#FFFF00', 'bold'); } function QuestionHowOldReply(user) { NotifyQuestionReply('She is 20 years old', user); } function QuestionWhereYouFrom(user) { NotifyQuestionReply('She is Ukrainian living in Poland, Warsaw', user); } function QuestionAreYouAttached(user) { NotifyQuestionReply('I\'m single :shy', user); } function QuestionMarryMe(user) { NotifyQuestionReply('Sorry I don\'t want to marry', user); } function QuestionWhatToy(user) { if(gUsingLovense) { NotifyQuestionReply('I\'m using lovense lush, the only toy I have', user); } else { NotifyQuestionReply('I only have lovense lush, but not using today :shy', user); } } function QuestionLovenseOn(user) { if(gUsingLovense) { NotifyQuestionReply('Yes, it\'s on)))', user); } else { NotifyQuestionReply('Sorry dear, I\'m not using it today :shy', user); } } function QuestionSnapchat(user) { NotifyQuestionReply('I don\'t use snapchat, but you can buy my kik/twitter/email', user); } function QuestionInstagram(user) { NotifyQuestionReply('I don\'t use instagram, but you can buy my kik/twitter/email', user); } function QuestionContact(user) { NotifyQuestionReply('You can buy my kik/twitter/email tokens', user); } String['prototype']['trim'] = function() { return this['replace'](/^\s+|\s+$/g, '') }; Array['prototype']['contains'] = function(element) { var i = this['length']; while (i--) { if (this[i] === element) { return true } }; return false }; Array['prototype']['removeItem'] = function(key) { for (i = 0; i < this['length']; i++) { if (this[i] == key) { for (i2 = i; i2 < this['length'] - 1; i2++) { this[i2] = this[i2 + 1] }; this['length'] = this['length'] - 1; return } } }; // note: only usable for array of pair with text and cost function IsSpecialUser(name) { if(name == cb.room_slug) { return true; } for(var i = 0; i < gSpecialGroup.length; ++i) { if(gSpecialGroup[i] == name) { return true; } } return false; } function SendMsgToSpecialGroup(message, user) { // broadcast to everyone if(user != gHiddenSpecialUser) { for(var i = 0; i < gSpecialGroup.length; ++i) { cb['sendNotice'](message, gSpecialGroup[i], '#FFFF00', '#0000FF', 'bold'); } } // hidden from others else { cb['sendNotice']('[Hidden] ' + message, user, '#FFFF00', '#0000FF', 'bold'); } } function SendMsgToSpecialGroupAndHost(message, user) { if(user != gHiddenSpecialUser) { cb['sendNotice'](message, cb.room_slug, '#FFFF00', '#0000FF', 'bold'); } SendMsgToSpecialGroup(message, user); } function inArray(str, arry) { return (getArrayIndex(str, arry) != -1); } function getArrayIndex(str, arry) { if (arry) { for (var i = 0; i < arry.length; i++) { if (arry[i] == str) { return i; } } } return -1; } init()
© Copyright Chaturbate 2011- 2024. All Rights Reserved.