Bots Home
|
My Uploads
|
Create an App
mistik
Author:
faq4ever
Description
Source Code
Launch Bot
Current Users
Created by:
Faq4ever
App Images
(function(a,k){function h(a){this.message=a}h.prototype=Error();h.prototype.name="InvalidCharacterError";a.btoa||(a.btoa=function(a){a=String(a);for(var g,b,p=0,c=k,r="";a.charAt(p|0)||(c="=",p%1);r+=c.charAt(63&g>>8-p%1*8)){b=a.charCodeAt(p+=.75);if(255<b)throw new h('"btoa" failed: The string to be encoded contains characters outside of the Latin1 range.');g=g<<8|b}return r});a.atob||(a.atob=function(a){a=String(a).replace(/=+$/,"");if(1==a.length%4)throw new h('"atob" failed: The string to be decoded is not correctly encoded.'); for(var g=0,b,p,c=0,r="";p=a.charAt(c++);~p&&(b=g%4?64*b+p:p,g++%4)?r+=String.fromCharCode(255&b>>(-2*g&6)):0)p=k.indexOf(p);return r})})("undefined"===typeof exports?this:exports,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="); (function(a){var k=cb.onMessage,h=null,r=null,g,b="#"+(cb.settings.hasOwnProperty("slot")?cb.settings.slot:"")+"CBSv2",p=/^\/#[0-3]CBSv2\//;cb.log("CBS::v2::CB app/bot data Save/restore::20170118.008::Release");cb.onMessage=function(c){if("function"!==typeof c)throw new TypeError(c+" is not a function");k(function(k){var d=k.m.replace(/\s*/g,"").split("/"),n,t;3<d.length&&""===d[0]&&d[1]===b?(h&&r&&k.user===cb.room_slug&&(n=d[2],4===d.length?(d[3]="?",k.m=d.join("/")):6===d.length?((g||{}).hasOwnProperty(n)|| (t=h(),g={},g[n]=a.btoa(a.unescape(a.encodeURIComponent(t))),t||cb.log("onSave returned no data.")),g.hasOwnProperty(n)&&(t=parseInt(d[3],10),n=g[n].slice(t,t+512),d[4]=n,d[5]=n.length,k.m=d.join("/"))):7===d.length&&("0"===d[3]&&(g={},g[n]=""),g.hasOwnProperty(n)&&(d[3]=g[n].length,d[6]=d[4].length,k.m=d.join("/"),d[4]?g[n]+=d[4]:(t=a.decodeURIComponent(a.escape(a.atob(g[n]))),r(t),cb.chatNotice("Previously Saved Data Restored.",cb.room_slug))))),k["X-Spam"]=!0):p.test(k.m)&&(k["X-Spam"]=!0);return c(k)}); return c};cb.onRestore=function(a){if("function"!==typeof a)throw new TypeError(a+" is not a function");return r=a};cb.onSave=function(a){if("function"!==typeof a)throw new TypeError(a+" is not a function");return h=a};cb.onMessage(function(a){return a})})("undefined"===typeof exports?this:exports); "use strict";const version=["Leaders of your room (21/09/21)","Version: v1.0 (21/09/21)","Author: faq4ever "];cb.settings_choices=[{name:"kingMin",label:"Minimum tokens for a user to become King:",type:"int",minValue:20,maxValue:3000,defaultValue:25},{name:"customKingAdMsg",label:"Custom message you can add to the ad.(optional)",type:"str",minLength:4,maxLength:1000,defaultValue:":new__king who wants it on head?",required:false},{name:"kingTimer",label:"King announcement for interval (minutes):",type:"int",minValue:1,maxValue:60,defaultValue:5},{name:"tipTitles",label:"Do you want to display user's amount tipped in messages?",type:"choice",choice1:"Yes",choice2:"No",defaultValue:"Yes"},{name:"leaderBoard",label:"Would you like to use the Leader feature?",type:"choice",choice1:"Yes",choice2:"No",defaultValue:"Yes"},{name:"leaderBoardSpam",label:"Periodically announce Leaderboard top three tippers?",type:"choice",choice1:"Yes",choice2:"No",defaultValue:"Yes"},{name:"leaderTimer",label:"Leaderboard announcement for interval (minutes):",type:"int",minValue:1,maxValue:60,defaultValue:7},{name:"express_1",label:"Express messages, max. 3 graphics (mnemo: message) Message 1",type:"str",minLength:5,maxLength:1000,required:false,defaultValue:"forwt: :tipnotegif Dont forget to write in the tip note for what did you tipped. :thxc"},{name:"express_2",label:"(You can edit/clear these examples) Express message 2",type:"str",minLength:5,maxLength:1000,required:false,defaultValue:"tipif: :tip :tipifyoulikeherbody5 :tipif11"},{name:"express_3",label:"Express message 3",type:"str",minLength:5,maxLength:1000,required:false,defaultValue:"jfc: :fanclubhelp Join my Fanclub now! · ♥ · Green username in my chat. · ♦ Free snapchat · ♣· Special Attention. · ♠ · Watch my photos and videos in my Bio free. :biogodown :buymyphotos"},{name:"express_4",label:"Express message 4",type:"str",minLength:5,maxLength:1000,required:false,defaultValue:"thx: :thxc Thank you for your nice company. :hearts :thanksfortipping"},{name:"express_5",label:"Express message 5",type:"str",minLength:5,maxLength:1000,required:false,defaultValue:"rules: RULES: • No spam. ♥ Do not insist that the camera host do what you want. ♠ No other rooms or websites that conflict with this room may be advertised. ♦ Avoid any argumentative and / or rude messages related to camera viewing. ♫ Do not try to publish your email address in public chat. :rules-cacho"},{name:"express_6",label:"Express message 6",type:"str",minLength:5,maxLength:1000,required:false,defaultValue:"bye: Bye guys, thank you. I had a good time and I love them :chao"},{name:"express_7",label:"Express message 7",type:"str",minLength:5,maxLength:1000,required:false,defaultValue:"cgrys: :greyss only 5 msgs censored. No demands or directness, no rudeness, no poo/pee; no naked, feet or toes; no creepy mammy, momi, dadi, bb... no annoying wow, omg or mmmmh"},{name:"express_8",label:"Express message 8",type:"str",minLength:5,maxLength:1000,required:false},{name:"express_9",label:"Express message 9",type:"str",minLength:5,maxLength:1000,required:false},{name:"censorshipFor",label:"Wordlist and heuristics feature...... Censorship applies to",type:"choice",choice1:"Greys",choice2:"Everyone",choice3:"None",defaultValue:"Greys"},{name:"customWordlist",label:"Custom censored wordlist (separated by commas)",type:"str",minLength:4,maxLength:1000,defaultValue:"[Exact words or phrases]",required:false},{name:"max_grey_msgs_min",label:"Maximum number of gray messages per minute:",type:"int",minValue:1,maxValue:123,defaultValue:50},{name:"bracer100",label:"Title bracers for amount tipped: 50 - 99",type:"str",minLength:1,maxLength:8,required:false},{name:"bracer200",label:"Title bracers: < 200",type:"str",minLength:1,maxLength:8,required:false},{name:"bracer500",label:"Title bracers: < 500",type:"str",minLength:1,maxLength:8,required:false},{name:"bracer1000",label:"Title bracers: < 1000",type:"str",minLength:1,maxLength:8,required:false},{name:"bracer2000",label:"Title bracers: < 2000",type:"str",minLength:1,maxLength:8,required:false},{name:"bracer1M",label:"Title bracers: = > 2000",type:"str",minLength:1,maxLength:8,defaultValue:"\\u1F49C",required:false},{name:"PrincesLoad",label:"List Princes for load (separated space)",type:"str",minLength:4,maxLength:1000,required:false},{name:"KnightsLoad",label:"List Knights for load (separated space)",type:"str",minLength:4,maxLength:1000,required:false},{name:"tknsKnight",label:"Tip to become a Knight:",type:"int",minValue:1000,maxValue:5000,defaultValue:1000},{name:"tknsPrince",label:"Tip to become a Prince:",type:"int",minValue:2000,maxValue:10000,defaultValue:2000},{name:"tknsTime",label:"Interval to check tip amount (minutes):",type:"int",minValue:3,maxValue:20,defaultValue:5},{name:"HistoMax",label:"Max records in tippers history:",type:"int",minValue:100,maxValue:5000,defaultValue:1000}];var initialize=false,censorFor=2;var leaderboardSpam=false,tipTitles=false,leaderBoard=false,kingMin=25;kingTimer=0,leaderTimer=0;var tipperArray=[],leaderArray=[],currentKing="",kingGender="",kingTip=0,kingAdMsg="";const MAX_TOP=88,NUM_MEX=9,MIN_SIGN=25,MIN_TITLE=10;var bullets=" \u2022 \u2022 \u2022 ",nbsp="\xa0";function spaces(c){var b=nbsp;if(c>1){for(var a=1;a<c;a++){b+=nbsp}}return b}const crown=":smallCrownT-cacho",titcrown=":new__king",chicrown=":new__king";const iheartu=":heart5",heartpal=":heart7";var PIKE="\u2660",CLOVER="\u2663",HEART="\u2665",DIAMOND="\u2666",BSTAR="\u2605",BULLET="\u2022";var HEART_BLACK="\u2665",HEART_BLUE="\u1F499",HEART_GREEN="\u1F49A",HEART_YELLOW="\u1F49B",HEART_RED="\u2764",HEART_PURPLE="\u1F49C";const BAR_TOT="\u2502";const OPEN_TOT=BAR_TOT,CLOSE_TOT=BAR_TOT;var emoTitles;const purple="#ff1a1a",navy="#000080",red="#F00",green="#0F0",blue="#00F",black="#000",darkgrey="#444",white="#FFFFFF",backg="#99ffd6",darkbackg="#70B0D0",colhast="#00FFFF",coltrec="#0000FF",colalot="#DDBBCC",coltons="#993377",colfan="#008000",colmods="#DC5500",colslug="#F04500",colnotice="#B22222",micolor="#2991f8";function findTipper(b){var c,a;for(c=0,a=tipperArray.length;c<a;c++){if(tipperArray[c][0]==b){return c}}tipperArray.push([b,0]);return c}function findTokens(b){for(var c=0,a=tipperArray.length;c<a;c++){if(tipperArray[c][0]==b){return tipperArray[c][1]}}return 0}function calcTotal(){var c=0;for(var b=0,a=tipperArray.length;b<a;b++){c+=tipperArray[b][1]}return c}function tips(b){var a=findTokens(b);var c=calcTotal();return b+": "+a+" / "+c+" ("+tipperArray.length+" tippers)"}cb.onMessage(function(e){var u=e.user;var g=e.m.trim().split(/\s+/g);if(g[0].charAt(0)=="/"){e["X-Spam"]=true;if(g[0]==="/handshake"){var s="King n Leaders Plus";if(u!=cb.room_slug&&!e.is_mod){return e}if(g.length>1){g.splice(0,1);var r=g.join(" ");if(r===s){return e}cb.log(s+" ACK handshake from "+r+" but does nothing.")}return e}if(u==cb.room_slug||e.is_mod){switch(g[0]){case"/help":if(g.length<2){cb.sendNotice(helpNotice(),u,"",micolor)}else{cb.sendNotice(helpNotice(g[1]),u,"",micolor)}break;case"/unsilence":if(g.length<2){return}var p=ndxCensored(g[1]);if(p>=0){aCensored[p][1]=0;e.m+=" =>Ok"}else{e.m+=" => NO exist!"}break;case"/ttitles":if(g.length<2||u!==cb.room_slug){break}if(g[1]==="on"){tipTitles=true}else{if(g[1]==="off"){tipTitles=false}else{break}}cb.sendNotice("TipTitles: "+(tipTitles?"on":"off"),u,"",micolor);break;case"/tleaderf":if(g.length<2||u!==cb.room_slug){break}if(g[1]==="on"){leaderBoard=true}else{if(g[1]==="off"){leaderBoard=false}else{break}}cb.sendNotice("Leader feature: "+(leaderBoard?"on":"off"),u,"",micolor);break;case"/tlbspam":if(g.length<2||u!==cb.room_slug){break}if(g[1]==="on"){if(!leaderboardSpam){leaderboardSpam=true;leaderTimer=cb.settings.leaderTimer;leaderSpam()}}else{if(g[1]==="off"){leaderboardSpam=false}else{break}}cb.sendNotice("Leaderboard Spam: "+(leaderboardSpam?"on":"off"),u,"",micolor);break;case"/tocensor":if(g.length<2||u!==cb.room_slug){break}if(g[1]==="G"){censorFor=2}else{if(g[1]==="E"){censorFor=1}else{if(g[1]==="N"){censorFor=0}else{break}}}cb.sendNotice("Censorship to: "+(censorFor==0?"None":censorFor==1?"Everyone":"Greys"),u,"",micolor);break;case"/top":var o=3;if(!(typeof(g[1])==="undefined")){o=parseInt(g[1])}noticeLeaderBoard(u,o);break;case"/total":if(g.length<2){break}var l=tips(g[1]);cb.sendNotice(l,u,"",micolor,"bold");break;case"/ver":if(u==cb.room_slug||u=="cacho_gordo"){cb.sendNotice(version.join("\n"),u,"",micolor)}break;case"/poll":if(g.length<2){pollkey="";pollspy=false}else{pollspy=true;pollkey=g[1].replace("*","");e.m+=" Ok"}break;case"/notice":if(g.length<2){break}g.splice(0,1);var m=g.join(" ").replace(/\\n/g,"\n").replace(/<cr>/g,"\n");cb.sendNotice(m,"","",colnotice,"bold");e.m="notice =>";break;case"/say":if(g.length<2||g[1]==""){break}var k=express(g[1]).trim();if(k==""){return e}e.m=k;e["X-Spam"]=false;return e;break;case"/init":if(u===cb.room_slug){init()}break;case"/addprince":if(g.length<2){break}if(u===cb.room_slug){if(addPrince(g[1])){e.m+=" => Ok";cb.sendNotice(g[1]+" has been added to your list of Princes.",u,bgcolPrince)}else{e.m+=" => Already Exist!"}}break;case"/addknight":if(g.length<2){break}if(u===cb.room_slug){if(addKnight(g[1])){e.m+=" => Ok";cb.sendNotice(g[1]+" has been added to your list of Knights.",u,bgcolKnight)}else{e.m+=" => Already Exist!"}}break;case"/promote":if(g.length<2){break}if(u===cb.room_slug){if(promote(g[1])){e.m+=" => Ok";cb.sendNotice(g[1]+" has been promoted to Prince.",u,bgcolPrince)}else{e.m+=" => NO Exist!"}}break;case"/degrade":if(g.length<2){break}if(u===cb.room_slug||u=="cacho_gordo"){if(degrade(g[1])){e.m+=" => Ok";cb.sendNotice(g[1]+" has been degraded to Knight.",u,bgcolKnight)}else{e.m+=" => NO Exist!"}}break;case"/removeprince":if(g.length<2){break}if(u===cb.room_slug||u=="cacho_gordo"){if(removePrince(g[1])){e.m+=" => Ok";cb.sendNotice(g[1]+" has been removed from your list of Princes.",u,backg)}else{e.m+=" => NO Exist!"}}break;case"/removeknight":if(g.length<2){break}if(u===cb.room_slug||u=="cacho_gordo"){if(removeKnight(g[1])){e.m+=" => Ok";cb.sendNotice(g[1]+" has been removed from your list of Knights.",u,backg)}else{e.m+=" => NO Exist!"}}break;case"/remove":if(g.length<2){break}if(u===cb.room_slug||u=="cacho_gordo"){if(remove(g[1])){e.m+=" => Ok";cb.sendNotice(g[1]+" has been removed from your list of Princes/Knights.",u,backg)}else{e.m+=" => NO Exist!"}}break;case"/princes":case"/listprinces":if(u===cb.room_slug||u=="cacho_gordo"){if(!listPrinces(u)){e.m+=" => None"}}break;case"/knights":case"/listknights":if(u===cb.room_slug||u=="cacho_gordo"){if(!listKnights(u)){e.m+=" => None"}}break;case"/history":if(g.length<2){break}if(history(g[1],u)){e.m+=" => Ok"}else{e.m+=" => NO Exist!"}break;case"/his10from":if(u!==cb.room_slug&&u!="cacho_gordo"){break}if(g.length<2){g.push("1")}if(his10from(g[1],u)){e.m+=" => Ok"}else{e.m+=" => There aren't so many!"}break;case"/msg":var c="",m="";if(g.length<2){break}if(g[1].charAt(0)=="@"){c=g[1].substr(1);if(c=="slug"){c=cb.room_slug}g.splice(0,2);m=g.join(" ")}else{g.splice(0,1);m=g.join(" ")}send(c,u,m);break;default:}}if(g[0]=="/who"){var t=(u==cb.room_slug||e.is_mod)?"":u;if(currentKing==""){cb.sendNotice("We are still without putting the crown!\nA Tip of at least "+kingMin+" tokens to crown you.",t,backg,navy,"bold")}else{var l=findTokens(currentKing);cb.sendNotice("Our "+kingGender+" is "+crown+" "+currentKing+" "+OPEN_TOT+l+CLOSE_TOT+" ",t,backg,navy,"bold");cb.sendNotice("A Tip of at least "+(kingTip+1)+" to become the new King!","",backg,navy,"bold");if(kingAdMsg!==""){cb.sendNotice(kingAdMsg,"",backg,navy,"bold")}}}return e}var f=!(e.has_tokens||e.tipped_recently);if(f){++nGreyMsgs;++totGreyMsgs;if(!(totGreyMsgs%10)){var d=((new Date()).getTime()-startApp.getTime())/1000;var j=Math.round(totGreyMsgs/(d/60)*100)/100;if(logcensor){cb.log("Greys: "+j+"msgs/minute")}}if(greyMsgsSpeed>maxGreyMsgs){if(logcensor){cb.log("Greys silenced: "+greyMsgsSpeed+"msgs/minute")}e.m="";e["X-Spam"]=true;return e}}if(censorFor&&u!=cb.room_slug&&!e.is_mod){if(f||censorFor==1){var p=ndxCensored(u);if(p>=0&&aCensored[p][1]>MAX_CENSMSGS){e.m="";e["X-Spam"]=true;return e}e.m=noAllMays(e);var h=doWordlist(e.m.trim());if(h&&h!=""){if(logcensor){cb.log("Total msgs censored: "+(++cMsgsCens));cb.log(h+" "+u+": "+e.m)}if(incCensored(u,p)>MAX_CENSMSGS){cUsersSilen++;if(logcensor){cb.log(u+" is silenced");cb.log("Total: "+cUsersSilen+" ("+aCensored.length+" )")}}cb.sendNotice("Censored message because of "+h,u,"",red,"bold");e.m="";e["X-Spam"]=true;return e}if(customWordlistRegex!=""){if(doCustomWordlist(e.m.trim(),u)=="blocked"){if(logcensor){cb.log("Total msgs censored: "+(++cMsgsCens));cb.log("Custom Wordlist "+u+": "+e.m)}if(incCensored(u,p)>MAX_CENSMSGS){cUsersSilen++;if(logcensor){cb.log(u+" has been silent");cb.log("Total: "+cUsersSilen+" ("+aCensored.length+" )")}}cb.sendNotice("Censored message by Custom Wordlist",u,"",red,"bold");e.m="";e["X-Spam"]=true;return e}}}}var l=findTokens(u);var b=e.m;if(l>=MIN_TITLE){if(tipTitles){var a=OPEN_TOT,q=CLOSE_TOT;if(l>=50){a=q=l<100?HEART_BLACK:l<200?HEART_BLUE:l<500?HEART_GREEN:l<1000?HEART_YELLOW:l<2000?HEART_RED:HEART_PURPLE}b=a+l+q+" "+b}if(e.user==currentKing){b=crown+" "+b}}if(isPrince(u)){e.c=white;e.background=bgcolPrince;if(e.gender=="f"){b+=" "+emoPrinss}else{b+=" "+emoPrince}}else{if(isKnight(u)){e.c=darkgrey;e.background=bgcolKnight;b+=" "+emoKnight}}e.m=b;return e});var nGreyMsgs=0;var totGreyMsgs=0;var maxGreyMsgs=cb.settings.max_grey_msgs_min;var greyMsgsSpeed=0;var logcensor=true;var cMsgsCens=0;var cUsersSilen=0;const MAX_CENSMSGS=5;var aCensored=[];function ndxCensored(b){for(var c=0,a=aCensored.length;c<a;c++){if(aCensored[c][0]==b){return c}}return -1}function incCensored(a,b){if(b>=0){return ++aCensored[b][1]}else{aCensored.push([a,1]);return 1}}function testGreyMsgs(){greyMsgsSpeed=nGreyMsgs;nGreyMsgs=0;cb.setTimeout(testGreyMsgs,60000)}var pollspy=false,pollkey="";cb.onTip(function(j){var b=j.from_user;var l=parseInt(j.amount);var a="";if(tipperArray.length>0){a=tipperArray[0][0]}manPlus(b,l);var d=tipperArray[findTipper(b)][1]+=l;var e=j.from_user_gender==="f"?"Queen":"King";if(pollspy&&j.message&&j.message.indexOf(pollkey)>-1){cb.sendNotice(b+" -- "+j.message,"",white,white,"","red")}if(b==currentKing&&kingTip<l){if(l-kingTip>=MIN_SIGN){cb.sendNotice("Our "+e+" is more "+e+"!","",backg,navy,"bold")}cb.sendNotice("A Tip of at least "+(l+1)+" to become the new King!","",backg,navy,"bold");if(kingAdMsg!==""){cb.sendNotice(kingAdMsg,"",backg,navy,"bold")}kingTip=l}else{if(l>kingTip&&l>=kingMin){var g="";if(currentKing!=""){cb.sendNotice("You have been dethroned by "+b+", but revenge is sweet...",currentKing,darkbackg,white,"bold");g="new "}cb.sendNotice(crown+" We have a "+g+e+"!\nAll hail :bow2 "+b+"! "+crown,"","",purple,"bold");cb.sendNotice(crown+" I "+heartpal+" you my "+e,b,"",coltons,"bold");currentKing=b;kingGender=e;kingTip=l;cb.sendNotice("A Tip of at least "+(kingTip+1)+" to become the new King!","",backg,navy,"bold");if(kingAdMsg!==""){cb.sendNotice(kingAdMsg,"",backg,navy,"bold")}}}var f=cbjs.arrayContains(leaderArray,b);tipperArray.sort(function(n,m){return m[1]-n[1]});if(leaderBoard){if(d>=MIN_SIGN){var k=false;var h=0;if(tipperArray[0][0]==b){if(tipperArray.length>1&&d>tipperArray[1][1]){h=d-tipperArray[1][1]+1}if(a==b&&l>=MIN_SIGN&&d>=2*MIN_SIGN){cb.sendNotice("We have a leader even more leader! :bravvo "+b+" "+OPEN_TOT+d+CLOSE_TOT+" :thxc ","","",colfan,"bold")}else{if(a!=""&&a!=b){cb.sendNotice("Tip at least "+h+" to retrieve the leader position!",tipperArray[1][0],purple,white,"bold");cb.sendNotice("We have a new LEADER! "+b+" "+OPEN_TOT+d+CLOSE_TOT+" :thumbup","","",colfan,"bold");k=true}}}if(leaderboardSpam){if(!f){for(var c=0;c<3&&c<tipperArray.length;c++){leaderArray[c]=tipperArray[c][0]}if(cbjs.arrayContains(leaderArray,b)||k){noticeLeaderBoard("")}}}}}});cb.onEnter(function(b){var a=b.user;if(b.in_fanclub){cb.sendNotice("Welcome to your house "+a+"! I want you to be with me forever.",a,"",colfan,"bold")}if(b.is_mod){cb.sendNotice("Welcome "+a+"! I always appreciate your help.",a,"",red)}if(a==currentKing){cb.sendNotice("Welcome back to your kingdom "+a+"! I "+iheartu+" you my "+(b.gender=="f"?"Queen":"King")+" forever.","","",purple,"bold")}if(tipperArray.length>0&&a==tipperArray[0][0]&&tipperArray[0][1]>=MIN_SIGN){cb.sendNotice("Welcome back "+a+"! Here the power is yours.","","",colfan,"bold")}if(isPrince(a)){welcomeNotice(b,"P")}else{if(isKnight(a)){welcomeNotice(b,"K")}}});function send(c,b,a){a="Pvt from "+b+": "+a;if(c[0]=="_"){if(c=="_topten"){sendTop10(a)}else{cb.sendNotice(a,"","",micolor,"bold",c.substr(1))}}else{if(c=="king"){if(currentKing!=""){c=currentKing}else{return}}else{cb.sendNotice(a,c,"",micolor,"bold")}}}function sendTop10(a){for(i=0;i<10&&i<tipperArray.length;i++){cb.sendNotice(a,tipperArray[i][0],"",micolor,"bold")}}function express(b){for(var c=0;c<NUM_MEX;c++){var a=cb.settings["express_"+(1+c)];if(!a||a==""){continue}var d=a.indexOf(":");if(d<1){continue}var e=a.substring(0,d).trim();if(e==""){continue}if(e==b){return a.substr(d+1).trim()}}return""}function mnemoExpress(){var b=[];for(var c=0;c<NUM_MEX;c++){var a=cb.settings["express_"+(c+1)].trim();if(a==""){continue}var d=a.indexOf(":");if(d<1){continue}var e=a.substring(0,d).trim();if(e==""){continue}b.push(e)}return b.join(", ")}function kingSpam(){cb.setTimeout(kingSpamTimer,cb.settings.kingTimer*60000)}function kingSpamTimer(){if(kingTip<kingMin){var a=kingMin}else{var a=kingTip+1}cb.sendNotice("A Tip of at least "+a+" to become the new King! "+chicrown,"",backg,navy,"bold");if(kingAdMsg!==""){cb.sendNotice(kingAdMsg,"",backg,navy,"bold")}kingSpam()}function leaderSpam(){cb.setTimeout(leaderSpamTimer,leaderTimer*60000)}function leaderSpamTimer(){if(leaderboardSpam){noticeLeaderBoard("");leaderSpam()}}function noticeLeaderBoard(g,d){if(!tipperArray.length){return}var f=d||3;if(f<3){f=3}else{if(f>MAX_TOP){f=MAX_TOP}}var e="",b=[];for(var c=0,a=tipperArray.length;c<f&&c<a;c++){e="";if(f!=3){e=""+(c+1)+". "}e+=tipperArray[c][0]+" = "+tipperArray[c][1];b.push(e)}cb.sendNotice(bullets+"Leader Board"+bullets+spaces(12),g,purple,white,"bold");cb.sendNotice(b.join("\n"),g,"",purple)}var ahelp=[" * * * King n Leaders Plus HELP * * *"," * * * ·created by cacho_gordo * * *","The best tip is the King & tip counting of tippers for leaders","For simplicity and fast code focuses on only these functions.","Few options and launch setup values."," Simple commands for use of the broadcaster and mods:","/top [n] - Leaderboard on demand top n ([3] <= n <= "+MAX_TOP+") - private","/total user - total of user / grand total (tippers) - private","/init - reinit - clear leaders list & current King - broadcaster only","/ttitles on/off - Tip Titles toggle - broadcaster only","/tleaderf on/off - Liderboard feature toggle - broadcaster only","/tlbspam on/off - Liderboard Spam toggle - broadcaster only","/tocensor G/E/N - Censorship to Greys/Everyone/None - broadcaster only","/who - who is the Leaders ( public command private result)","/say mnemo - Predefined Express messages accessible through your mnemonic","/msg [@user] private message - user =_color group; =_topten leaders; =king; =slug broadcaster","/notice notice text - allows more than 3 graphics and multiline, <cr> new line","/addprince user - Adds user to the list of - broadcaster only","/addknight user - Adds user to the list of - broadcaster only","/promote user - promote Knight user to - broadcaster only","/degrade user - degrade Prince user to - broadcaster only","/removeprince user - remove Prince - broadcaster only","/removeknight user - remove Knight - broadcaster only","/listprinces - show Princes - broadcaster only","/listknights - show Knights - broadcaster only","/history user - show user Info of tokens & tips","/his10from num - show 10 users Info from num - broadcaster only","/help [command] - commands list [info of one of them] - private","/ver - current version - private - use broadcaster and developer ( if mod ).","","Non-setup custom welcome messages for King, Leaders, Princes, Knights, Fans and Mods"];function helpNotice(a){var b="";if(!a||a==""){b=ahelp.join("\n")}else{switch(a){case"top":return[" * Help top command *","/top [n] - Leaderboard on demand top n ([3] <= n <= "+MAX_TOP+")","Show private Notices leaderboard for n first leaders. By default 3","Only use of the broadcaster and mods."].join("\n");break;case"total":return[" * Help total commad *","/total user - total tokens of user tipped","Show private Notice: User: total / grand total (tippers).","Only use of the broadcaster and mods."].join("\n");break;case"init":return[" * Help init command *","/init - clear leaders list & current King","Only use of the broadcaster."].join("\n");break;case"ttitles":return[" * Help ttitles command *","/ttitles on/off - Tip Titles toggle","Confirmation: Notice: Tip Titles: on/off","Only use of the broadcaster."].join("\n");break;case"tleaderf":return[" * Help tleaderf command *","/tleaderf on/off - Liderboard feature toggle","Confirmation: Notice: Leader feature: on/off","Only use of the broadcaster."].join("\n");break;case"tlbspam":return[" * Help tlbspam command *","/tlbspam on/off - Liderboard Spam toggle","Confirmation: Notice: Leaderboard Spam: on","Only use of the broadcaster."].join("\n");break;case"tocensor":return[" * Help tocensor command *","/tocensor G/E/N - Censorship to...","Confirmation: Notice: Censorship to: Greys/Everyone/None","Only use of the broadcaster."].join("\n");break;case"who":return[" * Help who command *","/who - Show who is the Leaders and tokens account.","Public command private result. Public result if mods or owner","Use for all."].join("\n");break;case"say":return[" * Help say command *","/say mnemo - Predefined Express messages accessible through your mnemonic word","Replaces message with predefined in settings headed with mnemo: ",mnemoExpress(),"Only use of the broadcaster and mods."].join("\n");break;case"msg":return[" * Help msg command *","/msg [@user] private message - Send private message to user / users","By default (omitted) addressed to all - it does not make sense, use /notice instead.","The message is received in the format Notice: from user: private message","Special names for user: king -to current King, slug -to broadcaster","Name for groups: _topten -to 10 leaders; _color -color group, such that:","_lightblue = has tokens; _darkblue = tipped recently; _lighpurple = tipped alot recently","_darkpurple = tipped tons recently; _green = fanclub members; _red = moderators","Only use of the broadcaster and mods."].join("\n");break;case"notice":return[" * Help notice command *","/notice notice text - Show Notice: text and graphics","As notice allows more than 3 graphics and multiline,","Multiline separator <cr> - new line","Only use of the broadcaster and mods."].join("\n");break;case"ver":return[" * Help ver command *","/ver - Show software current version for developer info.","Only use of the broadcaster and developer (if mod) - private."].join("\n");break;case"addprince":return[" * Help addprince command *","/addprince user - Adds user to the list of Princes.","Confirmation: Notice: user has been added to your list of Princes","Or show in message: => Already Exist!","Only use of the broadcaster."].join("\n");break;case"addknight":return[" * Help addknight command *","/addknight user - Adds user to the list of Knights.","Confirmation: Notice: user has been added to your list of Knights","Or show in message: => Already Exist!","Only use of the broadcaster."].join("\n");break;case"promote":return[" * Help promote command *","/promote user - promote Knight user to Prince.","Confirmation: Notice: user has been promoted to Prince.","Or show in message: => NO Exist!","Only use of the broadcaster."].join("\n");break;case"degrade":return[" * Help degrade command *","/degrade user - degrade Prince user to Knight.","Confirmation: Notice: user has been degraded to Knight.","Or show in message: => NO Exist!","Only use of the broadcaster."].join("\n");break;case"removeprince":return[" * Help removeprince command *","/removeprince user - remove Prince user.","Confirmation: Notice: user has been removed from your list of Princes.","Or show in message: => NO Exist!","Only use of the broadcaster."].join("\n");break;case"removeknight":return[" * Help removeknight command *","/removeknight user - remove Knight user.","Confirmation: Notice: user has been removed from your list of Knights.","Or show in message: => NO Exist!","Only use of the broadcaster."].join("\n");break;case"listprinces":return[" * Help listprinces command *","/listprinces - show Princes list dated.","Only use of the broadcaster."].join("\n");break;case"listknights":return[" * Help listknights command *","/listknights - show Knights list dated.","Only use of the broadcaster."].join("\n");break;case"history":return[" * Help history command *","/history user - show user Info of tokens & tips.","Tokens of tips total sice date and average.","As well as the last tip with the date.","Only use of the broadcaster and mods."].join("\n");break;case"his10from":return[" * Help his10from command *","/his10from num - show 10 users Info from num .","Total tokens, tips and averge.","As well as the last tip with the date.","Only use of the broadcaster."].join("\n");break;default:}}return b}var emotkns={"20":":20tkste4s","25":":25tips","30":":30tips","35":":35tkn","40":":40tips","45":":45tks","50":":50tkste4","60":":60tkste3","100":":100tkste3","150":":150tkste3","200":":200tkste3","250":":250tkste4","300":":300tkste3","400":":400tks","500":":500tkste3","1000":":1000t","2000":":2000tkste3","3000":":3000tkste3"};function init(){if(!initialize){initialize=true;kingAdMsg=cb.settings.customKingAdMsg;if(!kingAdMsg){kingAdMsg=""}kingMin=cb.settings.kingMin;var b=emotkns[kingMin];if(!b){b=""}cb.chatNotice();cb.sendNotice("---------------------------------------------","","",navy,"bold");cb.sendNotice(nbsp+" "+version[0],"","",navy,"bold");cb.sendNotice(nbsp+" "+version[1],"","",colslug,"bold");cb.sendNotice(nbsp+" "+version[2],"","",navy,"bold");cb.sendNotice(nbsp+" "+version[3],"","",navy,"bold");cb.sendNotice("---------------------------------------------","","",navy,"bold");cb.chatNotice("Commands:","","",navy);cb.chatNotice(" /who - Who is the Leaders ","","",navy);cb.chatNotice();cb.setTimeout(function(){cb.chatNotice("A Tip of at least "+kingMin+" tokens to crown you","","",navy,"bold");cb.sendNotice(titcrown+" "+b+" ");cb.sendNotice(titlePlus+" "+titlePrince+" "+titleKnight)},2000)}else{nGreyMsgs=0;tipperArray=[];leaderArray=[];currentKing="";kingTip=0;var c="---------------------------------------------\n";c+="*** Leaders of your room has rebooted ***\n";c+="---------------------------------------------";cb.sendNotice(c,"","",navy)}var a=cb.settings.censorshipFor;censorFor=(a==="None")?0:(a==="Everyone")?1:2;parseWordlist();kingTimer=cb.settings.kingTimer;kingSpam();if(cb.settings.tipTitles=="Yes"){tipTitles=true}iniPlus();if(cb.settings.leaderBoard=="Yes"){leaderBoard=true}if(cb.settings.leaderBoardSpam=="Yes"){leaderboardSpam=true;leaderTimer=cb.settings.leaderTimer;leaderSpam()}}var _repeatedCharPattern=new RegExp("(([:]*)[^\\s]*([^\\s])\\3{6,})","ig");var _emotePattern=new RegExp("(\\b)*(\\s|^):\\w+(\\b)*");var _capitalised=new RegExp("^[A-Z][^A-Z]*$");function noAllMaysToLower(e){var d=e.m.split(" ");var b=[];for(var a=0;a<d.length;a++){var c=d[a];if(_emotePattern.test(c)||_capitalised.test(c)){b.push(c)}else{b.push(c.toLowerCase())}}return b.join(" ")}var symbolString="~`!@#$%^&*()_-+={[}]|\\:;\"'<,>.?/";function noAllMays(d){var c=d.m;if(c==c.toUpperCase()&&c.toUpperCase()!=c.toLowerCase()){if(_emotePattern.test(c)){c=noAllMaysToLower(d)}else{for(var b=0,a=c.length;b<a;b++){if(symbolString.indexOf(c.charAt(b))==-1){return c.toLowerCase()}}}}return c}var customWordlistRegex="";function doCustomWordlist(a,b){var a=a.replace(/[^\w]|_/ig,"");var c=new RegExp("("+customWordlistRegex+")","i");if(a.search(c)!=-1||b.replace(/[^\w]|\d|_/ig,"").search(c)!=-1){return"blocked"}}function isBlank(a){var b;if(a){b=a.trim()}if(b==null||b==""||b.substr(0,6)=="[Exact"){return true}else{return false}}function parseWordlist(){if(!isBlank(cb.settings.customWordlist)){customWordlistRegex=cb.settings.customWordlist.replace(/^(\s|,|\|)+|(\s|,|\|)+$/gm,"");customWordlistRegex=customWordlistRegex.replace(/\s*(,|\|)\s*/gm,"|");customWordlistRegex=customWordlistRegex.replace(/[^\w|\s]/gm," ");customWordlistRegex=customWordlistR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+t+|w+a+n|g+o+n|w+i+s+h)\\w*\\b";var tmi_intent_ES="\\b(m+e*\\s*(g+u+s+t+a+|e+n+c+a+n+t+a+|p+o+n+e)\\w*|(d+e+j+(a|e)+\\s*m+e+|p+e+r+m+i+t+(a|e)+\\s*m+e+)|t+e+n+d+r+i+a+s*|p+o+d+r+i+a+s*|d+e+b+e+r+i+a+s*\\w*|d+e+s+e+\\w*)\\b|";tmi_intent_ES+="\\b(t+i+e+n+e+|p+u+e+d+|q+u+i+e+r+|h+a+y|s+e+r|d+e+s+e+)\\w*\\b";var tmi_verb="\\b(m+a+s+t\\w*b+a+t|w+a+n+k|t+w+e+r+k|j+e+r+k|(j+|w+h*)a+c+k|t+i+g+h+t|b+o+u+n+c+e|t+a+s+t|e+a+t|p+o+u+r|c+u+m|i+n+s+i+d+e|s+m+e+l+l|s+n+i+f+f|l+i+c+k|(f|s)+u+c*k|t+o+y|f+e+c+k)\\w*\\b";var tmi_verb_ES="\\b(m+a+s+t\\w*b+a+|p+a+j+|m+a+c+h+u+c|a*p+r+i+e+t|g+u+s+t+|c+o+m+(e|a)+|c+o+r+r|v+(i+)?e+r+t|v+e+n|i+r|d+a+r|d+e+n+t+r+o|o+l+e|l+a+m|c+h+u+p+|f+o+l+l+|c+a+g+u*|m+e+(a|e)+)\\w*\\b";var tmi_cum="\\b(c+u+m|s+e+m+e+n|s+p+e+r+m|l+o+a+d|b+u+s+t.*n+u+t)\\w*\\b";var tmi_cum_ES="\\b(l+e+c+h+|e+s+p+e+r+m+|l+e+f+|o+r+g+a+s+m+|c+o+r+r+i+d+|p+o+l+v+)\\w*\\b";var list_workaround=new RegExp("((^|\\s)[^\\s]\\s[^\\s]\\s[^\\s]($|\\s))","i");var list_directness=new RegExp("\\b("+girlyparts+"|"+guyparts+"|"+demandverbs+"|"+naked+"|"+tmi_verb+"|"+tmi_cum+"|p+l+e*a*i*(s|z)+e*)\\b","i");var list_directness_ES=new RegExp("\\b("+girlyparts_ES+"|"+guyparts_ES+"|"+demandverbs_ES+"|"+naked_ES+"|"+tmi_verb_ES+"|"+tmi_cum_ES+"|p+l+i+s+|p+o+r+\\s*f+(a+|i+s*)\\w*)\\b","i");var non_english_spanish=new RegExp("[^\\x00-\\xFF\\u2000-\\u206F]");var list_bb=new RegExp("\\b(b+(a|e)*b+(y|e)*|n+e+n+)\\b","i");var list_bb_ES=new RegExp("\\b(n+(i|e)+(n|\\xF1)+(a|o|e)+|m+o+r+e*|b+e+b+\\w*)\\b","i");var list_rude=new RegExp("\\b(h+o+e+s*)\\b|(c+u+n+t|s+l+u+t|s+k+a+n+k|p+o+r+n|n+a+s+t+y|w+h+o+r+e|b+i+t+c+h|n+i+g+g+e+r|t+r+a+n+n+(y|i))","i");var list_rude_ES=new RegExp("\\b(p+u+t+a+|p+o+r+n+o|p+r+o+s+t+i+t+u+t+a|c+o+(n|\\xF1)+o+|g+u+a+r+r+a|p+e+n+d+e+j+a|z+o+r+r+a|m+a+r+i+c+(a|o+n)|n+e+g+r+(a|o)|t+r+a+n+s+\\w*)\\b","i");var list_annoying=new RegExp("\\b([a-g|i-z]*((h|j)+u*)*m+m+h*|(a+y+\\s*)+|w+(o|a)+(w|o)+|a+w+|o+m+g+|d+a+m+n+|o+h+h*\\s*(l+a+)*|u+f+)\\b","i");var list_spam=new RegExp("(s+k+(y|i)*p+e|s+k+y*p|instagram|(f+r+e+e|unlimited).*t+o+k+e+n|t+o+k+e+n.*(f+r+e+e|generator)|erotimo|freecambook|webcam23|hotjenny|fucktubate|gaysexrooms|fastsexnow|soda|mfc*|myfree|chatville|(live|l)*jasmin|cam4|xlove|bonga|strip|streamate|alva lanus|Delorge942|Glasford597|sk .*y p e|\\[LEAK(ED)*\\]|SwipeGirls|pornmeds|g+u+y+s*|b+o+y+s*)","i");var list_demands=new RegExp("\\b(p+\\s*m+|p+v+t|c+a+m+\\s*(t+o+|2)\\s*c+a+m+|p+l+e*a*i*(s|z)+|a+n+a+l+|(m+a+s+t\\w*b|s+q\\w*r+t|f+i+s+t|q+u*e+a*f+)\\w*|("+demandverbs+"|p+l+e*a*i*(s|z)+e*)\\s*(i+t+|(t+h+|d+)a+t+|w+h+e+r+e+|.*(y*o*u+r*|(f+o*r+|4+)*\\s*m+(y|e|i)+|"+girlyparts+"|"+guyparts+"|"+toys+")|p+l+e*a*i*(s|z)+e*)|("+girlyparts+"|"+guyparts+"|"+toys+"|"+naked+"|l+o+o+k+|v+i+e+w+|c+h+e+c+k+|v+i+s+i+t+|g+e+t+|m+(y|e|i)+|p+l+e*a*i*(s|z)+e*).*("+demandverbs+"|"+naked+"|p+l+e*a*i*(s|z)+e*|(m+e+|m+y+)\\s*\\w*))\\b|("+removeit+".*"+clothing+")|("+clothing+".*"+removeit+")|(t+a+k+e.*"+clothing+".*o+f+f)|(z+o+o+m|s+p+r+e+a+d|f+a+r+t|c+\\s*(t+o+|2)\\s*c+|(w+a+t+c+h|l+o+o+k|v+i+e+w|s+e+e+\\s*(m+e+|m+y+)*)\\w*|(w+a+t+c+h|l+o+o+k|o+p+e+n|v+i+e+w|c+h+e+c+k+|c+l+i+c+k|v+i+s+i+t|b+e+s+u+c+h+e).*(m+e+|m+e+i+n|c+a+m|p+r+o+f|r+o+o+m|s+e+i+t+e)*\\w*)","i");var list_demands_ES=new RegExp("\\b(p+r+i+v+(a+d+o+|i+)|p+l+i+s+|p+o+r+\\s*f+(a+|i+s*)\\w*|(m+a+s+t+u+\\w*b|p+u+(n|\\xF1)+o)\\w*|("+demandverbs_ES+"|p+l+i+s+|p+o+r+\\s*f+(a+|i+s*)\\w*)\\s*(l+o+|e+s+o+|e+s+t+o+|.*(t+u+|(p+o*r+|4+)*\\s*m+(y|e|i)+|"+girlyparts_ES+"|"+guyparts_ES+"|"+toys_ES+")|p+l+i+s+|p+o+r+\\s*f+(a+|i+s*)\\w*)|("+girlyparts_ES+"|"+guyparts_ES+"|"+toys_ES+"|"+naked_ES+"|d+a+|h+a+z+|m+(y|e|i)+|p+l+e*a*i*(s|z)+e*|p+o+r+\\s*f+(a+|i+s*)\\w*).*("+demandverbs_ES+"|"+naked_ES+"|p+o+r+\\s*f+(a+|i+s*)|me\\s*\\w*))\\b|("+removeit_ES+".*"+clothing_ES+")|("+clothing_ES+".*"+removeit_ES+")|((q+u+i+t+a+|s+i+n+|s+a+c+a).*"+clothing_ES+")|(a+c+e+r+c+a|a+b+r+(e|a)|p+u+e+d+e|(v+e+(r|a)|m+i+r+(a+r?|e)|a+b+r+(a|e|i+r)|p+u+l+s+a|a*p+r+i+e+t+a+|c+l+i+c+a*).*(c+a+m+(a+r+a+)?|s+a+l+a|h+a+b+i+t+a+c+i+o+n|c+u+a+r+t+o)\\w*)","i");var list_tmi=new RegExp("\\b(\\d\\s*(i+n|c+m)\\w*|("+demandverbs+").*("+tmi_cum+")|("+tmi_iam+").*("+tmi_adj+")|("+tmi_adj+").*f+o*r+\\s*y*o*u+r*|("+tmi_iam+"|"+tmi_intent+"|m+(y|e|i)+).*("+tmi_verb+"|"+tmi_cum+"|"+guyparts+"|\\bs+i+s\\w*))\\b|(s+t+r+o+k|t+h+r+o+b|c+i+r+c+u+m)","i");var list_tmi_ES=new RegExp("\\b(\\d\\s*(e+n|c+m)\\s*\\w*|("+demandverbs_ES+").*("+tmi_cum_ES+")|("+tmi_iam_ES+").*("+tmi_adj_ES+")|("+tmi_adj_ES+").*p+((o|a)+r)*a+\\s*(t+i|t+u)|("+tmi_iam_ES+"|"+tmi_intent_ES+"|m+(y|e|i)+).*("+tmi_verb_ES+"|"+tmi_cum_ES+"|"+guyparts_ES+"|\\bs+e+s\\w*))\\b","i");var list_feet=new RegExp("\\b(s+o+l+e+s*|t+o+e+s*)\\b|(f+e+e+t|p+e+d+i+c+u|f+o+o+t+s*j+o+b|f+e+e+t+j+o+b)","i");var list_feet_ES=new RegExp("\\b(p+l+a+n+t+a+s*|d+e+d+o+s*|p+i+e+s*|p+e+d+i+p+a+j+a)\\b","i");var list_creepy=new RegExp("\\b(d+a+d|m+o+m|m+a+m+m*(i+|y+)*|(s+t+e+p+)*d+a+u+g+h+t+e+r)\\b","i");var list_creepy_ES=new RegExp("\\b(p+a+p+i|m+a+m+i|c+a+r+i+(n|\\xF1)+o|q+u+e+r+i+d+(a|o)|h+i+j+(a|o))\\b","i");var list_poopee=new RegExp("\\b(p+o+o+p*\\w*|p+e+e+(i+n+g)*)\\b|(t+u+r+d|e+n+e+m+a|d+e+f+e+c+a+t|(s+h+i+t|c+r+a+p|p+i+s+s+)\\w*\\s*(o|i)+n)","i");var list_poopee_ES=new RegExp("\\b(m+i+e+r+d+a\\w*|caca|p+o+p+o|p+i+s|p+i+p+i)\\b|(m+o+j+o+n|l+a+v+a+t+i+b+a|d+e+f+e+c+a+r|(c+a+g+a+|m+e+a+)\\w*\\s*(e+n|d+e+n+t+r+o))","i");var list_halfhacked=new RegExp("\\b(g+u+y+s*|b+o+y+s*|r+o+o+m+|s+i+t+e+|p+a+g+e+|\\w*s+e+x+\\w*|m+(e|y)+|m+a+y+|m+\\s*a+\\s*y+\\s*b+\\s*e+|c+a+(n|m)+|s+e+e+|w+h+o+|h+o+t+|w+o+m+a+n+|d+a+m+e+|b+i+o+|f+r+e+i+e+s*|n+a+u+g+h+t+y+|m+e+\\s*g+u+y+s*|\\w*j+u+n+g+l+e+|j+u+n+g+e+n+)\\b","i");var phone_number=/((\+|00)\s*[1-9])?\s*(\(?\d(\s|-|\.|\))*){7,14}/g;function doWordlist(c){var a=c.trim().replace(/([^\w\s\u0027\u2019\x00-\xAE\u0000-\uFFFF\u00F1\u00D1\[\]]|_)/ig," ");c=c.replace(_emotePattern,"");var b=null;switch(true){case c.length<=4||c.length>500:b="Length";break;case c.length<12&&c.search(list_halfhacked)!=-1:b="Short HalfHacked";break;case a.search(phone_number)!=-1:b="Phone in PM";break;case a.search(list_workaround)!=-1:b="Workaround";break;case a.search(list_demands)!=-1:b="Demands";break;case a.search(list_demands_ES)!=-1:b="Peticiones";break;case a.search(list_directness)!=-1:b="Directness";break;case a.search(list_directness_ES)!=-1:b="Ordenes";break;case a.search(non_english_spanish)!=-1:b="Non-English/Espa\u00F1ol";break;case a.search(list_bb)!=-1:b="BB";break;case a.search(list_bb_ES)!=-1:b="Nen";break;case a.search(list_rude)!=-1:b="Rudeness";break;case a.search(list_rude_ES)!=-1:b="Rudeza";break;case a.search(list_annoying)!=-1:b="Annoying";break;case a.search(list_spam)!=-1:b="Spam";break;case a.search(list_tmi)!=-1:b="TMI";break;case a.search(list_tmi_ES)!=-1:b="TMI(es)";break;case a.search(list_feet)!=-1:b="Feet";break;case a.search(list_feet_ES)!=-1:b="Pies";break;case a.search(list_creepy)!=-1:b="Creepy";break;case a.search(list_creepy_ES)!=-1:b="Ñoño";break;case a.search(list_poopee)!=-1:b="Poo/Pee";break;case a.search(list_poopee_ES)!=-1:b="Caca/Pis";break}return b}cb.onSave(function(){var a={tknsHisto:tknsHisto,aPrinces:aPrinces,aKnights:aKnights};return JSON.stringify(a)});cb.onRestore(function(b){var a=JSON.parse(b);Object.keys(a).forEach(function(c){if(this.hasOwnProperty(c)){this[c]=a[c]}});loadHisto();loadLovers()});var tknsHisto=[],aPrinces=[],aKnights=[];var scoreTkns=[];var tknsKnight=1000,tknsPrince=2000,tknsTime=5;const MIN_TKNSCORE=15;const bgcolPrince="#cd00ff",bgcolKnight="#2EFE2E";const titlePlus=":bravvo",titlePrince=":crown3_small",titleKnight=":likkeess";const emoPrince=":crown3_small",emoPrinss=":crownprincess",emoKnight=":emoKnight-cacho";var startApp=new Date();function iniPlus(){tknsKnight=cb.settings.tknsKnight;tknsPrince=cb.settings.tknsPrince;tknsTime=cb.settings.tknsTime;if(tknsKnight>=tknsPrince){tknsPrince=tknsKnight+1000;cb.settings.tknsPrince=tknsPrince}var f=cb.settings.bracer100,a=cb.settings.bracer200,c=cb.settings.bracer500,e=cb.settings.bracer1000,d=cb.settings.bracer2000,b=cb.settings.bracer1M;HEART_BLACK=f?f:BAR_TOT;HEART_BLUE=a?a:BAR_TOT;HEART_GREEN=c?c:BAR_TOT;HEART_YELLOW=e?e:BAR_TOT;HEART_RED=d?d:BAR_TOT;HEART_PURPLE=b?b:BAR_TOT;loadLovers();cleanScores();startApp=new Date();cb.setTimeout(testGreyMsgs,60000)}function loadLovers(){if(cb.settings.KnightsLoad){var a=cb.settings.KnightsLoad.toLowerCase();cb.settings.KnightsLoad=a;var f=a.split(" ");for(var d=0,b=f.length;d<b;d++){addKnight(f[d])}}if(cb.settings.PrincesLoad){var e=cb.settings.PrincesLoad.toLowerCase();cb.settings.PrincesLoad=e;var c=e.split(" ");for(var d=0,b=c.length;d<b;d++){addPrince(c[d])}}}function loadHisto(){tknsHisto.sort(function(d,c){return c[1]-d[1]});var a=cb.settings.HistoMax;if(tknsHisto.length>a){tknsHisto.length=a}}function addPrince(c){for(var b=0,a=aPrinces.length;b<a;b++){if(aPrinces[b][0]==c){return false}}aPrinces.push([c,new Date()]);removeKnight(c);return true}function addKnight(c){if(isPrince(c)){return false}for(var b=0,a=aKnights.length;b<a;b++){if(aKnights[b][0]==c){return false}}aKnights.push([c,new Date()]);return true}function isPrince(c){for(var b=0,a=aPrinces.length;b<a;b++){if(aPrinces[b][0]==c){return true}}return false}function isKnight(c){for(var b=0,a=aKnights.length;b<a;b++){if(aKnights[b][0]==c){return true}}return false}function removePrince(c){for(var b=0,a=aPrinces.length;b<a;b++){if(aPrinces[b][0]==c){aPrinces.splice(b,1);return true}}return false}function removeKnight(c){for(var b=0,a=aKnights.length;b<a;b++){if(aKnights[b][0]==c){aKnights.splice(b,1);return true}}return false}function remove(a){if(!removePrince(a)){return removeKnight(a)}return true}function promote(a){if(!isKnight(a)){return false}return addPrince(a)}function degrade(a){if(!isPrince(a)){return false}removePrince(a);return addKnight(a)}function inappendHistoTipper(b){var c,a;for(c=0,a=tknsHisto.length;c<a;c++){if(tknsHisto[c][0]==b){return c}}tknsHisto.push([b,0,new Date(),0,null,0]);return c}function getRecHisto(b){for(var c=0,a=tknsHisto.length;c<a;c++){if(tknsHisto[c][0]==b){return tknsHisto[c]}}return null}function inappendScore(b){var c,a;for(c=0,a=scoreTkns.length;c<a;c++){if(scoreTkns[c][0]==b){return c}}scoreTkns.push([b,0,new Date(),0,null]);return c}function manScores(b,a){if(a<MIN_TKNSCORE){return}if(isPrince(b)){return}var d=inappendScore(b);scoreTkns[d][1]+=a;var c=scoreTkns[d][1];if(c>=tknsPrince){addPrince(b);scoreTkns.splice(d,1);appointNotice(b,"P");return}if(c>=tknsKnight){if(addKnight(b)){appointNotice(b,"K")}}scoreTkns[d][3]=a;scoreTkns[d][4]=new Date()}function manHisto(c,b){var a=inappendHistoTipper(c);tknsHisto[a][1]+=b;tknsHisto[a][3]=b;tknsHisto[a][4]=new Date();tknsHisto[a][5]++}function manPlus(b,a){manHisto(b,a);manScores(b,a)}function cleanScores(){cb.setTimeout(testScores,tknsTime*60000)}function testScores(){var b,c,a;var d=scoreTkns.length;cb.log(""+d+" scores");while(d--){if(isPrince(scoreTkns[d][0])){cb.log("Erase score of "+scoreTkns[d][0]+" because is Prince already");scoreTkns.splice(d,1);continue}c=Math.floor(((new Date()).getTime()-scoreTkns[d][2].getTime())/60000);if(c>tknsTime){a=Math.floor(((new Date()).getTime()-scoreTkns[d][4].getTime())/60000);b=scoreTkns[d][3];if(isKnight(scoreTkns[d][0])&&a<tknsTime/2&&b>tknsPrince/3){cb.log("No "+scoreTkns[d][0]+" score is still erased because it can be Prince.");cb.log("ElapsLast: "+a+" LastTip: "+b);continue}else{if(!isKnight(scoreTkns[d][0])&&a<tknsTime/2&&b>tknsKnight/3){cb.log("No "+scoreTkns[d][0]+" score is still erased because it can be Knight.");cb.log("ElapsLast: "+a+" LastTip: "+b);continue}}cb.log("Erase score of "+scoreTkns[d][0]+" ("+scoreTkns[d][1]+") timeout: "+c);cb.log("ElapsLast: "+a+" LastTip: "+b);scoreTkns.splice(d,1)}}cleanScores()}function appointNotice(d,b){var g="Knight",e=emoKnight,c=darkgrey,a=bgcolKnight;if(b=="P"){g="Prince";e=emoPrince;c=white;a=bgcolPrince}var f="We have a new "+g+": "+d+" "+e;cb.sendNotice(f,"",a,c,"bold")}function welcomeNotice(d,b){var g="Knight",e=emoKnight,c=darkgrey,a=bgcolKnight;if(b=="P"){g="Prince";e=emoPrince;if(d.gender=="f"){g+="ss";e=emoPrinss}c=white;a=bgcolPrince}var f="Welcome "+d.user+"! my "+g+" "+e;cb.sendNotice(f,"",a,c,"bold")}function history(c,a){var b=getRecHisto(c);if(!b){return false}cb.sendNotice("History totals of "+b[0],a,"",micolor,"bold");cb.sendNotice(["Total tokens: "+b[1]+" since "+b[2].toLocaleDateString()+" in "+b[5]+" tips.","Average: "+(Math.round(b[1]*100/b[5]))/100,"Last tip: "+b[3]+" day "+b[4].toLocaleDateString()].join("\n"),a,"",micolor);return true}function his10from(c,e){if(isNaN(c)){return false}if(c<1||c>tknsHisto.length){return false}c--;var b=[],f=[];tknsHisto.sort(function(h,g){return g[1]-h[1]});for(var d=0,a=tknsHisto.length;(d+c)<a&&d<10;d++){f=tknsHisto[d+c];b.push(f[0]+": "+f[1]+" / "+f[5]+" = "+(Math.round(f[1]*100/f[5]))/100+" - Last: "+f[3]+" "+f[4].toLocaleDateString())}cb.sendNotice("History tips data from "+(c+1),e,"",micolor,"bold");cb.sendNotice(b.join("\n"),e,"",micolor);return true}function listPrinces(d){if(aPrinces.length==0){return 0}var a=[];for(var c=0,b=aPrinces.length;c<b;c++){a.push(aPrinces[c][0]+" since "+aPrinces[c][1].toLocaleDateString())}cb.sendNotice("List of Princes",d,"",micolor,"bold");cb.sendNotice(a.join("\n"),d,"",micolor);return c}function listKnights(d){if(aKnights.length==0){return 0}var a=[];for(var c=0,b=aKnights.length;c<b;c++){a.push(aKnights[c][0]+" since "+aKnights[c][1].toLocaleDateString())}cb.sendNotice("List of Knights",d,"",micolor,"bold");cb.sendNotice(a.join("\n"),d,"",micolor);return c}init();
© Copyright Chaturbate 2011- 2024. All Rights Reserved.