MissLayla_ Notifier
Author: layladolce
Description Source Code Launch Bot Current Users

Short Description:

MissLayla_ Notifier

Full Description

/*Title: MissLayla_ Notifier
Author: MissLayla_ -- cachotest multiline & fixed some
Version: 1.1 (19/08/2017)
Description: Rotatin g Notifier combined with Tip Menu Plus
- with pajama bot (cacho_gordo) color printer continuos paper option
- and thx for tip levels
- and autoresponses for msg questions

* Now with /admenu command for demand broadcaster or mods
*/

"use strict";const HEART="\u2665",BDIAMOND="\u2666",BSTAR="\u2605";const colnotice="#B22222",colslug="#F04500",bgctip2="#FFD000",bgctip1="#FFF000",bgcpajama="#EEEEEE",fluorlima="#CCFF00";const MAXITEMS=16,MAXMSGS=11,MAXSEP=9;var index=0;var pricedrgn=0;var iCntMsgs=0,selColor="",codColor="",pntPajama=false,rndColors=false,thxtip=false,aThx=[];var aRndCols=["#9bfb9b","#e4efe4","#e4edef","#03c9f6","#d699ee","#f0a0c8","#ff4670","#e3ff41","#b6d409","#cfcfcf","#6dece7","#d3fdce","#cef9f9","#ebf9ce","#8ce797","#e190bc","#13f2d4","#88ce80","#db9dc1","#a086f2","#ed26ff","#f2a4ca","#6ed2e9","#e0e9ea","#c6cef5"];var tip_amt=0,separator_char="| ",tipmsg,msg,tipmenuprice=[],tipmenuitem=[];var separators={Hearts:":heart2",Glitter:":pixelglitter",Flowers:":tinyflower2",Bow:":bluebow",Hearts2:":pixelheart",Smiley:":smile","Text Heart":HEART,"Text Diamond":BDIAMOND,"Text Star":BSTAR};cb.settings_choices=[{name:"msgonentry",type:"choice",choice1:"Yes",choice2:"No",defaultValue:"Yes",label:"Display Message 1 privately on entry? - set to No for busy rooms"},{name:"msg1",type:"str",label:"Notifier --- (\\n for multiline) Message 1",defaultValue:"Remember to :follow me on here"},{name:"msg2",type:"str",label:"Message 2",defaultValue:":newtipperswelcome \\n :tipnotegif"},{name:"msg3",type:"str",required:false,label:"Message 3",defaultValue:"Cum show in pvt and much more \\n :mmh"},{name:"msg4",type:"str",required:false,label:"Message 4",defaultValue:":keepitgoing \\n :tipsshow"},{name:"msg5",type:"str",required:false,label:"Message 5",defaultValue:":letshavefun \\n :comeonguysss"},{name:"msg6",type:"str",required:false,label:"Message 6",defaultValue:":torture \\n :rapidfiretips"},{name:"msg7",type:"str",required:false,label:"Message 7",defaultValue:":followtips \\n :tipifyou"},{name:"msg8",type:"str",required:false,label:"Message 8",defaultValue:"No forget :followclick"},{name:"msg9",type:"str",required:false,label:"Message 9",defaultValue:":motivation \\n :TIPFOR"},{name:"msg10",type:"str",required:false,label:"Message 10",defaultValue:"PRIVATE SHOW :skypelogo SKYPE"},{name:"msg11",type:"str",required:false,label:"Message 11",defaultValue:":makemeveryhot-k8 \\n You know how to do it."},{name:"msgcolor",type:"str",label:"Notices color (html code default dark red #9F000F)",defaultValue:"#9F000F"},{name:"sepchar",type:"choice",defaultValue:"Flowers",label:"Tip Menu message --- Separator between offers"},{name:"item1",type:"str",label:"Item 1 (eg 40--Flash tits)",defaultValue:"11--PM"},{name:"item2",type:"str",required:false,label:"Item 2",defaultValue:"51--Flash tits"},{name:"item3",type:"str",required:false,label:"Item 3",defaultValue:"53--Twerk"},{name:"item4",type:"str",required:false,label:"Item 4",defaultValue:"56--Spit tits"},{name:"item5",type:"str",required:false,label:"Item 5",defaultValue:"61--Flash ass"},{name:"item6",type:"str",required:false,label:"Item 6",defaultValue:"63--Suck toy"},{name:"item7",type:"str",required:false,label:"Item 7",defaultValue:"66--Flash pussy"},{name:"item8",type:"str",required:false,label:"Item 8",defaultValue:"71--Spread ass"},{name:"item9",type:"str",required:false,label:"Item 9",defaultValue:"91--Big Fingering pussy"},{name:"item10",type:"str",required:false,label:"Item 10",defaultValue:"101--Dildo pussy play"},{name:"item11",type:"str",required:false,label:"Item 11",defaultValue:"202--Squirt right away"},{name:"item12",type:"str",required:false,label:"Item 12"},{name:"item13",type:"str",required:false,label:"Item 13"},{name:"item14",type:"str",required:false,label:"Item 14"},{name:"item15",type:"str",required:false,label:"Item 15"},{name:"item16",type:"str",required:false,label:"Item 16"},{name:"menucolor",type:"str",label:"Menu items color(default medium red #DC5500)",defaultValue:"#DC5500"},{name:"chat_ad",type:"int",minValue:1,maxValue:5,defaultValue:2,label:"Delay in minutes between notices being displayed"},{name:"thxtip",label:"Auto thank you when a user tips?",type:"choice",choice1:"Yes",choice2:"No",defaultValue:"No"},{name:"tipMsg1",label:"Tips 10-99",type:"str",minLength:4,maxLength:1000,defaultValue:"I love you {username}, thank you! :thanks3 "},{name:"tipMsg2",label:"Tips 100-199",type:"str",minLength:4,maxLength:1000,defaultValue:"I love it, {username}. Thank you!! If you start me up I'll never stop :THX "},{name:"tipMsg3",label:"Tips 200-499",type:"str",minLength:4,maxLength:1000,defaultValue:"**{username}**, you know how to make me happy. Thank you!! :thx-gracias3 "},{name:"tipMsg4",label:"Tips 500-999",type:"str",minLength:4,maxLength:1000,defaultValue:"Thank you so much {username} for giving me this pleasure!!! This is true love :thx11"},{name:"tipMsg5",label:"Tips 1000-more",type:"str",minLength:4,maxLength:1000,defaultValue:"OMG!!!! I love it. You turn me on!! THANK YOU SO MUCH!!!! I :heart3 you {username} :thanks-3 "},{name:"ar_bra",label:"Auto respond --- Response when asked about bra size",type:"str",required:false,defaultValue:"Read my bio, {username}."},{name:"ar_pms",label:"Response when asked for PMs",type:"str",required:false,defaultValue:"See Tip Menu, {username}."},{name:"lst_wordsnotice",label:"Custom Words:Response List: (w1,w2,..wn:Resp1;w11,w12,..w1n:Resp2;...)",type:"str",required:false},{name:"msgscol",type:"choice",choice1:"Pajama",choice2:"Random",choice3:"None",defaultValue:"None",label:"Background odd msgs pajama or all random?"}];var ind=cb.settings_choices.findIndex(function(a){return a.name=="sepchar"});cb.settings_choices[ind]["choice1"]="Vertical Bar";var ics=1;for(var sep in separators){cb.settings_choices[ind]["choice"+(++ics)]=sep}var obj={name:"colorpj",type:"choice",label:"Color for odd messages"};var color={Aquamarine:"#7FFFD4",Bisque:"#FFE4C4",Gainsboro:"#DCDCDC",Gold:"#FFD700",GreenYellow:"#ADFF2F",Khaki:"#F0E68C",LightCyan:"#E0FFFF",LightGray:"#D3D3D3",LightPink:"#FFB6C1",LightSalmon:"#FFA07A",LightSkyBlue:"#87CEFA",LightSteelBlue:"#B0C4DE",MistyRose:"#FFE4E1",Moccasin:"#FFE4B5",PaleGoldenRod:"#EEE8AA",PaleGreen:"#98FB98",PaleTurquoise:"#AFEEEE",PeachPuff:"#FFDAB9",Pink:"#FFC0CB",Plum:"#DDA0DD",PowderBlue:"#B0E0E6",Salmon:"#FA8072",SandyBrown:"#F4A460",Silver:"#C0C0C0",SkyBlue:"#87CEEB",Tan:"#D2B48C",Thistle:"#D8BFD8",Turquoise:"#40E0D0",Violet:"#EE82EE",Wheat:"#F5DEB3"};var lenColor=Object.keys(color).length;obj.defaultValue=color.PaleGoldenRod;for(var col in color){obj["choice"+(++iCntMsgs)]=col}iCntMsgs=0;cb.settings_choices.push(obj);cb.onEnter(function(a){if(cb.settings.msgonentry!="Yes"||a.user==cb.room_slug||a.is_mod||!a.has_tokens){return}cb.sendNotice("Welcome "+a.user+"! \n"+cb.settings.msg1,a.user,"",cb.settings.msgcolor,"bold")});cb.onTip(function(d){var a=parseInt(d.amount);if(thxtip){var c=[1000,500,200,100,10].findIndex(function(f){return a>=f});if(c>-1){var e=Math.floor(Math.random()*2)?bgctip1:bgctip2;if(c<4){var e=color[Object.keys(color)[Math.floor(Math.random()*lenColor)]]}cb.sendNotice(aThx[4-c].replace("{username}",d.from_user),"",e,colnotice,"bold")}}for(var b=1;b<=MAXITEMS;b++){if(tipmenuitem[b]&&a;==tipmenuprice[b]){cb.sendNotice(d.from_user+" tipped for "+tipmenuitem[b],"",fluorlima,cb.settings.msgcolor,"bolder");if(a==pricedrgn){cb.sendNotice(user+" tipped same price Dices game, should not give the prize or offer.",cb.room_slug,"#F04500","#FFFF00",bold)}break}}});cb.onMessage(function(e){if(e.m[0]=="/"){e["X-Spam"]=true;if(e.user==cb.room_slug||e.is_mod){if(e.m.indexOf("/handshake")==0){var c=e.m.trim().split(/\s+/g);var d="Rotating Notifier n Tip Menu";var a="None";if(c.length>1){c.splice(0,1);a=c.join(" ");if(a===d){return e}if(a.substr(0,19)=="Dice Roll Game nice"){pricedrgn=parseInt(a.substr(19),10);var b=" >>price "+pricedrgn;cb.log(d+" ACK handshake from "+a.substr(0,19)+b);e.m=">> Dice game"+b;return e}}e.m="/handshake "+d;cb.log(d+" ACK handshake from "+a)}else{if(e.m=="/admenu"){cb.sendNotice(tipmsg,"","",cb.settings.menucolor,"bold")}}return e}}if(pntPajama){e.background=(++iCntMsgs)&1?codColor:bgcpajama}else{if(rndColors){e.background=aRndCols[Math.floor(Math.random()*25)]}}if(e.has_tokens&&e.user;!==cb.room_slug&&!e.is_mod){cb.setTimeout(function(){showReactions(e)},121)}return e});function chatAd(){while(index>0&&!cb.settings["msg"+index]){index++;index%=MAXMSGS+1}if(index==0){msg=tipmsg;cb.sendNotice(msg,"","",cb.settings.menucolor,"bold")}else{msg=cb.settings["msg"+index].replace(/\\n/g,"\n");cb.sendNotice(msg,"","",cb.settings.msgcolor,"bold")}++index;index%=MAXMSGS+1;cb.setTimeout(chatAd,(cb.settings.chat_ad*60000))}function init(){selColor=cb.settings.colorpj;codColor=color[selColor];if(cb.settings.msgscol==="Pajama"){pntPajama=true}else{if(cb.settings.msgscol==="Random"){rndColors=true}}if(cb.settings.thxtip==="Yes"){thxtip=true;for(var c=1;c<6;c++){aThx.push(cb.settings["tipMsg"+c])}}separator_char=separators[cb.settings.sepchar];if(!separator_char){separator_char="|"}separator_char+=" ";cb.sendNotice("Rotating Notifier and Tip Menu","","",cb.settings.menucolor,"bold");cb.sendNotice("cacho_gordo v1.3 -- badbadbubba","","",cb.settings.msgcolor);if(pntPajama){cb.sendNotice("Color odd msgs, sel: "+selColor,"","",cb.settings.menucolor)}else{if(rndColors){cb.sendNotice("Select random background colors.","","",cb.settings.menucolor)}}if(thxtip){cb.sendNotice("Enabled autothanks messages.","","",cb.settings.msgcolor)}tipmsg="Tip Menu: ";var d=[];for(var c=1;c<=MAXITEMS;c++){var b;b=cb.settings["item"+c];if(b){var a=b.split("--");if(a.length<2||a[1]===undefined){cb.sendNotice("Error: You need two dashes to separate the tip amount and menu item for item no "+c,"","",cb.settings.menucolor,"bold")}else{var e=parseInt(a[0]);if(!isNaN(e)&&e;>0){tipmenuprice[c]=e;tipmenuitem[c]=a[1];d.push(a[1]+"("+e+") ")}}}}tipmsg+=d.join(separator_char);if(tipmsg!="Tip Menu: "){cb.setTimeout(function(){cb.sendNotice(tipmsg,"","",cb.settings.menucolor,"bold")},5000)}else{cb.sendNotice("Error: No menu items found","","",cb.settings.menucolor,"bold")}cb.setTimeout(chatAd,(cb.settings.chat_ad*60000));parseReactive()}var userExp=/\{username\}/ig;function showReactions(f){var e=f.m.toLowerCase();var a=cb.settings.ar_bra;if(a&&a.trim;()!==""&&(/\b((how\s+big|size)\s+)?(\w+\s+)?((wh?at|boob|tities|bra|tit|titty|cup|breast|(yo)?ur)s?\s+)(use|size)\b/.test(e)||/\b((que|cual|talla)\s+)?(\w+\s+)?((bra|bra(c|z|s)ier|copa|teta|pecho|busto|tu)s?\s+)(usas*|talla)\b/.test(e))){cb.sendNotice(a.replace(userExp,f.user),"","",colslug,"bold");return}a=cb.settings.ar_pms;if(a&&a.trim;()!==""&&/\b(pm|pms)\b/.test(e)){cb.sendNotice(a.replace(userExp,f.user),"","",colslug,"bold");return}for(var d in reactives){if(RegExp("\\b"+d+"\\b").test(e)){cb.sendNotice(reactives[d].replace(userExp,f.user),"","",colslug,"bold");return}}var c="";for(var b=1;b<=MAXITEMS;b++){c=tipmenuitem[b];if(c){c=c.toLowerCase();if(e.indexOf(c)>=0||c.indexOf(e)>=0){cb.sendNotice(f.user+", "+separator_char+tipmenuitem[b]+"("+tipmenuprice[b]+") "+separator_char,"","",colslug,"bold");return}}}}var reactives={};function parseReactive(){var g=cb.settings.lst_wordsnotice;if(!g||!g.trim()){return}var a=g.splite(";"),c="",d="",h=[];for(var e=0,f;e<3){continue}f=a[e].indexOf(":");if(f<1){continue}c=a[e].substring(0,f).trim();d=a[e].substring(f+1).trim();if(c==""||d==""){continue}h=c.trim().split(",");for(var b=0;b

comments powered by Disqus

© Copyright Chaturbate 2011- 2019. All Rights Reserved.