Bots Home
|
Create an App
sfsf
Author:
raccoonpig
Description
Source Code
Launch Bot
Current Users
Created by:
Raccoonpig
// 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 gPermanentTopTipper = [ {name:"guest4ever22", tip:"20,000"}, {name:"frank9600", tip:"11,112"}, {name:"frank9600", tip:"11,111"}, {name:"jeanco691", tip:"10,009"}, {name:"hazzini", tip:"10,000"} ]; // KarenDice specific variable var gDiceCost = 19; var gTripleDiceCost = 39; var gSevenDiceCost = 79; var gUniqueDiceCost = 199; var gUniqueDiceRoll = 7; var gDiceMenu = [ {text:"Nothing"}, // dice roll 0, impossible {text:"Nothing"}, // dice roll 1, impossible {text:"Nothing"}, // dice roll 2, impossible {text:"Nothing"}, // dice roll 3, impossible {text:"Nothing"}, // dice roll 4, impossible {text:"Nude 10 minutes"}, // dice roll 5, 0.01% {text:"Top off 10 minutes"}, // dice roll 6, 0.06% {text:"Top off 10 minutes"}, // dice roll 7, 0.19% {text:"Triple Flash"}, // dice roll 8, 0.45% {text:"Spank Ass"}, // dice roll 9, 0.90% {text:"Jump 5 times without bra"}, // dice roll 10, 1.62% {text:"Twerk Ass"}, // dice roll 11, 2.64% {text:"Twerk Ass"}, // dice roll 12, 3.92% {text:"Play with Boob"}, // dice roll 13, 5.40% {text:"Flash Ass"}, // dice roll 14, 6.94% {text:"Flash Ass"}, // dice roll 15, 8.37% {text:"Play Right Boob"}, // dice roll 16, 9.45% {text:"Play Right Boob"}, // dice roll 17, 10.03% {text:"Play Left Boob"}, // dice roll 18, 10.03% {text:"Play Left Boob"}, // dice roll 19, 9.45% {text:"Flash Ass"}, // dice roll 20, 8.37% {text:"Flash Ass"}, // dice roll 21, 6.94% {text:"Play with Boob"}, // dice roll 22, 5.40% {text:"Flash Ass"}, // dice roll 23, 3.92% {text:"Close up on boob"}, // dice roll 24, 2.64% {text:"Close up on boob"}, // dice roll 25, 1.62% {text:"Pussy Flash"}, // dice roll 26, 0.90% {text:"Jump 5 times without bra"}, // dice roll 27, 0.45% {text:"Triple Flash"}, // dice roll 28, 0.19% {text:"Bottom off 10 minutes"}, // dice roll 29, 0.06% {text:"Panties off 10 minutes"}, // dice roll 30, 0.01% ]; var gCommonDiceMenu = [ {text:"Nothing"}, // dice roll 0, impossible {text:"Nothing"}, // dice roll 1, impossible {text:"Nothing"}, // dice roll 2, impossible {text:"Nothing"}, // dice roll 3, impossible {text:"Nothing"}, // dice roll 4, impossible {text:"Smile"}, // dice roll 5, 0.01% {text:"Smile"}, // dice roll 6, 0.06% {text:"Smile"}, // dice roll 7, 0.19% {text:"Smile"}, // dice roll 8, 0.45% {text:"Blow a kiss"}, // dice roll 9, 0.90% {text:"Blow a kiss"}, // dice roll 10, 1.62% {text:"Show Belly"}, // dice roll 11, 2.64% {text:"Show Belly"}, // dice roll 12, 3.92% {text:"Show Belly"}, // dice roll 13, 5.40% {text:"Blow a kiss"}, // dice roll 14, 6.94% {text:"Close up on eye"}, // dice roll 15, 8.37% {text:"Say 'I Love You"}, // dice roll 16, 9.45% {text:"Smile"}, // dice roll 17, 10.03% {text:"Blow a kiss"}, // dice roll 18, 10.03% {text:"Say 'I Love You"}, // dice roll 19, 9.45% {text:"Close up on eye"}, // dice roll 20, 8.37% {text:"Close up on eye"}, // dice roll 21, 6.94% {text:"Close up on eye"}, // dice roll 22, 5.40% {text:"Short Dance"}, // dice roll 23, 3.92% {text:"Short Dance"}, // dice roll 24, 2.64% {text:"Short Dance"}, // dice roll 25, 1.62% {text:"Short Dance"}, // dice roll 26, 0.90% {text:"Say 'I Love You"}, // dice roll 27, 0.45% {text:"Say 'I Love You"}, // dice roll 28, 0.19% {text:"Say 'I Love You"}, // dice roll 29, 0.06% {text:"Say 'I Love You"}, // dice roll 30, 0.01% ]; 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, 'raccoonpig'); 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 = 'raccoonpig'; 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 gTipMenuContainer = [ {text:"PM", cost:"11"}, {text:"Twerk Ass", cost:"89"}, {text:"Flash Boob", cost:"100"}, {text:"Boob Close Up", cost:"125"}, {text:"Flash Pussy", cost:"200"}, {text:"Triple Flash", cost:"300"}, {text:"Smile", cost:"10"}, {text:"c2c 5 min", cost:"35"}, {text:"Flash Ass", cost:"50"}, {text:"Flash Left Boob", cost:"78"}, {text:"Flash Right Boob", cost:"79"}, {text:"Kik/Twitter/Email", cost:"500"} ]; var gNudeMenuContainer = [ {text:"Bra off for 10 min", cost:"555"}, {text:"Stay Nude for 5 min", cost:"666"}, {text:"Panties off for 10 min", cost:"777"}, {text:"Nude for 10 min", cost:"999"} ]; var gLovenseLevelContainer = [ {text:"Sweet Pleasure", cost:1}, {text:"Wet Level", cost:15}, {text:"Oh YES, I love this toy!", cost:100}, {text:"OMG! OMG!", cost:500}, {text:"Deep in my heart... and pussy!", cost:1000}, {text:":pulsepattern Pattern", cost:101}, {text:":wavepattern Pattern", cost:201} ]; var gUsingNudeMenu = false; 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:":hearts_bubbling_small :takeoff :hearts_bubbling_small", frequency:gNotificationFrequency[0], oldFrequency:gNotificationFrequency[3]}, {text:":privateisopen01-sam- You can tip for PM to ask what I do in private or you can contact my lovely moderator for more information :hearts_bubbling_small", frequency:gNotificationFrequency[2], oldFrequency:gNotificationFrequency[3]}, {text:":endtip1", 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))U CAN BUY AND ENJOY! :photosss", frequency:gNotificationFrequency[1], oldFrequency:gNotificationFrequency[3]} ]; cb['settings_choices'] = [{ name: 'nudeMenu', type: 'choice', choice1: 'No', choice2: 'Yes', defaultValue: 'No', label: 'Use nude menu? (type /togglenude to turn it on/off at run time)' }, { 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 ]; cb.onTip(function (tip) { if(gEnableShow) { 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 = getTextFromCost(currentTip, gTipMenuContainer); // if nth can be found, check nude menu, but only check it if nude menu is activated if(gUsingNudeMenu && (text == null || text == '')) { text = getTextFromCost(currentTip, gNudeMenuContainer); } // 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'); } } 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 gHasRarePrize = 0; function rollDice(user, maxRarePrizeCount, prizeText, allowDuplicatePrize, chance) { if(gHasRarePrize < maxRarePrizeCount && Math.random() < chance) { ++gHasRarePrize; return getDicePrize(user, gDiceMenu, prizeText, allowDuplicatePrize); } else { return getDicePrize(user, gCommonDiceMenu, prizeText, allowDuplicatePrize); } } function handleDiceRoll(tip, user) { var prizeText = new Array(); gHasRarePrize = 0; if(tip == gDiceCost) { notify(user + ' tipped for single dice roll! Prize won:'); notify(':ssty7 You can roll multiple times for lesser token!', user); rollDice(user, 1, prizeText, true, 0.03); } else if(tip == gTripleDiceCost) { notify(user + ' tipped for triple dice! Prize won:'); notify(':ssty7 You can roll multiple times for lesser token!', user); // grab 3 prize for(var i = 0; i < 3; ++i) { rollDice(user, 1, prizeText, true, 0.15); } } else if(tip == gSevenDiceCost) { notify(user + ' tipped for 7 lucky dice! Prize won:'); notify(':ssty7 You can roll multiple times for lesser token!', user); // grab 7 prize for(var i = 0; i < 7; ++i) { rollDice(user, 2, prizeText, true, 0.35); } } else if(tip == gUniqueDiceCost) { notify(user + ' tipped for ' + gUniqueDiceRoll + ' unique dice! Prize won:'); notify(':ssty7', user); var rareRoll = 2; var commonRoll = gUniqueDiceRoll - rareRoll; // grab 7 UNIQUE prize for(var i = 0; i < gUniqueDiceRoll;) { if(rollDice(user, 4, prizeText, false, 0.7)) { ++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 if(!msg['X-Spam']) { // 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'; 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, 'raccoonpig', '#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 === '/togglenude') { msg['X-Spam'] = true; gUsingNudeMenu = !gUsingNudeMenu; SendMsgToSpecialGroupAndHost('Use nude menu: ' + (gUsingNudeMenu? '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 === '/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) { if(msgString == '/history') { for(var i = 0; i < gTipNoteContainer.length; ++i) { cb['sendNotice'](gTipNoteContainer[i], user, '#FFFF00', '#000000', 'bold'); } } /* if(msgString == '/chathistory') { cb['sendNotice'](gMessageHistory, user, '#FFFF00', '#000000', 'bold'); } */ if (msgString['substring'](0, 7) == '/karen ') { msg['X-Spam'] = true; var text = 'raccoonPig: ' + 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 = ':dice3\n Tip ' + gDiceCost + ' token to roll dice for a prize\n'; text += gTripleDiceCost + ' token for 3 rolls (' + ((1 - (gTripleDiceCost/(gDiceCost * 3))) * 100).toFixed(0) + '% discount)\n'; text += gSevenDiceCost + ' token for 7 lucky rolls (' + ((1 - (gSevenDiceCost/(gDiceCost * 7))) * 100).toFixed(0) + '% discount)\n'; text += gUniqueDiceCost + ' token for ' + gUniqueDiceRoll + ' unique rolls (no repeated prizes! very high chance for rare prizes!)\n\n'; text += 'Dice Prize:\n'; var prizes = new Array(); 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'); gUsingNudeMenu = (cb['settings']['nudeMenu'] == '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 nude menu: ' + (gUsingNudeMenu ? '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 = ""; if(gMenuTipping) { if (gTipMenuContainer != null) { for (var i = 0; i < gTipMenuContainer.length; i++) { finalMessage += gTipMenuContainer[i].text + ' (' + gTipMenuContainer[i].cost + ' Token) ' + ':pixelheart '; } } // only used if nude menu is turned on if(gUsingNudeMenu) { if (gNudeMenuContainer != null) { for (var i = 0; i < gNudeMenuContainer.length; i++) { finalMessage += gNudeMenuContainer[i].text + '(' + gNudeMenuContainer[i].cost + ' Token) ' + ':pixelheart '; } } } } return 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 ''; } 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 += ':dice3\n Tip ' + gDiceCost + ' token to roll dice for a prize\n'; text += gTripleDiceCost + ' token for 3 rolls (' + ((1 - (gTripleDiceCost/(gDiceCost * 3))) * 100).toFixed(0) + '% discount)\n'; text += gSevenDiceCost + ' token for 7 lucky rolls (' + ((1 - (gSevenDiceCost/(gDiceCost * 7))) * 100).toFixed(0) + '% discount)\n'; text += gUniqueDiceCost + ' token for ' + gUniqueDiceRoll + ' unique rolls (no repeated prizes! very high chance for rare 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, 'raccoonPig', '#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('яна'); 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); // flash pussy AddTrieNode(gRootQuestionTrieNode, 'how much for pussy', QuestionPussyCost); AddTrieNode(gRootQuestionTrieNode, 'i want to see pussy', QuestionPussyCost); AddTrieNode(gRootQuestionTrieNode, 'flash pussy', QuestionPussyCost); AddTrieNode(gRootQuestionTrieNode, 'show pussy', QuestionPussyCost); AddTrieNode(gRootQuestionTrieNode, 'show your pussy', QuestionPussyCost); AddTrieNode(gRootQuestionTrieNode, 'pussy', QuestionPussyCost); AddTrieNode(gRootQuestionTrieNode, 'give me a pussy please', QuestionPussyCost); AddTrieNode(gRootQuestionTrieNode, 'give me pussy', QuestionPussyCost); AddTrieNode(gRootQuestionTrieNode, 'give me a pussy', QuestionPussyCost); AddTrieNode(gRootQuestionTrieNode, 'pussy please', QuestionPussyCost); AddTrieNode(gRootQuestionTrieNode, 'can you show pussy', QuestionPussyCost); AddTrieNode(gRootQuestionTrieNode, 'can you show your pussy', QuestionPussyCost); // flash ass AddTrieNode(gRootQuestionTrieNode, 'how much for ass', QuestionAssCost); AddTrieNode(gRootQuestionTrieNode, 'i want to see ass', QuestionAssCost); AddTrieNode(gRootQuestionTrieNode, 'flash ass', QuestionAssCost); AddTrieNode(gRootQuestionTrieNode, 'show ass', QuestionAssCost); AddTrieNode(gRootQuestionTrieNode, 'ass', QuestionAssCost); AddTrieNode(gRootQuestionTrieNode, 'give me ass please', QuestionAssCost); AddTrieNode(gRootQuestionTrieNode, 'give me ass', QuestionAssCost); AddTrieNode(gRootQuestionTrieNode, 'ass please', QuestionAssCost); AddTrieNode(gRootQuestionTrieNode, 'show your ass', QuestionAssCost); AddTrieNode(gRootQuestionTrieNode, 'can you show ass', QuestionAssCost); AddTrieNode(gRootQuestionTrieNode, 'can you show your ass', QuestionAssCost); // flash boob AddTrieNode(gRootQuestionTrieNode, 'how much for boob', QuestionBoobCost); AddTrieNode(gRootQuestionTrieNode, 'i want to see boob', QuestionBoobCost); AddTrieNode(gRootQuestionTrieNode, 'flash boob', QuestionBoobCost); AddTrieNode(gRootQuestionTrieNode, 'show boob', QuestionBoobCost); AddTrieNode(gRootQuestionTrieNode, 'boob', QuestionBoobCost); AddTrieNode(gRootQuestionTrieNode, 'give me boob please', QuestionBoobCost); AddTrieNode(gRootQuestionTrieNode, 'give me boob', QuestionBoobCost); AddTrieNode(gRootQuestionTrieNode, 'boob please', QuestionBoobCost); AddTrieNode(gRootQuestionTrieNode, 'can you show boob', QuestionBoobCost); AddTrieNode(gRootQuestionTrieNode, 'can you show your boob', QuestionBoobCost); // twerk ass AddTrieNode(gRootQuestionTrieNode, 'how much for twerk', QuestionTwerkCost); AddTrieNode(gRootQuestionTrieNode, 'i want to see twerk', QuestionTwerkCost); AddTrieNode(gRootQuestionTrieNode, 'i want to see you twerk', QuestionTwerkCost); AddTrieNode(gRootQuestionTrieNode, 'how much for twerk ass', QuestionTwerkCost); AddTrieNode(gRootQuestionTrieNode, 'twerk ass', QuestionTwerkCost); AddTrieNode(gRootQuestionTrieNode, 'give me twerk please', QuestionTwerkCost); AddTrieNode(gRootQuestionTrieNode, 'give me twerk', QuestionTwerkCost); AddTrieNode(gRootQuestionTrieNode, 'twerk please', QuestionTwerkCost); // naked AddTrieNode(gRootQuestionTrieNode, 'how much for naked', QuestionNakedCost); AddTrieNode(gRootQuestionTrieNode, 'how much to get you naked', QuestionNakedCost); AddTrieNode(gRootQuestionTrieNode, 'how much for you to get naked', QuestionNakedCost); AddTrieNode(gRootQuestionTrieNode, 'i want to see you naked', QuestionNakedCost); AddTrieNode(gRootQuestionTrieNode, 'naked', QuestionNakedCost); AddTrieNode(gRootQuestionTrieNode, 'show naked body', QuestionNakedCost); AddTrieNode(gRootQuestionTrieNode, 'show naked', QuestionNakedCost); AddTrieNode(gRootQuestionTrieNode, 'take off clothing', QuestionNakedCost); AddTrieNode(gRootQuestionTrieNode, 'naked please', QuestionNakedCost); // c2c AddTrieNode(gRootQuestionTrieNode, 'how much for c2c', QuestionC2CCost); AddTrieNode(gRootQuestionTrieNode, 'c2c', QuestionC2CCost); AddTrieNode(gRootQuestionTrieNode, 'want to see my camera', QuestionC2CCost); AddTrieNode(gRootQuestionTrieNode, 'open my camera baby', QuestionC2CCost); AddTrieNode(gRootQuestionTrieNode, 'open my camera', QuestionC2CCost); AddTrieNode(gRootQuestionTrieNode, 'my camera is on', QuestionC2CCost); AddTrieNode(gRootQuestionTrieNode, 'hey do you look at guy cam models', QuestionC2CCost); AddTrieNode(gRootQuestionTrieNode, 'hey do you look at cam', QuestionC2CCost); AddTrieNode(gRootQuestionTrieNode, 'c2c please', QuestionC2CCost); // 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); // pm me AddTrieNode(gRootQuestionTrieNode, 'pm me', QuestionPMCost); AddTrieNode(gRootQuestionTrieNode, 'pm me please', QuestionPMCost); AddTrieNode(gRootQuestionTrieNode, 'pm me for private', QuestionPMCost); AddTrieNode(gRootQuestionTrieNode, 'pm me i got something important', QuestionPMCost); AddTrieNode(gRootQuestionTrieNode, 'pm me i got question', QuestionPMCost); AddTrieNode(gRootQuestionTrieNode, 'how much for pm', QuestionPMCost); AddTrieNode(gRootQuestionTrieNode, 'do you pm', QuestionPMCost); AddTrieNode(gRootQuestionTrieNode, 'pm my love', QuestionPMCost); AddTrieNode(gRootQuestionTrieNode, 'pm please', QuestionPMCost); AddTrieNode(gRootQuestionTrieNode, 'pm', QuestionPMCost); // private cost AddTrieNode(gRootQuestionTrieNode, 'how much for private', QuestionPrivateCost); AddTrieNode(gRootQuestionTrieNode, 'private cost', QuestionPrivateCost); AddTrieNode(gRootQuestionTrieNode, 'you do private', QuestionPrivateCost); AddTrieNode(gRootQuestionTrieNode, 'do you private', QuestionPrivateCost); AddTrieNode(gRootQuestionTrieNode, 'any private', QuestionPrivateCost); AddTrieNode(gRootQuestionTrieNode, 'private', QuestionPrivateCost); AddTrieNode(gRootQuestionTrieNode, 'you do private show', QuestionPrivateCost); // 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 QuestionPussyCost(user) { NotifyQuestionReply('200 token for flash pussy', user); } function QuestionAssCost(user) { NotifyQuestionReply('50 token for flash ass', user); } function QuestionBoobCost(user) { NotifyQuestionReply('100 token for flash boob', user); } function QuestionTwerkCost(user) { NotifyQuestionReply('89 token for twerk ass', user); } function QuestionPMCost(user) { NotifyQuestionReply('11 token for pm', user); } function QuestionPrivateCost(user) { NotifyQuestionReply('60 token per minute for private', user); } function QuestionC2CCost(user) { NotifyQuestionReply('35 token per minute for C2C', user); } function QuestionAreYouAttached(user) { NotifyQuestionReply('I\'m single :shy', user); } function QuestionMarryMe(user) { NotifyQuestionReply('Sorry I don\'t want to marry', user); } function QuestionNakedCost(user) { NotifyQuestionReply('666 token for 5 min nude or 999 token for 10 min nude', 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 for 500 tokens and get my photo there', user); } function QuestionInstagram(user) { NotifyQuestionReply('I don\'t use instagram, but you can buy my kik/twitter/email for 500 tokens and get my photo there', user); } function QuestionContact(user) { NotifyQuestionReply('You can buy my kik/twitter/email for 500 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.